You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/07/29 12:55:01 UTC
[skywalking-booster-ui] branch main updated: fix: set the value(SECOND) of the `step` filed for queries (#131)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-booster-ui.git
The following commit(s) were added to refs/heads/main by this push:
new b01565b fix: set the value(SECOND) of the `step` filed for queries (#131)
b01565b is described below
commit b01565b2b83d57f2906bd6a852d3d55a4a0eae8a
Author: Fine0830 <fi...@outlook.com>
AuthorDate: Fri Jul 29 20:54:57 2022 +0800
fix: set the value(SECOND) of the `step` filed for queries (#131)
---
src/views/dashboard/related/event/Content.vue | 24 ++++++++++++++++--------
src/views/dashboard/related/log/Header.vue | 9 +--------
src/views/dashboard/related/trace/Filter.vue | 7 -------
3 files changed, 17 insertions(+), 23 deletions(-)
diff --git a/src/views/dashboard/related/event/Content.vue b/src/views/dashboard/related/event/Content.vue
index a8a71f8..50de8b7 100644
--- a/src/views/dashboard/related/event/Content.vue
+++ b/src/views/dashboard/related/event/Content.vue
@@ -139,7 +139,19 @@ function associateTraceLog(
};
dashboardStore.setWidget(item);
} else {
- const { start, end } = setEndTime(i.start, i.end);
+ let step = appStore.duration.step;
+ let start = i.start;
+ let end = i.end;
+ if (
+ appStore.duration.step === "MINUTE" &&
+ i.end.getTime() - i.start.getTime() < 60000
+ ) {
+ step = "SECOND";
+ } else {
+ const times = setEndTime(i.start, i.end);
+ start = times.start;
+ end = times.end;
+ }
const item = {
...widget,
filters: {
@@ -147,15 +159,11 @@ function associateTraceLog(
duration: {
start: dateFormatStep(
getLocalTime(appStore.utc, start),
- appStore.duration.step,
- true
- ),
- end: dateFormatStep(
- getLocalTime(appStore.utc, end),
- appStore.duration.step,
+ step,
true
),
- step: appStore.duration.step,
+ end: dateFormatStep(getLocalTime(appStore.utc, end), step, true),
+ step,
},
},
};
diff --git a/src/views/dashboard/related/log/Header.vue b/src/views/dashboard/related/log/Header.vue
index 3373201..d91cbe8 100644
--- a/src/views/dashboard/related/log/Header.vue
+++ b/src/views/dashboard/related/log/Header.vue
@@ -271,7 +271,7 @@ function searchLogs() {
: state.service.id,
endpointId: endpoint || state.endpoint.id || undefined,
serviceInstanceId: instance || state.instance.id || undefined,
- queryDuration: appStore.durationTime,
+ queryDuration: duration.value,
keywordsOfContent: keywordsOfContent.value,
excludingKeywordsOfContent: excludingKeywordsOfContent.value,
tags: tagsMap.value.length ? tagsMap.value : undefined,
@@ -344,13 +344,6 @@ function removeExcludeContent(index: number) {
}
onUnmounted(() => {
logStore.resetState();
- const item = {
- ...props.data,
- filters: undefined,
- };
- dashboardStore.setWidget(item);
- traceId.value = "";
- duration.value = appStore.durationTime;
});
watch(
() => selectorStore.currentService,
diff --git a/src/views/dashboard/related/trace/Filter.vue b/src/views/dashboard/related/trace/Filter.vue
index cb351e9..1deb168 100644
--- a/src/views/dashboard/related/trace/Filter.vue
+++ b/src/views/dashboard/related/trace/Filter.vue
@@ -236,13 +236,6 @@ async function searchEndpoints(keyword: string) {
}
onUnmounted(() => {
traceStore.resetState();
- const item = {
- ...props.data,
- filters: undefined,
- };
- dashboardStore.setWidget(item);
- traceId.value = "";
- duration.value = appStore.durationTime;
});
watch(
() => [selectorStore.currentPod],