From: Alwin Antreich <a.antreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 4/4] ceph: gui: display warning on min_size 1
Date: Tue, 27 Oct 2020 17:47:17 +0100 [thread overview]
Message-ID: <20201027164717.2001054-4-a.antreich@proxmox.com> (raw)
In-Reply-To: <20201027164717.2001054-1-a.antreich@proxmox.com>
Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
---
www/manager6/ceph/Pool.js | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/www/manager6/ceph/Pool.js b/www/manager6/ceph/Pool.js
index 28b0b4a5..93ed667e 100644
--- a/www/manager6/ceph/Pool.js
+++ b/www/manager6/ceph/Pool.js
@@ -47,7 +47,23 @@ Ext.define('PVE.CephPoolEdit', {
value: 2,
minValue: 1,
maxValue: 7,
- allowBlank: false
+ allowBlank: false,
+ listeners: {
+ change: function(field, val) {
+ if (val < 2) {
+ field.up().down('field[name=min_size-warning]').setHidden(false);
+ field.setFieldLabel(gettext('Min. Size') + ' <i class="fa fa-exclamation-triangle warning"></i>');
+ }
+ }
+ },
+ },
+ {
+ xtype: 'displayfield',
+ name: 'min_size-warning',
+ padding: '5 0 0 0',
+ userCls: 'pmx-hint',
+ value: 'A pool with min_size=1 could lead to data loss, incomplete PGs or unfound objects.',
+ hidden: true,
},
{
xtype: 'pveCephRuleSelector',
--
2.27.0
prev parent reply other threads:[~2020-10-27 16:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 16:47 [pve-devel] [PATCH manager 1/4] ceph: add get api call for single pool Alwin Antreich
2020-10-27 16:47 ` [pve-devel] [PATCH manager 2/4] ceph: gui: ability to edit an existing pool Alwin Antreich
2020-10-27 16:47 ` [pve-devel] [PATCH manager 3/4] ceph: gui: use separate reload function Alwin Antreich
2020-10-27 16:47 ` Alwin Antreich [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=20201027164717.2001054-4-a.antreich@proxmox.com \
--to=a.antreich@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.