mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 18:05:25 +00:00
update templates
This commit is contained in:
parent
b4f26b04bf
commit
1b45c719e3
@ -231,13 +231,27 @@ function exportTemplates() {
|
|||||||
multipleTableRef.value!.clearSelection();
|
multipleTableRef.value!.clearSelection();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
function optimizeTemplate(children: (LayoutConfig & { moved?: boolean })[]) {
|
function optimizeTemplate(
|
||||||
|
children: (LayoutConfig & { moved?: boolean; standard?: unknown })[]
|
||||||
|
) {
|
||||||
for (const child of children || []) {
|
for (const child of children || []) {
|
||||||
delete child.moved;
|
delete child.moved;
|
||||||
delete child.activedTabIndex;
|
delete child.activedTabIndex;
|
||||||
|
delete child.standard;
|
||||||
if (isEmptyObject(child.graph)) {
|
if (isEmptyObject(child.graph)) {
|
||||||
delete child.graph;
|
delete child.graph;
|
||||||
}
|
}
|
||||||
|
if (child.widget) {
|
||||||
|
if (child.widget.title === "") {
|
||||||
|
delete child.widget.title;
|
||||||
|
}
|
||||||
|
if (child.widget.tips === "") {
|
||||||
|
delete child.widget.tips;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isEmptyObject(child.widget)) {
|
||||||
|
delete child.widget;
|
||||||
|
}
|
||||||
if (!(child.metrics && child.metrics.length && child.metrics[0])) {
|
if (!(child.metrics && child.metrics.length && child.metrics[0])) {
|
||||||
delete child.metrics;
|
delete child.metrics;
|
||||||
}
|
}
|
||||||
@ -270,6 +284,13 @@ function optimizeTemplate(children: (LayoutConfig & { moved?: boolean })[]) {
|
|||||||
optimizeTemplate(item.children);
|
optimizeTemplate(item.children);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
["Trace", "Topology", "Tab", "Profile", "Ebpf", "Log"].includes(
|
||||||
|
child.type
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
delete child.widget;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function handleEdit(row: DashboardItem) {
|
function handleEdit(row: DashboardItem) {
|
||||||
|
Loading…
Reference in New Issue
Block a user