public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup v2 1/6] api2/types: add TaskStateType struct
@ 2020-10-06 10:25 Dominik Csapak
  2020-10-06 10:25 ` [pbs-devel] [PATCH proxmox-backup v2 2/6] api2/status: add type- and statusfilter to tasks api call Dominik Csapak
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Dominik Csapak @ 2020-10-06 10:25 UTC (permalink / raw)
  To: pbs-devel

the same as the regular TaskState, but without its fields, so that
we can use the api macro and use it as api call parameter

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/api2/types/mod.rs | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/api2/types/mod.rs b/src/api2/types/mod.rs
index 348d3bf4..75b68879 100644
--- a/src/api2/types/mod.rs
+++ b/src/api2/types/mod.rs
@@ -662,6 +662,20 @@ impl From<crate::server::TaskListInfo> for TaskListItem {
     }
 }
 
+#[api()]
+#[derive(Eq, PartialEq, Debug, Serialize, Deserialize)]
+#[serde(rename_all = "lowercase")]
+pub enum TaskStateType {
+    /// Ok
+    OK,
+    /// Warning
+    Warning,
+    /// Error
+    Error,
+    /// Unknown
+    Unknown,
+}
+
 #[api()]
 #[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
 #[serde(rename_all = "lowercase")]
-- 
2.20.1





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-10-06 14:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06 10:25 [pbs-devel] [PATCH proxmox-backup v2 1/6] api2/types: add TaskStateType struct Dominik Csapak
2020-10-06 10:25 ` [pbs-devel] [PATCH proxmox-backup v2 2/6] api2/status: add type- and statusfilter to tasks api call Dominik Csapak
2020-10-06 10:25 ` [pbs-devel] [PATCH proxmox-backup v2 3/6] ui: implment task history limit and make it configurable Dominik Csapak
2020-10-06 10:53   ` Thomas Lamprecht
2020-10-06 11:25     ` Dominik Csapak
2020-10-06 10:25 ` [pbs-devel] [PATCH proxmox-backup v2 4/6] ui: Dashboard/TaskSummary: refactor types and title Dominik Csapak
2020-10-06 10:25 ` [pbs-devel] [PATCH proxmox-backup v2 5/6] ui: Dashboard/TaskSummary: add Verifies to the Summary Dominik Csapak
2020-10-06 11:10   ` Thomas Lamprecht
2020-10-06 11:25     ` Thomas Lamprecht
2020-10-06 10:25 ` [pbs-devel] [PATCH proxmox-backup v2 6/6] ui: Dashboard/TaskSummary: show task overlay when clicking on a count Dominik Csapak
2020-10-06 14:07 ` [pbs-devel] applied-series: [PATCH proxmox-backup v2 1/6] api2/types: add TaskStateType struct Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal