throw "unable to find waitMsgTarget";
}
}
-
+
if (me.selModel) {
me.mon(me.selModel, "selectionchange", function() {
getUrl: function(rec) {
var me = this;
-
+
return me.baseurl + '/' + rec.getId();
},
alias: 'store.diff',
sortAfterUpdate: false,
-
+
constructor: function(config) {
var me = this;
}
});
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;
/* 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:
Ext.define('Proxmox.data.reader.JsonObject', {
extend: 'Ext.data.reader.Json',
alias : 'reader.jsonobject',
-
+
readArray: false,
rows: undefined,
}
});
}
-
- } else {
-
+
+ } else {
+
var org_root = root;
if (Ext.isArray(org_root)) {
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) {
}
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;
if (me.cbind) {
applyCBind(me);
}
-
+
var cloneTemplateArray = function(org) {
var copy, i, found, el, elcopy, arrayLength;
}
return copy;
};
-
+
var cloneTemplateObject = function(org) {
var res = {}, prop, el, copy;
for (prop in org) {
var condCloneProperties = function() {
var prop, el, i, tmp;
-
+
for (prop in me) {
el = me[prop];
if (el === undefined || el === null) continue;
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
alias: 'widget.proxmoxRRDChart',
unit: undefined, // bytes, bytespersecond, percent
-
+
controller: {
xclass: 'Ext.app.ViewController',
// 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];
},
onSeriesTooltipRender: function(tooltip, record, item) {
var me = this.getView();
-
+
var suffix = '';
-
+
if (me.unit === 'percent') {
suffix = '%';
} else if (me.unit === 'bytes') {
} 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)];
ourUndoZoomButton.setDisabled(undoButton.isDisabled());
}
},
-
+
width: 770,
height: 300,
animation: false,
}
});
- me.on('destroy', statstore.stopUpdate);
+ me.on('destroy', statstore.stopUpdate);
var getObjectValue = function(key, defaultValue) {
var rec = statstore.getById(key);
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
});
}
}
},
- exitstatus: {
+ exitstatus: {
visible: false
},
type: {
},
user: {
header: gettext('User name'),
- required: true
+ required: true
},
node: {
header: gettext('Node'),
- required: true
+ required: true
},
pid: {
header: gettext('Process ID'),
},
starttime: {
header: gettext('Start Time'),
- required: true,
+ required: true,
renderer: Proxmox.Utils.render_timestamp
},
upid: {
rows: rows
});
- me.on('destroy', statstore.stopUpdate);
+ me.on('destroy', statstore.stopUpdate);
var stop_task = function() {
Proxmox.Utils.API2Request({
me.mon(statstore, 'load', function() {
var status = statgrid.getObjectValue('status');
-
+
if (status === 'stopped') {
logView.scrollToEnd = false;
logView.requestUpdate();