]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/node/ACME.js
ui: eslint: fix trailing comma and comma related whitespaces errors
[pve-manager.git] / www / manager6 / node / ACME.js
index 6a2730cb4c3a79f7521679d2c97c7d9cd0632200..cfe9cc12907d4a5c39c3ed37dabd09fa51dad50f 100644 (file)
@@ -14,7 +14,7 @@ Ext.define('PVE.node.ACMEAccountCreate', {
     items: [
        {
            xtype: 'proxmoxtextfield',
-           fieldLabel: gettext('Name'),
+           fieldLabel: gettext('Account Name'),
            name: 'name',
            cbind: {
                emptyText: (get) => get('defaultExists') ? '' : 'default',
@@ -26,7 +26,7 @@ Ext.define('PVE.node.ACMEAccountCreate', {
            name: 'contact',
            vtype: 'email',
            allowBlank: false,
-           fieldLabel: gettext('E-Mail')
+           fieldLabel: gettext('E-Mail'),
        },
        {
            xtype: 'proxmoxComboGrid',
@@ -41,26 +41,26 @@ Ext.define('PVE.node.ACMEAccountCreate', {
                idProperty: ['name'],
                proxy: {
                    type: 'proxmox',
-                   url: '/api2/json/cluster/acme/directories'
+                   url: '/api2/json/cluster/acme/directories',
                },
                sorters: {
                    property: 'name',
-                   order: 'ASC'
-               }
+                   order: 'ASC',
+               },
            },
            listConfig: {
                columns: [
                    {
                        header: gettext('Name'),
                        dataIndex: 'name',
-                       flex: 1
+                       flex: 1,
                    },
                    {
                        header: gettext('URL'),
                        dataIndex: 'url',
-                       flex: 1
-                   }
-               ]
+                       flex: 1,
+                   },
+               ],
            },
            listeners: {
                change: function(combogrid, value) {
@@ -76,34 +76,36 @@ Ext.define('PVE.node.ACMEAccountCreate', {
                    disp.setValue(gettext('Loading'));
                    field.setValue(undefined);
                    checkbox.setValue(undefined);
+                   checkbox.setHidden(true);
 
                    Proxmox.Utils.API2Request({
                        url: '/cluster/acme/tos',
                        method: 'GET',
                        params: {
-                           directory: value
+                           directory: value,
                        },
                        success: function(response, opt) {
-                           me.up('window').down('#tos_url').setValue(response.result.data);
-                           me.up('window').down('#tos_url_display').setValue(response.result.data);
+                           field.setValue(response.result.data);
+                           disp.setValue(response.result.data);
+                           checkbox.setHidden(false);
                        },
                        failure: function(response, opt) {
                            Ext.Msg.alert(gettext('Error'), response.htmlStatus);
-                       }
+                       },
                    });
-               }
-           }
+               },
+           },
        },
        {
            xtype: 'displayfield',
            itemId: 'tos_url_display',
            renderer: PVE.Utils.render_optional_url,
-           name: 'tos_url_display'
+           name: 'tos_url_display',
        },
        {
            xtype: 'hidden',
            itemId: 'tos_url',
-           name: 'tos_url'
+           name: 'tos_url',
        },
        {
            xtype: 'proxmoxcheckbox',
@@ -115,9 +117,9 @@ Ext.define('PVE.node.ACMEAccountCreate', {
                    return true;
                }
                return false;
-           }
+           },
        },
-    ]
+    ],
 
 });
 
@@ -126,7 +128,7 @@ Ext.define('PVE.node.ACMEAccountView', {
 
     width: 600,
     fieldDefaults: {
-       labelWidth: 140
+       labelWidth: 140,
     },
 
     title: gettext('Account'),
@@ -135,30 +137,30 @@ Ext.define('PVE.node.ACMEAccountView', {
        {
            xtype: 'displayfield',
            fieldLabel: gettext('E-Mail'),
-           name: 'email'
+           name: 'email',
        },
        {
            xtype: 'displayfield',
            fieldLabel: gettext('Created'),
-           name: 'createdAt'
+           name: 'createdAt',
        },
        {
            xtype: 'displayfield',
            fieldLabel: gettext('Status'),
-           name: 'status'
+           name: 'status',
        },
        {
            xtype: 'displayfield',
            fieldLabel: gettext('Directory'),
            renderer: PVE.Utils.render_optional_url,
-           name: 'directory'
+           name: 'directory',
        },
        {
            xtype: 'displayfield',
            fieldLabel: gettext('Terms of Services'),
            renderer: PVE.Utils.render_optional_url,
-           name: 'tos'
-       }
+           name: 'tos',
+       },
     ],
 
     initComponent: function() {
@@ -182,9 +184,9 @@ Ext.define('PVE.node.ACMEAccountView', {
                data.createdAt = data.account.createdAt;
                data.status = data.account.status;
                me.setValues(data);
-           }
+           },
        });
-    }
+    },
 });
 
 Ext.define('PVE.node.ACMEDomainEdit', {