#126 saimod tbc account + bot control

This commit is contained in:
Ulf Gebhardt 2017-01-09 04:27:04 +01:00
parent 06b30a7e5b
commit d1ebef0049
22 changed files with 440 additions and 107 deletions

View File

@ -12,9 +12,9 @@ class account_serverstatus implements \SYSTEM\PAGE\Page {
if(!\SYSTEM\SECURITY\security::isLoggedIn()){
return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('account_website/tpl/account_login.tpl'))->SERVERPATH(), $vars);}
$vars['realm_online'] = \SAI\saimod_mojotrollz_server_handling::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_tbc_realm_status() == 1 ? 'online' : 'offline';
$vars['world_online'] = \SAI\saimod_mojotrollz_server_handling::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_tbc_world_status() == 1 ? 'online' : 'offline';
$vars['test_online'] = \SAI\saimod_mojotrollz_server_handling::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_tbc_world_test_status() == 1 ? 'online' : 'offline';
$vars['realm_online'] = \SAI\saimod_mojotrollz_servers::sai_mod__SAI_saimod_mojotrollz_servers_action_run_tbc_realm_status() == 1 ? 'online' : 'offline';
$vars['world_online'] = \SAI\saimod_mojotrollz_servers::sai_mod__SAI_saimod_mojotrollz_servers_action_run_tbc_world_status() == 1 ? 'online' : 'offline';
$vars['test_online'] = \SAI\saimod_mojotrollz_servers::sai_mod__SAI_saimod_mojotrollz_servers_action_run_tbc_world_test_status() == 1 ? 'online' : 'offline';
return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('account_serverstatus/tpl/account_serverstatus.tpl'))->SERVERPATH(), $vars);
}

View File

