mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 00:37:33 +00:00
fix metric config
This commit is contained in:
parent
f072b8273f
commit
b75010c46c
@ -26,16 +26,18 @@ export function useListConfig(config: any, index: string) {
|
|||||||
config.metricConfig &&
|
config.metricConfig &&
|
||||||
config.metricConfig[i] &&
|
config.metricConfig[i] &&
|
||||||
config.metricConfig[i].calculation;
|
config.metricConfig[i].calculation;
|
||||||
const line =
|
const isLinear =
|
||||||
config.metricTypes[i] === MetricQueryTypes.ReadMetricsValues &&
|
[
|
||||||
!types.includes(calculation);
|
MetricQueryTypes.ReadMetricsValues,
|
||||||
|
MetricQueryTypes.ReadLabeledMetricsValues,
|
||||||
|
].includes(config.metricTypes[i]) && !types.includes(calculation);
|
||||||
const isAvg =
|
const isAvg =
|
||||||
[
|
[
|
||||||
MetricQueryTypes.ReadMetricsValues,
|
MetricQueryTypes.ReadMetricsValues,
|
||||||
MetricQueryTypes.ReadLabeledMetricsValues,
|
MetricQueryTypes.ReadLabeledMetricsValues,
|
||||||
].includes(config.metricTypes[i]) && types.includes(calculation);
|
].includes(config.metricTypes[i]) && types.includes(calculation);
|
||||||
return {
|
return {
|
||||||
isLinear: line,
|
isLinear,
|
||||||
isAvg,
|
isAvg,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -221,15 +221,12 @@ async function queryServiceMetrics(currentServices: Service[]) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!metricConfig.value.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const { data, names, metricConfigArr, metricTypesArr } = usePodsSource(
|
const { data, names, metricConfigArr, metricTypesArr } = usePodsSource(
|
||||||
currentServices,
|
currentServices,
|
||||||
json,
|
json,
|
||||||
{
|
{
|
||||||
...props.config,
|
...props.config,
|
||||||
metricConfig: metricConfig.value,
|
metricConfig: metricConfig.value || [],
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
services.value = data;
|
services.value = data;
|
||||||
|
Loading…
Reference in New Issue
Block a user