}
return cpustr + optstr;
- },
+ }
}});
pveMail: function(v) {
return (/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,63}$/).test(v);
},
- pveMailText: gettext('Example') + ": user@example.com",
+ pveMailText: gettext('Example') + ": user@example.com"
});
// ExtJs 5-6 has an issue with caching
xtype: 'pveLogView',
url: "/api2/extjs/nodes/" + nodename + "/ceph/log"
}
- ],
+ ]
}
});
});
Ext.apply(me, {
- store: store,
+ store: store
});
me.callParent();
me.title = gettext('Remove') + ': ' + 'Ceph OSD osd.' + me.osdid;
Ext.applyIf(me, {
- url: "/nodes/" + me.nodename + "/ceph/osd/" + me.osdid,
+ url: "/nodes/" + me.nodename + "/ceph/osd/" + me.osdid
});
me.callParent();
}
Ext.applyIf(me, {
- url: "/nodes/" + me.nodename + "/ceph/pools",
+ url: "/nodes/" + me.nodename + "/ceph/pools"
});
me.callParent();
reader: {
type: 'json',
rootProperty: config.root || 'data'
- },
+ }
});
this.callParent([config]);
},
proxy: {
- type: 'pve',
+ type: 'pve'
},
fields: [
// node rrd fields
'total',
// for time we generate unix timestamps, javascript uses milliseconds instead of seconds
- { name:'time', convert: function(value) { return value*1000; }},
+ { name:'time', convert: function(value) { return value*1000; }}
],
sorters: 'time',
timeframe: 'hour',
renderer: PVE.Utils.render_disk_usage,
sortable: true,
width: 100,
- hidden: true,
+ hidden: true
},
diskuse: {
header: gettext('Disk usage') + " %",
renderer: PVE.Utils.render_disk_usage_percent,
width: 100,
calculate: PVE.Utils.calculate_disk_usage,
- sortType: 'asFloat',
+ sortType: 'asFloat'
},
maxdisk: {
header: gettext('Disk size'),
['Pacific/Tongatapu'],
['Pacific/Wake'],
['Pacific/Wallis']
- ],
-});
\ No newline at end of file
+ ]
+});
data.push(rec);
}
});
- }
+ }
} else {
Ext.Object.each(root, function(key, value) {
data.push({key: key, value: value });
});
- }
+ }
}
}
catch (ex) {
}
}
]
- },
+ }
},
remove_btn
],
sortable: true,
disabled: true,
disabledCls: 'x-item-enabled',
- stopSelection: false,
+ stopSelection: false
},
{
header: gettext('Node'),
name: 'console',
value: '__default__',
fieldLabel: gettext('Console Viewer'),
- comboItems: data,
+ comboItems: data
}
});
win.on('destroy', reload);
win.show();
}
- },
+ }
/* the following type are conidered unstable
* so we do not enable that on the GUI for now
['layer2', 'layer2'],
['layer2+3', 'layer2+3'],
['layer3+4', 'layer3+4']
- ],
+ ]
});
['writeback', 'Write back'],
['unsafe', 'Write back (' + gettext('unsafe') + ')'],
['none', gettext('No cache')]
- ],
+ ]
});
['thu', Ext.util.Format.htmlDecode(Ext.Date.dayNames[4])],
['fri', Ext.util.Format.htmlDecode(Ext.Date.dayNames[5])],
['sat', Ext.util.Format.htmlDecode(Ext.Date.dayNames[6])],
- ['sun', Ext.util.Format.htmlDecode(Ext.Date.dayNames[0])],
+ ['sun', Ext.util.Format.htmlDecode(Ext.Date.dayNames[0])]
];
this.callParent();
}
});
Ext.apply(me, {
- store: store,
+ store: store
});
me.callParent();
}
}
return data;
- },
+ }
});
me.store = Ext.create('Ext.data.ArrayStore', {
model: 'KeyValue',
- data : me.comboItems,
+ data : me.comboItems
});
if (me.initialConfig.editable === undefined) {
width: 100,
dataIndex: 'cpu'
}
- ],
+ ]
},
validator: function(value) {
if (state && state.id) {
this.setValue(state.id);
}
- },
+ }
});
var me = this;
me.store = Ext.create('Ext.data.Store', {
- model: 'pve-domains',
+ model: 'pve-domains'
});
me.callParent();
});
Ext.apply(me, {
- store: store,
+ store: store
});
me.callParent();
reader: 'array'
},
data: groupdef,
- autoload: true,
+ autoload: true
});
Ext.apply(me, {
});
Ext.apply(me, {
- store: store,
+ store: store
});
me.callParent();
// form again.
xtype: 'hiddenfield',
name: 'modified_marker',
- value: '',
+ value: ''
},
{
xtype: 'pveKVComboBox',
});
vmsField.setValue(selectedVms);
}
- },
+ }
},
columns: [
{
header: gettext('Type'),
dataIndex: 'type'
}
- ],
+ ]
});
Ext.apply(me, {
subject: gettext('Virtual Machine'),
columnschanged: 'saveCurrentState',
columnresize: 'saveCurrentState',
columnmove: 'saveCurrentState',
- sortchange: 'saveCurrentState',
+ sortchange: 'saveCurrentState'
},
columns: coldef
});
plugins: [{
ptype: 'lazyitems',
items: items
- }],
+ }]
});
me.callParent();
name: 'nofailback',
uncheckedValue: 0,
fieldLabel: 'nofailback'
- },
+ }
];
me.columnB = [
store: store,
stateful: false,
viewConfig: {
- trackOver: false,
+ trackOver: false
},
columns: [
{
});
}
},
- { xtype: 'menuseparator', },
+ { xtype: 'menuseparator' },
{
text: gettext('Migrate'),
iconCls: 'fa fa-fw fa-send-o',
// });
// }
// },
- { xtype: 'menuseparator', },
+ { xtype: 'menuseparator' },
{
text: gettext('Console'),
iconCls: 'fa fa-fw fa-terminal',
{
xtype: 'pveVlanField',
name: 'tag',
- value: cdata.tag,
+ value: cdata.tag
},
{
xtype: 'numberfield',
xtype: 'pvecheckbox',
fieldLabel: gettext('Firewall'),
name: 'firewall',
- checked: cdata.firewall,
+ checked: cdata.firewall
}
];
items: [
{
xtype: 'label',
- text: gettext('IPv4') + ':',
+ text: gettext('IPv4') + ':'
},
{
xtype: 'radiofield',
items: [
{
xtype: 'label',
- text: gettext('IPv6') + ':',
+ text: gettext('IPv6') + ':'
},
{
xtype: 'radiofield',
listeners: {
activate: function() { notesview.load(); rrdstore.startUpdate(); },
hide: rrdstore.stopUpdate,
- destroy: rrdstore.stopUpdate,
+ destroy: rrdstore.stopUpdate
}
});
iconCls: 'fa fa-fw fa-send-o',
handler: function() {
var win = Ext.create('PVE.window.MigrateAll', {
- nodename: nodename,
+ nodename: nodename
});
win.show();
}
{
title: gettext('Services'),
itemId: 'services',
- xtype: 'pveNodeServiceView',
+ xtype: 'pveNodeServiceView'
},
{
title: gettext('Network'),
xtype: 'pvecheckbox',
fieldLabel: gettext('VLAN aware'),
name: 'bridge_vlan_aware',
- deleteEmpty: !me.create,
+ deleteEmpty: !me.create
});
column2.push({
xtype: 'textfield',
'iface', 'type', 'active', 'autostart',
'bridge_ports', 'slaves',
'address', 'netmask', 'gateway',
- 'address6', 'netmask6', 'gateway6',
+ 'address6', 'netmask6', 'gateway6'
],
idProperty: 'iface'
});
document.body.removeChild(element);
}
}
- },
+ }
],
items: view
});
renderer: PVE.Utils.render_timestamp
},
nextduedate: {
- header: gettext('Next due date'),
+ header: gettext('Next due date')
}
};
});
var rrdstore = Ext.create('PVE.data.RRDStore', {
- rrdurl: "/api2/json/nodes/" + nodename + "/rrddata",
+ rrdurl: "/api2/json/nodes/" + nodename + "/rrddata"
});
Ext.apply(me, {
title: gettext('Network traffic'),
fields: ['netin','netout'],
store: rrdstore
- },
- ],
+ }
+ ]
},
listeners: {
activate: function() { rstore.startUpdate(); rrdstore.startUpdate(); },
hide: function() { rstore.stopUpdate(); rrdstore.stopUpdate(); },
- destroy: function() { rstore.stopUpdate(); rrdstore.stopUpdate(); },
+ destroy: function() { rstore.stopUpdate(); rrdstore.stopUpdate(); }
}
});
view_btn.setDisabled(!(selections && selections[0]));
},
show: function() { reload_task.delay(10); },
- destroy: function() { reload_task.cancel(); },
+ destroy: function() { reload_task.cancel(); }
}
});
tbar.unshift({
xtype: 'tbtext',
text: title,
- baseCls: 'x-panel-header-text',
+ baseCls: 'x-panel-header-text'
});
plugins: [{
ptype: 'lazyitems',
items: items
- }],
+ }]
});
me.callParent();
position: 'left',
grid: true,
renderer: 'leftAxisRenderer',
- minimum: 0,
+ minimum: 0
}, {
type: 'time',
position: 'bottom',
grid: true,
- fields: ['time'],
+ fields: ['time']
}],
legend: {
docked: 'right',
// we set this that all graphs have same width
- width: 140,
+ width: 140
},
listeners: {
afterrender: 'onAfterRender'
'disk',
'maxdisk',
'total',
- 'used',
+ 'used'
],
bytespersArr: [
'netin',
fill: true,
style: {
lineWidth: 1.5,
- opacity: 0.60,
+ opacity: 0.60
},
marker: {
opacity: 0,
name: 'bd1',
allowBlank: false,
listeners: {
- change: me.recomputeSelection,
+ change: me.recomputeSelection
}
}),
Ext.createWidget('pveKVComboBox', {
name: 'bd2',
allowBlank: false,
listeners: {
- change: me.recomputeSelection,
+ change: me.recomputeSelection
}
}),
Ext.createWidget('pveKVComboBox', {
name: 'bd3',
allowBlank: false,
listeners: {
- change: me.recomputeSelection,
+ change: me.recomputeSelection
}
- }),
+ })
];
Ext.apply(me, { items: me.comboboxes });
me.callParent();
var me = this;
var ipanel = Ext.create('PVE.qemu.CPUOptionsInputPanel', {
- maxvcpus: me.maxvcpus,
+ maxvcpus: me.maxvcpus
});
Ext.apply(me, {
handler: function() {
vm_command('start');
},
- iconCls: 'fa fa-play',
+ iconCls: 'fa fa-play'
});
var migrateBtn = Ext.create('Ext.Button', {
handler: function() {
vm_command("stop", { timeout: 30 });
},
- iconCls: 'fa fa-stop',
+ iconCls: 'fa fa-stop'
}]
},
iconCls: 'fa fa-power-off'
hotplug: me.hotplug,
fieldLabel: gettext('Memory') + ' (MB)',
labelAlign: 'right',
- labelWidth: labelWidth,
+ labelWidth: labelWidth
},
{
xtype: 'radiofield',
allowBlank: true,
emptyText: PVE.Utils.defaultText + ' (1000)',
submitEmptyText: false
- },
+ }
];
if (me.insideWizard) {
}
var ipanel = Ext.create('PVE.qemu.MemoryInputPanel', {
- hotplug: memoryhotplug,
+ hotplug: memoryhotplug
});
Ext.apply(me, {
maxmemory: data.memory,
balloon: data.balloon,
shares: data.shares,
- memoryType: data.balloon ? 'dynamic' : 'fixed',
+ memoryType: data.balloon ? 'dynamic' : 'fixed'
};
ipanel.setValues(values);
}
xtype: 'pvecheckbox',
fieldLabel: gettext('Enable NUMA'),
name: 'numa',
- uncheckedValue: 0,
- },
+ uncheckedValue: 0
+ }
];
xtype: 'textfield',
fieldLabel: 'UUID',
regex: /^[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$/,
- name: 'uuid',
+ name: 'uuid'
},
{
xtype: 'textfield',
fieldLabel: gettext('Manufacturer'),
regex: /^\S+$/,
- name: 'manufacturer',
+ name: 'manufacturer'
},
{
xtype: 'textfield',
fieldLabel: gettext('Product'),
regex: /^\S+$/,
- name: 'product',
+ name: 'product'
},
{
xtype: 'textfield',
fieldLabel: gettext('Version'),
regex: /^\S+$/,
- name: 'version',
+ name: 'version'
},
{
xtype: 'textfield',
fieldLabel: gettext('Serial'),
regex: /^\S+$/,
- name: 'serial',
+ name: 'serial'
},
{
xtype: 'textfield',
fieldLabel: gettext('SKU'),
regex: /^\S+$/,
- name: 'sku',
+ name: 'sku'
},
{
xtype: 'textfield',
fieldLabel: gettext('Family'),
regex: /^\S+$/,
- name: 'family',
+ name: 'family'
}
];
});
var rrdstore = Ext.create('PVE.data.RRDStore', {
- rrdurl: "/api2/json/nodes/" + nodename + "/qemu/" + vmid + "/rrddata",
+ rrdurl: "/api2/json/nodes/" + nodename + "/qemu/" + vmid + "/rrddata"
});
Ext.apply(me, {
fields: ['diskread','diskwrite'],
store: rrdstore
}
- ],
+ ]
},
listeners: {
activate: function() {notesview.load(); rrdstore.startUpdate();},
hide: rrdstore.stopUpdate,
- destroy: rrdstore.stopUpdate,
+ destroy: rrdstore.stopUpdate
}
});
xtype: 'filefield',
name: 'filename',
buttonText: gettext('Select File...'),
- allowBlank: false,
+ allowBlank: false
},
pbar
]
stateful: false,
viewConfig: {
trackOver: false,
- loadMask: false,
+ loadMask: false
},
initComponent : function() {
var me = this;
var win = Ext.create('PVE.storage.Upload', {
nodename: nodename,
storage: storage,
- contents: me.contents,
+ contents: me.contents
});
win.show();
win.on('destroy', reload);
});
me.statusStore = Ext.create('PVE.data.ObjectStore', {
- url: '/api2/json/nodes/' + nodename + '/storage/' + storage + '/status',
+ url: '/api2/json/nodes/' + nodename + '/storage/' + storage + '/status'
});
Ext.apply(me, {
});
Ext.apply(me, {
- store: store,
+ store: store
});
me.callParent();
name: 'server2',
value: '',
fieldLabel: gettext('Second Server'),
- allowBlank: true,
+ allowBlank: true
},
{
xtype: me.create ? 'pveGlusterFsScan' : 'displayfield',
});
Ext.apply(me, {
- store: store,
+ store: store
});
me.callParent();
Ext.apply(me, {
store: store,
listConfig: {
- loadingText: gettext('Scanning...'),
+ loadingText: gettext('Scanning...')
}
});
store.loadData([{ storage: '' }], true);
Ext.apply(me, {
- store: store,
+ store: store
});
me.callParent();
Ext.apply(me, {
store: store,
listConfig: {
- loadingText: gettext('Scanning...'),
+ loadingText: gettext('Scanning...')
}
});
Ext.apply(me, {
store: store,
listConfig: {
- loadingText: gettext('Scanning...'),
+ loadingText: gettext('Scanning...')
}
});
});
Ext.apply(me, {
- store: store,
+ store: store
});
me.callParent();
}
Ext.apply(me, {
- url: "/api2/json/nodes/" + nodename + "/storage/" + storage + "/status",
+ url: "/api2/json/nodes/" + nodename + "/storage/" + storage + "/status"
});
me.callParent();
var rstore = statusview.rstore;
var rrdstore = Ext.create('PVE.data.RRDStore', {
- rrdurl: "/api2/json/nodes/" + nodename + "/storage/" + storage + "/rrddata",
+ rrdurl: "/api2/json/nodes/" + nodename + "/storage/" + storage + "/rrddata"
});
Ext.apply(me, {
listeners: {
activate: function() { rstore.startUpdate(); rrdstore.startUpdate(); },
hide: function() { rstore.stopUpdate(); rrdstore.stopUpdate(); },
- destroy: function() { rstore.stopUpdate(); rrdstore.stopUpdate(); },
+ destroy: function() { rstore.stopUpdate(); rrdstore.stopUpdate(); }
}
});
queryMode: 'local',
editable: false,
listConfig: {
- loadingText: gettext('Scanning...'),
+ loadingText: gettext('Scanning...')
},
initComponent : function() {
var me = this;
});
Ext.apply(me, {
- store: store,
+ store: store
});
me.callParent();
iconCls: 'fa fa-file-o fa-dark x-fa-tree-template'
},
datacenter: {
- iconCls: 'fa fa-server x-fa-tree-datacenter',
+ iconCls: 'fa fa-server x-fa-tree-datacenter'
}
}
},
modal: true,
width: twoColumn ? colwidth*2 : colwidth,
border: false,
- items: [ me.formPanel ],
+ items: [ me.formPanel ]
});
me.callParent();
value: 1,
fieldLabel: 'Parallel jobs',
allowBlank: false
- },
+ }
]
});
xtype: 'component',
cls: [ Ext.baseCSSPrefix + 'message-box-icon',
Ext.baseCSSPrefix + 'message-box-warning',
- Ext.baseCSSPrefix + 'dlg-icon'],
+ Ext.baseCSSPrefix + 'dlg-icon']
},
{
xtype: 'container',
hideTrigger: true,
allowBlank: false
}
- ],
+ ]
}
],
buttons: [