hidden: true,
convert: function(value, record) {
var info = record.data;
- if (info.type === 'qemu' || info.type === 'lxc' || info.type === 'node') {
- return (Ext.isNumeric(info.uptime) && (info.uptime > 0));
- } else {
- return false;
- }
+ return (Ext.isNumeric(info.uptime) && (info.uptime > 0));
}
},
text: {
hastate: {
header: gettext('HA State'),
type: 'string',
- defaultValue: '',
+ defaultValue: 'unmanaged',
hidden: true,
sortable: true
}
var fieldNames = [];
Ext.Object.each(field_defaults, function(key, value) {
if (!Ext.isDefined(value.convert) && !Ext.isDefined(value.calculate)) {
- fields.push({name: key, type: value.type});
+ var field = {name: key, type: value.type};
+ if (Ext.isDefined(value.defaultValue)) {
+ field.defaultValue = value.defaultValue;
+ }
+ fields.push(field);
fieldNames.push(key);
} else if (key === 'text' || key === 'running') {
fields.push({name: key, type: value.type, convert: value.convert});
Ext.apply(config, {
storeid: 'PVEResources',
model: 'PVEResources',
- defaultColums: function() {
+ defaultColumns: function() {
var res = [];
Ext.Object.each(field_defaults, function(field, info) {
var fi = Ext.apply({ dataIndex: field }, info);