Fix: use seconds for PBS since (#6583)

This commit is contained in:
shamoon
2026-04-19 07:53:25 -07:00
committed by GitHub
parent 10ade1d32f
commit 8322dd9016
3 changed files with 26 additions and 4 deletions

View File

@@ -8,9 +8,14 @@ export default function Component({ service }) {
const { t } = useTranslation();
const { widget } = service;
const taskQueryParams = {
errors: true,
limit: 100,
since: Math.floor(Date.now() / 1000) - 24 * 60 * 60,
};
const { data: datastoreData, error: datastoreError } = useWidgetAPI(widget, "status/datastore-usage");
const { data: tasksData, error: tasksError } = useWidgetAPI(widget, "nodes/localhost/tasks");
const { data: tasksData, error: tasksError } = useWidgetAPI(widget, "nodes/localhost/tasks", taskQueryParams);
const { data: hostData, error: hostError } = useWidgetAPI(widget, "nodes/localhost/status");
if (datastoreError || tasksError || hostError) {