test: remove temporary test url

This commit is contained in:
Thomas Gelf 2014-11-30 11:33:33 +01:00
parent 15734a65d8
commit 6e62479849
2 changed files with 0 additions and 81 deletions

View file

@ -1,12 +0,0 @@
<?php
use Icinga\Web\Controller\ModuleActionController;
class Bpapp_TestController extends ModuleActionController
{
public function layoutAction()
{
$this->view->title = 'Testlayout';
}
}

View file

@ -1,69 +0,0 @@
<?php
$bp = (object) [
'operator' => 'or',
'status' => 'ok',
'handled' => false,
'children' => [
'DNS Service' => (object) [
'status' => 'ok',
'handled' => false,
'children' => [],
],
'Exchange' => (object) [
'operator' => 'and',
'status' => 'critical',
'handled' => false,
'children' => [
'Exchange 1' => (object) [
'status' => 'critical',
'handled' => false,
'children' => [],
],
'Exchange 2' => (object) [
'status' => 'warning',
'handled' => true,
'children' => [],
],
'Exchange 3' => (object) [
'status' => 'ok',
'handled' => false,
'children' => [],
]
],
]
]
];
function renderProcess($name, $process)
{
$html = sprintf('<table class="bp %s%s%s">
<tbody>
<tr><th%s><a href="#">%s</a></th><td><a href="#">%s</a></td></tr>
',
$process->status,
$process->handled ? ' handled' : '',
empty($process->children) ? '' : ' operator',
empty($process->children) ? ' class="service"' : sprintf(' rowspan="%d"', count($process->children) + 1),
empty($process->children) ? '&nbsp;' : $process->operator,
$name
);
if (! empty($process->children)) {
// $html .= '<tbody>
//';
foreach ($process->children as $name => $child) {
$html .= '<tr><td>' . renderProcess($name, $child) . '</td></tr>';
}
// $html .= '</tbody>';
}
$html .= '</tbody></table>';
return $html;
}
?>
<div class="content">
<h1>Testlayout</h1>
<?= renderProcess('Mail Process', $bp) ?>
</div>