}
data.bridge = bridge_res[1];
data.tag = bridge_res[4];
- /*jslint confusion: true*/
data.firewall = bridge_res[5] ? 1 : 0;
- /*jslint confusion: false*/
} else {
data[match_res[1]] = match_res[2];
}
}
});
- /*jslint confusion: true*/
if (data.rate > 0) {
tmparray.push('rate=' + data.rate);
}
- /*jslint confusion: false*/
return tmparray.join(',');
},
},
parseTfaType: function(value) {
- /*jslint confusion: true*/
var match;
if (!value || !value.length) {
return undefined;
},
get: function(name, defaultValue){
- /*jslint confusion: true */
var me = this;
var data;
'Accept': 'application/json'
};
-/*jslint confusion: true */
Ext.define('PVE.Utils', { utilities: {
// this singleton contains miscellaneous utilities
},
render_size: function(value, metaData, record, rowIndex, colIndex, store) {
- /*jslint confusion: true */
if (!Ext.isNumeric(value)) {
return '';
if (me.confirmMsg) {
msg = me.confirmMsg;
// confirMsg can be boolean or function
- /*jslint confusion: true*/
if (Ext.isFunction(me.confirmMsg)) {
msg = me.confirmMsg(rec);
}
- /*jslint confusion: false*/
Ext.MessageBox.defaultButton = me.dangerous ? 2 : 1;
Ext.Msg.show({
title: gettext('Confirm'),
},
initComponent: function() {
- /*jslint confusion: true */
var me = this;
-/*jslint confusion: true*/
Ext.define('PVE.ceph.CephInstallWizard', {
extend: 'PVE.window.Wizard',
alias: 'widget.pveCephInstallWizard',
-/*jslint confusion: true */
Ext.define('PVE.CephCreateFS', {
extend: 'Proxmox.window.Edit',
alias: 'widget.pveCephCreateFS',
}
],
initComponent : function() {
- /*jslint confusion: true */
var me = this;
if (!me.nodename) {
}
});
-/*jslint confusion: true*/
Ext.define('PVE.ceph.ServiceWidget', {
extend: 'Ext.Component',
alias: 'widget.pveCephServiceWidget',
constructor: function(config) {
// fixme: how to avoid those warnings
- /*jslint confusion: true */
var me = this;
name: 'vmid'
});
- /*jslint confusion: true*/
// 'value' can be assigned a string or an array
var selModeField = Ext.create('Proxmox.form.KVComboBox', {
xtype: 'proxmoxKVComboBox',
},
vmidField
];
- /*jslint confusion: false*/
var ipanel = Ext.create('Proxmox.panel.InputPanel', {
onlineHelp: 'chapter_vzdump',
sortable: false,
dataIndex: 'vmid',
renderer: function(value, metaData, record) {
- /*jslint confusion: true */
if (record.data.all) {
if (record.data.exclude) {
return Ext.String.format(me.allExceptText, record.data.exclude);
-/*jslint confusion: true*/
Ext.define('pve-cluster-nodes', {
extend: 'Ext.data.Model',
fields: [
-/*jslint confusion: true*/
Ext.define('PVE.ClusterCreateWindow', {
extend: 'Proxmox.window.Edit',
xtype: 'pveClusterCreateWindow',
- /*jslint confusion: true*/
Ext.define('PVE.dc.OptionView', {
extend: 'Proxmox.grid.ObjectGrid',
alias: ['widget.pveDcOptionView'],
base_url: "/cluster/firewall/groups",
initComponent: function() {
- /*jslint confusion: true */
var me = this;
if (me.rule_panel == undefined) {
return function() { me.createStorageEditWindow(type); };
};
var addMenuItems = [], type;
- /*jslint forin: true */
for (type in PVE.Utils.storageSchema) {
var storage = PVE.Utils.storageSchema[type];
if (storage.hideAdd) {
/*global u2f,QRCode,Uint8Array*/
-/*jslint confusion: true*/
Ext.define('PVE.window.TFAEdit', {
extend: 'Ext.window.Window',
mixins: ['Proxmox.Mixin.CBind'],
-/*jslint confusion: true */
Ext.define('PVE.dc.UserView', {
extend: 'Ext.grid.GridPanel',
flex: 1,
allowBlank: false,
validator: function(value) {
- /*jslint confusion: true */
if (!me.rendered) {
return;
}
me.callParent();
- /*jslint confusion: true*/
/*because shift is also a function*/
// bind ctrl+shift+f and ctrl+space
// to open/close the search
});
/* because above is hotplug an array */
- /*jslint confusion: true*/
if (data.length === 0) {
return { 'hotplug':'0' };
} else {
},
validator: function(value) {
- /*jslint confusion: true */
var me = this;
if (!me.onlineValidator || (me.allowBlank && !value)) {
return true;
method: 'GET',
success: function(response, options) {
var data = [], key;
- /*jslint forin: true */
for (key in response.result.data) {
data.push([key, key]);
}
- /*jslint forin: false */
me.store.setData(data);
-/*jslint confusion: true*/
Ext.define('PVE.form.VMCPUFlagSelector', {
extend: 'Ext.grid.Panel',
alias: 'widget.vmcpuflagselector',
-/*jslint confusion: true*/
/* filter is a javascript builtin, but extjs calls it also filter */
Ext.define('PVE.form.VMSelector', {
extend: 'Ext.grid.Panel',
base_url: undefined,
initComponent : function() {
- /*jslint confusion: true */
var me = this;
initComponent: function() {
- /*jslint confusion: true */
var me = this;
if (!me.list_refs_url) {
}
});
-/*jslint confusion: true */
/* callback is a function and string */
Ext.define('PVE.grid.ReplicaView', {
extend: 'Ext.grid.Panel',
}
});
- /*jslint confusion: true */
var vmidStore = (me.vmid) ? {} : {
model: 'PVEResources',
autoLoad: true,
allowBlank: false
}
];
- /*jslint confusion: false */
me.column2 = [
{
-/*jslint confusion: true*/
Ext.define('PVE.lxc.CreateWizard', {
extend: 'PVE.window.Wizard',
mixins: ['Proxmox.Mixin.CBind'],
}
});
-/*jslint confusion: true */
Ext.define('PVE.lxc.DNS', {
extend: 'Proxmox.grid.PendingObjectGrid',
alias: ['widget.pveLxcDNS'],
-/*jslint confusion: true*/
Ext.define('PVE.lxc.FeaturesInputPanel', {
extend: 'Proxmox.panel.InputPanel',
xtype: 'pveLxcFeaturesInputPanel',
-/*jslint confusion: true*/
/* hidden: boolean and string
* bind: function and object
* disabled: boolean and string
if (Ext.isDefined(me.vmconfig["mp"+value])) {
return "Mount point is already in use.";
}
- /*jslint confusion: true*/
/* returns a string above */
return true;
}
success: function(response, options) {
ipanel.setVMConfig(response.result.data);
if (me.confid) {
- /*jslint confusion: true*/
/*data is defined as array above*/
var value = response.result.data[me.confid];
- /*jslint confusion: false*/
var mp = PVE.Parser.parseLxcMountPoint(value);
if (!mp) {
return result;
}
// validator can return bool/string
- /*jslint confusion:true*/
return true;
}
},
-/*jslint confusion: true */
Ext.define('PVE.lxc.Options', {
extend: 'Proxmox.grid.PendingObjectGrid',
alias: ['widget.pveLxcOptions'],
-/*jslint confusion: true */
var labelWidth = 120;
Ext.define('PVE.lxc.MemoryEdit', {
-/*jslint confusion: true */
Ext.define('PVE.lxc.RessourceView', {
extend: 'Proxmox.grid.PendingObjectGrid',
alias: ['widget.pveLxcRessourceView'],
},
initComponent: function() {
- /*jslint confusion: true */
var me = this;
me.nodename = me.pveSelNode.data.node;
],
initComponent: function() {
- /*jslint confusion: true */
var me = this;
var nodename = me.pveSelNode.data.node;
default:
// includes 'ata'
// cannot use empty case because
- // of jslint
grid.setVisible(true);
text.setVisible(false);
grid.setStore(rec.attributes());
},
initComponent: function() {
- /*jslint confusion: true */
var me = this;
me.nodename = me.pveSelNode.data.node;
},
initComponent: function() {
- /*jslint confusion: true */
var me = this;
me.nodename = me.pveSelNode.data.node;
-/*jslint confusion: true*/
Ext.define('PVE.node.CreateZFS', {
extend: 'Proxmox.window.Edit',
xtype: 'pveCreateZFS',
},
initComponent: function() {
- /*jslint confusion: true */
var me = this;
if (!me.nodename) {
border: false,
initComponent: function() {
- /*jslint confusion: true */
var me = this;
if (!me.nodename) {
},
initComponent: function() {
- /*jslint confusion: true */
var me = this;
me.nodename = me.pveSelNode.data.node;
}
me.savedItems = {};
- /*jslint confusion:true*/
if (me.items[0]) {
me.firstItem = me.items[0].itemId;
}
- /*jslint confusion:false*/
me.store = Ext.create('Ext.data.TreeStore', {
root: {
},
initComponent: function() {
- /*jslint confusion: true */
var me = this;
if (!me.list_refs_url) {
field.updateValue(renderer.call(field, me.getRecordValue(field.textField)));
} else if(field.valueField !== undefined) {
var used = me.getRecordValue(field.valueField);
- /*jslint confusion: true*/
/* string and int */
var max = field.maxField !== undefined ? me.getRecordValue(field.maxField) : 1;
me.editorConfig.url = me.baseurl + '/config';
me.editorConfig.pveSelNode = me.pveSelNode;
- /*jslint confusion: true*/
/* editor is string and object */
me.rows = {
ciuser: {
visible: false
};
}
- /*jslint confusion: false*/
PVE.Utils.forEachBus(['ide', 'scsi', 'sata'], function(type, id) {
me.rows[type+id] = {
-/*jslint confusion: true*/
Ext.define('PVE.qemu.CreateWizard', {
extend: 'PVE.window.Wizard',
alias: 'widget.pveQemuCreateWizard',
-/*jslint confusion: true */
/* 'change' property is assigned a string and then a function */
Ext.define('PVE.qemu.HDInputPanel', {
extend: 'Proxmox.panel.InputPanel',
me.callParent();
}
});
-/*jslint confusion: false */
Ext.define('PVE.qemu.HDEdit', {
extend: 'Proxmox.window.Edit',
me.items = [ ipanel ];
me.callParent();
- /*jslint confusion: true*/
/* 'data' is assigned an empty array in same file, and here we
* use it like an object
*/
}
}
});
- /*jslint confusion: false*/
}
});
var caps = Ext.state.Manager.get('GuiCap');
var diskCap = caps.vms['VM.Config.Disk'];
- /*jslint confusion: true */
var rows = {
memory: {
header: gettext('Memory'),
visible: false
}
};
- /*jslint confusion: false */
PVE.Utils.forEachBus(undefined, function(type, id) {
var confid = type + id;
isAdd: true,
initComponent : function() {
- /*jslint confusion: true */
var me = this;
isAdd: true,
initComponent : function() {
- /*jslint confusion: true */
var me = this;
initComponent : function() {
var me = this;
- /*jslint confusion: true */
me.items = [
{
xtype: 'displayfield',
}
}
];
- /*jslint confusion: false */
me.callParent();
}
-/*jslint confusion: true */
Ext.define('PVE.qemu.Options', {
extend: 'Proxmox.grid.PendingObjectGrid',
alias: ['widget.PVE.qemu.Options'],
-/*jslint confusion: true */
Ext.define('PVE.qemu.SerialnputPanel', {
extend: 'Proxmox.panel.InputPanel',
extend: 'Proxmox.window.Edit',
initComponent : function() {
- /*jslint confusion: true */
var me = this;
-/*jslint confusion: true*/
Ext.define('PVE.qemu.SystemInputPanel', {
extend: 'Proxmox.panel.InputPanel',
xtype: 'pveQemuSystemPanel',
return function() { me.createSDNControllerEditWindow(type); };
};
var addMenuItems = [], type;
- /*jslint forin: true */
for (type in PVE.Utils.sdncontrollerSchema) {
var controller = PVE.Utils.sdncontrollerSchema[type];
return function() { me.createSDNEditWindow(type); };
};
let addMenuItems = [], type;
- /*jslint forin: true */
for (type in PVE.Utils.sdnzoneSchema) {
let zone = PVE.Utils.sdnzoneSchema[type];
-/*jslint confusion: true*/
Ext.define('PVE.storage.CephFSInputPanel', {
extend: 'PVE.panel.StorageBase',
controller: 'cephstorage',
width: 900,
height: 600,
initComponent : function() {
- /*jslint confusion: true */
var me = this;
var grid = Ext.create('PVE.grid.TemplateSelector', {
modal: true,
initComponent : function() {
- /*jslint confusion: true */
var me = this;
var xhr;
// here value is an array,
// while before it was a string
- /*jslint confusion: true*/
me.column1.push({
xtype: 'pveContentTypeSelector',
cts: ['images', 'rootdir'],
multiSelect: true,
allowBlank: false
});
- /*jslint confusion: false*/
me.column2 = [
{
// here value is an array,
// while before it was a string
- /*jslint confusion: true*/
me.column1.push({
xtype: 'pveContentTypeSelector',
cts: ['images', 'rootdir'],
multiSelect: true,
allowBlank: false
});
- /*jslint confusion: false*/
me.column2 = [];
-/*jslint confusion: true*/
Ext.define('PVE.storage.NFSScan', {
extend: 'Ext.form.field.ComboBox',
alias: 'widget.pveNFSScan',
-/*jslint confusion: true*/
Ext.define('PVE.storage.Ceph.Model', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.cephstorage',
-/*jslint confusion: true*/
Ext.define('PVE.storage.ZFSInputPanel', {
extend: 'PVE.panel.StorageBase',
// value is an array,
// while before it was a string
- /*jslint confusion: true*/
me.column1.push(
{xtype: 'pveContentTypeSelector',
cts: ['images', 'rootdir'],
multiSelect: true,
allowBlank: false
});
- /*jslint confusion: false*/
me.column2 = [
{
xtype: 'proxmoxcheckbox',
var items = [];
if (me.action === 'migrateall') {
- /*jslint confusion: true*/
/*value is string and number*/
items.push(
{
hidden: true // only visible if running container chosen
}
);
- /*jslint confusion: false*/
} else if (me.action === 'startall') {
items.push({
xtype: 'hiddenfield',
-/*jslint confusion: true*/
Ext.define('PVE.ceph.Install', {
extend: 'Ext.window.Window',
xtype: 'pveCephInstallWindow',
-/*jslint confusion: true*/
Ext.define('PVE.FirewallEnableEdit', {
extend: 'Proxmox.window.Edit',
alias: ['widget.pveFirewallEnableEdit'],
-/*jslint confusion: true*/
Ext.define('PVE.FirewallLograteInputPanel', {
extend: 'Proxmox.panel.InputPanel',
xtype: 'pveFirewallLograteInputPanel',
-/*jslint confusion: true*/
Ext.define('PVE.window.Migrate', {
extend: 'Ext.window.Window',
},
];
- /*jslint confusion: true*/
if (me.vmtype === 'lxc') {
items.push({
xtype: 'proxmoxcheckbox',
fieldLabel: gettext('Unprivileged container')
});
}
- /*jslint confusion: false*/
me.formPanel = Ext.create('Ext.form.Panel', {
bodyPadding: 10,