mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 00:08:56 +00:00
fix: metric config
This commit is contained in:
parent
94dc2f3642
commit
6867f2ec32
@ -198,7 +198,7 @@ export async function useExpressionsQueryPodsMetrics(
|
||||
const names: string[] = [];
|
||||
const metricConfigArr: MetricConfigOpt[] = [];
|
||||
const metricTypesArr: string[] = [];
|
||||
const data = pods.map((d: Instance & Indexable, idx: number) => {
|
||||
const data = pods.map((d: any, idx: number) => {
|
||||
config.expressions.map((exp: string, index: number) => {
|
||||
const c: any = (config.metricConfig && config.metricConfig[index]) || {};
|
||||
const k = "expression" + idx + index;
|
||||
|
@ -166,6 +166,8 @@ limitations under the License. -->
|
||||
|
||||
states.isList = ListChartTypes.includes(graph.value.type);
|
||||
const defaultLen = ref<number>(states.isList ? 5 : 20);
|
||||
const backupMetricConfig = ref<MetricConfigOpt[]>([]);
|
||||
|
||||
setDashboards();
|
||||
setMetricType();
|
||||
|
||||
@ -461,11 +463,14 @@ limitations under the License. -->
|
||||
}
|
||||
function changeMetricMode() {
|
||||
states.metrics = metrics.value.length ? metrics.value : [""];
|
||||
(states.metricTypes = metricTypes.value.length ? metricTypes.value : [""]),
|
||||
states.metricTypes = metricTypes.value.length ? metricTypes.value : [""];
|
||||
const config = dashboardStore.selectedGrid.metricTypes;
|
||||
dashboardStore.selectWidget({
|
||||
...dashboardStore.selectedGrid,
|
||||
metricMode: isExpression.value ? "Expression" : "General",
|
||||
metricTypes: backupMetricConfig.value,
|
||||
});
|
||||
backupMetricConfig.value = config;
|
||||
}
|
||||
async function changeExpression(event: any, index: number) {
|
||||
const params = event.target.textContent;
|
||||
|
Loading…
Reference in New Issue
Block a user