public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Matthias Heiserer <m.heiserer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 1/3] API integration for default-lang in node-cfg
Date: Mon,  7 Feb 2022 12:19:01 +0100	[thread overview]
Message-ID: <20220207111903.1953333-1-m.heiserer@proxmox.com> (raw)

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
---
 src/api2/node/config.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/api2/node/config.rs b/src/api2/node/config.rs
index c4af7b92..0a119354 100644
--- a/src/api2/node/config.rs
+++ b/src/api2/node/config.rs
@@ -62,6 +62,8 @@ pub enum DeletableProperty {
     /// Delete the ciphers-tls-1.2 property.
     #[serde(rename="ciphers-tls-1.2")]
     ciphers_tls_1_2,
+    /// Delete the default-lang property.
+    default_lang,
 }
 
 #[api(
@@ -121,6 +123,7 @@ pub fn update_node_config(
                 DeletableProperty::email_from => { config.email_from = None; },
                 DeletableProperty::ciphers_tls_1_3 => { config.ciphers_tls_1_3 = None; },
                 DeletableProperty::ciphers_tls_1_2 => { config.ciphers_tls_1_2 = None; },
+                DeletableProperty::default_lang => { config.default_lang = None; },
             }
         }
     }
@@ -135,6 +138,7 @@ pub fn update_node_config(
     if update.email_from.is_some() { config.email_from = update.email_from; }
     if update.ciphers_tls_1_3.is_some() { config.ciphers_tls_1_3 = update.ciphers_tls_1_3; }
     if update.ciphers_tls_1_2.is_some() { config.ciphers_tls_1_2 = update.ciphers_tls_1_2; }
+    if update.default_lang.is_some() { config.default_lang = update.default_lang; }
 
     crate::config::node::save_config(&config)?;
 
-- 
2.30.2





             reply	other threads:[~2022-02-07 11:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 11:19 Matthias Heiserer [this message]
2022-02-07 11:19 ` [pbs-devel] [PATCH proxmox-backup 2/3] add english to translation enum for default-lang Matthias Heiserer
2022-02-07 14:35   ` [pbs-devel] applied: " Thomas Lamprecht
2022-02-07 11:19 ` [pbs-devel] [PATCH proxmox-backup 3/3] GUI option for node.cfg default-lang Matthias Heiserer
2022-02-09 12:53   ` Dominik Csapak
2022-02-07 14:33 ` [pbs-devel] applied: [PATCH proxmox-backup 1/3] API integration for default-lang in node-cfg 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=20220207111903.1953333-1-m.heiserer@proxmox.com \
    --to=m.heiserer@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