add label

This commit is contained in:
Fine 2022-11-09 22:31:56 +08:00
parent f393440a5d
commit 09646c0d69
5 changed files with 6 additions and 3 deletions

View File

@ -184,7 +184,7 @@ export function useSourceProcessor(
const c = (config.metricConfig && config.metricConfig[index]) || {}; const c = (config.metricConfig && config.metricConfig[index]) || {};
if (type === MetricQueryTypes.ReadMetricsValues) { if (type === MetricQueryTypes.ReadMetricsValues) {
source[m] = source[c.label || m] =
(resp.data[keys[index]] && (resp.data[keys[index]] &&
calculateExp(resp.data[keys[index]].values.values, c)) || calculateExp(resp.data[keys[index]].values.values, c)) ||
[]; [];

View File

@ -266,7 +266,7 @@ const msg = {
entityType: "Entity Type", entityType: "Entity Type",
maxItemNum: "Max number of Item", maxItemNum: "Max number of Item",
unknownMetrics: "Unknown Metrics", unknownMetrics: "Unknown Metrics",
labels: "Labels", labels: "Label",
aggregation: "Calculation", aggregation: "Calculation",
unit: "Unit", unit: "Unit",
labelsIndex: "Label Subscript", labelsIndex: "Label Subscript",
@ -327,6 +327,7 @@ const msg = {
eventsParameters: "Event Parameters", eventsParameters: "Event Parameters",
eventDetail: "Event Detail", eventDetail: "Event Detail",
value: "Value", value: "Value",
key: "Key",
show: "Show", show: "Show",
hide: "Hide", hide: "Hide",
statistics: "Statistics", statistics: "Statistics",

View File

@ -327,6 +327,7 @@ const msg = {
eventsParameters: "Parámetro del Evento", eventsParameters: "Parámetro del Evento",
eventDetail: "Detalle del Evento", eventDetail: "Detalle del Evento",
value: "Valor", value: "Valor",
key: "Clave",
show: "Mostrar", show: "Mostrar",
hide: "Oculatr", hide: "Oculatr",
statistics: "Estadísticas", statistics: "Estadísticas",

View File

@ -325,6 +325,7 @@ const msg = {
eventsParameters: "事件参数", eventsParameters: "事件参数",
eventDetail: "事件详情", eventDetail: "事件详情",
value: "数值", value: "数值",
key: "Key",
tableHeader: "表头名称", tableHeader: "表头名称",
tableValues: "表值", tableValues: "表值",
show: "展示", show: "展示",

View File

@ -122,7 +122,7 @@ const hasLabel = computed(() => {
const graph = dashboardStore.selectedGrid.graph || {}; const graph = dashboardStore.selectedGrid.graph || {};
return ( return (
ListChartTypes.includes(graph.type) || ListChartTypes.includes(graph.type) ||
metricType.value === "readLabeledMetricsValues" ["readLabeledMetricsValues", "readMetricsValues"].includes(metricType.value)
); );
}); });
const isTopn = computed(() => const isTopn = computed(() =>