mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-09-20 21:29:28 +00:00
fix id
This commit is contained in:
@@ -80,6 +80,7 @@ export const dashboardStore = defineStore({
|
|||||||
const newItem: LayoutConfig = {
|
const newItem: LayoutConfig = {
|
||||||
...NewControl,
|
...NewControl,
|
||||||
i: index,
|
i: index,
|
||||||
|
id: index,
|
||||||
type,
|
type,
|
||||||
metricTypes: [""],
|
metricTypes: [""],
|
||||||
metrics: [""],
|
metrics: [""],
|
||||||
@@ -152,9 +153,11 @@ export const dashboardStore = defineStore({
|
|||||||
if (!children.length) {
|
if (!children.length) {
|
||||||
index = "0";
|
index = "0";
|
||||||
}
|
}
|
||||||
|
const id = `${activedGridItem}-${tabIndex}-${index}`;
|
||||||
const newItem: LayoutConfig = {
|
const newItem: LayoutConfig = {
|
||||||
...NewControl,
|
...NewControl,
|
||||||
i: index,
|
i: index,
|
||||||
|
id,
|
||||||
type,
|
type,
|
||||||
metricTypes: [""],
|
metricTypes: [""],
|
||||||
metrics: [""],
|
metrics: [""],
|
||||||
|
@@ -235,7 +235,6 @@ function optimizeTemplate(
|
|||||||
children: (LayoutConfig & {
|
children: (LayoutConfig & {
|
||||||
moved?: boolean;
|
moved?: boolean;
|
||||||
standard?: unknown;
|
standard?: unknown;
|
||||||
id?: string;
|
|
||||||
})[]
|
})[]
|
||||||
) {
|
) {
|
||||||
for (const child of children || []) {
|
for (const child of children || []) {
|
||||||
@@ -407,6 +406,7 @@ async function updateName(d: DashboardItem, value: string) {
|
|||||||
name: value,
|
name: value,
|
||||||
};
|
};
|
||||||
delete c.id;
|
delete c.id;
|
||||||
|
delete c.filters;
|
||||||
const setting = {
|
const setting = {
|
||||||
id: d.id,
|
id: d.id,
|
||||||
configuration: JSON.stringify(c),
|
configuration: JSON.stringify(c),
|
||||||
|
Reference in New Issue
Block a user