[pve-devel] [PATCH manager v3 5/5] ui/acme: switch to new meta endpoint
Folke Gleumes
f.gleumes at proxmox.com
Tue Oct 31 10:05:14 CET 2023
Besides the switch from tos to meta endpoint, this fixes a visual bug,
where the 'Accept TOS' button would show up, even if no ToS was needed.
Signed-off-by: Folke Gleumes <f.gleumes at proxmox.com>
---
Changes since v2:
fixed tabs/spaces
www/manager6/node/ACME.js | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/www/manager6/node/ACME.js b/www/manager6/node/ACME.js
index 9f1dabce..21137b1a 100644
--- a/www/manager6/node/ACME.js
+++ b/www/manager6/node/ACME.js
@@ -79,15 +79,19 @@ Ext.define('PVE.node.ACMEAccountCreate', {
checkbox.setHidden(true);
Proxmox.Utils.API2Request({
- url: '/cluster/acme/tos',
+ url: '/cluster/acme/meta',
method: 'GET',
params: {
directory: value,
},
success: function(response, opt) {
- field.setValue(response.result.data);
- disp.setValue(response.result.data);
- checkbox.setHidden(false);
+ if (response.result.data.termsOfService) {
+ field.setValue(response.result.data.termsOfService);
+ disp.setValue(response.result.data.termsOfService);
+ checkbox.setHidden(false);
+ } else {
+ disp.setValue(undefined);
+ }
},
failure: function(response, opt) {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
--
2.39.2
More information about the pve-devel
mailing list