api: make expensive parts of datastore status opt-in
used in the PBS GUI, but also for PVE usage queries which don't need all the extra expensive information.. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
0d08fceeb9
commit
98afc7b152
@ -707,8 +707,14 @@ pub struct Counts {
|
||||
|
||||
#[api(
|
||||
properties: {
|
||||
"gc-status": { type: GarbageCollectionStatus, },
|
||||
counts: { type: Counts, }
|
||||
"gc-status": {
|
||||
type: GarbageCollectionStatus,
|
||||
optional: true,
|
||||
},
|
||||
counts: {
|
||||
type: Counts,
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
)]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
@ -722,9 +728,11 @@ pub struct DataStoreStatus {
|
||||
/// Available space (bytes).
|
||||
pub avail: u64,
|
||||
/// Status of last GC
|
||||
pub gc_status: GarbageCollectionStatus,
|
||||
#[serde(skip_serializing_if="Option::is_none")]
|
||||
pub gc_status: Option<GarbageCollectionStatus>,
|
||||
/// Group/Snapshot counts
|
||||
pub counts: Counts,
|
||||
#[serde(skip_serializing_if="Option::is_none")]
|
||||
pub counts: Option<Counts>,
|
||||
}
|
||||
|
||||
#[api(
|
||||
|
Reference in New Issue
Block a user