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 ec7a8bb fix: update event associations with the duration step (#122)
ec7a8bb is described below
commit ec7a8bbfa9a2698a4ecb26588413e704a3f76016
Author: Fine0830 <[email protected]>
AuthorDate: Tue Jul 19 14:11:41 2022 +0800
fix: update event associations with the duration step (#122)
---
src/components/Graph.vue | 6 ++++++
src/views/dashboard/related/event/Content.vue | 16 ++++++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/components/Graph.vue b/src/components/Graph.vue
index 24b7665..6b87334 100644
--- a/src/components/Graph.vue
+++ b/src/components/Graph.vue
@@ -115,6 +115,12 @@ watch(
}
if (props.filters) {
if (props.filters.isRange) {
+ const list = props.option.series[0].data.map(
+ (d: (number | string)[]) => d[0]
+ );
+ if (!list.includes(props.filters.duration.endTime)) {
+ return;
+ }
const markArea = {
silent: true,
itemStyle: {
diff --git a/src/views/dashboard/related/event/Content.vue
b/src/views/dashboard/related/event/Content.vue
index dad8e99..14d2c3b 100644
--- a/src/views/dashboard/related/event/Content.vue
+++ b/src/views/dashboard/related/event/Content.vue
@@ -117,8 +117,20 @@ function visTimeline() {
for (const widget of widgets) {
let end = i.end;
if (!isNaN(index)) {
- if (!i.end || i.end.getTime() - i.start.getTime() < 60000) {
- end = i.start.getTime() + 60000;
+ let diff = 60000;
+ switch (appStore.duration.step) {
+ case "MINUTE":
+ diff = 60000;
+ break;
+ case "HOUR":
+ diff = 3600000;
+ break;
+ case "DAY":
+ diff = 3600000 * 24;
+ break;
+ }
+ if (!i.end || i.end.getTime() - i.start.getTime() < diff) {
+ end = i.start.getTime() + diff;
}
}
const startTime = dateFormatTime(i.start, appStore.duration.step);