mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
update event with the duration step
This commit is contained in:
parent
4e022ff29a
commit
6387b2b202
@ -117,8 +117,29 @@ 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 = 0;
|
||||
switch (appStore.duration.step) {
|
||||
case "MINUTE":
|
||||
diff = 60000;
|
||||
break;
|
||||
case "HOUR":
|
||||
diff = 3600000;
|
||||
break;
|
||||
case "DAY":
|
||||
diff = 86400000;
|
||||
break;
|
||||
case "MONTH":
|
||||
diff =
|
||||
(appStore.duration.end.getTime() -
|
||||
appStore.duration.start.getTime()) /
|
||||
(appStore.duration.end.getFullYear() * 12 +
|
||||
appStore.duration.end.getMonth() -
|
||||
appStore.duration.start.getFullYear() * 12 -
|
||||
appStore.duration.start.getMonth());
|
||||
break;
|
||||
}
|
||||
if (!i.end || i.end.getTime() - i.start.getTime() < diff) {
|
||||
end = i.start.getTime() + diff;
|
||||
}
|
||||
}
|
||||
const startTime = dateFormatTime(i.start, appStore.duration.step);
|
||||
|
Loading…
Reference in New Issue
Block a user