// this class only contains static functions
parseBoolean: function(value, default_value) {
- if (!Ext.isDefined(value))
+ if (!Ext.isDefined(value)) {
return default_value;
+ }
value = value.toLowerCase();
return value === 1 || value === '1' ||
value === 'on' ||
var datastr = '';
Ext.Object.each(data, function(key, value) {
- if (value === '') return;
+ if (value === '') { return; }
datastr += (datastr !== '' ? ',' : '') + key + '=' + value;
});
});
if (!cpustr) {
- if (optstr)
+ if (optstr) {
return 'kvm64' + optstr;
+ }
return;
}
});
} else if (me.authType === 'pve') {
- if (me.create) throw 'unknown auth type';
+ if (me.create) {
+ throw 'unknown auth type';
+ }
me.subject = 'Proxmox VE authentication server';
} else if (me.authType === 'pam') {
- if (me.create) throw 'unknown auth type';
+ if (me.create) {
+ throw 'unknown auth type';
+ }
me.subject = 'linux PAM';
var newdata = {};
- if (values['ipv6mode'] !== 'static')
- values['ip6'] = values['ipv6mode'];
- if (values['ipv4mode'] !== 'static')
- values['ip'] = values['ipv4mode']
+ if (values.ipv6mode !== 'static') {
+ values.ip6 = values.ipv6mode;
+ }
+ if (values.ipv4mode !== 'static') {
+ values.ip = values.ipv4mode;
+ }
newdata[id] = PVE.Parser.printLxcNetwork(values);
return newdata;
},