mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-21 05:35:12 +00:00
Merge pull request #152 from MicMee/master
Preparation for maintenance od hubloc/server
This commit is contained in:
commit
c9b485bc3e
2 changed files with 42 additions and 0 deletions
|
@ -49,6 +49,7 @@ function admin_post(&$a){
|
||||||
if(is_ajax()) return;
|
if(is_ajax()) return;
|
||||||
|
|
||||||
goaway($a->get_baseurl(true) . '/admin/themes/' . $theme );
|
goaway($a->get_baseurl(true) . '/admin/themes/' . $theme );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case 'logs':
|
case 'logs':
|
||||||
|
@ -458,6 +459,25 @@ function admin_page_hubloc_post(&$a){
|
||||||
|
|
||||||
function admin_page_hubloc(&$a) {
|
function admin_page_hubloc(&$a) {
|
||||||
$o = '';
|
$o = '';
|
||||||
|
$hubloc = q("SELECT hubloc_id, hubloc_addr, hubloc_host, hubloc_status FROM hubloc");
|
||||||
|
|
||||||
|
|
||||||
|
if(! $hubloc){
|
||||||
|
notice( t('No server found') . EOL);
|
||||||
|
goaway($a->get_baseurl(true) . '/admin/hubloc');
|
||||||
|
}
|
||||||
|
|
||||||
|
$t = get_markup_template("admin_hubloc.tpl");
|
||||||
|
return replace_macros($t, array(
|
||||||
|
'$hubloc' => $hubloc,
|
||||||
|
'$th_hubloc' => array(t('ID'), t('for channel'), t('on server'), t('Status')),
|
||||||
|
'$title' => t('Administration'),
|
||||||
|
'$page' => t('Server'),
|
||||||
|
'$queues' => $queues,
|
||||||
|
'$accounts' => $accounts,
|
||||||
|
'$pending' => Array( t('Pending registrations'), $pending),
|
||||||
|
'$plugins' => Array( t('Active plugins'), $a->plugins )
|
||||||
|
));
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
22
view/tpl/admin_hubloc.tpl
Executable file
22
view/tpl/admin_hubloc.tpl
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
<div class="generic-content-wrapper" id='adminpage'>
|
||||||
|
<h1>{{$title}} - {{$page}}</h1>
|
||||||
|
|
||||||
|
<form action="{{$baseurl}}/admin/hubloc" method="post">
|
||||||
|
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||||
|
|
||||||
|
<table id='server'>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
{{foreach $th_hubloc as $th}}<th>{{$th}}</th>{{/foreach}}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
{{foreach $hubloc as $hub}}<tr>
|
||||||
|
<td>{{$hub.hubloc_id}}</td><td>{{$hub.hubloc_addr}}</td><td>{{$hub.hubloc_host}}</td><td>{{$hub.hubloc_status}}</td>
|
||||||
|
</tr>{{/foreach}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
Loading…
Reference in a new issue