@ -1,4 +1,20 @@
function init_saimod_mojotrollz_server_tbc(){
{
$('#tabs a').click(function () {
$('#tabs li').each(function(){
$(this).removeClass('active');});
$(this).parent().addClass('active');
});
}
}
function init_saimod_mojotrollz_server_tbc_status(){
{
$('#tabs li').each(function(){
$(this).removeClass('active');});
$('#menu_status').parent().addClass('active');
}
{
load_visualisation_mojotrollz_tbc('vis_tbc_player', 'stats_tbc_player', '#filter_vis_tbc_player', 'Players on WoW-TBC', 400,250);
@ -11,17 +27,62 @@ function init_saimod_mojotrollz_server_tbc(){
load_visualisation_mojotrollz_tbc('vis_tbc_server', 'stats_tbc_server', '#filter_vis_tbc_server', 'WoW-TBC Server Status', 400,250);
})
}
$('#btn_clear').click(function(){
$('#output_log').html('');
$('#table_changes').html('');
});
register_tbc();
}
function register_tbc(){
function init_saimod_mojotrollz_server_tbc_account(){
{
$('#tabs li').each(function(){
$(this).removeClass('active');});
$('#menu_account').parent().addClass('active');
$('#btn_search').click(function(){
system.load('mojotrollz_server_tbc(account);search.'+$('#input_search').val(),true);
});
}
}
function init_saimod_mojotrollz_server_tbc_account_show(){
{
$('#tabs li').each(function(){
$(this).removeClass('active');});
$('#menu_account').parent().addClass('active');
}
{
$('.bot').click(function(){
var account = $(this).attr('account');
var guid = $(this).attr('guid');
var server = $(this).attr('server');
var status = $(this).attr('status');
$.ajax({ type :'GET',
url : './sai.php',
data : { sai_mod: '.SAI.saimod_mojotrollz_server_tbc',
action: 'bot_toggle',
account: account,
guid: guid,
server: server,
status: status},
success : function() {
system.reload();
}
});
});
}
}
function init_saimod_mojotrollz_server_tbc_control(){
{
$('#tabs li').each(function(){
$(this).removeClass('active');});
$('#menu_control').parent().addClass('active');
}
{
$('#btn_clear').click(function(){
$('#output_log').html('');
$('#table_changes').html('');
});
$('#btn_tbc_realm_start').click(function(){
growl_start('Doing ... please wait')
$.ajax({ type :'GET',

View File

@ -2,18 +2,81 @@
namespace SAI;
class saimod_mojotrollz_server_tbc extends \SYSTEM\SAI\SaiModule {
public static function sai_mod__SAI_saimod_mojotrollz_server_tbc(){
return \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/mojotrollz_server_tbc.tpl');}
public static function html_li_menu(){return '<li class=""><a data-toggle="tooltip" data-placement="left" title="Mojotrollz TBC Server" href="#!mojotrollz_server_tbc"><span class="glyphicon glyphicon-tree-deciduous" aria-hidden="true"></span>&nbsp;&nbsp;TBC Server</a></li>';}
public static function right_public(){return false;}
public static function right_right(){return \SYSTEM\SECURITY\security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
public static function js(){return array(new \PSAI('saimod_mojotrollz_server_tbc/js/saimod_mojotrollz_server_tbc.js'));}
//public static function css(){}
public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_status(){
$vars = array();
$vars['tbc_realm_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_realm_status();
$vars['tbc_world_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_world_status();
$vars['tbc_world_test_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_world_test_status();
$vars['tbc_players_online'] = self::online_tbc();
$vars['tbc_test_players_online'] = self::online_tbc_test();
return \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/main.tpl', $vars);}
public static function html_li_menu(){return '<li class=""><a data-toggle="tooltip" data-placement="left" title="Mojotrollz TBC Server" href="#!mojotrollz_server_tbc"><span class="glyphicon glyphicon-tree-deciduous" aria-hidden="true"></span>&nbsp;&nbsp;TBC Server</a></li>';}
public static function right_public(){return false;}
public static function right_right(){return \SYSTEM\SECURITY\security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
public static function js(){return array(new \PSAI('saimod_mojotrollz_server_tbc/js/saimod_mojotrollz_server_tbc.js'));}
//public static function css(){}
return \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/status.tpl', $vars);
}
public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_control(){
return \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/control.tpl');}
public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_account($search='%',$page=0){
$res = \SQL\TBC_ACCOUNTS::QQ(array($search,$search,$search));
$count = \SQL\TBC_ACCOUNTS_COUNT::Q1(array($search,$search,$search))['count'];
$vars = array();
$vars['search'] = $search;
$vars['page'] = $page;
$vars['entries'] = '';
$count_filtered = 0;
$res->seek(100*$page);
while(($r = $res->next()) && ($count_filtered < 100)){
$r['online'] = $r['online'] == 1 ? 'online' : 'offline';
$r['system_account'] = $r['system_account'] > 0 ? 'online' : 'offline';
$r['bot'] = $r['bot'] > 0 ? 'online' : 'offline';
$vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/account_entry.tpl', $r);
$count_filtered++;}
$vars['pagination'] = '';
$vars['page_last'] = ceil($count/100)-1;
for($i=0;$i < ceil($count/100);$i++){
$data = array('page' => $i,'search' => $search, 'active' => ($i == $page) ? 'active' : '');
$vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/account_pagination.tpl', $data);
}
$vars['count'] = $count_filtered.'/'.$count;
return \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/account.tpl',$vars);
}
public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_account_show($id){
$vars = \SQL\TBC_ACCOUNT::Q1(array($id));
$vars['entries'] = $vars['entries_test'] = '';
$res = \SQL\TBC_CHARACTERS::QQ(array($id));
while($r = $res->next()){
$r['online'] = $r['online'] == 1 ? 'online' : 'offline';
$r['status'] = $r['bot'] ? '1' : '0';
$r['bot'] = $r['bot'] ? 'online' : 'offline';
$r['server'] = 0;
$r['account'] = $vars['id'];
$vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/account_show_entry.tpl', $r);
}
$res = \SQL\TBC_CHARACTERS_TEST::QQ(array($id));
while($r = $res->next()){
$r['online'] = $r['online'] == 1 ? 'online' : 'offline';
$r['status'] = $r['bot'] ? '1' : '0';
$r['bot'] = $r['bot'] ? 'online' : 'offline';
$r['server'] = 1;
$r['account'] = $vars['id'];
$vars['entries_test'] .= \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/account_show_entry.tpl', $r);
}
return \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/account_show.tpl',$vars);
}
public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_bot_toggle($account, $guid, $server, $status){
if($status == 0){
\SQL\TBC_CHARACTER_BOT::QI(array($account,$guid,$server));
} else {
//TODO: Remove Bot from World
\SQL\TBC_CHARACTER_UNBOT::QI(array($account));
}
}
public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_stats_tbc_player($filter = 600){
return \SYSTEM\LOG\JsonResult::toString(\SQL\STATS_TBC_PLAYER::QA(array($filter)));}

View File

@ -4,6 +4,7 @@ class DATA_SAIMOD_MOJOTROLLZ_SERVER_TBC extends \SYSTEM\DB\QI {
public static function get_class(){return \get_class();}
public static function files_mysql(){
return array( (new \PSAI('/saimod_mojotrollz_server_tbc/sql/mysql/system_page.sql'))->SERVERPATH(),
(new \PSAI('/saimod_mojotrollz_server_tbc/sql/mysql/system_api.sql'))->SERVERPATH());
(new \PSAI('/saimod_mojotrollz_server_tbc/sql/mysql/system_api.sql'))->SERVERPATH(),
(new \PSAI('/saimod_mojotrollz_server_tbc/sql/mysql/schema_mojotrollz_bot.sql'))->SERVERPATH());
}
}

View File

@ -0,0 +1,9 @@
CREATE TABLE `mojotrollz_bot` (
`account_id` INT(11) UNSIGNED NOT NULL,
`char_id` INT(11) UNSIGNED NOT NULL,
`server_id` INT(11) UNSIGNED NOT NULL,
UNIQUE INDEX `account_id` (`account_id`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;

View File

@ -1,3 +1,13 @@
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5600, 42, 0, 0, '_SAI_saimod_mojotrollz_server_tbc', 'action', NULL);
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5620, 42, 3, 5600, NULL, 'filter', 'INT');
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5620, 42, 3, 5600, NULL, 'filter', 'INT');
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5630, 42, 3, 5600, 'account', 'search', 'STRING');
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5631, 42, 3, 5600, 'account', 'page', 'UINT0');
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5640, 42, 2, 5600, 'account_show', 'id', 'UINT0');
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5650, 42, 2, 5600, 'bot_toggle', 'account', 'UINT0');
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5651, 42, 2, 5600, 'bot_toggle', 'guid', 'UINT0');
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5652, 42, 2, 5600, 'bot_toggle', 'server', 'UINT0');
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5653, 42, 2, 5600, 'bot_toggle', 'status', 'UINT0');

View File

@ -1 +1,5 @@
REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (560, 42, 'mojotrollz_server_tbc', 'mojotrollz_server_tbc', -1, 0, 0, '#content', './sai.php?sai_mod=.SAI.saimod_mojotrollz_server_tbc', 'init_saimod_mojotrollz_server_tbc', '\\SAI\\saimod_mojotrollz_server_tbc');
REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (560, 42, 'mojotrollz_server_tbc', 'mojotrollz_server_tbc', -1, 0, 0, '#content', './sai.php?sai_mod=.SAI.saimod_mojotrollz_server_tbc', 'init_saimod_mojotrollz_server_tbc', '\\SAI\\saimod_mojotrollz_server_tbc');
REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (561, 42, 'status', 'mojotrollz_server_tbc', 560, 0, 0, '#tab', './sai.php?sai_mod=.SAI.saimod_mojotrollz_server_tbc&action=status', 'init_saimod_mojotrollz_server_tbc_status', '\\SAI\\saimod_mojotrollz_server_tbc');
REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (562, 42, 'control', 'mojotrollz_server_tbc', 560, 0, 1, '#tab', './sai.php?sai_mod=.SAI.saimod_mojotrollz_server_tbc&action=control', 'init_saimod_mojotrollz_server_tbc_control', '\\SAI\\saimod_mojotrollz_server_tbc');
REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (563, 42, 'account', 'mojotrollz_server_tbc', 560, 0, 1, '#tab', './sai.php?sai_mod=.SAI.saimod_mojotrollz_server_tbc&action=account&search=${search}&page=${page}', 'init_saimod_mojotrollz_server_tbc_account', '\\SAI\\saimod_mojotrollz_server_tbc');
REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (564, 42, 'account_show', 'mojotrollz_server_tbc', 560, 0, 1, '#tab', './sai.php?sai_mod=.SAI.saimod_mojotrollz_server_tbc&action=account_show&id=${id}', 'init_saimod_mojotrollz_server_tbc_account_show', '\\SAI\\saimod_mojotrollz_server_tbc');

View File

@ -0,0 +1,13 @@
<?php
namespace SQL;
class TBC_ACCOUNT extends \SYSTEM\DB\QP {
public static function get_class(){return \get_class();}
public static function mysql(){return
'SELECT accounts.id, accounts.username, accounts.email, accounts.joindate, accounts.last_login,'.
' system_user.username as system_account'.
' FROM system_user'.
' RIGHT JOIN mangos_one_realm.account as accounts ON UPPER(accounts.email) = UPPER(system_user.email)'.
' WHERE accounts.id = ?'.
' LIMIT 1;';
}
}

View File

@ -0,0 +1,17 @@
<?php
namespace SQL;
class TBC_ACCOUNTS extends \SYSTEM\DB\QP {
public static function get_class(){return \get_class();}
public static function mysql(){return
'SELECT accounts.id, accounts.username, accounts.email, accounts.joindate, accounts.last_login,'.
' MAX(chars.online) as online, COUNT(chars.guid) as chars,'.
' COUNT(system_user.id) as system_account,'.
' COUNT(bots.account_id) as bot'.
' FROM system_user'.
' RIGHT JOIN mangos_one_realm.account as accounts ON UPPER(accounts.email) = UPPER(system_user.email)'.
' LEFT JOIN mangos_one_chars.characters as chars ON chars.account = accounts.id'.
' LEFT JOIN mojotrollz_bot as bots ON bots.account_id = accounts.id'.
' WHERE (accounts.id LIKE ? OR accounts.username LIKE ? OR accounts.email LIKE ?)'.
' GROUP BY accounts.id;';
}
}

View File

@ -0,0 +1,10 @@
<?php
namespace SQL;
class TBC_ACCOUNTS_COUNT extends \SYSTEM\DB\QP {
public static function get_class(){return \get_class();}
public static function mysql(){return
'SELECT COUNT(*) as count FROM mangos_one_realm.account'.
' WHERE (id LIKE ? OR username LIKE ? OR email LIKE ?)'.
' LIMIT 1;';
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace SQL;
class TBC_CHARACTERS extends \SYSTEM\DB\QP {
public static function get_class(){return \get_class();}
public static function mysql(){return
'SELECT chars.guid, chars.name, chars.level, chars.online,'.
' mojotrollz_bot.account_id as bot'.
' FROM mojotrollz_bot'.
' RIGHT JOIN mangos_one_chars.characters as chars ON chars.account = mojotrollz_bot.account_id AND chars.guid = mojotrollz_bot.char_id AND mojotrollz_bot.server_id = 0'.
' WHERE chars.account = ?;';
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace SQL;
class TBC_CHARACTERS_TEST extends \SYSTEM\DB\QP {
public static function get_class(){return \get_class();}
public static function mysql(){return
'SELECT chars.guid, chars.name, chars.level, chars.online,'.
' mojotrollz_bot.account_id as bot'.
' FROM mojotrollz_bot'.
' RIGHT JOIN mangos_one_chars_test.characters as chars ON chars.account = mojotrollz_bot.account_id AND chars.guid = mojotrollz_bot.char_id AND mojotrollz_bot.server_id = 1'.
' WHERE chars.account = ?;';
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace SQL;
class TBC_CHARACTER_BOT extends \SYSTEM\DB\QP {
public static function get_class(){return \get_class();}
public static function mysql(){return
'REPLACE INTO mojotrollz_bot VALUES(?,?,?)';
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace SQL;
class TBC_CHARACTER_UNBOT extends \SYSTEM\DB\QP {
public static function get_class(){return \get_class();}
public static function mysql(){return
'DELETE FROM mojotrollz_bot WHERE account_id = ?;';
}
}

View File

@ -0,0 +1,31 @@
<div class="panel panel-default">
<div class="panel-heading"><h4>TBC - Account</h4></div>
<div class="panel-body">
<button class="btn-sm btn btn-success" id="btn_search" type="submit" style="float: right; margin-left: 10px;"><span class="glyphicon glyphicon-search" aria-hidden="true"></span> Search</button>
<input class="input-medium search-query action-control" id="input_search" type="text" placeholder="Search..." size="20" style="float: right;" value="${search}"/>
<h6>Rows: ${count} Page: ${page}</h6>
<table class="table table-hover table-condensed sai_table tablesorter">
<thead>
<tr>
<th>ID</th>
<th>Username</th>
<th>Email</th>
<th>Chars</th>
<th>JoinDate</th>
<th>LastLogin</th>
<th>Sys</th>
<th>Bot</th>
<th>On</th>
</tr>
</thead>
<tbody>
${entries}
</tbody>
</table>
<ul class="pagination">
<li><a href="#!mojotrollz_server_tbc(account);search.${search};page.0">&laquo;</a></li>
${pagination}
<li><a href="#!mojotrollz_server_tbc(account);search.${search};page.${page_last}">&raquo;</a></li>
</ul>
</div>
</div>

View File

@ -0,0 +1,11 @@
<tr onclick="system.load('mojotrollz_server_tbc(account_show);id.${id}')">
<td>${id}</td>
<td>${username}</td>
<td>${email}</td>
<td>${chars}</td>
<td>${joindate}</td>
<td>${last_login}</td>
<td><img src="./api.php?call=files&cat=content&id=${system_account}.png" width="18" height="18"/></td>
<td><img src="./api.php?call=files&cat=content&id=${bot}.png" width="18" height="18"/></td>
<td><img src="./api.php?call=files&cat=content&id=${online}.png" width="18" height="18"/></td>
</tr>

View File

@ -0,0 +1 @@
<li class="${active}"><a href="#!mojotrollz_server_tbc(account);search.${search};page.${page}">${page}</a></li>

View File

@ -0,0 +1,47 @@
<div class="panel panel-default">
<div class="panel-heading"><h4>TBC - Account - <b>${username}</b></h4></div>
<div class="panel-body">
<table class="table table-hover table-condensed sai_table tablesorter">
<tr>
<th>ID</th>
<td>${id}</td>
</tr>
<tr>
<th>Username</th>
<td>${username}</td>
</tr>
<tr>
<th>Email</th>
<td>${email}</td>
</tr>
<tr>
<th>Join Date</th>
<td>${joindate}</td>
</tr>
<tr>
<th>Last Login</th>
<td>${last_login}</td>
</tr>
<tr>
<th>System Account</th>
<td><a href="#!security(user);username.${system_account}">${system_account}</a></td>
</tr>
</table>
<br/>
<table class="table table-hover table-condensed sai_table tablesorter">
<tr>
<th>GUID</th>
<th>Name</th>
<th>Level</th>
<th>Bot</th>
<th>On</th>
</tr>
${entries}
<tr>
<th colspan="5">Test Server</th>
</tr>
${entries_test}
</table>
<button class="btn-sm btn btn-success" id="btn_back" onclick="system.load('mojotrollz_server_tbc(account)')"><span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> Back</button>
</div>
</div>

View File

@ -0,0 +1,7 @@
<tr>
<td>${guid}</td>
<td>${name}</td>
<td>${level}</td>
<td><img class="bot" guid="${guid}" status="${status}" account="${account}" server="${server}" src="./api.php?call=files&cat=content&id=${bot}.png" width="18" height="18"/></td>
<td><img src="./api.php?call=files&cat=content&id=${online}.png" width="18" height="18"/></td>
</tr>

View File

@ -1,73 +1,22 @@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><h4>TBC - Status</h4></div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
<div id="vis_tbc_player"></div>
<select id="filter_vis_tbc_player">
<option value="2692000">30d</option>
<option value="1209600">14d</option>
<option value="604800">7d</option>
<option value="172800">2d</option>
<option value="86400">1d</option>
<option value="43200">12h</option>
<option value="21600">6h</option>
<option value="14400">4h</option>
<option value="7200">2h</option>
<option value="3600">1h</option>
<option value="1800">30m</option>
<option value="600" selected>10m</option>
</select>
<br>
<br>
</div>
<div class="col-md-6">
<div id="vis_tbc_server"></div>
<select id="filter_vis_tbc_server">
<option value="2692000">30d</option>
<option value="1209600">14d</option>
<option value="604800">7d</option>
<option value="172800">2d</option>
<option value="86400">1d</option>
<option value="43200">12h</option>
<option value="21600">6h</option>
<option value="14400">4h</option>
<option value="7200">2h</option>
<option value="3600">1h</option>
<option value="1800">30m</option>
<option value="600" selected>10m</option>
</select>
<br>
<br>
</div>
</div>
<table class="table">
<tr>
<th>realm</th>
<td>${tbc_realm_status}</td>
</tr>
<tr>
<th>world</th>
<td>${tbc_world_status}</td>
</tr>
<tr>
<th>world_test</th>
<td>${tbc_world_test_status}</td>
</tr>
<tr>
<th>players live</th>
<td>${tbc_players_online}</td>
</tr>
<tr>
<th>players test</th>
<td>${tbc_test_players_online}</td>
</tr>
</table>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><h4>TBC - Control</h4></div>
<div class="panel-body">
<table>
<thead>
<tr>
<th>Path</th>
<th>Submodule</th>
<th>Action</th>
</tr>
</thead>
<tbody id="table_changes">
</tbody>
</table>
<textarea id="output_log" style="width: 100%; height: 350px;"></textarea>
<button id="btn_clear" class="btn-danger btn btn-sm" style="margin-right: 15px; height: 32px; font-size: 13px;"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Clear</button>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading"><h4>TBC - Run</h4></div>
@ -187,22 +136,4 @@
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><h4>Output</h4></div>
<div class="panel-body">
<table>
<thead>
<tr>
<th>Path</th>
<th>Submodule</th>
<th>Action</th>
</tr>
</thead>
<tbody id="table_changes">
</tbody>
</table>
<textarea id="output_log" style="width: 100%; height: 350px;"></textarea>
<button id="btn_clear" class="btn-danger btn btn-sm" style="margin-right: 15px; height: 32px; font-size: 13px;"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Clear</button>
</div>
</div>

View File

@ -0,0 +1,10 @@
<div class="tabbable">
<ul class="nav nav-tabs" id="tabs">
<li class="active"><a href="#!mojotrollz_server_tbc" id="menu_status">Status</a></li>
<li><a href="#!mojotrollz_server_tbc(control)" id="menu_control">Control</a></li>
<li><a href="#!mojotrollz_server_tbc(account)" id="menu_account">Account</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab"></div>
</div>
</div>

View File

@ -0,0 +1,67 @@
<div class="panel panel-default">
<div class="panel-heading"><h4>TBC - Status</h4></div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
<div id="vis_tbc_player"></div>
<select id="filter_vis_tbc_player">
<option value="2692000">30d</option>
<option value="1209600">14d</option>
<option value="604800">7d</option>
<option value="172800">2d</option>
<option value="86400">1d</option>
<option value="43200">12h</option>
<option value="21600">6h</option>
<option value="14400">4h</option>
<option value="7200">2h</option>
<option value="3600">1h</option>
<option value="1800">30m</option>
<option value="600" selected>10m</option>
</select>
<br>
<br>
</div>
<div class="col-md-6">
<div id="vis_tbc_server"></div>
<select id="filter_vis_tbc_server">
<option value="2692000">30d</option>
<option value="1209600">14d</option>
<option value="604800">7d</option>
<option value="172800">2d</option>
<option value="86400">1d</option>
<option value="43200">12h</option>
<option value="21600">6h</option>
<option value="14400">4h</option>
<option value="7200">2h</option>
<option value="3600">1h</option>
<option value="1800">30m</option>
<option value="600" selected>10m</option>
</select>
<br>
<br>
</div>
</div>
<table class="table">
<tr>
<th>realm</th>
<td>${tbc_realm_status}</td>
</tr>
<tr>
<th>world</th>
<td>${tbc_world_status}</td>
</tr>
<tr>
<th>world_test</th>
<td>${tbc_world_test_status}</td>
</tr>
<tr>
<th>players live</th>
<td>${tbc_players_online}</td>
</tr>
<tr>
<th>players test</th>
<td>${tbc_test_players_online}</td>
</tr>
</table>
</div>
</div>