mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 12:49:17 +00:00
feat: support Tabs in the widget visiable when MQE expressions (#353)
This commit is contained in:
@@ -29,6 +29,7 @@ limitations under the License. -->
|
||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||
import dateFormatStep, { dateFormatTime } from "@/utils/dateFormat";
|
||||
import getLocalTime from "@/utils/localtime";
|
||||
import { WidgetType } from "@/views/dashboard/data";
|
||||
|
||||
const eventStore = useEventStore();
|
||||
/*global defineProps, Nullable */
|
||||
@@ -122,7 +123,9 @@ limitations under the License. -->
|
||||
}[],
|
||||
dashboard: LayoutConfig[],
|
||||
) {
|
||||
const widgets = dashboard.filter((d: { type: string }) => ["Trace", "Log"].includes(d.type));
|
||||
const widgets = dashboard.filter((d: { type: string }) =>
|
||||
([WidgetType.Trace, WidgetType.Log] as string[]).includes(d.type),
|
||||
);
|
||||
const index = items[0];
|
||||
const i = events[index - 1 || 0];
|
||||
for (const widget of widgets) {
|
||||
|
@@ -41,6 +41,7 @@ limitations under the License. -->
|
||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||
import type { LayoutConfig } from "@/types/dashboard";
|
||||
import { dateFormat } from "@/utils/dateFormat";
|
||||
import { WidgetType } from "@/views/dashboard/data";
|
||||
|
||||
/*global defineProps, defineEmits, Recordable */
|
||||
const props = defineProps({
|
||||
@@ -78,7 +79,7 @@ limitations under the License. -->
|
||||
traceId: id,
|
||||
id: props.data.serviceId || "",
|
||||
},
|
||||
"Trace",
|
||||
WidgetType.Trace,
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
@@ -101,6 +101,7 @@ limitations under the License. -->
|
||||
import type { LayoutConfig } from "@/types/dashboard";
|
||||
import { dateFormat } from "@/utils/dateFormat";
|
||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||
import { WidgetType } from "@/views/dashboard/data";
|
||||
|
||||
const props = {
|
||||
serviceId: { type: String, default: "" },
|
||||
@@ -145,7 +146,7 @@ limitations under the License. -->
|
||||
traceId: traceId.value || traceStore.currentTrace.traceIds[0].value,
|
||||
id: props.serviceId || undefined,
|
||||
},
|
||||
"Log",
|
||||
WidgetType.Log,
|
||||
);
|
||||
}
|
||||
return {
|
||||
|
Reference in New Issue
Block a user