mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-14 10:28:14 +00:00
jslint: fix type confusion and property access
fix various type confusion, for example: items: {} and items: [] style: string and style: {} also fix object['property'] access with object.property also fix /=/ with either '=' or /\=/ where appropriate (/=/ can be confused with /= according to jslint) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
84de645d34
commit
ec0bd652db
@ -10,7 +10,7 @@ Ext.define('PVE.Parser', { statics: {
|
|||||||
return default_value;
|
return default_value;
|
||||||
}
|
}
|
||||||
value = value.toLowerCase();
|
value = value.toLowerCase();
|
||||||
return value === 1 || value === '1' ||
|
return value === '1' ||
|
||||||
value === 'on' ||
|
value === 'on' ||
|
||||||
value === 'yes' ||
|
value === 'yes' ||
|
||||||
value === 'true';
|
value === 'true';
|
||||||
@ -192,9 +192,11 @@ Ext.define('PVE.Parser', { statics: {
|
|||||||
errors = true;
|
errors = true;
|
||||||
return false; // break
|
return false; // break
|
||||||
}
|
}
|
||||||
data['bridge'] = bridge_res[1];
|
data.bridge = bridge_res[1];
|
||||||
data['tag'] = bridge_res[4];
|
data.tag = bridge_res[4];
|
||||||
data['firewall'] = bridge_res[5] ? 1 : 0;
|
/*jslint confusion: true*/
|
||||||
|
data.firewall = bridge_res[5] ? 1 : 0;
|
||||||
|
/*jslint confusion: false*/
|
||||||
} else {
|
} else {
|
||||||
data[match_res[1]] = match_res[2];
|
data[match_res[1]] = match_res[2];
|
||||||
}
|
}
|
||||||
@ -221,10 +223,10 @@ Ext.define('PVE.Parser', { statics: {
|
|||||||
Ext.Array.each(['ifname', 'mac', 'bridge', 'host_ifname' , 'host_mac', 'mac_filter', 'tag', 'firewall'], function(key) {
|
Ext.Array.each(['ifname', 'mac', 'bridge', 'host_ifname' , 'host_mac', 'mac_filter', 'tag', 'firewall'], function(key) {
|
||||||
var value = data[key];
|
var value = data[key];
|
||||||
if (key === 'bridge'){
|
if (key === 'bridge'){
|
||||||
if(data['tag']){
|
if(data.tag){
|
||||||
value = value + 'v' + data['tag'];
|
value = value + 'v' + data.tag;
|
||||||
}
|
}
|
||||||
if (data['firewall']){
|
if (data.firewall){
|
||||||
value = value + 'f';
|
value = value + 'f';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -270,9 +272,11 @@ Ext.define('PVE.Parser', { statics: {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*jslint confusion: true*/
|
||||||
if (data.rate > 0) {
|
if (data.rate > 0) {
|
||||||
tmparray.push('rate=' + data.rate);
|
tmparray.push('rate=' + data.rate);
|
||||||
}
|
}
|
||||||
|
/*jslint confusion: false*/
|
||||||
return tmparray.join(',');
|
return tmparray.join(',');
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -396,7 +400,7 @@ Ext.define('PVE.Parser', { statics: {
|
|||||||
var res = {};
|
var res = {};
|
||||||
|
|
||||||
Ext.Array.each(value.split(','), function(p) {
|
Ext.Array.each(value.split(','), function(p) {
|
||||||
var kva = p.split(/=/, 2);
|
var kva = p.split('=', 2);
|
||||||
res[kva[0]] = kva[1];
|
res[kva[0]] = kva[1];
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -419,7 +423,7 @@ Ext.define('PVE.Parser', { statics: {
|
|||||||
var res = {};
|
var res = {};
|
||||||
|
|
||||||
Ext.Array.each(value.split(','), function(p) {
|
Ext.Array.each(value.split(','), function(p) {
|
||||||
var kva = p.split(/=/, 2);
|
var kva = p.split('=', 2);
|
||||||
res[kva[0]] = kva[1];
|
res[kva[0]] = kva[1];
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -439,8 +443,8 @@ Ext.define('PVE.Parser', { statics: {
|
|||||||
return; // continue
|
return; // continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!p.match(/=/)) {
|
if (!p.match(/\=/)) {
|
||||||
if (Ext.isDefined(res['cpu'])) {
|
if (Ext.isDefined(res.cpu)) {
|
||||||
errors = true;
|
errors = true;
|
||||||
return false; // break
|
return false; // break
|
||||||
}
|
}
|
||||||
|
@ -147,6 +147,7 @@ Ext.define('PVE.Datepicker', {
|
|||||||
// since Ext.Msg is an object and not a prototype, we need to override it
|
// since Ext.Msg is an object and not a prototype, we need to override it
|
||||||
// after the framework has been initiated
|
// after the framework has been initiated
|
||||||
Ext.onReady(function() {
|
Ext.onReady(function() {
|
||||||
|
/*jslint confusion: true */
|
||||||
Ext.override(Ext.Msg, {
|
Ext.override(Ext.Msg, {
|
||||||
alert: function(title, message, fn, scope) {
|
alert: function(title, message, fn, scope) {
|
||||||
if (Ext.isString(title)) {
|
if (Ext.isString(title)) {
|
||||||
@ -163,8 +164,8 @@ Ext.onReady(function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
/*jslint confusion: false */
|
||||||
});
|
});
|
||||||
|
|
||||||
Ext.define('Ext.ux.IFrame', {
|
Ext.define('Ext.ux.IFrame', {
|
||||||
extend: 'Ext.Component',
|
extend: 'Ext.Component',
|
||||||
|
|
||||||
|
@ -109,6 +109,9 @@ Ext.define('PVE.ConsoleWorkspace', {
|
|||||||
title: gettext('Console'),
|
title: gettext('Console'),
|
||||||
|
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
|
// novnc is a string in param
|
||||||
|
// but a boolean in content
|
||||||
|
/*jslint confusion: true*/
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
var param = Ext.Object.fromQueryString(window.location.search);
|
var param = Ext.Object.fromQueryString(window.location.search);
|
||||||
|
@ -32,9 +32,12 @@ Ext.define('PVE.button.Split', {
|
|||||||
|
|
||||||
if (me.confirmMsg) {
|
if (me.confirmMsg) {
|
||||||
msg = me.confirmMsg;
|
msg = me.confirmMsg;
|
||||||
|
// confirMsg can be boolean or function
|
||||||
|
/*jslint confusion: true*/
|
||||||
if (Ext.isFunction(me.confirmMsg)) {
|
if (Ext.isFunction(me.confirmMsg)) {
|
||||||
msg = me.confirmMsg(rec);
|
msg = me.confirmMsg(rec);
|
||||||
}
|
}
|
||||||
|
/*jslint confusion: false*/
|
||||||
Ext.MessageBox.defaultButton = me.dangerous ? 2 : 1;
|
Ext.MessageBox.defaultButton = me.dangerous ? 2 : 1;
|
||||||
Ext.Msg.show({
|
Ext.Msg.show({
|
||||||
title: gettext('Confirm'),
|
title: gettext('Confirm'),
|
||||||
|
@ -15,7 +15,7 @@ Ext.define('PVE.node.CephDiskList', {
|
|||||||
sortable: false,
|
sortable: false,
|
||||||
renderer: function(v, metaData, rec) {
|
renderer: function(v, metaData, rec) {
|
||||||
if (rec && (rec.data.osdid >= 0)) {
|
if (rec && (rec.data.osdid >= 0)) {
|
||||||
return "osd." + rec.data.osdid;
|
return "osd." + rec.data.osdid.toString();
|
||||||
}
|
}
|
||||||
return v || PVE.Utils.noText;
|
return v || PVE.Utils.noText;
|
||||||
},
|
},
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
// Ext.create is a function, but
|
||||||
|
// we defined create a bool in PVE.window.Edit
|
||||||
|
/*jslint confusion: true*/
|
||||||
Ext.define('PVE.CephCreatePool', {
|
Ext.define('PVE.CephCreatePool', {
|
||||||
extend: 'PVE.window.Edit',
|
extend: 'PVE.window.Edit',
|
||||||
alias: ['widget.pveCephCreatePool'],
|
alias: ['widget.pveCephCreatePool'],
|
||||||
|
@ -274,8 +274,11 @@ Ext.define('PVE.dc.AuthEdit', {
|
|||||||
data.yubico_api_id = tfacfg.id;
|
data.yubico_api_id = tfacfg.id;
|
||||||
data.yubico_url = tfacfg.url;
|
data.yubico_url = tfacfg.url;
|
||||||
} else if (tfacfg.type === 'oath') {
|
} else if (tfacfg.type === 'oath') {
|
||||||
|
// step is a number before
|
||||||
|
/*jslint confusion: true*/
|
||||||
data.oath_step = tfacfg.step;
|
data.oath_step = tfacfg.step;
|
||||||
data.oath_digits = tfacfg.digits;
|
data.oath_digits = tfacfg.digits;
|
||||||
|
/*jslint confusion: false*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,13 +15,15 @@ Ext.define('PVE.form.HotplugFeatureSelector', {
|
|||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
if (me.multiSelect && Ext.isString(value)) {
|
if (me.multiSelect && Ext.isString(value)) {
|
||||||
|
var newVal;
|
||||||
if (value === '0') {
|
if (value === '0') {
|
||||||
value = [];
|
newVal = [];
|
||||||
} else if (value === '1') {
|
} else if (value === '1') {
|
||||||
value = ['disk', 'network', 'usb'];
|
newVal = ['disk', 'network', 'usb'];
|
||||||
} else {
|
} else {
|
||||||
value = value.split(',');
|
newVal = value.split(',');
|
||||||
}
|
}
|
||||||
|
me.callParent([newVal, doSelect]);
|
||||||
}
|
}
|
||||||
|
|
||||||
me.callParent([value, doSelect]);
|
me.callParent([value, doSelect]);
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
// Ext.create is a function
|
||||||
|
// but we defined create as a bool in PVE.window.Edit
|
||||||
|
/*jslint confusion: true*/
|
||||||
Ext.define('PVE.pool.AddVM', {
|
Ext.define('PVE.pool.AddVM', {
|
||||||
extend: 'PVE.window.Edit',
|
extend: 'PVE.window.Edit',
|
||||||
width: 600,
|
width: 600,
|
||||||
|
@ -137,10 +137,10 @@ Ext.define('PVE.lxc.Config', {
|
|||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
plugins: {
|
plugins: {
|
||||||
ptype: 'lazyitems',
|
ptype: 'lazyitems',
|
||||||
items: {
|
items: [{
|
||||||
xtype: 'pveLxcRessourceView',
|
xtype: 'pveLxcRessourceView',
|
||||||
pveSelNode: me.pveSelNode
|
pveSelNode: me.pveSelNode
|
||||||
}
|
}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,7 @@ Ext.define('PVE.lxc.DNSEdit', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
subject: gettext('Resources'),
|
subject: gettext('Resources'),
|
||||||
items: ipanel
|
items: [ ipanel ]
|
||||||
});
|
});
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
@ -71,7 +71,7 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
|
|||||||
|
|
||||||
var i, netlist = [];
|
var i, netlist = [];
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
netlist.push({ "name": "net" + i });
|
netlist.push({ "name": "net" + i.toString() });
|
||||||
}
|
}
|
||||||
|
|
||||||
var netliststore = Ext.create('Ext.data.Store', {
|
var netliststore = Ext.create('Ext.data.Store', {
|
||||||
@ -94,6 +94,8 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
|
|||||||
if (me.create && me.dataCache[value]) {
|
if (me.create && me.dataCache[value]) {
|
||||||
return "Network ID already in use";
|
return "Network ID already in use";
|
||||||
}
|
}
|
||||||
|
// validator can return bool/String
|
||||||
|
/*jslint confusion: true*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -107,7 +109,7 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
|
|||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
value: cdata.name,
|
value: cdata.name,
|
||||||
validator: function(value) {
|
validator: function(value) {
|
||||||
var result = true;
|
var result = '';
|
||||||
Ext.Object.each(me.dataCache, function(key, netstr) {
|
Ext.Object.each(me.dataCache, function(key, netstr) {
|
||||||
if (!key.match(/^net\d+/) || key === me.ifname) {
|
if (!key.match(/^net\d+/) || key === me.ifname) {
|
||||||
return; // continue
|
return; // continue
|
||||||
@ -118,7 +120,12 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return result;
|
if (result !== '') {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
// validator can return bool/string
|
||||||
|
/*jslint confusion:true*/
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -54,7 +54,7 @@ Ext.define('PVE.lxc.Summary', {
|
|||||||
ptype: 'lazyitems',
|
ptype: 'lazyitems',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
style: 'padding-top:0px',
|
style: {'padding-top': '0px' },
|
||||||
layout: {
|
layout: {
|
||||||
type: 'hbox',
|
type: 'hbox',
|
||||||
align: 'stretchmax'
|
align: 'stretchmax'
|
||||||
|
@ -74,7 +74,7 @@ Ext.define('PVE.node.Subscription', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
items: [ view ]
|
items: view
|
||||||
});
|
});
|
||||||
|
|
||||||
PVE.Utils.API2Request({
|
PVE.Utils.API2Request({
|
||||||
|
@ -50,14 +50,14 @@ Ext.define('PVE.panel.Config', {
|
|||||||
items.unshift({
|
items.unshift({
|
||||||
itemId: 'search',
|
itemId: 'search',
|
||||||
title: gettext('Search'),
|
title: gettext('Search'),
|
||||||
layout: 'fit',
|
layout: { type:'fit' },
|
||||||
plugins: {
|
plugins: [{
|
||||||
ptype: 'lazyitems',
|
ptype: 'lazyitems',
|
||||||
items: {
|
items: [{
|
||||||
xtype: 'pveResourceGrid',
|
xtype: 'pveResourceGrid',
|
||||||
pveSelNode: me.pveSelNode
|
pveSelNode: me.pveSelNode
|
||||||
}
|
}]
|
||||||
}
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ Ext.define('PVE.panel.LogView', {
|
|||||||
var maxDown = me.getMaxDown();
|
var maxDown = me.getMaxDown();
|
||||||
var scrollToEnd = (maxDown <= 0) && me.scrollToEnd;
|
var scrollToEnd = (maxDown <= 0) && me.scrollToEnd;
|
||||||
|
|
||||||
el.setStyle('padding-top', start*me.lineHeight + 'px');
|
el.setStyle('padding-top', (start*me.lineHeight).toString() + 'px');
|
||||||
el.update(text);
|
el.update(text);
|
||||||
me.dataCmp.setHeight(total*me.lineHeight);
|
me.dataCmp.setHeight(total*me.lineHeight);
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ Ext.define('PVE.widget.RRDChart', {
|
|||||||
// limit to 2 decimal points
|
// limit to 2 decimal points
|
||||||
value = Ext.util.Format.number(value, "0.##");
|
value = Ext.util.Format.number(value, "0.##");
|
||||||
|
|
||||||
return value + " " + units[si];
|
return value.toString() + " " + units[si];
|
||||||
},
|
},
|
||||||
|
|
||||||
leftAxisRenderer: function(axis, label, layoutContext) {
|
leftAxisRenderer: function(axis, label, layoutContext) {
|
||||||
|
@ -48,7 +48,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
|
|||||||
var res = { boot: order };
|
var res = { boot: order };
|
||||||
|
|
||||||
if (me.bootdisk && order.indexOf('c') !== -1) {
|
if (me.bootdisk && order.indexOf('c') !== -1) {
|
||||||
res['bootdisk'] = me.bootdisk;
|
res.bootdisk = me.bootdisk;
|
||||||
} else {
|
} else {
|
||||||
res['delete'] = 'bootdisk';
|
res['delete'] = 'bootdisk';
|
||||||
}
|
}
|
||||||
@ -151,10 +151,10 @@ Ext.define('PVE.qemu.BootOrderPanel', {
|
|||||||
Ext.define('PVE.qemu.BootOrderEdit', {
|
Ext.define('PVE.qemu.BootOrderEdit', {
|
||||||
extend: 'PVE.window.Edit',
|
extend: 'PVE.window.Edit',
|
||||||
|
|
||||||
items: {
|
items: [{
|
||||||
xtype: 'pveQemuBootOrderPanel',
|
xtype: 'pveQemuBootOrderPanel',
|
||||||
itemId: 'inputpanel',
|
itemId: 'inputpanel'
|
||||||
},
|
}],
|
||||||
|
|
||||||
subject: gettext('Boot Order'),
|
subject: gettext('Boot Order'),
|
||||||
|
|
||||||
|
@ -11,11 +11,11 @@ Ext.define('PVE.qemu.CPUOptionsInputPanel', {
|
|||||||
delete_array.push('vcpus');
|
delete_array.push('vcpus');
|
||||||
delete values.vcpus;
|
delete values.vcpus;
|
||||||
}
|
}
|
||||||
if (values.cpulimit === '' || values.cpulimit == 0) {
|
if (values.cpulimit === '' || values.cpulimit == '0') {
|
||||||
delete_array.push('cpulimit');
|
delete_array.push('cpulimit');
|
||||||
delete values.cpulimit;
|
delete values.cpulimit;
|
||||||
}
|
}
|
||||||
if (values.cpuunits === '' || values.cpuunits == 1024) {
|
if (values.cpuunits === '' || values.cpuunits == '1024') {
|
||||||
delete_array.push('cpuunits');
|
delete_array.push('cpuunits');
|
||||||
delete values.cpuunits;
|
delete values.cpuunits;
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ Ext.define('PVE.qemu.CPUOptionsInputPanel', {
|
|||||||
fieldLabel: gettext('CPU units'),
|
fieldLabel: gettext('CPU units'),
|
||||||
minValue: 8,
|
minValue: 8,
|
||||||
maxValue: 500000,
|
maxValue: 500000,
|
||||||
value: 1024,
|
value: '1024',
|
||||||
allowBlank: true
|
allowBlank: true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -81,7 +81,7 @@ Ext.define('PVE.qemu.CPUOptions', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
subject: gettext('CPU options'),
|
subject: gettext('CPU options'),
|
||||||
items: ipanel,
|
items: [ ipanel ]
|
||||||
});
|
});
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
@ -152,7 +152,7 @@ Ext.define('PVE.qemu.MemoryEdit', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
subject: gettext('Memory'),
|
subject: gettext('Memory'),
|
||||||
items: ipanel,
|
items: [ ipanel ],
|
||||||
// uncomment the following to use the async configiguration API
|
// uncomment the following to use the async configiguration API
|
||||||
// backgroundDelay: 5,
|
// backgroundDelay: 5,
|
||||||
width: 400
|
width: 400
|
||||||
|
@ -6,8 +6,8 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
|
|||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
// build the cpu options:
|
// build the cpu options:
|
||||||
me.cpu.cputype = values['cputype'];
|
me.cpu.cputype = values.cputype;
|
||||||
delete values['cputype'];
|
delete values.cputype;
|
||||||
var cpustring = PVE.Parser.printQemuCpu(me.cpu);
|
var cpustring = PVE.Parser.printQemuCpu(me.cpu);
|
||||||
|
|
||||||
// remove cputype delete request:
|
// remove cputype delete request:
|
||||||
@ -21,14 +21,14 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cpustring) {
|
if (cpustring) {
|
||||||
values['cpu'] = cpustring;
|
values.cpu = cpustring;
|
||||||
} else {
|
} else {
|
||||||
del.push('cpu');
|
del.push('cpu');
|
||||||
}
|
}
|
||||||
|
|
||||||
del = del.join(',');
|
var delarr = del.join(',');
|
||||||
if (del) {
|
if (delarr) {
|
||||||
values['delete'] = del;
|
values['delete'] = delarr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return values;
|
return values;
|
||||||
@ -120,7 +120,7 @@ Ext.define('PVE.qemu.ProcessorEdit', {
|
|||||||
me.load({
|
me.load({
|
||||||
success: function(response, options) {
|
success: function(response, options) {
|
||||||
var data = response.result.data;
|
var data = response.result.data;
|
||||||
var value = data['cpu'];
|
var value = data.cpu;
|
||||||
if (value) {
|
if (value) {
|
||||||
var cpu = PVE.Parser.parseQemuCpu(value);
|
var cpu = PVE.Parser.parseQemuCpu(value);
|
||||||
ipanel.cpu = cpu;
|
ipanel.cpu = cpu;
|
||||||
|
@ -172,6 +172,9 @@ Ext.define('PVE.storage.LVMInputPanel', {
|
|||||||
|
|
||||||
me.column1.push(vgnameField);
|
me.column1.push(vgnameField);
|
||||||
|
|
||||||
|
// here value is an array,
|
||||||
|
// while before it was a string
|
||||||
|
/*jslint confusion: true*/
|
||||||
me.column1.push({
|
me.column1.push({
|
||||||
xtype: 'pveContentTypeSelector',
|
xtype: 'pveContentTypeSelector',
|
||||||
cts: ['images', 'rootdir'],
|
cts: ['images', 'rootdir'],
|
||||||
@ -181,6 +184,7 @@ Ext.define('PVE.storage.LVMInputPanel', {
|
|||||||
multiSelect: true,
|
multiSelect: true,
|
||||||
allowBlank: false
|
allowBlank: false
|
||||||
});
|
});
|
||||||
|
/*jslint confusion: false*/
|
||||||
|
|
||||||
me.column2 = [
|
me.column2 = [
|
||||||
{
|
{
|
||||||
|
@ -168,6 +168,9 @@ Ext.define('PVE.storage.LvmThinInputPanel', {
|
|||||||
|
|
||||||
me.column1.push(thinpoolField);
|
me.column1.push(thinpoolField);
|
||||||
|
|
||||||
|
// here value is an array,
|
||||||
|
// while before it was a string
|
||||||
|
/*jslint confusion: true*/
|
||||||
me.column1.push({
|
me.column1.push({
|
||||||
xtype: 'pveContentTypeSelector',
|
xtype: 'pveContentTypeSelector',
|
||||||
cts: ['images', 'rootdir'],
|
cts: ['images', 'rootdir'],
|
||||||
@ -177,6 +180,7 @@ Ext.define('PVE.storage.LvmThinInputPanel', {
|
|||||||
multiSelect: true,
|
multiSelect: true,
|
||||||
allowBlank: false
|
allowBlank: false
|
||||||
});
|
});
|
||||||
|
/*jslint confusion: false*/
|
||||||
|
|
||||||
me.column2 = [
|
me.column2 = [
|
||||||
{
|
{
|
||||||
|
@ -52,6 +52,9 @@ Ext.define('PVE.storage.RBDInputPanel', {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// here value is an array,
|
||||||
|
// while before it was a string
|
||||||
|
/*jslint confusion: true*/
|
||||||
me.column2 = [
|
me.column2 = [
|
||||||
{
|
{
|
||||||
xtype: 'pvecheckbox',
|
xtype: 'pvecheckbox',
|
||||||
@ -76,6 +79,7 @@ Ext.define('PVE.storage.RBDInputPanel', {
|
|||||||
fieldLabel: gettext('KRBD')
|
fieldLabel: gettext('KRBD')
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
/*jslint confusion: false*/
|
||||||
|
|
||||||
if (me.create || me.storageId !== 'local') {
|
if (me.create || me.storageId !== 'local') {
|
||||||
me.column2.unshift({
|
me.column2.unshift({
|
||||||
|
@ -28,7 +28,7 @@ Ext.define('PVE.storage.Summary', {
|
|||||||
|
|
||||||
var statusview = Ext.create('PVE.storage.StatusView', {
|
var statusview = Ext.create('PVE.storage.StatusView', {
|
||||||
pveSelNode: me.pveSelNode,
|
pveSelNode: me.pveSelNode,
|
||||||
style: 'padding-top:0px'
|
style: {'padding-top':'0px'}
|
||||||
});
|
});
|
||||||
|
|
||||||
var rstore = statusview.rstore;
|
var rstore = statusview.rstore;
|
||||||
|
@ -79,6 +79,9 @@ Ext.define('PVE.storage.ZFSPoolInputPanel', {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// value is an array,
|
||||||
|
// while before it was a string
|
||||||
|
/*jslint confusion: true*/
|
||||||
me.column1.push(
|
me.column1.push(
|
||||||
{xtype: 'pveContentTypeSelector',
|
{xtype: 'pveContentTypeSelector',
|
||||||
cts: ['images', 'rootdir'],
|
cts: ['images', 'rootdir'],
|
||||||
@ -86,8 +89,9 @@ Ext.define('PVE.storage.ZFSPoolInputPanel', {
|
|||||||
name: 'content',
|
name: 'content',
|
||||||
value: ['images', 'rootdir'],
|
value: ['images', 'rootdir'],
|
||||||
multiSelect: true,
|
multiSelect: true,
|
||||||
allowBlank: false});
|
allowBlank: false
|
||||||
|
});
|
||||||
|
/*jslint confusion: false*/
|
||||||
me.column2 = [
|
me.column2 = [
|
||||||
{
|
{
|
||||||
xtype: 'pvecheckbox',
|
xtype: 'pvecheckbox',
|
||||||
|
@ -104,7 +104,7 @@ Ext.define('PVE.tree.ResourceTree', {
|
|||||||
|
|
||||||
var defaults = PVE.tree.ResourceTree.typeDefaults[info.type];
|
var defaults = PVE.tree.ResourceTree.typeDefaults[info.type];
|
||||||
if (info.id === 'root') {
|
if (info.id === 'root') {
|
||||||
defaults = PVE.tree.ResourceTree.typeDefaults['datacenter'];
|
defaults = PVE.tree.ResourceTree.typeDefaults.datacenter;
|
||||||
} else if (info.type === 'type') {
|
} else if (info.type === 'type') {
|
||||||
defaults = PVE.tree.ResourceTree.typeDefaults[info.groupbyid];
|
defaults = PVE.tree.ResourceTree.typeDefaults[info.groupbyid];
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ Ext.define('PVE.tree.ResourceTree', {
|
|||||||
|
|
||||||
if (info.template) {
|
if (info.template) {
|
||||||
iconClsAdd = '-template';
|
iconClsAdd = '-template';
|
||||||
info.iconCls = PVE.tree.ResourceTree.typeDefaults['template'].iconCls + '-' + info.type;
|
info.iconCls = PVE.tree.ResourceTree.typeDefaults.template.iconCls + '-' + info.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ Ext.define('PVE.window.SafeDestroy', {
|
|||||||
buttonAlign: 'center',
|
buttonAlign: 'center',
|
||||||
bodyPadding: 10,
|
bodyPadding: 10,
|
||||||
width: 450,
|
width: 450,
|
||||||
layout: 'hbox',
|
layout: { type:'hbox' },
|
||||||
defaultFocus: 'confirmField',
|
defaultFocus: 'confirmField',
|
||||||
|
|
||||||
config: {
|
config: {
|
||||||
|
Loading…
Reference in New Issue
Block a user