mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 00:37:33 +00:00
Merge branch 'main' of github.com:apache/skywalking-booster-ui into feat/metric-trace
This commit is contained in:
commit
2fc55e3d97
@ -21,6 +21,7 @@ export enum MetricQueryTypes {
|
|||||||
ReadLabeledMetricsValues = "readLabeledMetricsValues",
|
ReadLabeledMetricsValues = "readLabeledMetricsValues",
|
||||||
READHEATMAP = "readHeatMap",
|
READHEATMAP = "readHeatMap",
|
||||||
ReadSampledRecords = "readSampledRecords",
|
ReadSampledRecords = "readSampledRecords",
|
||||||
|
ReadRecords = "readRecords",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum Calculations {
|
export enum Calculations {
|
||||||
@ -101,4 +102,10 @@ export const RespFields: any = {
|
|||||||
value
|
value
|
||||||
refId
|
refId
|
||||||
}`,
|
}`,
|
||||||
|
readRecords: `{
|
||||||
|
id
|
||||||
|
name
|
||||||
|
value
|
||||||
|
refId
|
||||||
|
}`,
|
||||||
};
|
};
|
||||||
|
@ -73,6 +73,22 @@ export function useQueryProcessor(config: any) {
|
|||||||
topN: c.topN || 10,
|
topN: c.topN || 10,
|
||||||
order: c.sortOrder || "DES",
|
order: c.sortOrder || "DES",
|
||||||
};
|
};
|
||||||
|
} else if ([MetricQueryTypes.ReadRecords].includes(metricType)) {
|
||||||
|
variables.push(`$condition${index}: RecordCondition!`);
|
||||||
|
conditions[`condition${index}`] = {
|
||||||
|
name,
|
||||||
|
parentEntity: {
|
||||||
|
scope: config.catalog,
|
||||||
|
normal: selectorStore.currentService
|
||||||
|
? selectorStore.currentService.normal
|
||||||
|
: true,
|
||||||
|
serviceName: ["All"].includes(dashboardStore.entity)
|
||||||
|
? null
|
||||||
|
: selectorStore.currentService.value,
|
||||||
|
},
|
||||||
|
topN: c.topN || 10,
|
||||||
|
order: c.sortOrder || "DES",
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
|
if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
|
||||||
const labels = (c.labelsIndex || "")
|
const labels = (c.labelsIndex || "")
|
||||||
@ -435,6 +451,7 @@ export async function useGetMetricEntity(metric: string, metricType: any) {
|
|||||||
[
|
[
|
||||||
MetricQueryTypes.ReadSampledRecords,
|
MetricQueryTypes.ReadSampledRecords,
|
||||||
MetricQueryTypes.SortMetrics,
|
MetricQueryTypes.SortMetrics,
|
||||||
|
MetricQueryTypes.ReadRecords,
|
||||||
].includes(metricType)
|
].includes(metricType)
|
||||||
) {
|
) {
|
||||||
const res = await dashboardStore.fetchMetricList(metric);
|
const res = await dashboardStore.fetchMetricList(metric);
|
||||||
|
@ -108,6 +108,7 @@ const msg = {
|
|||||||
showXAxis: "Show X Axis",
|
showXAxis: "Show X Axis",
|
||||||
showYAxis: "Show Y Axis",
|
showYAxis: "Show Y Axis",
|
||||||
nameError: "The dashboard name cannot be duplicate",
|
nameError: "The dashboard name cannot be duplicate",
|
||||||
|
nameEmptyError: "The dashboard name cannot be empty",
|
||||||
showGroup: "Show Group",
|
showGroup: "Show Group",
|
||||||
noRoot: "Please set a root dashboard for",
|
noRoot: "Please set a root dashboard for",
|
||||||
noWidget: "Please add widgets.",
|
noWidget: "Please add widgets.",
|
||||||
|
@ -110,6 +110,7 @@ const msg = {
|
|||||||
showXAxis: "Mostrar Eje X",
|
showXAxis: "Mostrar Eje X",
|
||||||
showYAxis: "Mostrar Eje Y",
|
showYAxis: "Mostrar Eje Y",
|
||||||
nameError: "El nombre del panel no puede ser duplicado",
|
nameError: "El nombre del panel no puede ser duplicado",
|
||||||
|
nameEmptyError: "El nombre del panel no puede estar vacío",
|
||||||
showGroup: "Mostrar Grupo",
|
showGroup: "Mostrar Grupo",
|
||||||
noRoot: "Por favor ponga la raíz del panel",
|
noRoot: "Por favor ponga la raíz del panel",
|
||||||
noWidget: "Por favor añada widgets.",
|
noWidget: "Por favor añada widgets.",
|
||||||
|
@ -106,6 +106,7 @@ const msg = {
|
|||||||
showXAxis: "显示X轴",
|
showXAxis: "显示X轴",
|
||||||
showYAxis: "显示Y轴",
|
showYAxis: "显示Y轴",
|
||||||
nameError: "仪表板名称不能重复",
|
nameError: "仪表板名称不能重复",
|
||||||
|
nameEmptyError: "仪表板名称不能为空",
|
||||||
noRoot: "请设置根仪表板,为",
|
noRoot: "请设置根仪表板,为",
|
||||||
showGroup: "显示分组",
|
showGroup: "显示分组",
|
||||||
noWidget: "请添加组件",
|
noWidget: "请添加组件",
|
||||||
|
@ -81,6 +81,10 @@ const onCreate = () => {
|
|||||||
states.entity === d.entity &&
|
states.entity === d.entity &&
|
||||||
states.selectedLayer === d.layer
|
states.selectedLayer === d.layer
|
||||||
);
|
);
|
||||||
|
if (!states.name) {
|
||||||
|
ElMessage.error(t("nameEmptyError"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
ElMessage.error(t("nameError"));
|
ElMessage.error(t("nameError"));
|
||||||
return;
|
return;
|
||||||
|
@ -45,6 +45,7 @@ export const MetricChartType: any = {
|
|||||||
readLabeledMetricsValues: [{ label: "Line", value: "Line" }],
|
readLabeledMetricsValues: [{ label: "Line", value: "Line" }],
|
||||||
readHeatMap: [{ label: "Heat Map", value: "HeatMap" }],
|
readHeatMap: [{ label: "Heat Map", value: "HeatMap" }],
|
||||||
readSampledRecords: [{ label: "Top List", value: "TopList" }],
|
readSampledRecords: [{ label: "Top List", value: "TopList" }],
|
||||||
|
readRecords: [{ label: "Top List", value: "TopList" }],
|
||||||
};
|
};
|
||||||
export const DefaultGraphConfig: { [key: string]: any } = {
|
export const DefaultGraphConfig: { [key: string]: any } = {
|
||||||
Bar: {
|
Bar: {
|
||||||
@ -134,6 +135,7 @@ export const MetricTypes: {
|
|||||||
{ label: "read heatmap values in the duration", value: "readHeatMap" },
|
{ label: "read heatmap values in the duration", value: "readHeatMap" },
|
||||||
],
|
],
|
||||||
SAMPLED_RECORD: [
|
SAMPLED_RECORD: [
|
||||||
|
{ label: "get sorted topN values", value: "readRecords" },
|
||||||
{ label: "get sorted topN values", value: "readSampledRecords" },
|
{ label: "get sorted topN values", value: "readSampledRecords" },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user