mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-17 13:35:24 +00:00
delete metrics
This commit is contained in:
parent
d111c167d8
commit
1f483a5f69
@ -389,11 +389,19 @@ function deleteMetric(index: number) {
|
||||
dashboardStore.selectWidget({
|
||||
...dashboardStore.selectedGrid,
|
||||
...{ metricTypes: states.metricTypes, metrics: states.metrics },
|
||||
metricConfig: [],
|
||||
});
|
||||
return;
|
||||
}
|
||||
states.metrics.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) {
|
||||
if (type !== MetricsType.REGULAR_VALUE) {
|
||||
|
Loading…
Reference in New Issue
Block a user