From 13fc756dfdee2cf6d14a2c1daca0eb1887f1d61d Mon Sep 17 00:00:00 2001 From: Aaron Lauterer Date: Wed, 18 Sep 2019 17:06:09 +0200 Subject: [PATCH] tree-wide trailing whitespace cleanup Signed-off-by: Aaron Lauterer Signed-off-by: Thomas Lamprecht --- button/Button.js | 4 ++-- data/DiffStore.js | 4 ++-- data/reader/JsonObject.js | 14 +++++++------- mixin/CBind.js | 14 +++++++------- node/TimeView.js | 14 +++++++------- panel/RRDChart.js | 14 +++++++------- window/TaskViewer.js | 20 ++++++++++---------- 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/button/Button.js b/button/Button.js index 846db7c..89d273e 100644 --- a/button/Button.js +++ b/button/Button.js @@ -80,7 +80,7 @@ Ext.define('Proxmox.button.Button', { throw "unable to find waitMsgTarget"; } } - + if (me.selModel) { me.mon(me.selModel, "selectionchange", function() { @@ -113,7 +113,7 @@ Ext.define('Proxmox.button.StdRemoveButton', { getUrl: function(rec) { var me = this; - + return me.baseurl + '/' + rec.getId(); }, diff --git a/data/DiffStore.js b/data/DiffStore.js index 22b84a6..d43f111 100644 --- a/data/DiffStore.js +++ b/data/DiffStore.js @@ -23,7 +23,7 @@ Ext.define('Proxmox.data.DiffStore', { alias: 'store.diff', sortAfterUpdate: false, - + constructor: function(config) { var me = this; @@ -58,7 +58,7 @@ Ext.define('Proxmox.data.DiffStore', { } }); olditem.endEdit(true); - olditem.commit(); + olditem.commit(); } else { var newrec = Ext.create(me.model, data); var pos = (me.appendAtStart && !first_load) ? 0 : me.data.length; diff --git a/data/reader/JsonObject.js b/data/reader/JsonObject.js index db2646c..342ad08 100644 --- a/data/reader/JsonObject.js +++ b/data/reader/JsonObject.js @@ -1,12 +1,12 @@ /* A reader to store a single JSON Object (hash) into a storage. - * Also accepts an array containing a single hash. + * Also accepts an array containing a single hash. * * So it can read: * - * example1: {data1: "xyz", data2: "abc"} + * example1: {data1: "xyz", data2: "abc"} * returns [{key: "data1", value: "xyz"}, {key: "data2", value: "abc"}] * - * example2: [ {data1: "xyz", data2: "abc"} ] + * example2: [ {data1: "xyz", data2: "abc"} ] * returns [{key: "data1", value: "xyz"}, {key: "data2", value: "abc"}] * * If you set 'readArray', the reader expexts the object as array: @@ -30,7 +30,7 @@ Ext.define('Proxmox.data.reader.JsonObject', { extend: 'Ext.data.reader.Json', alias : 'reader.jsonobject', - + readArray: false, rows: undefined, @@ -82,9 +82,9 @@ Ext.define('Proxmox.data.reader.JsonObject', { } }); } - - } else { - + + } else { + var org_root = root; if (Ext.isArray(org_root)) { diff --git a/mixin/CBind.js b/mixin/CBind.js index 6f217cf..4bd4a55 100644 --- a/mixin/CBind.js +++ b/mixin/CBind.js @@ -9,11 +9,11 @@ Ext.define('Proxmox.Mixin.CBind', { cloneTemplates: function() { var me = this; - + if (typeof(me.cbindData) == "function") { me.cbindData = me.cbindData(me.initialConfig) || {}; } - + var getConfigValue = function(cname) { if (cname in me.initialConfig) { @@ -21,13 +21,13 @@ Ext.define('Proxmox.Mixin.CBind', { } if (cname in me.cbindData) { return me.cbindData[cname]; - } + } if (cname in me) { return me[cname]; } throw "unable to get cbind data for '" + cname + "'"; }; - + var applyCBind = function(obj) { var cbind = obj.cbind, prop, cdata, cvalue, match, found; if (!cbind) return; @@ -71,7 +71,7 @@ Ext.define('Proxmox.Mixin.CBind', { if (me.cbind) { applyCBind(me); } - + var cloneTemplateArray = function(org) { var copy, i, found, el, elcopy, arrayLength; @@ -105,7 +105,7 @@ Ext.define('Proxmox.Mixin.CBind', { } return copy; }; - + var cloneTemplateObject = function(org) { var res = {}, prop, el, copy; for (prop in org) { @@ -128,7 +128,7 @@ Ext.define('Proxmox.Mixin.CBind', { var condCloneProperties = function() { var prop, el, i, tmp; - + for (prop in me) { el = me[prop]; if (el === undefined || el === null) continue; diff --git a/node/TimeView.js b/node/TimeView.js index 27de02d..05319ee 100644 --- a/node/TimeView.js +++ b/node/TimeView.js @@ -28,17 +28,17 @@ Ext.define('Proxmox.node.TimeView', { interval: 1000, run_editor: run_editor, rows: { - timezone: { - header: gettext('Time zone'), + timezone: { + header: gettext('Time zone'), required: true }, - localtime: { - header: gettext('Server time'), - required: true, - renderer: renderlocaltime + localtime: { + header: gettext('Server time'), + required: true, + renderer: renderlocaltime } }, - tbar: [ + tbar: [ { text: gettext("Edit"), handler: run_editor diff --git a/panel/RRDChart.js b/panel/RRDChart.js index 5673a96..27b35b0 100644 --- a/panel/RRDChart.js +++ b/panel/RRDChart.js @@ -3,7 +3,7 @@ Ext.define('Proxmox.widget.RRDChart', { alias: 'widget.proxmoxRRDChart', unit: undefined, // bytes, bytespersecond, percent - + controller: { xclass: 'Ext.app.ViewController', @@ -17,10 +17,10 @@ Ext.define('Proxmox.widget.RRDChart', { // javascript floating point weirdness value = Ext.Number.correctFloat(value); - + // limit to 2 decimal points value = Ext.util.Format.number(value, "0.##"); - + return value.toString() + " " + units[si]; }, @@ -32,9 +32,9 @@ Ext.define('Proxmox.widget.RRDChart', { onSeriesTooltipRender: function(tooltip, record, item) { var me = this.getView(); - + var suffix = ''; - + if (me.unit === 'percent') { suffix = '%'; } else if (me.unit === 'bytes') { @@ -42,7 +42,7 @@ Ext.define('Proxmox.widget.RRDChart', { } else if (me.unit === 'bytespersecond') { suffix = 'B/s'; } - + var prefix = item.field; if (me.fieldTitles && me.fieldTitles[me.fields.indexOf(item.field)]) { prefix = me.fieldTitles[me.fields.indexOf(item.field)]; @@ -60,7 +60,7 @@ Ext.define('Proxmox.widget.RRDChart', { ourUndoZoomButton.setDisabled(undoButton.isDisabled()); } }, - + width: 770, height: 300, animation: false, diff --git a/window/TaskViewer.js b/window/TaskViewer.js index b508882..d3133f9 100644 --- a/window/TaskViewer.js +++ b/window/TaskViewer.js @@ -22,7 +22,7 @@ Ext.define('Proxmox.window.TaskProgress', { } }); - me.on('destroy', statstore.stopUpdate); + me.on('destroy', statstore.stopUpdate); var getObjectValue = function(key, defaultValue) { var rec = statstore.getById(key); @@ -60,10 +60,10 @@ Ext.define('Proxmox.window.TaskProgress', { bodyPadding: 5, items: pbar, buttons: [ - { + { text: gettext('Details'), - handler: function() { - var win = Ext.create('Proxmox.window.TaskViewer', { + handler: function() { + var win = Ext.create('Proxmox.window.TaskViewer', { taskDone: me.taskDone, upid: me.upid }); @@ -118,7 +118,7 @@ Ext.define('Proxmox.window.TaskViewer', { } } }, - exitstatus: { + exitstatus: { visible: false }, type: { @@ -127,11 +127,11 @@ Ext.define('Proxmox.window.TaskViewer', { }, user: { header: gettext('User name'), - required: true + required: true }, node: { header: gettext('Node'), - required: true + required: true }, pid: { header: gettext('Process ID'), @@ -139,7 +139,7 @@ Ext.define('Proxmox.window.TaskViewer', { }, starttime: { header: gettext('Start Time'), - required: true, + required: true, renderer: Proxmox.Utils.render_timestamp }, upid: { @@ -153,7 +153,7 @@ Ext.define('Proxmox.window.TaskViewer', { rows: rows }); - me.on('destroy', statstore.stopUpdate); + me.on('destroy', statstore.stopUpdate); var stop_task = function() { Proxmox.Utils.API2Request({ @@ -196,7 +196,7 @@ Ext.define('Proxmox.window.TaskViewer', { me.mon(statstore, 'load', function() { var status = statgrid.getObjectValue('status'); - + if (status === 'stopped') { logView.scrollToEnd = false; logView.requestUpdate(); -- 2.39.2