[pbs-devel] [RFC widget-toolkit] acme: separate flag to disable the 'domains=' array
Wolfgang Bumiller
w.bumiller at proxmox.com
Fri Apr 16 15:35:17 CEST 2021
PVE has 2 domain lists, PMG only 1 since it requires the
additional type.
In PBS I do not want to have 2 lists either, since it seems
rather inconvenient to have 2 different ways to access the
same list.
Currently we decide this based on whether we have multiple
certificate types, which in PBS we don't, so we need a
separate option for this.
Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
src/panel/ACMEDomains.js | 4 ++++
src/window/ACMEDomains.js | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/panel/ACMEDomains.js b/src/panel/ACMEDomains.js
index 6cfc501..a7fb088 100644
--- a/src/panel/ACMEDomains.js
+++ b/src/panel/ACMEDomains.js
@@ -21,6 +21,8 @@ Ext.define('Proxmox.panel.ACMEDomains', {
domainUsages: undefined,
// if no domainUsages parameter is supllied, the orderUrl is required instead:
orderUrl: undefined,
+ // Force the use of 'acmedomainX' properties.
+ separateDomainEntries: undefined,
acmeUrl: undefined,
@@ -87,6 +89,7 @@ Ext.define('Proxmox.panel.ACMEDomains', {
acmeUrl: view.acmeUrl,
nodeconfig: view.nodeconfig,
domainUsages: view.domainUsages,
+ separateDomainEntries: view.separateDomainEntries,
apiCallDone: function() {
me.reload();
},
@@ -105,6 +108,7 @@ Ext.define('Proxmox.panel.ACMEDomains', {
acmeUrl: view.acmeUrl,
nodeconfig: view.nodeconfig,
domainUsages: view.domainUsages,
+ separateDomainEntries: view.separateDomainEntries,
domain: selection[0].data,
apiCallDone: function() {
me.reload();
diff --git a/src/window/ACMEDomains.js b/src/window/ACMEDomains.js
index 930a4c3..b040e33 100644
--- a/src/window/ACMEDomains.js
+++ b/src/window/ACMEDomains.js
@@ -16,6 +16,9 @@ Ext.define('Proxmox.window.ACMEDomainEdit', {
// For PMG the we have multiple certificates, so we have a "usage" attribute & column.
domainUsages: undefined,
+ // Force the use of 'acmedomainX' properties.
+ separateDomainEntries: undefined,
+
cbindData: function(config) {
let me = this;
return {
@@ -50,7 +53,7 @@ Ext.define('Proxmox.window.ACMEDomainEdit', {
};
// If we have a 'usage' property (pmg), we only use the `acmedomainX` config keys.
- if (win.domainUsages) {
+ if (win.separateDomainEntries || win.domainUsages) {
if (!configkey || configkey === 'acme') {
configkey = find_free_slot();
}
--
2.20.1
More information about the pbs-devel
mailing list