public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/1] remove pbsEncryptionCheckbox
Date: Wed, 28 Oct 2020 16:22:22 +0100	[thread overview]
Message-ID: <20201028152222.25023-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20201028152222.25023-1-s.ivanov@proxmox.com>

it got moved to proxmox-widget-toolkit for reuse in PMG

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 www/manager6/storage/PBSEdit.js | 62 ---------------------------------
 1 file changed, 62 deletions(-)

diff --git a/www/manager6/storage/PBSEdit.js b/www/manager6/storage/PBSEdit.js
index 841b5218..58d38b34 100644
--- a/www/manager6/storage/PBSEdit.js
+++ b/www/manager6/storage/PBSEdit.js
@@ -1,65 +1,3 @@
-Ext.define('Proxmox.form.PBSEncryptionCheckbox', {
-    extend: 'Ext.form.field.Checkbox',
-    xtype: 'pbsEncryptionCheckbox',
-
-    inputValue: true,
-
-    viewModel: {
-	data: {
-	    value: null,
-	    originalValue: null,
-	},
-	formulas: {
-	    blabel: (get) => {
-		let v = get('value');
-		let original = get('originalValue');
-		if (!get('isCreate') && original) {
-		    if (!v) {
-			return gettext('Warning: Existing encryption key will be deleted!');
-		    }
-		    return gettext('Active');
-		} else {
-		    return gettext('Auto-generate a client encryption key, saved privately on cluster filesystem');
-		}
-	    },
-	},
-    },
-
-    bind: {
-	value: '{value}',
-	boxLabel: '{blabel}',
-    },
-    resetOriginalValue: function() {
-	let me = this;
-	let vm = me.getViewModel();
-	vm.set('originalValue', me.value);
-
-	me.callParent(arguments);
-    },
-
-    getSubmitData: function() {
-	let me = this;
-	let val = me.getSubmitValue();
-	if (!me.isCreate) {
-	    if (val === null) {
-	       return { 'delete': 'encryption-key' };
-	    } else if (val && !!val !== !!me.originalValue) {
-	       return { 'encryption-key': 'autogen' };
-	    }
-	} else if (val) {
-	   return { 'encryption-key': 'autogen' };
-	}
-	return null;
-    },
-
-    initComponent: function() {
-	let me = this;
-	me.callParent();
-
-	let vm = me.getViewModel();
-	vm.set('isCreate', me.isCreate);
-    },
-});
 Ext.define('PVE.storage.PBSInputPanel', {
     extend: 'PVE.panel.StorageBase',
 
-- 
2.20.1





      parent reply	other threads:[~2020-10-28 15:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28 15:22 [pve-devel] [PATCH widget-toolkit/manager] move PBSEncryptionCheckbox to proxmox-widget-toolkit Stoiko Ivanov
2020-10-28 15:22 ` [pve-devel] [PATCH widget-toolkit 1/1] move pbsEncryptionCheckbox from pve-manager Stoiko Ivanov
2020-10-28 16:09   ` Thomas Lamprecht
2020-10-28 15:22 ` Stoiko Ivanov [this message]

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=20201028152222.25023-3-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pve-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