mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-09 12:16:13 +00:00
fix: update event associations with the duration step (#122)
This commit is contained in:
parent
4e022ff29a
commit
ec7a8bbfa9
@ -115,6 +115,12 @@ watch(
|
|||||||
}
|
}
|
||||||
if (props.filters) {
|
if (props.filters) {
|
||||||
if (props.filters.isRange) {
|
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 = {
|
const markArea = {
|
||||||
silent: true,
|
silent: true,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
|
@ -117,8 +117,20 @@ function visTimeline() {
|
|||||||
for (const widget of widgets) {
|
for (const widget of widgets) {
|
||||||
let end = i.end;
|
let end = i.end;
|
||||||
if (!isNaN(index)) {
|
if (!isNaN(index)) {
|
||||||
if (!i.end || i.end.getTime() - i.start.getTime() < 60000) {
|
let diff = 60000;
|
||||||
end = i.start.getTime() + 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);
|
const startTime = dateFormatTime(i.start, appStore.duration.step);
|
||||||
|
Loading…
Reference in New Issue
Block a user