From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 3/6] ui: tape backup job: don't send delete value on creation
Date: Wed, 6 Mar 2024 12:21:01 +0100 [thread overview]
Message-ID: <20240306112104.2486728-5-d.csapak@proxmox.com> (raw)
In-Reply-To: <20240306112104.2486728-1-d.csapak@proxmox.com>
this is not a valid parameter for the create call. To do that in the
onGetValues method, we have to pass the 'isCreate' value through to the
input panels via cbind.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/tape/window/TapeBackupJob.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/www/tape/window/TapeBackupJob.js b/www/tape/window/TapeBackupJob.js
index 2b18e0e0..abbbaa0b 100644
--- a/www/tape/window/TapeBackupJob.js
+++ b/www/tape/window/TapeBackupJob.js
@@ -61,8 +61,16 @@ Ext.define('PBS.TapeManagement.BackupJobEdit', {
Proxmox.Utils.assemble_field_data(values, { "delete": 'eject-media' });
}
PBS.Utils.delete_if_default(values, 'notify-user');
+
+ if (me.isCreate) {
+ delete values.delete;
+ }
+
return values;
},
+ cbind: {
+ isCreate: '{isCreate}', // pass it through
+ },
column1: [
{
xtype: 'pmxDisplayEditField',
@@ -184,8 +192,14 @@ Ext.define('PBS.TapeManagement.BackupJobEdit', {
delete values['group-filter'];
values.delete = 'group-filter';
}
+ if (this.isCreate) {
+ delete values.delete;
+ }
return values;
},
+ cbind: {
+ isCreate: '{isCreate}', // pass it through
+ },
title: gettext('Group Filter'),
items: [
{
--
2.39.2
next prev parent reply other threads:[~2024-03-06 11:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 11:20 [pbs-devel] [PATCH widget-toolkit/proxmox-backup] adapt to stricter api parameter checks Dominik Csapak
2024-03-06 11:20 ` [pbs-devel] [PATCH widget-toolkit 1/1] realms: don't send type and delete on creation Dominik Csapak
2024-03-06 11:20 ` [pbs-devel] [PATCH proxmox-backup 1/6] ui: prune job edit: indent fix Dominik Csapak
2024-03-06 11:21 ` [pbs-devel] [PATCH proxmox-backup 2/6] ui: metrics: don't send digest when creating a new influxdbupd host Dominik Csapak
2024-03-06 11:21 ` Dominik Csapak [this message]
2024-03-06 11:21 ` [pbs-devel] [PATCH proxmox-backup 4/6] ui: prune: fix sending invalid parameters Dominik Csapak
2024-03-06 11:21 ` [pbs-devel] [PATCH proxmox-backup 5/6] ui: sync job: don't send delete value on creation Dominik Csapak
2024-03-06 11:21 ` [pbs-devel] [PATCH proxmox-backup 6/6] ui: verify " Dominik Csapak
2024-03-07 9:32 ` [pbs-devel] applied-series: [PATCH widget-toolkit/proxmox-backup] adapt to stricter api parameter checks 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=20240306112104.2486728-5-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