]> git.proxmox.com Git - proxmox-backup.git/commitdiff
ui: some eslint auto-fixes
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 25 Sep 2020 16:29:42 +0000 (18:29 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 25 Sep 2020 16:29:42 +0000 (18:29 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/Dashboard.js
www/config/ACLView.js
www/config/DataStoreConfig.js
www/config/RemoteView.js
www/window/BackupFileDownloader.js
www/window/ZFSCreate.js

index d6dc40d256d86c06d33463dfc0020327a4aa4143..a04b40408617e0f5ef37f68c8757ce27dd280d49 100644 (file)
@@ -13,7 +13,7 @@ Ext.define('PBS.Dashboard', {
                width: 300,
                title: gettext('Dashboard Options'),
                layout: {
-                   type: 'auto'
+                   type: 'auto',
                },
                items: [{
                    xtype: 'form',
@@ -28,7 +28,7 @@ Ext.define('PBS.Dashboard', {
                        minValue: 1,
                        maxValue: 24,
                        value: viewModel.get('hours'),
-                       fieldLabel: gettext('Hours to show')
+                       fieldLabel: gettext('Hours to show'),
                    }],
                    buttons: [{
                        text: gettext('Save'),
@@ -39,9 +39,9 @@ Ext.define('PBS.Dashboard', {
                            var hours = win.down('#hours').getValue();
                            me.setHours(hours, true);
                            win.close();
-                       }
-                   }]
-               }]
+                       },
+                   }],
+               }],
            }).show();
        },
 
