mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
update
This commit is contained in:
parent
f7e31055a6
commit
d9eccf1d7c
@ -17,18 +17,17 @@
|
|||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
import { LayoutConfig } from "@/types/dashboard";
|
import { LayoutConfig } from "@/types/dashboard";
|
||||||
|
|
||||||
export default function getDashboard(param: {
|
export default function getDashboard(param?: {
|
||||||
name: string;
|
name: string;
|
||||||
layer: string;
|
layer: string;
|
||||||
entity: string;
|
entity: string;
|
||||||
}) {
|
}) {
|
||||||
const dashboardStore = useDashboardStore();
|
const dashboardStore = useDashboardStore();
|
||||||
|
const opt = param || dashboardStore.currentDashboard;
|
||||||
const list = JSON.parse(sessionStorage.getItem("dashboards") || "[]");
|
const list = JSON.parse(sessionStorage.getItem("dashboards") || "[]");
|
||||||
const dashboard = list.find(
|
const dashboard = list.find(
|
||||||
(d: { name: string; layer: string; entity: string }) =>
|
(d: { name: string; layer: string; entity: string }) =>
|
||||||
d.name === param.name &&
|
d.name === opt.name && d.entity === opt.entity && d.layer === opt.layer
|
||||||
d.entity === param.entity &&
|
|
||||||
d.layer === param.layer
|
|
||||||
);
|
);
|
||||||
const all = dashboardStore.layout;
|
const all = dashboardStore.layout;
|
||||||
const widgets: LayoutConfig[] = [];
|
const widgets: LayoutConfig[] = [];
|
||||||
|
@ -130,7 +130,6 @@ import graphs from "./components/index";
|
|||||||
import LogTable from "@/views/dashboard/related/components/LogTable/Index.vue";
|
import LogTable from "@/views/dashboard/related/components/LogTable/Index.vue";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import getDashboard from "@/hooks/useDashboardsSession";
|
import getDashboard from "@/hooks/useDashboardsSession";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
|
||||||
import { LayoutConfig } from "@/types/dashboard";
|
import { LayoutConfig } from "@/types/dashboard";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@ -147,7 +146,6 @@ export default defineComponent({
|
|||||||
const loading = ref<boolean>(false);
|
const loading = ref<boolean>(false);
|
||||||
const traceId = ref<string>("");
|
const traceId = ref<string>("");
|
||||||
const displayMode = ref<string>("List");
|
const displayMode = ref<string>("List");
|
||||||
const dashboardStore = useDashboardStore();
|
|
||||||
const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") =>
|
const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") =>
|
||||||
dayjs(date).format(pattern);
|
dayjs(date).format(pattern);
|
||||||
|
|
||||||
@ -166,9 +164,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function searchTraceLogs() {
|
async function searchTraceLogs() {
|
||||||
const { associationWidget } = getDashboard(
|
const { associationWidget } = getDashboard();
|
||||||
dashboardStore.currentDashboard
|
|
||||||
);
|
|
||||||
associationWidget(
|
associationWidget(
|
||||||
(options.id as any) || "",
|
(options.id as any) || "",
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,6 @@ import type { PropType } from "vue";
|
|||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import copy from "@/utils/copy";
|
import copy from "@/utils/copy";
|
||||||
import getDashboard from "@/hooks/useDashboardsSession";
|
import getDashboard from "@/hooks/useDashboardsSession";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
|
||||||
import { LayoutConfig } from "@/types/dashboard";
|
import { LayoutConfig } from "@/types/dashboard";
|
||||||
|
|
||||||
/*global defineProps, Recordable */
|
/*global defineProps, Recordable */
|
||||||
@ -97,12 +96,11 @@ const options: Recordable<LayoutConfig> = inject("options") || {};
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
currentSpan: { type: Object as PropType<any>, default: () => ({}) },
|
currentSpan: { type: Object as PropType<any>, default: () => ({}) },
|
||||||
});
|
});
|
||||||
const dashboardStore = useDashboardStore();
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") =>
|
const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") =>
|
||||||
dayjs(date).format(pattern);
|
dayjs(date).format(pattern);
|
||||||
async function getTaceLogs() {
|
async function getTaceLogs() {
|
||||||
const { associationWidget } = getDashboard(dashboardStore.currentDashboard);
|
const { associationWidget } = getDashboard();
|
||||||
associationWidget(
|
associationWidget(
|
||||||
(options.id as any) || "",
|
(options.id as any) || "",
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user