mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2026-01-06 01:04:09 +00:00
tree-wide trailing whitespace cleanup
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
7c67159cdc
commit
13fc756dfd
@ -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();
|
||||
},
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user