@@ -119,7 +119,7 @@ Ext.define('PBS.Dashboard', {
                            el.select();
                            document.execCommand("copy");
                        },
-                       text: gettext('Copy')
+                       text: gettext('Copy'),
                    },
                    {
                        text: gettext('Ok'),
@@ -140,10 +140,10 @@ Ext.define('PBS.Dashboard', {
            me.lookup('longesttasks').updateTasks(top10);
 
            let data = {
-               backup: {  error: 0, warning: 0, ok: 0, },
-               prune: { error: 0, warning: 0, ok: 0, },
-               garbage_collection: { error: 0, warning: 0, ok: 0, },
-               sync: {  error: 0, warning: 0, ok: 0, },
+               backup: { error: 0, warning: 0, ok: 0 },
+               prune: { error: 0, warning: 0, ok: 0 },
+               garbage_collection: { error: 0, warning: 0, ok: 0 },
+               sync: { error: 0, warning: 0, ok: 0 },
            };
 
            records.forEach(record => {
@@ -166,7 +166,7 @@ Ext.define('PBS.Dashboard', {
            var sp = Ext.state.Manager.getProvider();
            var hours = sp.get('dashboard-hours') || 12;
            me.setHours(hours, false);
-       }
+       },
     },
 
     viewModel: {
@@ -177,7 +177,7 @@ Ext.define('PBS.Dashboard', {
            fingerprint: "",
            'bytes_in': 0,
            'bytes_out': 0,
-           'avg_ptime': 0.0
+           'avg_ptime': 0.0,
        },
 
        formulas: {
@@ -194,11 +194,11 @@ Ext.define('PBS.Dashboard', {
                autoDestroy: true,
                proxy: {
                    type: 'proxmox',
-                   url: '/api2/json/nodes/localhost/status'
+                   url: '/api2/json/nodes/localhost/status',
                },
                listeners: {
-                   load: 'updateUsageStats'
-               }
+                   load: 'updateUsageStats',
+               },
            },
            subscription: {
                storeid: 'dash-subscription',
@@ -209,11 +209,11 @@ Ext.define('PBS.Dashboard', {
                autoDestroy: true,
                proxy: {
                    type: 'proxmox',
-                   url: '/api2/json/nodes/localhost/subscription'
+                   url: '/api2/json/nodes/localhost/subscription',
                },
                listeners: {
-                   load: 'updateSubscription'
-               }
+                   load: 'updateSubscription',
+               },
            },
            tasks: {
                storeid: 'dash-tasks',
@@ -225,19 +225,19 @@ Ext.define('PBS.Dashboard', {
                model: 'proxmox-tasks',
                proxy: {
                    type: 'proxmox',
-                   url: '/api2/json/status/tasks'
+                   url: '/api2/json/status/tasks',
                },
                listeners: {
-                   load: 'updateTasks'
-               }
+                   load: 'updateTasks',
+               },
            },
-       }
+       },
     },
 
     title: gettext('Dashboard') + ' - WIP',
 
     layout: {
-       type: 'column'
+       type: 'column',
     },
 
     bodyPadding: '20 0 0 20',
@@ -245,7 +245,7 @@ Ext.define('PBS.Dashboard', {
     defaults: {
        columnWidth: 0.49,
        xtype: 'panel',
-       margin: '0 20 20 0'
+       margin: '0 20 20 0',
     },
 
     scrollable: true,
@@ -268,27 +268,27 @@ Ext.define('PBS.Dashboard', {
            ],
            layout: {
                type: 'hbox',
-               align: 'center'
+               align: 'center',
            },
            defaults: {
                xtype: 'proxmoxGauge',
                spriteFontSize: '20px',
-               flex: 1
+               flex: 1,
            },
            items: [
                {
                    title: gettext('CPU'),
-                   reference: 'cpu'
+                   reference: 'cpu',
                },
                {
                    title: gettext('Memory'),
-                   reference: 'mem'
+                   reference: 'mem',
                },
                {
                    title: gettext('Root Disk'),
-                   reference: 'root'
-               }
-           ]
+                   reference: 'root',
+               },
+           ],
        },
        {
            xtype: 'pbsDatastoresStatistics',
@@ -314,7 +314,7 @@ Ext.define('PBS.Dashboard', {
            reference: 'subscription',
            xtype: 'pbsSubscriptionInfo',
        },
-    ]
+    ],
 });
 
 Ext.define('PBS.dashboard.SubscriptionInfo', {
@@ -322,7 +322,7 @@ Ext.define('PBS.dashboard.SubscriptionInfo', {
     xtype: 'pbsSubscriptionInfo',
 
     style: {
-       cursor: 'pointer'
+       cursor: 'pointer',
     },
 
     layout: {
@@ -382,7 +382,7 @@ Ext.define('PBS.dashboard.SubscriptionInfo', {
            fn: function() {
                var mainview = this.component.up('mainview');
                mainview.getController().redirectTo('pbsSubscription');
-           }
-       }
-    }
+           },
+       },
+    },
 });
index 86797c917de4ec5e99e5944b9252a4124fa7334a..f02d8de5452e0c4297e3796d34759ecbc799d7aa 100644 (file)
@@ -47,7 +47,7 @@ Ext.define('PBS.config.ACLView', {
        removeACL: function(btn, event, rec) {
            let me = this;
            Proxmox.Utils.API2Request({
-               url:'/access/acl',
+               url: '/access/acl',
                method: 'PUT',
                params: {
                    'delete': 1,
@@ -58,7 +58,7 @@ Ext.define('PBS.config.ACLView', {
                callback: function() {
                    me.reload();
                },
-               failure: function (response, opts) {
+               failure: function(response, opts) {
                    Ext.Msg.alert(gettext('Error'), response.htmlStatus);
                },
            });
index 685d3d5ff1564b65c6441d10f8a333352db17c5f..b7e78e2f6a9b1b513d5bdf057334dafaa06c4109 100644 (file)
@@ -1,11 +1,11 @@
 Ext.define('pbs-datastore-list', {
     extend: 'Ext.data.Model',
-    fields: [ 'name', 'comment' ],
+    fields: ['name', 'comment'],
     proxy: {
         type: 'proxmox',
-       url: "/api2/json/admin/datastore"
+       url: "/api2/json/admin/datastore",
     },
-    idProperty: 'store'
+    idProperty: 'store',
 });
 
 Ext.define('pbs-data-store-config', {
@@ -209,7 +209,7 @@ Ext.define('PBS.DataStoreConfig', {
                    dataIndex: 'keep-yearly',
                    width: 70,
                },
-           ]
+           ],
        },
        {
            header: gettext('Comment'),
index 5739255d1f213b670f9fb43d3b8c584508eab262..a820da0405554355ba010b20581695fee407e75a 100644 (file)
@@ -1,6 +1,6 @@
 Ext.define('pmx-remotes', {
     extend: 'Ext.data.Model',
-    fields: [ 'name', 'host', 'userid', 'fingerprint', 'comment' ],
+    fields: ['name', 'host', 'userid', 'fingerprint', 'comment'],
     idProperty: 'name',
     proxy: {
        type: 'proxmox',
index 6abe40fa63109bfc67e133c4e1d158e68dd7d57b..81f88b100c361865b8d05f06b88c02bd6c12a902 100644 (file)
@@ -71,11 +71,11 @@ Ext.define('PBS.window.BackupFileDownloader', {
 
        control: {
            'proxmoxComboGrid': {
-               change: 'changeFile'
+               change: 'changeFile',
            },
            'button': {
                click: 'downloadFile',
-           }
+           },
        },
     },
 
@@ -89,7 +89,7 @@ Ext.define('PBS.window.BackupFileDownloader', {
            emptyText: gettext('No file selected'),
            fieldLabel: gettext('File'),
            store: {
-               fields: ['filename', 'size', 'crypt-mode',],
+               fields: ['filename', 'size', 'crypt-mode'],
                idProperty: ['filename'],
            },
            listConfig: {
@@ -115,7 +115,7 @@ Ext.define('PBS.window.BackupFileDownloader', {
                                mode = PBS.Utils.cryptmap.indexOf(value);
                            }
                            return PBS.Utils.cryptText[mode] || Proxmox.Utils.unknownText;
-                       }
+                       },
                    },
                ],
            },
@@ -133,7 +133,7 @@ Ext.define('PBS.window.BackupFileDownloader', {
            reference: 'encryptedHint',
            hidden: true,
            value: gettext('Encrypted Files cannot be decoded on the server directly. Please use the client where the decryption key is located.'),
-       }
+       },
     ],
 
     buttons: [
index 517acb5fecece5870451f60c5b92b417cb3d376b..d89e53bc60e0b6333c8a4c49d532761f229dcc3b 100644 (file)
@@ -30,8 +30,8 @@ Ext.define('PBS.window.CreateZFS', {
                    xtype: 'proxmoxcheckbox',
                    name: 'add-datastore',
                    fieldLabel: gettext('Add as Datastore'),
-                   value: '1'
-               }
+                   value: '1',
+               },
            ],
            column2: [
                {
@@ -45,8 +45,8 @@ Ext.define('PBS.window.CreateZFS', {
                        ['raid10', 'RAID10'],
                        ['raidz', 'RAIDZ'],
                        ['raidz2', 'RAIDZ2'],
-                       ['raidz3', 'RAIDZ3']
-                   ]
+                       ['raidz3', 'RAIDZ3'],
+                   ],
                },
                {
                    xtype: 'proxmoxKVComboBox',
@@ -59,8 +59,8 @@ Ext.define('PBS.window.CreateZFS', {
                        ['gzip', 'gzip'],
                        ['lz4', 'lz4'],
                        ['lzjb', 'lzjb'],
-                       ['zle', 'zle']
-                   ]
+                       ['zle', 'zle'],
+                   ],
                },
                {
                    xtype: 'proxmoxintegerfield',
@@ -68,8 +68,8 @@ Ext.define('PBS.window.CreateZFS', {
                    minValue: 9,
                    maxValue: 16,
                    value: '12',
-                   name: 'ashift'
-               }
+                   name: 'ashift',
+               },
            ],
            columnB: [
                {
@@ -80,8 +80,8 @@ Ext.define('PBS.window.CreateZFS', {
                    valueField: 'name',
                    height: 200,
                    emptyText: gettext('No Disks unused'),
-               }
-           ]
+               },
+           ],
        },
        {
            xtype: 'displayfield',