Fencing.js 787 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
Ext.define('PVE.ha.FencingView', {
    extend: 'Ext.grid.GridPanel',
    alias: ['widget.pveFencingView'],

    initComponent : function() {
	var me = this;

	var store = new Ext.data.Store({
	    model: 'pve-ha-fencing',
	    data: []
	});

	Ext.apply(me, {
	    store: store,
	    stateful: false,
	    viewConfig: {
		trackOver: false,
		deferEmptyText: false,
		emptyText: 'Use watchgog based fencing.'
	    },
	    columns: [
		{
		    header: 'Node',
		    width: 100,
		    sortable: true,
		    dataIndex: 'node'
		},
		{
		    header: gettext('Command'),
		    flex: 1,
		    dataIndex: 'command'
		}
	    ]
	});

	me.callParent();
    }
}, function() {

    Ext.define('pve-ha-fencing', {
	extend: 'Ext.data.Model',
	fields: [ 
	    'node', 'command', 'digest'
	]
    });

});