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 3/6] cli: manager: sync: add 'sync-direction' parameter to list
Date: Mon, 25 Nov 2024 12:15:34 +0100	[thread overview]
Message-ID: <20241125111537.1504618-4-d.csapak@proxmox.com> (raw)
In-Reply-To: <20241125111537.1504618-1-d.csapak@proxmox.com>

so one can list pull and push jobs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
not really happy with this, ideally we would also allow 'all' here, but
then we'd have to show the type in the return value too, which is not
really possible with the 'SyncJobConfig' type (as that get's
deserialized) where the direction is part of the config section type

alternatively we could here switch to the '/admin/sync' api from the
'/config/sync' api which does contain the sync-direction (and also
the status). then it'd be easy to show all types

 src/bin/proxmox_backup_manager/sync.rs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/bin/proxmox_backup_manager/sync.rs b/src/bin/proxmox_backup_manager/sync.rs
index 005cce6f3..b08bfb58b 100644
--- a/src/bin/proxmox_backup_manager/sync.rs
+++ b/src/bin/proxmox_backup_manager/sync.rs
@@ -4,7 +4,7 @@ use serde_json::Value;
 use proxmox_router::{cli::*, ApiHandler, RpcEnvironment};
 use proxmox_schema::api;
 
-use pbs_api_types::JOB_ID_SCHEMA;
+use pbs_api_types::{SyncDirection, JOB_ID_SCHEMA};
 
 use proxmox_backup::api2;
 
@@ -20,6 +20,10 @@ fn render_group_filter(value: &Value, _record: &Value) -> Result<String, Error>
 #[api(
     input: {
         properties: {
+            "sync-direction": {
+                type: SyncDirection,
+                optional: true,
+            },
             "output-format": {
                 schema: OUTPUT_FORMAT,
                 optional: true,
-- 
2.39.5



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


  parent reply	other threads:[~2024-11-25 11:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25 11:15 [pbs-devel] [PATCH proxmox-backup 0/6] sync job ui improvements Dominik Csapak
2024-11-25 11:15 ` [pbs-devel] [PATCH proxmox-backup 1/6] api: admin: sync: add direction to sync job status Dominik Csapak
2024-11-25 11:15 ` [pbs-devel] [PATCH proxmox-backup 2/6] api: admin: sync: add optional 'all' sync type for listing Dominik Csapak
2024-11-25 11:15 ` Dominik Csapak [this message]
2024-11-25 11:15 ` [pbs-devel] [PATCH proxmox-backup 4/6] ui: sync jobs: revert to single list for pull/push jobs Dominik Csapak
2024-11-25 11:15 ` [pbs-devel] [PATCH proxmox-backup 5/6] ui: sync jobs: change default sorting to 'store' -> 'direction' -> 'id' Dominik Csapak
2024-11-25 11:15 ` [pbs-devel] [PATCH proxmox-backup 6/6] ui: sync jobs: add search box Dominik Csapak
2024-11-25 11:30 ` [pbs-devel] [PATCH proxmox-backup 0/6] sync job ui improvements Christian Ebner
2024-11-26 15:03 ` [pbs-devel] applied-series: " 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=20241125111537.1504618-4-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