mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-04 12:49:34 -05:00
test: remove temporary test url
This commit is contained in:
parent
15734a65d8
commit
6e62479849
2 changed files with 0 additions and 81 deletions
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Web\Controller\ModuleActionController;
|
||||
|
||||
class Bpapp_TestController extends ModuleActionController
|
||||
{
|
||||
public function layoutAction()
|
||||
{
|
||||
$this->view->title = 'Testlayout';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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) ? ' ' : $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>
|
||||
Loading…
Reference in a new issue