mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 17:05:10 +00:00
fix time range
This commit is contained in:
parent
c875c95c20
commit
1d7eb0f0e5
@ -165,21 +165,23 @@ const state = reactive<any>({
|
|||||||
});
|
});
|
||||||
/*global Nullable */
|
/*global Nullable */
|
||||||
const intervalFn = ref<Nullable<any>>(null);
|
const intervalFn = ref<Nullable<any>>(null);
|
||||||
const rangeTime = computed(() => {
|
function rangeTime() {
|
||||||
const times = {
|
{
|
||||||
start: getLocalTime(
|
const times = {
|
||||||
appStore.utc,
|
start: getLocalTime(
|
||||||
new Date(new Date().getTime() - state.duration.value * 1000)
|
appStore.utc,
|
||||||
),
|
new Date(new Date().getTime() - state.duration.value * 1000)
|
||||||
end: getLocalTime(appStore.utc, new Date()),
|
),
|
||||||
step: "SECOND",
|
end: getLocalTime(appStore.utc, new Date()),
|
||||||
};
|
step: "SECOND",
|
||||||
return {
|
};
|
||||||
start: dateFormatStep(times.start, times.step, false),
|
return {
|
||||||
end: dateFormatStep(times.end, times.step, false),
|
start: dateFormatStep(times.start, times.step, false),
|
||||||
step: times.step,
|
end: dateFormatStep(times.end, times.step, false),
|
||||||
};
|
step: times.step,
|
||||||
});
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchSelectors();
|
fetchSelectors();
|
||||||
@ -236,7 +238,7 @@ function searchLogs() {
|
|||||||
demandLogStore.setLogCondition({
|
demandLogStore.setLogCondition({
|
||||||
serviceInstanceId: instance || state.instance.id || "",
|
serviceInstanceId: instance || state.instance.id || "",
|
||||||
container: state.container.value,
|
container: state.container.value,
|
||||||
duration: rangeTime.value,
|
duration: rangeTime(),
|
||||||
keywordsOfContent: keywordsOfContent.value.length
|
keywordsOfContent: keywordsOfContent.value.length
|
||||||
? keywordsOfContent.value
|
? keywordsOfContent.value
|
||||||
: undefined,
|
: undefined,
|
||||||
|
Loading…
Reference in New Issue
Block a user