mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
refactor: update
This commit is contained in:
parent
48a37d1093
commit
98008e5cf4
@ -96,20 +96,14 @@ limitations under the License. -->
|
|||||||
metricsValues.value = (await useDashboardQueryProcessor(configList)) || {};
|
metricsValues.value = (await useDashboardQueryProcessor(configList)) || {};
|
||||||
}
|
}
|
||||||
async function queryTabsMetrics() {
|
async function queryTabsMetrics() {
|
||||||
const widgets = [];
|
const configList = dashboardStore.currentTabItems
|
||||||
|
.filter((item: LayoutConfig) => item.type === WidgetType.Widget && !ListChartTypes.includes(item.type || ""))
|
||||||
for (const item of dashboardStore.currentTabItems) {
|
.map((d: LayoutConfig) => ({
|
||||||
const isList = ListChartTypes.includes(item.type || "");
|
metrics: d.expressions || [],
|
||||||
if (item.type === WidgetType.Widget && !isList) {
|
metricConfig: d.metricConfig || [],
|
||||||
widgets.push(item);
|
id: d.i,
|
||||||
}
|
}));
|
||||||
}
|
if (!configList.length) {
|
||||||
const configList = widgets.map((d: LayoutConfig) => ({
|
|
||||||
metrics: d.expressions || [],
|
|
||||||
metricConfig: d.metricConfig || [],
|
|
||||||
id: d.i,
|
|
||||||
}));
|
|
||||||
if (!widgets.length) {
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
metricsValues.value = (await useDashboardQueryProcessor(configList)) || {};
|
metricsValues.value = (await useDashboardQueryProcessor(configList)) || {};
|
||||||
|
Loading…
Reference in New Issue
Block a user