Skip to content

Commit

Permalink
Added tabs to monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedek Vartok committed Jul 31, 2014
1 parent 0670e87 commit 2c8037f
Show file tree
Hide file tree
Showing 11 changed files with 4,464 additions and 5,038 deletions.
6,876 changes: 3,511 additions & 3,365 deletions html/css/bootstrap.css
100755 → 100644

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions html/css/bootstrap.css.map

Large diffs are not rendered by default.

893 changes: 4 additions & 889 deletions html/css/bootstrap.min.css
100755 → 100644

Large diffs are not rendered by default.

Empty file modified index.htm
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion js/GameList.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
GameList.version = '0.1.0';
GameList.description = 'Visually display available games on the server.';

GameList.title = 'Games';
//GameList.title = 'Games';
GameList.className = 'gamelist';

// ## Dependencies
Expand Down
57 changes: 49 additions & 8 deletions js/Monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ function Monitor(node) {
var stager = new node.Stager();

stager.setOnInit(function() {
var button;
var channelList, roomList, clientList;
var button, tabList, tmpElem;
var tabContent, channelList, roomList, clientList;

// Add refresh button:
button = document.createElement('button');
Expand All @@ -17,14 +17,55 @@ function Monitor(node) {
};
document.body.appendChild(button);

// Tabs:
tabList = document.createElement('ul');
tabList.className = 'nav nav-tabs';
tabList.setAttribute('role', 'tablist');
document.body.appendChild(tabList);

tmpElem = document.createElement('li');
tmpElem.className = 'active';
tmpElem.innerHTML =
'<a href="#channels" role="tab" data-toggle="tab">Channels</a>';
tabList.appendChild(tmpElem);

tmpElem = document.createElement('li');
tmpElem.innerHTML =
'<a href="#clients" role="tab" data-toggle="tab">Clients</a>';
tabList.appendChild(tmpElem);

tmpElem = document.createElement('li');
tmpElem.innerHTML =
'<a href="#games" role="tab" data-toggle="tab">Games</a>';
tabList.appendChild(tmpElem);

// Add widgets:
channelList = node.widgets.append('ChannelList');
roomList = node.widgets.append('RoomList');
clientList = node.widgets.append('ClientList');
node.widgets.append('GameList');
tabContent = document.createElement('div');
tabContent.className = 'tab-content';
document.body.appendChild(tabContent);

// Channel and room list:
tmpElem = document.createElement('div');
tmpElem.className = 'tab-pane active';
tmpElem.id = 'channels';
tabContent.appendChild(tmpElem);
channelList = node.widgets.append('ChannelList', tmpElem);
roomList = node.widgets.append('RoomList', tmpElem);

// Client list and controls:
tmpElem = document.createElement('div');
tmpElem.className = 'tab-pane';
tmpElem.id = 'clients';
tabContent.appendChild(tmpElem);
clientList = node.widgets.append('ClientList', tmpElem);
node.widgets.append('MsgBar', tmpElem);
node.widgets.append('StateBar', tmpElem);

node.widgets.append('MsgBar');
node.widgets.append('StateBar');
tmpElem = document.createElement('div');
tmpElem.className = 'tab-pane';
tmpElem.id = 'games';
tabContent.appendChild(tmpElem);
node.widgets.append('GameList', tmpElem);
});

stager.addStage({
Expand Down
Empty file modified js/bootbox.min.js
100755 → 100644
Empty file.
Loading

0 comments on commit 2c8037f

Please sign in to comment.