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