* [pve-devel] [PATCH manager] ui: fix reset behavior of backup job editor
@ 2024-04-23 7:30 Dominik Csapak
2024-04-23 7:53 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2024-04-23 7:30 UTC (permalink / raw)
To: pve-devel
when we `bind` we also have to set the initial value correctly,
otherwise the form dirty tracking is off (the initial bind set does not
reset the `originalValue`)
also the bandwidth selector auto transformed the value `null` to `0`
when there was no initial transformation. Since this is not a valid
value anyway, skip that.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/dc/Backup.js | 1 +
www/manager6/form/BandwidthSelector.js | 2 +-
www/manager6/panel/BackupAdvancedOptions.js | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index cd4ece33..336b23f5 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -350,6 +350,7 @@ Ext.define('PVE.dc.BackupEdit', {
],
fieldLabel: gettext('Notification mode'),
name: 'notification-mode',
+ value: '__default__',
cbind: {
deleteEmpty: '{!isCreate}',
},
diff --git a/www/manager6/form/BandwidthSelector.js b/www/manager6/form/BandwidthSelector.js
index 01ec8f9c..6f20af3a 100644
--- a/www/manager6/form/BandwidthSelector.js
+++ b/www/manager6/form/BandwidthSelector.js
@@ -62,7 +62,7 @@ Ext.define('PVE.form.SizeField', {
flex: 1,
enableKeyEvents: true,
setValue: function(v) {
- if (!this._transformed) {
+ if (!this._transformed && v !== null) {
let fieldContainer = this.up('fieldcontainer');
let vm = fieldContainer.getViewModel();
let unit = vm.get('unit');
diff --git a/www/manager6/panel/BackupAdvancedOptions.js b/www/manager6/panel/BackupAdvancedOptions.js
index c79c31cb..f1810637 100644
--- a/www/manager6/panel/BackupAdvancedOptions.js
+++ b/www/manager6/panel/BackupAdvancedOptions.js
@@ -185,6 +185,7 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
clusterView: true,
storageContent: 'images',
allowBlank: false,
+ disabled: true,
bind: {
disabled: '{!fleecingEnabled.checked}',
},
--
2.39.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH manager] ui: fix reset behavior of backup job editor
2024-04-23 7:30 [pve-devel] [PATCH manager] ui: fix reset behavior of backup job editor Dominik Csapak
@ 2024-04-23 7:53 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-04-23 7:53 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
Am 23/04/2024 um 09:30 schrieb Dominik Csapak:
> when we `bind` we also have to set the initial value correctly,
> otherwise the form dirty tracking is off (the initial bind set does not
> reset the `originalValue`)
>
> also the bandwidth selector auto transformed the value `null` to `0`
> when there was no initial transformation. Since this is not a valid
> value anyway, skip that.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> www/manager6/dc/Backup.js | 1 +
> www/manager6/form/BandwidthSelector.js | 2 +-
> www/manager6/panel/BackupAdvancedOptions.js | 1 +
> 3 files changed, 3 insertions(+), 1 deletion(-)
>
>
applied, thanks!
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-23 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-23 7:30 [pve-devel] [PATCH manager] ui: fix reset behavior of backup job editor Dominik Csapak
2024-04-23 7:53 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox