api2/status/datastore-usage: add gc-status and history start and delta

so that we can show more info and calculate the points in time for the
history

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-11-10 10:18:05 +01:00 committed by Thomas Lamprecht
parent c3a1b34ed3
commit b35eb0a175

View File

@ -103,6 +103,7 @@ fn datastore_status(
"total": status.total,
"used": status.used,
"avail": status.avail,
"gc-status": datastore.last_gc_status(),
});
let rrd_dir = format!("datastore/{}", store);
@ -152,6 +153,8 @@ fn datastore_status(
}
}
entry["history-start"] = start.into();
entry["history-delta"] = reso.into();
entry["history"] = history.into();
// we skip the calculation for datastores with not enough data