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 = "";
|
let labelStr = "";
|
||||||
if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
|
if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
|
||||||
console.log(config);
|
|
||||||
variables.push(`$labels${index}${idx}: [String!]!`);
|
variables.push(`$labels${index}${idx}: [String!]!`);
|
||||||
labelStr = `labels: $labels${index}${idx}, `;
|
labelStr = `labels: $labels${index}${idx}, `;
|
||||||
conditions[`labels${index}${idx}`] = (
|
conditions[`labels${index}${idx}`] = (
|
||||||
@ -331,7 +330,7 @@ export function usePodsSource(
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
const names: string[] = [];
|
const names: string[] = [];
|
||||||
const metricConfigArr: MetricConfigOpt[] = config.metricConfig || [];
|
const metricConfigArr: MetricConfigOpt[] = [];
|
||||||
const data = pods.map((d: Instance | any, idx: number) => {
|
const data = pods.map((d: Instance | any, idx: number) => {
|
||||||
config.metrics.map((name: string, index: number) => {
|
config.metrics.map((name: string, index: number) => {
|
||||||
const c: any = (config.metricConfig && config.metricConfig[index]) || {};
|
const c: any = (config.metricConfig && config.metricConfig[index]) || {};
|
||||||
@ -340,6 +339,7 @@ export function usePodsSource(
|
|||||||
d[name] = aggregation(resp.data[key], c);
|
d[name] = aggregation(resp.data[key], c);
|
||||||
if (idx === 0) {
|
if (idx === 0) {
|
||||||
names.push(name);
|
names.push(name);
|
||||||
|
metricConfigArr.push(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (config.metricTypes[index] === MetricQueryTypes.ReadMetricsValues) {
|
if (config.metricTypes[index] === MetricQueryTypes.ReadMetricsValues) {
|
||||||
@ -358,6 +358,7 @@ export function usePodsSource(
|
|||||||
);
|
);
|
||||||
if (idx === 0) {
|
if (idx === 0) {
|
||||||
names.push(name);
|
names.push(name);
|
||||||
|
metricConfigArr.push(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
@ -401,6 +402,7 @@ export function usePodsSource(
|
|||||||
d[labels[indexNum]]["values"] = values;
|
d[labels[indexNum]]["values"] = values;
|
||||||
if (idx === 0) {
|
if (idx === 0) {
|
||||||
names.push(labels[indexNum]);
|
names.push(labels[indexNum]);
|
||||||
|
metricConfigArr.push(c);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!d[item.label]) {
|
if (!d[item.label]) {
|
||||||
@ -409,9 +411,9 @@ export function usePodsSource(
|
|||||||
d[item.label]["values"] = values;
|
d[item.label]["values"] = values;
|
||||||
if (idx === 0) {
|
if (idx === 0) {
|
||||||
names.push(item.label);
|
names.push(item.label);
|
||||||
|
metricConfigArr.push(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
metricConfigArr.splice(index, 0, c);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -56,7 +56,7 @@ limitations under the License. -->
|
|||||||
<ColumnGraph
|
<ColumnGraph
|
||||||
:intervalTime="intervalTime"
|
:intervalTime="intervalTime"
|
||||||
:colMetrics="colMetrics"
|
:colMetrics="colMetrics"
|
||||||
:config="config"
|
:config="{ ...config, metrics: colMetrics, metricConfig }"
|
||||||
v-if="colMetrics.length"
|
v-if="colMetrics.length"
|
||||||
/>
|
/>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -228,10 +228,8 @@ async function queryServiceMetrics(currentServices: Service[]) {
|
|||||||
services.value = data;
|
services.value = data;
|
||||||
colMetrics.value = names;
|
colMetrics.value = names;
|
||||||
|
|
||||||
// metricConfig.value = metricConfigArr;
|
metricConfig.value = metricConfigArr;
|
||||||
console.log(names);
|
// console.log(metricConfigArr);
|
||||||
console.log(data);
|
|
||||||
console.log(metricConfigArr);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
services.value = currentServices;
|
services.value = currentServices;
|
||||||
|
Loading…
Reference in New Issue
Block a user