mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-03 04:43:59 +00:00
address pr
This commit is contained in:
parent
7bb0728751
commit
73a32951bc
@ -114,7 +114,7 @@ export async function useDashboardQueryProcessor(configList: Indexable[]) {
|
||||
const typesOfMQE: string[] = [];
|
||||
|
||||
for (let i = 0; i < config.metrics.length; i++) {
|
||||
const c: MetricConfigOpt = (config.metricConfig && config.metricConfig[i]) || {};
|
||||
const metricConfig: MetricConfigOpt = (config.metricConfig && config.metricConfig[i]) || {};
|
||||
const obj = resp.data[keys[i]] || {};
|
||||
const results = obj.results || [];
|
||||
const name = config.metrics[i];
|
||||
@ -130,7 +130,8 @@ export async function useDashboardQueryProcessor(configList: Indexable[]) {
|
||||
item.metric.labels.map((d: { key: string; value: string }) => `${d.key}=${d.value}`).join(",");
|
||||
const values = item.values.map((d: { value: unknown }) => d.value) || [];
|
||||
if (results.length === 1) {
|
||||
label = label ? `${c.label || name}, ${label}` : c.label || name;
|
||||
// If the label does not exist use the configuration label or expression
|
||||
label = label ? `${metricConfig.label || name}, ${label}` : metricConfig.label || name;
|
||||
}
|
||||
source[label] = values;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user