mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
fix duration
This commit is contained in:
parent
7818a11aa5
commit
01a7cd3736
@ -28,6 +28,8 @@ import { useDashboardStore } from "@/store/modules/dashboard";
|
||||
import getDashboard from "@/hooks/useDashboardsSession";
|
||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||
import dateFormatStep, { dateFormatTime } from "@/utils/dateFormat";
|
||||
import getLocalTime from "@/utils/localtime";
|
||||
import { enumDeclaration } from "@babel/types";
|
||||
|
||||
const eventStore = useEventStore();
|
||||
/*global defineProps, Nullable */
|
||||
@ -134,8 +136,8 @@ function associateTraceLog(
|
||||
filters: {
|
||||
sourceId: props.data.id || "",
|
||||
duration: {
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
start: null,
|
||||
end: null,
|
||||
step: appStore.duration.step,
|
||||
},
|
||||
},
|
||||
@ -148,8 +150,16 @@ function associateTraceLog(
|
||||
filters: {
|
||||
sourceId: props.data.id || "",
|
||||
duration: {
|
||||
startTime: dateFormatStep(start, appStore.duration.step, true),
|
||||
endTime: dateFormatStep(end, appStore.duration.step, true),
|
||||
start: dateFormatStep(
|
||||
getLocalTime(appStore.utc, start),
|
||||
appStore.duration.step,
|
||||
true
|
||||
),
|
||||
end: dateFormatStep(
|
||||
getLocalTime(appStore.utc, end),
|
||||
appStore.duration.step,
|
||||
true
|
||||
),
|
||||
step: appStore.duration.step,
|
||||
},
|
||||
},
|
||||
|
@ -160,6 +160,9 @@ const logStore = useLogStore();
|
||||
const traceId = ref<string>(
|
||||
(props.data.filters && props.data.filters.traceId) || ""
|
||||
);
|
||||
const duration = ref<any>(
|
||||
(props.data.filters && props.data.filters.duration) || appStore.durationTime
|
||||
);
|
||||
const keywordsOfContent = ref<string[]>([]);
|
||||
const excludingKeywordsOfContent = ref<string[]>([]);
|
||||
const tagsList = ref<string[]>([]);
|
||||
@ -252,7 +255,7 @@ function searchLogs() {
|
||||
pagePathId: endpoint || state.endpoint.id || undefined,
|
||||
serviceVersionId: instance || state.instance.id || undefined,
|
||||
paging: { pageNum: 1, pageSize: 15 },
|
||||
queryDuration: appStore.durationTime,
|
||||
queryDuration: duration,
|
||||
category: state.category.value,
|
||||
});
|
||||
} else {
|
||||
@ -346,6 +349,7 @@ onUnmounted(() => {
|
||||
};
|
||||
dashboardStore.setWidget(item);
|
||||
traceId.value = "";
|
||||
duration.value = appStore.durationTime;
|
||||
});
|
||||
watch(
|
||||
() => selectorStore.currentService,
|
||||
@ -381,6 +385,7 @@ watch(
|
||||
return;
|
||||
}
|
||||
traceId.value = props.data.filters.traceId || "";
|
||||
duration.value = props.data.filters.duration || appStore.durationTime;
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
@ -105,6 +105,7 @@ import ConditionTags from "@/views/components/ConditionTags.vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { EntityType } from "../../data";
|
||||
import { LayoutConfig } from "@/types/dashboard";
|
||||
// import { Duration, DurationTime } from "@/types/app";
|
||||
|
||||
/*global defineProps, Recordable */
|
||||
const props = defineProps({
|
||||
@ -122,6 +123,9 @@ const appStore = useAppStoreWithOut();
|
||||
const selectorStore = useSelectorStore();
|
||||
const dashboardStore = useDashboardStore();
|
||||
const traceStore = useTraceStore();
|
||||
const duration = ref<any>(
|
||||
(props.data.filters && props.data.filters.duration) || appStore.durationTime
|
||||
);
|
||||
const minTraceDuration = ref<number>();
|
||||
const maxTraceDuration = ref<number>();
|
||||
const tagsList = ref<string[]>([]);
|
||||
@ -198,7 +202,7 @@ function searchTraces() {
|
||||
endpointId: endpoint || state.endpoint.id || undefined,
|
||||
serviceInstanceId: instance || state.instance.id || undefined,
|
||||
traceState: state.status.value || "ALL",
|
||||
queryDuration: appStore.durationTime,
|
||||
queryDuration: duration.value,
|
||||
minTraceDuration: Number(minTraceDuration.value),
|
||||
maxTraceDuration: Number(maxTraceDuration.value),
|
||||
queryOrder: "BY_DURATION",
|
||||
@ -238,6 +242,7 @@ onUnmounted(() => {
|
||||
};
|
||||
dashboardStore.setWidget(item);
|
||||
traceId.value = "";
|
||||
duration.value = appStore.durationTime;
|
||||
});
|
||||
watch(
|
||||
() => [selectorStore.currentPod],
|
||||
@ -273,6 +278,7 @@ watch(
|
||||
return;
|
||||
}
|
||||
traceId.value = props.data.filters.traceId || "";
|
||||
duration.value = props.data.filters.duration || appStore.durationTime;
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user