Add Zombies tab to main panel

This commit is contained in:
Brendan Coles
2019-02-15 13:33:36 +00:00
parent 9e22c02b0b
commit ad186a56de
5 changed files with 46 additions and 10 deletions

View File

@@ -5,7 +5,7 @@
//
DataGrid = function(url, page, base) {
LogsDataGrid = function(url, page, base) {
this.page = page;
this.url = url;
this.base = typeof(base) != 'undefined' ? base : {};
@@ -72,7 +72,7 @@ DataGrid = function(url, page, base) {
width: 35
}];
DataGrid.superclass.constructor.call(this, {
LogsDataGrid.superclass.constructor.call(this, {
region: 'center',
id: 'topic-grid',
loadMask: {msg:'Loading Feed...'},
@@ -93,7 +93,7 @@ DataGrid = function(url, page, base) {
});
};
Ext.extend(DataGrid, Ext.grid.GridPanel, {});
Ext.extend(LogsDataGrid, Ext.grid.GridPanel, {});
//Because we're using paging stores now, we have to override the PagingToolbar refresh
Ext.override(Ext.PagingToolbar, {

View File

@@ -29,8 +29,13 @@ MainPanel = function(){
}
});
this.grid = new DataGrid('<%= @base_path %>/logs/all.json',30);
this.grid.border = false;
this.logs_grid = new LogsDataGrid('<%= @base_path %>/logs/all.json',30);
this.logs_grid.border = false;
this.zombies_grid = new ZombieDataGrid('/api/hooks/all', 30);
this.zombies_grid.border = false;
this.welcome_tab = new WelcomeTab;
MainPanel.superclass.constructor.call(this, {
@@ -53,13 +58,23 @@ MainPanel = function(){
shadow:true,
items:[
this.welcome_tab
]},{
]
},{
id:'logs-view',
layout:'border',
title:'Logs',
hideMode:'offsets',
items:[
this.grid
this.logs_grid
]
},
{
id:'zombies-view',
layout:'border',
title:'Zombies',
hideMode:'offsets',
items:[
this.zombies_grid
]
}]
});

View File

@@ -9,7 +9,7 @@
*/
ZombieTab_LogTab = function(zombie) {
var zombieLog = new DataGrid('<%= @base_path %>/logs/zombie.json',30,{session:zombie.session});
var zombieLog = new LogsDataGrid('<%= @base_path %>/logs/zombie.json',30,{session:zombie.session});
zombieLog.border = false;
ZombieTab_LogTab.superclass.constructor.call(this, {