Archived
1
0
Fork 0

Remove tree view

This commit is contained in:
Varakh 2018-09-01 17:04:38 +02:00
parent 1b130315d2
commit 20fb428b1e
3 changed files with 1 additions and 18 deletions

View file

@ -11,7 +11,6 @@
"vlucas/phpdotenv": "^2.3",
"jeremykendall/slim-auth": "dev-slim-3.x",
"par0noid/ts3admin": "^1.0",
"planetteamspeak/ts3-php-framework": "^1.1",
"nesbot/carbon": "^1.25",
"bryanjhv/slim-session": "^3.5",
"symfony/filesystem": "^4.0",

View file

@ -15,23 +15,10 @@ final class OnlineAction extends AbstractAction
$dataResult = $this->ts->getInstance()->clientList('-ip -times -info');
$this->ts->getInstance()->logout(); // avoid showing currently used user twice
$instance = TeamSpeak3::factory(sprintf("serverquery://%s:%s@%s:%s/?server_id=%s",
$this->auth->getIdentity()['user'],
$this->auth->getIdentity()['password'],
$this->ts->getHost(),
$this->ts->getQueryPort(),
$sid)
);
$treeView = new TeamSpeak3_Viewer_Html("/images/viewer/", "/images/flags/", "data:image");
$tree = $instance->getViewer($treeView);
$instance->logout();
// render GET
$this->view->render($response, 'online.twig', [
'title' => $this->translator->trans('online.title'),
'data' => $this->ts->getInstance()->getElement('data', $dataResult),
'tree' => $tree,
'sid' => $sid
]);
}

View file

@ -4,10 +4,7 @@
<h1 class="header">{{ title }}</h1>
<div class="row">
<div class="col-md-4 small">
{{ tree|raw }}
</div>
<div class="col-md-8">
<div class="col-md-12">
{% if data|length >0 %}
{% include 'table.twig' with {'data': data,
'hiddenDependingOnAttribute': [{'key': 'client_type', 'values': ['1']}],