From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-widget-toolkit 2/7] safe destroy: allow specifing additional items
Date: Mon, 19 Apr 2021 15:14:36 +0200 [thread overview]
Message-ID: <20210419131441.23650-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20210419131441.23650-1-f.ebner@proxmox.com>
to be used to add more checkboxes for PVE's guest destroy use case.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
src/window/SafeDestroy.js | 104 ++++++++++++++++++++------------------
1 file changed, 54 insertions(+), 50 deletions(-)
diff --git a/src/window/SafeDestroy.js b/src/window/SafeDestroy.js
index 91e0f2c..72e7e19 100644
--- a/src/window/SafeDestroy.js
+++ b/src/window/SafeDestroy.js
@@ -15,6 +15,8 @@ Ext.define('Proxmox.window.SafeDestroy', {
defaultFocus: 'confirmField',
showProgress: false,
+ additionalItems: [],
+
config: {
item: {
id: undefined,
@@ -96,56 +98,6 @@ Ext.define('Proxmox.window.SafeDestroy', {
},
},
- items: [
- {
- xtype: 'component',
- cls: [Ext.baseCSSPrefix + 'message-box-icon',
- Ext.baseCSSPrefix + 'message-box-warning',
- Ext.baseCSSPrefix + 'dlg-icon'],
- },
- {
- xtype: 'container',
- flex: 1,
- layout: {
- type: 'vbox',
- align: 'stretch',
- },
- items: [
- {
- xtype: 'component',
- reference: 'messageCmp',
- },
- {
- itemId: 'confirmField',
- reference: 'confirmField',
- xtype: 'textfield',
- name: 'confirm',
- labelWidth: 300,
- hideTrigger: true,
- allowBlank: false,
- },
- {
- xtype: 'container',
- reference: 'noteContainer',
- flex: 1,
- hidden: true,
- layout: {
- type: 'vbox',
- align: 'middle',
- },
- height: 25,
- items: [
- {
- xtype: 'component',
- reference: 'noteCmp',
- width: '300px',
- style: 'font-size: smaller; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;',
- },
- ],
- },
- ],
- },
- ],
buttons: [
{
reference: 'removeButton',
@@ -157,6 +109,58 @@ Ext.define('Proxmox.window.SafeDestroy', {
initComponent: function() {
let me = this;
+ me.items = [
+ {
+ xtype: 'component',
+ cls: [Ext.baseCSSPrefix + 'message-box-icon',
+ Ext.baseCSSPrefix + 'message-box-warning',
+ Ext.baseCSSPrefix + 'dlg-icon'],
+ },
+ {
+ xtype: 'container',
+ flex: 1,
+ layout: {
+ type: 'vbox',
+ align: 'stretch',
+ },
+ items: [
+ {
+ xtype: 'component',
+ reference: 'messageCmp',
+ },
+ {
+ itemId: 'confirmField',
+ reference: 'confirmField',
+ xtype: 'textfield',
+ name: 'confirm',
+ labelWidth: 300,
+ hideTrigger: true,
+ allowBlank: false,
+ },
+ ].concat(me.additionalItems).concat([
+ {
+ xtype: 'container',
+ reference: 'noteContainer',
+ flex: 1,
+ hidden: true,
+ layout: {
+ type: 'vbox',
+ align: 'middle',
+ },
+ height: 25,
+ items: [
+ {
+ xtype: 'component',
+ reference: 'noteCmp',
+ width: '300px',
+ style: 'font-size: smaller; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;',
+ },
+ ],
+ },
+ ]),
+ },
+ ];
+
me.callParent();
const item = me.getItem();
--
2.20.1
next prev parent reply other threads:[~2021-04-19 13:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-19 13:14 [pve-devel] [PATCH-SERIES widget-toolkit/manager] Add checkbox for removing unreferenced disks on guest removal Fabian Ebner
2021-04-19 13:14 ` [pve-devel] [PATCH proxmox-widget-toolkit 1/7] safe destroy: remove purge checkbox Fabian Ebner
2021-04-19 13:14 ` Fabian Ebner [this message]
2021-04-19 13:14 ` [pve-devel] [PATCH manager 3/7] ui: add SafeDestroyGuest window Fabian Ebner
2021-04-19 13:14 ` [pve-devel] [PATCH manager 4/7] ui: use new " Fabian Ebner
2021-04-19 13:14 ` [pve-devel] [PATCH manager 5/7] ui: safe destroy guest: add checkbox for removal of unreferenced disks Fabian Ebner
2021-04-19 13:14 ` [pve-devel] [PATCH manager 6/7] ui: use safe destroy window from proxmox-widget-toolkit Fabian Ebner
2021-04-19 13:14 ` [pve-devel] [PATCH manager 7/7] ui: remove SafeDestroy window Fabian Ebner
2021-04-22 18:45 ` [pve-devel] applied: [PATCH-SERIES widget-toolkit/manager] Add checkbox for removing unreferenced disks on guest removal 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=20210419131441.23650-3-f.ebner@proxmox.com \
--to=f.ebner@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 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