all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] storage: base edit: Don't send delete during creation
@ 2020-11-24 12:15 Dominic Jäger
  2020-11-24 12:39 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominic Jäger @ 2020-11-24 12:15 UTC (permalink / raw)
  To: pve-devel

... as this is now allowed by the API (createSchema() in PVE::SectionConfig).
It is only allowed by the update API call (updateSchema()).

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
---

 www/manager6/storage/Base.js | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/www/manager6/storage/Base.js b/www/manager6/storage/Base.js
index 79b4a618..21ab3a41 100644
--- a/www/manager6/storage/Base.js
+++ b/www/manager6/storage/Base.js
@@ -67,17 +67,22 @@ Ext.define('PVE.panel.StoragePruneInputPanel', {
 	let retention = PVE.Parser.printPropertyString(formValues)
 	// always delete old 'maxfiles', we map it to keep-last on edit win load
 	if (retention === '') {
-	    return {
-		delete: [
-		    'prune-backups',
-		    'maxfiles',
-		],
-	    };
+	    if (this.isCreate) {
+		return {};
+	    } else {
+		return {
+		    delete: [
+			'prune-backups',
+			'maxfiles',
+		    ],
+		};
+	    }
 	}
-	return {
-	    'prune-backups': retention,
-	    delete: 'maxfiles',
+	let options = { 'prune-backups': retention };
+	if (!this.isCreate) {
+	    options.delete = 'maxfiles';
 	}
+	return options;
     },
 
     listeners: {
-- 
2.20.1




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

* [pve-devel] applied: [PATCH manager] storage: base edit: Don't send delete during creation
  2020-11-24 12:15 [pve-devel] [PATCH manager] storage: base edit: Don't send delete during creation Dominic Jäger
@ 2020-11-24 12:39 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2020-11-24 12:39 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominic Jäger

On 24.11.20 13:15, Dominic Jäger wrote:
> ... as this is now allowed by the API (createSchema() in PVE::SectionConfig).
> It is only allowed by the update API call (updateSchema()).
> 
> Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
> ---
> 
>  www/manager6/storage/Base.js | 23 ++++++++++++++---------
>  1 file changed, 14 insertions(+), 9 deletions(-)
> 
>

applied, thanks!





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

end of thread, other threads:[~2020-11-24 12:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 12:15 [pve-devel] [PATCH manager] storage: base edit: Don't send delete during creation Dominic Jäger
2020-11-24 12:39 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal