From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/3] ui: realm sync edit: improve ux when there is no ldap/ad realm
Date: Mon, 12 Jun 2023 14:43:54 +0200 [thread overview]
Message-ID: <20230612124356.3455888-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20230612124356.3455888-1-d.csapak@proxmox.com>
by adding an empty text to the dropdown, and disabling the other
possibly invalid fields, so that it's clear why the panel is invalid
as soon as there is an ldap/ad realm, it gets autoselected anyway and
the fields get re-enabled.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/dc/RealmSyncJob.js | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/www/manager6/dc/RealmSyncJob.js b/www/manager6/dc/RealmSyncJob.js
index 5a903ef7..8a1fb2b2 100644
--- a/www/manager6/dc/RealmSyncJob.js
+++ b/www/manager6/dc/RealmSyncJob.js
@@ -154,6 +154,11 @@ Ext.define('PVE.dc.RealmSyncJobEdit', {
updateDefaults: function(_field, newValue) {
let me = this;
+
+ ['scope','enable-new','schedule'].forEach((reference) => {
+ me.lookup(reference)?.setDisabled(false);
+ });
+
// only update on create
if (!me.getView().isCreate) {
return;
@@ -232,6 +237,9 @@ Ext.define('PVE.dc.RealmSyncJobEdit', {
xtype: 'pmxRealmComboBox',
storeFilter: rec => rec.data.type === 'ldap' || rec.data.type === 'ad',
},
+ listConfig: {
+ emptyText: `<div class="x-grid-empty">${gettext('No LDAP/AD Realm found')}</div>`,
+ },
cbind: {
editable: '{isCreate}',
},
@@ -245,6 +253,7 @@ Ext.define('PVE.dc.RealmSyncJobEdit', {
{
xtype: 'pveCalendarEvent',
fieldLabel: gettext('Schedule'),
+ disabled: true,
allowBlank: false,
name: 'schedule',
reference: 'schedule',
@@ -265,6 +274,7 @@ Ext.define('PVE.dc.RealmSyncJobEdit', {
xtype: 'proxmoxKVComboBox',
name: 'scope',
reference: 'scope',
+ disabled: true,
fieldLabel: gettext('Scope'),
value: '',
emptyText: gettext('No default available'),
@@ -280,6 +290,7 @@ Ext.define('PVE.dc.RealmSyncJobEdit', {
xtype: 'proxmoxKVComboBox',
value: '1',
deleteEmpty: false,
+ disabled: true,
allowBlank: false,
comboItems: [
['1', Proxmox.Utils.yesText],
--
2.30.2
next prev parent reply other threads:[~2023-06-12 12:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 12:43 [pve-devel] [PATCH manager 0/3] improve ui for reaml sync jobs Dominik Csapak
2023-06-12 12:43 ` Dominik Csapak [this message]
2023-06-12 12:43 ` [pve-devel] [PATCH manager 2/3] ui: realm sync: change enabled column rendering Dominik Csapak
2023-06-12 12:43 ` [pve-devel] [PATCH manager 3/3] ui: realm: move sync job panel into realm panel Dominik Csapak
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=20230612124356.3455888-2-d.csapak@proxmox.com \
--to=d.csapak@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.