[pve-devel] [PATCH manager 1/1] ui: realm sync: add 'remove-vanished' option
Dominik Csapak
d.csapak at proxmox.com
Wed Oct 27 14:57:08 CEST 2021
in default sync options and the sync window. There we disable it if
'full' sync is enabled to make it clear the combination does not make
sense.
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/dc/AuthEditLDAP.js | 14 +++++++++++++-
www/manager6/dc/SyncWindow.js | 19 +++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/www/manager6/dc/AuthEditLDAP.js b/www/manager6/dc/AuthEditLDAP.js
index 015a5a6e..2942ae64 100644
--- a/www/manager6/dc/AuthEditLDAP.js
+++ b/www/manager6/dc/AuthEditLDAP.js
@@ -100,7 +100,7 @@ Ext.define('PVE.panel.LDAPSyncInputPanel', {
xtype: 'pveAuthLDAPSyncPanel',
editableAttributes: ['email'],
- editableDefaults: ['scope', 'full', 'enable-new', 'purge'],
+ editableDefaults: ['scope', 'full', 'enable-new', 'purge', 'remove-vanished'],
default_opts: {},
sync_attributes: {},
@@ -216,6 +216,18 @@ Ext.define('PVE.panel.LDAPSyncInputPanel', {
name: 'full',
fieldLabel: gettext('Full'),
},
+ {
+ xtype: 'proxmoxKVComboBox',
+ value: '__default__',
+ deleteEmpty: false,
+ comboItems: [
+ ['__default__', Proxmox.Utils.NoneText],
+ ['1', Proxmox.Utils.yesText],
+ ['0', Proxmox.Utils.noText],
+ ],
+ name: 'remove-vanished',
+ fieldLabel: gettext('Remove vanished'),
+ },
],
column2: [
diff --git a/www/manager6/dc/SyncWindow.js b/www/manager6/dc/SyncWindow.js
index 25a42182..c988a4bf 100644
--- a/www/manager6/dc/SyncWindow.js
+++ b/www/manager6/dc/SyncWindow.js
@@ -12,6 +12,11 @@ Ext.define('PVE.dc.SyncWindow', {
xclass: 'Ext.app.ViewController',
control: {
+ 'field[name=full]': {
+ change: function(field, value) {
+ this.lookup('remove-vanished').setDisabled(value === '1');
+ },
+ },
'form': {
validitychange: function(field, valid) {
let me = this;
@@ -101,6 +106,20 @@ Ext.define('PVE.dc.SyncWindow', {
name: 'full',
fieldLabel: gettext('Full'),
},
+ {
+ xtype: 'proxmoxKVComboBox',
+ value: '',
+ emptyText: gettext('No default available'),
+ deleteEmpty: false,
+ allowBlank: false,
+ comboItems: [
+ ['1', Proxmox.Utils.yesText],
+ ['0', Proxmox.Utils.noText],
+ ],
+ name: 'remove-vanished',
+ reference: 'remove-vanished',
+ fieldLabel: gettext('Remove vanished'),
+ },
],
column2: [
--
2.30.2
More information about the pve-devel
mailing list