diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:29:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:29:17 +0000 |
commit | c22a2c3ebc334fd7a891370e43a841d914893d47 (patch) | |
tree | 8a2c06166a1025a97cad914e1ce9da2bc78d646c /application/controllers/TestController.php | |
parent | Releasing progress-linux version 0.10.0-2~progress7.99u1. (diff) | |
download | icingaweb2-module-reporting-c22a2c3ebc334fd7a891370e43a841d914893d47.tar.xz icingaweb2-module-reporting-c22a2c3ebc334fd7a891370e43a841d914893d47.zip |
Merging upstream version 1.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'application/controllers/TestController.php')
-rw-r--r-- | application/controllers/TestController.php | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/application/controllers/TestController.php b/application/controllers/TestController.php deleted file mode 100644 index f666085..0000000 --- a/application/controllers/TestController.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php -// Icinga Reporting | (c) 2018 Icinga GmbH | GPLv2 - -namespace Icinga\Module\Reporting\Controllers; - -use Icinga\Module\Reporting\Database; -use Icinga\Module\Reporting\Timeframe; -use Icinga\Module\Reporting\Web\Controller; -use ipl\Html\Table; -use ipl\Sql\Select; - -class TestController extends Controller -{ - use Database; - - public function timeframesAction() - { - $select = (new Select()) - ->from('timeframe') - ->columns('*'); - - $table = new Table(); - - $table->getAttributes()->add('class', 'common-table'); - - $table->getHeader()->add(Table::row(['Name', 'Title', 'Start', 'End'], null, 'th')); - - foreach ($this->getDb()->select($select) as $row) { - $timeframe = (new Timeframe()) - ->setName($row->name) - ->setTitle($row->title) - ->setStart($row->start) - ->setEnd($row->end); - - $table->getBody()->add(Table::row([ - $timeframe->getName(), - $timeframe->getTitle(), - $timeframe->getTimerange()->getStart()->format('Y-m-d H:i:s'), - $timeframe->getTimerange()->getEnd()->format('Y-m-d H:i:s') - ])); - } - - $this->addTitleTab('Timeframes'); - - $this->addContent($table); - } -} |