mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-14 01:45:23 +00:00
fix widget name (#149)
This commit is contained in:
parent
82b348a766
commit
1a989a1434
@ -40,15 +40,16 @@ const widgetIds = ref<string[]>(
|
|||||||
associate.map((d: { widgetId: string }) => d.widgetId)
|
associate.map((d: { widgetId: string }) => d.widgetId)
|
||||||
);
|
);
|
||||||
const widgets: any = computed(() => {
|
const widgets: any = computed(() => {
|
||||||
const all = getDashboard(dashboardStore.currentDashboard).widgets;
|
const widgetList = getDashboard(dashboardStore.currentDashboard).widgets;
|
||||||
const items = all.filter((d: any) => {
|
const items = [];
|
||||||
|
for (const d of widgetList) {
|
||||||
const isLinear = ["Bar", "Line", "Area"].includes(
|
const isLinear = ["Bar", "Line", "Area"].includes(
|
||||||
(d.graph && d.graph.type) || ""
|
(d.graph && d.graph.type) || ""
|
||||||
);
|
);
|
||||||
if (isLinear && d.id && dashboardStore.selectedGrid.id !== d.id) {
|
if (isLinear && d.id && dashboardStore.selectedGrid.id !== d.id) {
|
||||||
return { value: d.id, label: (d.widget && d.widget.name) || d.id };
|
items.push({ value: d.id, label: (d.widget && d.widget.name) || d.id });
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
return items;
|
return items;
|
||||||
});
|
});
|
||||||
function updateWidgetConfig(options: Option[]) {
|
function updateWidgetConfig(options: Option[]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user