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[i] &&
|
||||
config.metricConfig[i].calculation;
|
||||
const line =
|
||||
config.metricTypes[i] === MetricQueryTypes.ReadMetricsValues &&
|
||||
!types.includes(calculation);
|
||||
const isLinear =
|
||||
[
|
||||
MetricQueryTypes.ReadMetricsValues,
|
||||
MetricQueryTypes.ReadLabeledMetricsValues,
|
||||
].includes(config.metricTypes[i]) && !types.includes(calculation);
|
||||
const isAvg =
|
||||
[
|
||||
MetricQueryTypes.ReadMetricsValues,
|
||||
MetricQueryTypes.ReadLabeledMetricsValues,
|
||||
].includes(config.metricTypes[i]) && types.includes(calculation);
|
||||
return {
|
||||
isLinear: line,
|
||||
isLinear,
|
||||
isAvg,
|
||||
};
|
||||
}
|
||||
|
@ -221,15 +221,12 @@ async function queryServiceMetrics(currentServices: Service[]) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!metricConfig.value.length) {
|
||||
return;
|
||||
}
|
||||
const { data, names, metricConfigArr, metricTypesArr } = usePodsSource(
|
||||
currentServices,
|
||||
json,
|
||||
{
|
||||
...props.config,
|
||||
metricConfig: metricConfig.value,
|
||||
metricConfig: metricConfig.value || [],
|
||||
}
|
||||
);
|
||||
services.value = data;
|
||||
|
Loading…
Reference in New Issue
Block a user