mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 16:27:33 +00:00
feat: remove metric name
This commit is contained in:
parent
b293f4ddb5
commit
00281e8920
@ -107,11 +107,11 @@ export function useExpressionsSourceProcessor(
|
|||||||
}
|
}
|
||||||
const source: { [key: string]: unknown } = {};
|
const source: { [key: string]: unknown } = {};
|
||||||
const keys = Object.keys(resp.data);
|
const keys = Object.keys(resp.data);
|
||||||
for (let i = 0; i < config.metricTypes.length; i++) {
|
for (let i = 0; i < config.metrics.length; i++) {
|
||||||
const type = config.metricTypes[i];
|
const type = config.metricTypes[i];
|
||||||
const c = (config.metricConfig && config.metricConfig[i]) || {};
|
const c: any = (config.metricConfig && config.metricConfig[i]) || {};
|
||||||
const results = (resp.data[keys[i]] && resp.data[keys[i]].results) || [];
|
const results = (resp.data[keys[i]] && resp.data[keys[i]].results) || [];
|
||||||
const name = ((results[0] || {}).metric || {}).name;
|
const name = config.metrics[i];
|
||||||
|
|
||||||
if (type === ExpressionResultType.TIME_SERIES_VALUES) {
|
if (type === ExpressionResultType.TIME_SERIES_VALUES) {
|
||||||
if (results.length === 1) {
|
if (results.length === 1) {
|
||||||
@ -255,7 +255,7 @@ export async function useExpressionsQueryPodsMetrics(
|
|||||||
if (!results[0]) {
|
if (!results[0]) {
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
const name = results[0].metric.name || "";
|
const name = config.expressions[index] || "";
|
||||||
if (!d[name]) {
|
if (!d[name]) {
|
||||||
d[name] = {};
|
d[name] = {};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user