From 20fb428b1e9ca9d5f59998395d762c574f024819 Mon Sep 17 00:00:00 2001 From: Varakh Date: Sat, 1 Sep 2018 17:04:38 +0200 Subject: [PATCH] Remove tree view --- composer.json | 1 - src/Control/Actions/OnlineAction.php | 13 ------------- src/View/material/online.twig | 5 +---- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/composer.json b/composer.json index 8387eb1..0d8d632 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/Control/Actions/OnlineAction.php b/src/Control/Actions/OnlineAction.php index 9c83bfa..955cd64 100644 --- a/src/Control/Actions/OnlineAction.php +++ b/src/Control/Actions/OnlineAction.php @@ -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 ]); } diff --git a/src/View/material/online.twig b/src/View/material/online.twig index e082664..8cca1c7 100644 --- a/src/View/material/online.twig +++ b/src/View/material/online.twig @@ -4,10 +4,7 @@

{{ title }}

-
- {{ tree|raw }} -
-
+
{% if data|length >0 %} {% include 'table.twig' with {'data': data, 'hiddenDependingOnAttribute': [{'key': 'client_type', 'values': ['1']}],