mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 00:37:33 +00:00
fix
This commit is contained in:
parent
9dbca48ea3
commit
ca27b760e1
@ -298,7 +298,6 @@ export function useQueryPodsMetrics(
|
||||
};
|
||||
let labelStr = "";
|
||||
if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
|
||||
console.log(config);
|
||||
variables.push(`$labels${index}${idx}: [String!]!`);
|
||||
labelStr = `labels: $labels${index}${idx}, `;
|
||||
conditions[`labels${index}${idx}`] = (
|
||||
@ -331,7 +330,7 @@ export function usePodsSource(
|
||||
return {};
|
||||
}
|
||||
const names: string[] = [];
|
||||
const metricConfigArr: MetricConfigOpt[] = config.metricConfig || [];
|
||||
const metricConfigArr: MetricConfigOpt[] = [];
|
||||
const data = pods.map((d: Instance | any, idx: number) => {
|
||||
config.metrics.map((name: string, index: number) => {
|
||||
const c: any = (config.metricConfig && config.metricConfig[index]) || {};
|
||||
@ -340,6 +339,7 @@ export function usePodsSource(
|
||||
d[name] = aggregation(resp.data[key], c);
|
||||
if (idx === 0) {
|
||||
names.push(name);
|
||||
metricConfigArr.push(c);
|
||||
}
|
||||
}
|
||||
if (config.metricTypes[index] === MetricQueryTypes.ReadMetricsValues) {
|
||||
@ -358,6 +358,7 @@ export function usePodsSource(
|
||||
);
|
||||
if (idx === 0) {
|
||||
names.push(name);
|
||||
metricConfigArr.push(c);
|
||||
}
|
||||
}
|
||||
if (
|
||||
@ -401,6 +402,7 @@ export function usePodsSource(
|
||||
d[labels[indexNum]]["values"] = values;
|
||||
if (idx === 0) {
|
||||
names.push(labels[indexNum]);
|
||||
metricConfigArr.push(c);
|
||||
}
|
||||
} else {
|
||||
if (!d[item.label]) {
|
||||
@ -409,9 +411,9 @@ export function usePodsSource(
|
||||
d[item.label]["values"] = values;
|
||||
if (idx === 0) {
|
||||
names.push(item.label);
|
||||
metricConfigArr.push(c);
|
||||
}
|
||||
}
|
||||
metricConfigArr.splice(index, 0, c);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -56,7 +56,7 @@ limitations under the License. -->
|
||||
<ColumnGraph
|
||||
:intervalTime="intervalTime"
|
||||
:colMetrics="colMetrics"
|
||||
:config="config"
|
||||
:config="{ ...config, metrics: colMetrics, metricConfig }"
|
||||
v-if="colMetrics.length"
|
||||
/>
|
||||
</el-table>
|
||||
@ -228,10 +228,8 @@ async function queryServiceMetrics(currentServices: Service[]) {
|
||||
services.value = data;
|
||||
colMetrics.value = names;
|
||||
|
||||
// metricConfig.value = metricConfigArr;
|
||||
console.log(names);
|
||||
console.log(data);
|
||||
console.log(metricConfigArr);
|
||||
metricConfig.value = metricConfigArr;
|
||||
// console.log(metricConfigArr);
|
||||
return;
|
||||
}
|
||||
services.value = currentServices;
|
||||
|
Loading…
Reference in New Issue
Block a user