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