mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-20 14:37:34 +00:00
delete metrics
This commit is contained in:
parent
d111c167d8
commit
1f483a5f69
@ -389,11 +389,19 @@ function deleteMetric(index: number) {
|
|||||||
dashboardStore.selectWidget({
|
dashboardStore.selectWidget({
|
||||||
...dashboardStore.selectedGrid,
|
...dashboardStore.selectedGrid,
|
||||||
...{ metricTypes: states.metricTypes, metrics: states.metrics },
|
...{ metricTypes: states.metricTypes, metrics: states.metrics },
|
||||||
|
metricConfig: [],
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
states.metrics.splice(index, 1);
|
states.metrics.splice(index, 1);
|
||||||
states.metricTypes.splice(index, 1);
|
states.metricTypes.splice(index, 1);
|
||||||
|
const config = dashboardStore.selectedGrid.metricConfig || [];
|
||||||
|
const metricConfig = config[index] ? config.splice(index, 1) : config;
|
||||||
|
dashboardStore.selectWidget({
|
||||||
|
...dashboardStore.selectedGrid,
|
||||||
|
...{ metricTypes: states.metricTypes, metrics: states.metrics },
|
||||||
|
metricConfig,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
function setMetricTypeList(type: string) {
|
function setMetricTypeList(type: string) {
|
||||||
if (type !== MetricsType.REGULAR_VALUE) {
|
if (type !== MetricsType.REGULAR_VALUE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user