mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-06-29 16:27:36 +00:00
update
This commit is contained in:
parent
090b9e9cdd
commit
c9cf77523e
@ -42,6 +42,9 @@ export function useDuration() {
|
|||||||
durationRow = data;
|
durationRow = data;
|
||||||
}
|
}
|
||||||
function getMaxRange(day: number) {
|
function getMaxRange(day: number) {
|
||||||
|
if (day === -1) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
const gap = (day + 1) * 24 * 60 * 60 * 1000;
|
const gap = (day + 1) * 24 * 60 * 60 * 1000;
|
||||||
const dates: Date[] = [new Date(new Date().getTime() - gap), new Date()];
|
const dates: Date[] = [new Date(new Date().getTime() - gap), new Date()];
|
||||||
|
|
||||||
|
@ -246,15 +246,18 @@ limitations under the License. -->
|
|||||||
minute: 20,
|
minute: 20,
|
||||||
hour: 2,
|
hour: 2,
|
||||||
day: 3,
|
day: 3,
|
||||||
coldMinute: 10,
|
coldMinute: 19,
|
||||||
coldHour: 10,
|
coldHour: 10,
|
||||||
coldDay: 9,
|
coldDay: 9,
|
||||||
};
|
};
|
||||||
appStore.setMetricsTTL(data);
|
appStore.setMetricsTTL(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMetricsTTL(params: { minute: number; hour: number; day: number }) {
|
function handleMetricsTTL({ minute, hour, day }: { minute: number; hour: number; day: number }) {
|
||||||
const gap = dayToMS(params.day) + params.hour * 60 * 60 * 1000 + params.minute * 60 * 1000;
|
if (minute === -1 || hour === -1 || day === -1) {
|
||||||
|
return appStore.setMaxRange([]);
|
||||||
|
}
|
||||||
|
const gap = dayToMS(day) + hour * 60 * 60 * 1000 + minute * 60 * 1000;
|
||||||
const dates: Date[] = [new Date(new Date().getTime() - gap), new Date()];
|
const dates: Date[] = [new Date(new Date().getTime() - gap), new Date()];
|
||||||
appStore.setMaxRange(dates);
|
appStore.setMaxRange(dates);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user