-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.12.0: Added listener stats, fixed signal type ordering, set listene…
…r logs / signals default limit to 20 to fit window
- Loading branch information
Showing
12 changed files
with
143 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
namespace App\Controller\Web\Listener; | ||
|
||
use App\Controller\Web\Listener\Base; | ||
use App\Repository\ListenerRepository; | ||
use App\Repository\TypeRepository; | ||
|
||
use App\Utils\Rxx; | ||
use Symfony\Component\Routing\Annotation\Route; // Required for annotations | ||
|
||
/** | ||
* Class Listeners | ||
* @package App\Controller\Web\Listener | ||
*/ | ||
class Stats extends Base | ||
{ | ||
|
||
/** | ||
* @Route( | ||
* "/{system}/listeners/{id}/stats", | ||
* requirements={ | ||
* "system": "reu|rna|rww" | ||
* }, | ||
* name="listener_stats" | ||
* ) | ||
*/ | ||
public function statsController( | ||
$system, | ||
$id, | ||
ListenerRepository $listenerRepository, | ||
TypeRepository $typeRepository | ||
) { | ||
if (!$listener = $this->getValidListener($id, $listenerRepository)) { | ||
return $this->redirectToRoute('listeners', ['system' => $system]); | ||
} | ||
$parameters = [ | ||
'id' => $id, | ||
'mode' => $listener->getName().' > Stats', | ||
'listener' => $listener, | ||
'system' => $system, | ||
'tabs' => $listenerRepository->getTabs($listener), | ||
'typeRepository' => $typeRepository | ||
]; | ||
$parameters = array_merge($parameters, $this->parameters); | ||
return $this->render('listener/stats.html.twig', $parameters); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{% extends 'popup.html.twig' %} | ||
{% block body %} | ||
<div class="main fullwidth"> | ||
{% set form_class='listener_stats' %} | ||
{% include 'listener/tabs.html.twig' %} | ||
<div class="controlPanel {{ form_class }}"> | ||
<div class="header">{{ mode|raw }}</div> | ||
<div class="content"> | ||
<h2>Signal Statistics</h2><br class="clear" /> | ||
<div class="stats clearfix"> | ||
{% for type,data in typeRepository.all %} | ||
{% set idx = "count" ~ data.class|capitalize %} | ||
<div class="signal_stat "> | ||
<label class="type_{{ data.class|lower }}">{{ data.title }}{{ data.class != 'OTHER' ? 's' : '' }}:</label> | ||
<div>{{ attribute(listener, idx)|number_format }}</div> | ||
</div><br class="clear" /> | ||
{% endfor %} | ||
<div class="signal_stat"> | ||
<label class="type_all">Total Signals:</label> | ||
<div>{{ listener.countSignals|number_format }}</div> | ||
</div><br class="clear" /> | ||
</div> | ||
<h2>Log Statistics</h2><br class="clear" /> | ||
<div class="stats clearfix"> | ||
<div class="signal_stat"> | ||
<label class="type_all">Total Logs:</label> | ||
<div>{{ listener.countLogs|number_format }}</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters