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/19 04:47:07 UTC
[skywalking-booster-ui] branch main updated: fix short time range (#121)
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 4e022ff fix short time range (#121)
4e022ff is described below
commit 4e022ff29a6c815264ab64a1e1f6c524b38e7e46
Author: Fine0830 <fi...@outlook.com>
AuthorDate: Tue Jul 19 12:47:03 2022 +0800
fix short time range (#121)
---
src/components/Graph.vue | 23 +----------------------
src/views/dashboard/related/event/Content.vue | 8 +++++++-
2 files changed, 8 insertions(+), 23 deletions(-)
diff --git a/src/components/Graph.vue b/src/components/Graph.vue
index 0222dca..24b7665 100644
--- a/src/components/Graph.vue
+++ b/src/components/Graph.vue
@@ -77,7 +77,7 @@ onMounted(async () => {
});
document.addEventListener(
"click",
- (event: Event) => {
+ () => {
if (instance.isDisposed()) {
return;
}
@@ -88,27 +88,6 @@ onMounted(async () => {
type: "updateAxisPointer",
currTrigger: "leave",
});
- if (
- ["vis-item-overflow", "vis-item-content"].includes(
- (event.target as HTMLDivElement).className
- )
- ) {
- return;
- }
- const series = (window as any).structuredClone(props.option.series);
- for (const temp of series) {
- if (temp.markArea) {
- delete temp.markArea;
- }
- }
- const options = {
- ...props.option,
- series,
- };
- if (JSON.stringify(options) === JSON.stringify(props.option)) {
- return;
- }
- setOptions(options);
},
true
);
diff --git a/src/views/dashboard/related/event/Content.vue b/src/views/dashboard/related/event/Content.vue
index 4786e7b..dad8e99 100644
--- a/src/views/dashboard/related/event/Content.vue
+++ b/src/views/dashboard/related/event/Content.vue
@@ -115,8 +115,14 @@ function visTimeline() {
const i = events[index - 1 || 0];
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;
+ }
+ }
const startTime = dateFormatTime(i.start, appStore.duration.step);
- const endTime = dateFormatTime(i.end, appStore.duration.step);
+ const endTime = dateFormatTime(new Date(end), appStore.duration.step);
widget.filters = {
sourceId: dashboardStore.selectedGrid.id || "",
isRange: true,