public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] ui: prune job edit: fix disabling jobs
@ 2022-11-14  9:42 Fiona Ebner
  2022-11-14 10:54 ` Dominik Csapak
  2022-11-15 14:29 ` Thomas Lamprecht
  0 siblings, 2 replies; 6+ messages in thread
From: Fiona Ebner @ 2022-11-14  9:42 UTC (permalink / raw)
  To: pbs-devel

The backend doesn't have an 'enable' option, but 'disable'. Could be
converted before sending and after loading, but it's cleaner to just
align it with the backend.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 www/window/PruneJobEdit.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/www/window/PruneJobEdit.js b/www/window/PruneJobEdit.js
index 87be71ad..1b43b31f 100644
--- a/www/window/PruneJobEdit.js
+++ b/www/window/PruneJobEdit.js
@@ -112,11 +112,11 @@ Ext.define('PBS.window.PruneJobEdit', {
 	    },
 	    {
 		xtype: 'proxmoxcheckbox',
-		fieldLabel: gettext('Enabled'),
-		name: 'enable',
-		uncheckedValue: 0,
-		defaultValue: 1,
-		checked: true,
+		fieldLabel: gettext('Disabled'),
+		name: 'disable',
+		uncheckedValue: false,
+		defaultValue: true,
+		checked: false,
 	    },
 	],
 
-- 
2.30.2





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

* Re: [pbs-devel] [PATCH proxmox-backup] ui: prune job edit: fix disabling jobs
  2022-11-14  9:42 [pbs-devel] [PATCH proxmox-backup] ui: prune job edit: fix disabling jobs Fiona Ebner
@ 2022-11-14 10:54 ` Dominik Csapak
  2022-11-14 13:26   ` Fabian Grünbichler
  2022-11-15 14:29 ` Thomas Lamprecht
  1 sibling, 1 reply; 6+ messages in thread
From: Dominik Csapak @ 2022-11-14 10:54 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Fiona Ebner

IMO good, but do we really drop unrecognized parameters in the api?
is that intentional? (iow. in pve it would have triggered an api exception
since that parameter does not exist)




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

* Re: [pbs-devel] [PATCH proxmox-backup] ui: prune job edit: fix disabling jobs
  2022-11-14 10:54 ` Dominik Csapak
@ 2022-11-14 13:26   ` Fabian Grünbichler
  2022-11-14 14:01     ` Dominik Csapak
  0 siblings, 1 reply; 6+ messages in thread
From: Fabian Grünbichler @ 2022-11-14 13:26 UTC (permalink / raw)
  To: Fiona Ebner, Proxmox Backup Server development discussion

On November 14, 2022 11:54 am, Dominik Csapak wrote:
> IMO good, but do we really drop unrecognized parameters in the api?
> is that intentional? (iow. in pve it would have triggered an api exception
> since that parameter does not exist)

yes, if it's an AllOf Schema (which everything containing a flattened type is).
for regular ObjectSchema-s, AdditionalProperties like in PVE is configurable.




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

* Re: [pbs-devel] [PATCH proxmox-backup] ui: prune job edit: fix disabling jobs
  2022-11-14 13:26   ` Fabian Grünbichler
@ 2022-11-14 14:01     ` Dominik Csapak
  0 siblings, 0 replies; 6+ messages in thread
From: Dominik Csapak @ 2022-11-14 14:01 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion,
	Fabian Grünbichler, Fiona Ebner

On 11/14/22 14:26, Fabian Grünbichler wrote:
> On November 14, 2022 11:54 am, Dominik Csapak wrote:
>> IMO good, but do we really drop unrecognized parameters in the api?
>> is that intentional? (iow. in pve it would have triggered an api exception
>> since that parameter does not exist)
> 
> yes, if it's an AllOf Schema (which everything containing a flattened type is).
> for regular ObjectSchema-s, AdditionalProperties like in PVE is configurable.
> 

meh... for configuration APIs i quite like the PVE behavior, since we can catch
such things much earlier.





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

* Re: [pbs-devel] [PATCH proxmox-backup] ui: prune job edit: fix disabling jobs
  2022-11-14  9:42 [pbs-devel] [PATCH proxmox-backup] ui: prune job edit: fix disabling jobs Fiona Ebner
  2022-11-14 10:54 ` Dominik Csapak
@ 2022-11-15 14:29 ` Thomas Lamprecht
  2022-11-16  9:41   ` Fiona Ebner
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Lamprecht @ 2022-11-15 14:29 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Fiona Ebner

Am 14/11/2022 um 10:42 schrieb Fiona Ebner:
> The backend doesn't have an 'enable' option, but 'disable'. Could be
> converted before sending and after loading, but it's cleaner to just
> align it with the backend.

while it is cleaner code-wise, its worse UX-wise; as checking (=enabling) a
"negative" option like disable is always a bit odd and in general a bit less
intuitive.

I replaced this by a patch that converts it on load/before send to keep the
"Enable" display.




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

* Re: [pbs-devel] [PATCH proxmox-backup] ui: prune job edit: fix disabling jobs
  2022-11-15 14:29 ` Thomas Lamprecht
@ 2022-11-16  9:41   ` Fiona Ebner
  0 siblings, 0 replies; 6+ messages in thread
From: Fiona Ebner @ 2022-11-16  9:41 UTC (permalink / raw)
  To: Thomas Lamprecht, Proxmox Backup Server development discussion

Am 15.11.22 um 15:29 schrieb Thomas Lamprecht:
> Am 14/11/2022 um 10:42 schrieb Fiona Ebner:
>> The backend doesn't have an 'enable' option, but 'disable'. Could be
>> converted before sending and after loading, but it's cleaner to just
>> align it with the backend.
> 
> while it is cleaner code-wise, its worse UX-wise; as checking (=enabling) a
> "negative" option like disable is always a bit odd and in general a bit less
> intuitive.
> 
> I replaced this by a patch that converts it on load/before send to keep the
> "Enable" display.

Makes sense, thanks! For PBS 3.0, should we align it with sync and
verify jobs where the schedule is optional (so disabled if no schedule
is set)? That would close #4342.




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

end of thread, other threads:[~2022-11-16  9:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14  9:42 [pbs-devel] [PATCH proxmox-backup] ui: prune job edit: fix disabling jobs Fiona Ebner
2022-11-14 10:54 ` Dominik Csapak
2022-11-14 13:26   ` Fabian Grünbichler
2022-11-14 14:01     ` Dominik Csapak
2022-11-15 14:29 ` Thomas Lamprecht
2022-11-16  9:41   ` Fiona Ebner

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