Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add servers debug template #280

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions web_upload/includes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@
$serverTabMenu->addMenuItem("Список серверов",0);
if($userbank->HasAccess(ADMIN_OWNER|ADMIN_ADD_SERVER ) )
$serverTabMenu->addMenuItem("Добавить новый сервер",1);
if($userbank->HasAccess(ADMIN_OWNER|ADMIN_ADD_SERVER ) ) // todo: change access required
$serverTabMenu->addMenuItem("Отладка",2);
$serverTabMenu->outputMenu();
// ====================[ ADMIN SIDE MENU END ] ===================

Expand Down
4 changes: 4 additions & 0 deletions web_upload/pages/admin.servers.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@

<div id="1" style="display:none;">
<?php $theme->display('page_admin_servers_add.tpl'); ?>
</div>

<div id="2" style="display:none;">
<?php $theme->display('page_admin_servers_debug.tpl'); ?>
</div>

</div>
36 changes: 36 additions & 0 deletions web_upload/theme/page_admin_servers_debug.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{if NOT $permission_list}
Доступ запрещен
{else}

<div class="card">
<div class="form-horizontal" role="form">
<div class="card-header">
<h2>Отладка серверов</h2>
</div>

<div class="alert alert-info">
<button type="button" class="close" aria-hidden="true"></button>
<div class="text-center" id="connection_debug_log">
Выводить будем СЮДА
</div>
</div>

<div class="card-body card-padding p-b-0" id="">
<select class="form-control" id="server" onmouseup="$('where_banned').checked = true">
<option label="Web Бан" value="0">Web Бан</option>
{foreach from="$server_list" item="server}
<option value="{$server.sid}" id="ss{$server.sid}"> Получение адреса... ({$server.ip}:{$server.port})
</option>
{/foreach}
</select>
</div>

<div class="card-body card-padding text-center">
<button type="button" class="btn btn-success">Начать Отладку</button>
<button type="button" class="btn btn-danger">Назад</button>
</div>

</div>
</div>

{/if}