public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup v2 1/6] api2/types: add TaskStateType struct
Date: Tue,  6 Oct 2020 12:25:23 +0200	[thread overview]
Message-ID: <20201006102528.15383-1-d.csapak@proxmox.com> (raw)

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





             reply	other threads:[~2020-10-06 10:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 10:25 Dominik Csapak [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201006102528.15383-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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