* [pbs-devel] [PATCH] api/status: readd gc-status
@ 2022-04-29 10:07 Dominik Csapak
2022-05-02 8:12 ` [pbs-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2022-04-29 10:07 UTC (permalink / raw)
To: pbs-devel
this was removed during the recent cleanup of this api call, and
we missed that the gc-status was used in the gui for the
datastore overview list (not the dashboard), so simply readd it
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
pbs-api-types/src/datastore.rs | 3 +++
src/api2/status.rs | 2 ++
2 files changed, 5 insertions(+)
diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
index df891cac..e0b900d9 100644
--- a/pbs-api-types/src/datastore.rs
+++ b/pbs-api-types/src/datastore.rs
@@ -975,6 +975,9 @@ pub struct DataStoreStatusListItem {
/// An error description, for example, when the datastore could not be looked up
#[serde(skip_serializing_if = "Option::is_none")]
pub error: Option<String>,
+ /// Status of last GC
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub gc_status: Option<GarbageCollectionStatus>,
}
pub const ADMIN_DATASTORE_LIST_SNAPSHOTS_RETURN_TYPE: ReturnType = ReturnType {
diff --git a/src/api2/status.rs b/src/api2/status.rs
index 51cb345b..45aa7fd7 100644
--- a/src/api2/status.rs
+++ b/src/api2/status.rs
@@ -63,6 +63,7 @@ pub fn datastore_status(
history_delta: None,
estimated_full_date: None,
error: Some(err.to_string()),
+ gc_status: None,
});
continue;
}
@@ -79,6 +80,7 @@ pub fn datastore_status(
history_delta: None,
estimated_full_date: None,
error: None,
+ gc_status: Some(datastore.last_gc_status()),
};
let rrd_dir = format!("datastore/{}", store);
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pbs-devel] applied: [PATCH] api/status: readd gc-status
2022-04-29 10:07 [pbs-devel] [PATCH] api/status: readd gc-status Dominik Csapak
@ 2022-05-02 8:12 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2022-05-02 8:12 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Dominik Csapak
Am 4/29/22 um 12:07 schrieb Dominik Csapak:
> this was removed during the recent cleanup of this api call, and
> we missed that the gc-status was used in the gui for the
> datastore overview list (not the dashboard), so simply readd it
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> pbs-api-types/src/datastore.rs | 3 +++
> src/api2/status.rs | 2 ++
> 2 files changed, 5 insertions(+)
>
>
applied, thanks!
fixed the typos in the commit message (readd), well actually rewrote it
and added info about the commit that broke this, which is always good to
have.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-02 8:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 10:07 [pbs-devel] [PATCH] api/status: readd gc-status Dominik Csapak
2022-05-02 8:12 ` [pbs-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal