mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-09 12:16:13 +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)
|
||||
);
|
||||
const widgets: any = computed(() => {
|
||||
const all = getDashboard(dashboardStore.currentDashboard).widgets;
|
||||
const items = all.filter((d: any) => {
|
||||
const widgetList = getDashboard(dashboardStore.currentDashboard).widgets;
|
||||
const items = [];
|
||||
for (const d of widgetList) {
|
||||
const isLinear = ["Bar", "Line", "Area"].includes(
|
||||
(d.graph && d.graph.type) || ""
|
||||
);
|
||||
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;
|
||||
});
|
||||
function updateWidgetConfig(options: Option[]) {
|
||||
|
Loading…
Reference in New Issue
Block a user