public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 0/3] improve ui for reaml sync jobs
@ 2023-06-12 12:43 Dominik Csapak
  2023-06-12 12:43 ` [pve-devel] [PATCH manager 1/3] ui: realm sync edit: improve ux when there is no ldap/ad realm Dominik Csapak
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dominik Csapak @ 2023-06-12 12:43 UTC (permalink / raw)
  To: pve-devel

by implementing @thomas suggestions.

The only thing not done for now is a 'run now' button, but for that
we either have to create a new api call, or change the existing
'sync' call to read the job config with an extra parameter
(i'd lean to do the latter)

Dominik Csapak (3):
  ui: realm sync edit: improve ux when there is no ldap/ad realm
  ui: realm sync: change enabled column rendering
  ui: realm: move sync job panel into realm panel

 www/manager6/dc/AuthView.js     |  2 +-
 www/manager6/dc/Config.js       | 28 ++++++++++++++++++++--------
 www/manager6/dc/RealmSyncJob.js | 20 +++++++++++++++++---
 3 files changed, 38 insertions(+), 12 deletions(-)

-- 
2.30.2





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

* [pve-devel] [PATCH manager 1/3] ui: realm sync edit: improve ux when there is no ldap/ad realm
  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
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2023-06-12 12:43 UTC (permalink / raw)
  To: pve-devel

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





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

* [pve-devel] [PATCH manager 2/3] ui: realm sync: change enabled column rendering
  2023-06-12 12:43 [pve-devel] [PATCH manager 0/3] improve ui for reaml sync jobs Dominik Csapak
  2023-06-12 12:43 ` [pve-devel] [PATCH manager 1/3] ui: realm sync edit: improve ux when there is no ldap/ad realm Dominik Csapak
@ 2023-06-12 12:43 ` Dominik Csapak
  2023-06-12 12:43 ` [pve-devel] [PATCH manager 3/3] ui: realm: move sync job panel into realm panel Dominik Csapak
  2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2023-06-12 12:43 UTC (permalink / raw)
  To: pve-devel

to make it consistent with the repositories ui, since having a checkbox
that is not clickable is confusing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/dc/RealmSyncJob.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/www/manager6/dc/RealmSyncJob.js b/www/manager6/dc/RealmSyncJob.js
index 8a1fb2b2..74942829 100644
--- a/www/manager6/dc/RealmSyncJob.js
+++ b/www/manager6/dc/RealmSyncJob.js
@@ -49,16 +49,19 @@ Ext.define('PVE.dc.RealmSyncJobView', {
 	},
     },
 
+    viewConfig: {
+	getRowClass: (record, _index) => record.get('enabled') ? '' : 'proxmox-disabled-row',
+    },
+
     columns: [
 	{
 	    header: gettext('Enabled'),
 	    width: 80,
 	    dataIndex: 'enabled',
-	    xtype: 'checkcolumn',
 	    sortable: true,
-	    disabled: true,
-	    disabledCls: 'x-item-enabled',
+	    align: 'center',
 	    stopSelection: false,
+	    renderer: Proxmox.Utils.renderEnabledIcon,
 	},
 	{
 	    text: gettext('Name'),
-- 
2.30.2





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

* [pve-devel] [PATCH manager 3/3] ui: realm: move sync job panel into realm panel
  2023-06-12 12:43 [pve-devel] [PATCH manager 0/3] improve ui for reaml sync jobs Dominik Csapak
  2023-06-12 12:43 ` [pve-devel] [PATCH manager 1/3] ui: realm sync edit: improve ux when there is no ldap/ad realm Dominik Csapak
  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 ` Dominik Csapak
  2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2023-06-12 12:43 UTC (permalink / raw)
  To: pve-devel

and make it collapsible, so that users can hide it if they're not
interested in it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/dc/AuthView.js |  2 +-
 www/manager6/dc/Config.js   | 28 ++++++++++++++++++++--------
 2 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/www/manager6/dc/AuthView.js b/www/manager6/dc/AuthView.js
index 60332c3f..229c944b 100644
--- a/www/manager6/dc/AuthView.js
+++ b/www/manager6/dc/AuthView.js
@@ -130,11 +130,11 @@ Ext.define('PVE.dc.AuthView', {
 		},
 	    ],
 	    listeners: {
-		activate: () => me.reload(),
 		itemdblclick: () => me.run_editor(),
 	    },
 	});
 
 	me.callParent();
+	me.reload();
     },
 });
diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js
index 72a9bec1..1699f0a8 100644
--- a/www/manager6/dc/Config.js
+++ b/www/manager6/dc/Config.js
@@ -134,18 +134,30 @@ Ext.define('PVE.dc.Config', {
 		itemId: 'roles',
 	    },
 	    {
-		xtype: 'pveAuthView',
 		title: gettext('Realms'),
+		xtype: 'panel',
+		layout: {
+		    type: 'border',
+		},
 		groups: ['permissions'],
 		iconCls: 'fa fa-address-book-o',
 		itemId: 'domains',
-	    },
-	    {
-		xtype: 'pveRealmSyncJobView',
-		title: gettext('Realm Sync'),
-		groups: ['permissions'],
-		iconCls: 'fa fa-refresh',
-		itemId: 'realmsyncjobs',
+		items: [
+		    {
+			xtype: 'pveAuthView',
+			region: 'center',
+			border: false,
+		    },
+		    {
+			xtype: 'pveRealmSyncJobView',
+			title: gettext('Sync Jobs'),
+			region: 'south',
+			collapsible: true,
+			animCollapse: false,
+			border: false,
+			height: '50%',
+		    }
+		],
 	    },
 	    {
 		xtype: 'pveHAStatus',
-- 
2.30.2





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

end of thread, other threads:[~2023-06-12 12:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12 12:43 [pve-devel] [PATCH manager 0/3] improve ui for reaml sync jobs Dominik Csapak
2023-06-12 12:43 ` [pve-devel] [PATCH manager 1/3] ui: realm sync edit: improve ux when there is no ldap/ad realm Dominik Csapak
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

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