mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-02 17:44:46 +00:00
fix short time range (#121)
This commit is contained in:
parent
42ead4a572
commit
4e022ff29a
@ -77,7 +77,7 @@ onMounted(async () => {
|
|||||||
});
|
});
|
||||||
document.addEventListener(
|
document.addEventListener(
|
||||||
"click",
|
"click",
|
||||||
(event: Event) => {
|
() => {
|
||||||
if (instance.isDisposed()) {
|
if (instance.isDisposed()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -88,27 +88,6 @@ onMounted(async () => {
|
|||||||
type: "updateAxisPointer",
|
type: "updateAxisPointer",
|
||||||
currTrigger: "leave",
|
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
|
true
|
||||||
);
|
);
|
||||||
|
@ -115,8 +115,14 @@ function visTimeline() {
|
|||||||
const i = events[index - 1 || 0];
|
const i = events[index - 1 || 0];
|
||||||
|
|
||||||
for (const widget of widgets) {
|
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 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 = {
|
widget.filters = {
|
||||||
sourceId: dashboardStore.selectedGrid.id || "",
|
sourceId: dashboardStore.selectedGrid.id || "",
|
||||||
isRange: true,
|
isRange: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user