+/*global Proxmox*/
Ext.define('PMG.ClamAVDatabaseConfig', {
extend: 'Proxmox.grid.ObjectGrid',
alias: ['widget.pmgClamAVDatabaseConfig'],
me.add_text_row('dbmirror', gettext('Database Mirror'),
{ deleteEmpty: true, defaultValue: 'database.clamav.net' });
+ /*jslint confusion: true*/
+ /*defaultValue is a string above*/
me.add_boolean_row('safebrowsing', gettext('Google Safe Browsing'),
{ defaultValue: 1 });
+ /*jslint confusion: false*/
var baseurl = '/config/clamav';
Ext.apply(me, {
url: '/api2/json' + baseurl,
editorConfig: {
- url: '/api2/extjs' + baseurl,
+ url: '/api2/extjs' + baseurl
},
interval: 5000,
cwidth1: 200,
me.callParent();
- me.on('activate', me.rstore.stopUpdate);
+ me.on('activate', me.rstore.startUpdate);
me.on('destroy', me.rstore.stopUpdate);
me.on('deactivate', me.rstore.stopUpdate);
}
}
});
- Proxmox.Utils.monStoreErrors(me, me.store);
-
Ext.apply(me, {
viewConfig: {
trackOver: false
flex: 1,
sortable: true,
dataIndex: 'nsigs'
- },
- ]
+ }
+ ],
+ listeners: {
+ activate: me.reload
+ }
});
+
me.callParent();
- me.reload();
+ /*jslint confusion: true*/
+ /*monStoreErrors is a bool above*/
+ Proxmox.Utils.monStoreErrors(me.getView(), me.store, true);
+ /*jslint confusion: false*/
}
});
});
var statusPanel = Ext.create('PMG.ClamAVDatabaseStatus', {
- border: false
+ border: false,
+ flex: 1
});
var update_command = function(){
upid: upid
});
win.show();
- me.mon(win, 'close', function() { statusPanel.reload() });
+ me.mon(win, 'close', function() { statusPanel.reload(); });
}
});
};
text: gettext('Edit'),
xtype: 'proxmoxButton',
disabled: true,
- handler: function() { editPanel.run_editor() },
+ handler: function() { editPanel.run_editor(); },
selModel: selModel
},
{
me.callParent();
+ editPanel.relayEvents(me, ['activate', 'deactivate', 'destroy']);
+ statusPanel.relayEvents(me, ['activate', 'deactivate', 'destroy']);
+
}
});