mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-31 23:49:27 -05:00
views/scripts: remove obsolete view scripts
This commit is contained in:
parent
f4bd0b05bd
commit
b11fbf5211
4 changed files with 0 additions and 148 deletions
|
|
@ -1 +0,0 @@
|
|||
__CLOSEME__
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
<?php
|
||||
$months = array(
|
||||
'Jänner',
|
||||
'Februar',
|
||||
'März',
|
||||
'April',
|
||||
'Mai',
|
||||
'Juni',
|
||||
'Juli',
|
||||
'August',
|
||||
'September',
|
||||
'Oktober',
|
||||
'November',
|
||||
'Dezember',
|
||||
);
|
||||
?><table style="width: 100%;">
|
||||
<tr>
|
||||
<th style="width: 10%;"> </th>
|
||||
<? for ($i = 1; $i <= 12; $i++): ?>
|
||||
<th style="width: 7.5%; border: 1px solid black;"><?= $months[$i - 1] ?></th>
|
||||
<? endfor ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="overflow: auto">
|
||||
<table>
|
||||
<tr>
|
||||
<? for ($i = 1; $i <= 12; $i++): ?>
|
||||
<td style="border-right: 1px solid black;"><div style="width: 600px; height: 1px; overflow: hidden;"> </div><?= $months[$i - 1] ?></td>
|
||||
<? endfor ?>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="overflow: auto; ">
|
||||
<?php
|
||||
|
||||
function stateColor($state)
|
||||
{
|
||||
switch($state) {
|
||||
case 0:
|
||||
$color = '#0f0';
|
||||
break;
|
||||
case 1:
|
||||
$color = 'orange';
|
||||
break;
|
||||
case 2:
|
||||
$color = '#f00';
|
||||
break;
|
||||
default: // und case 3
|
||||
$color = '#ccc';
|
||||
}
|
||||
return $color;
|
||||
}
|
||||
|
||||
$next_color = null;
|
||||
$color = null;
|
||||
|
||||
$start = mktime(0, 0, 0, 0, 0, (int) date('Y'));
|
||||
$current_offset = $start;
|
||||
$htm = '';
|
||||
$cnt = 0;
|
||||
$last_host = null;
|
||||
$last_service = null;
|
||||
foreach ($this->history as $entry) {
|
||||
if ($entry->hostname !== $last_host || $entry->service !== $last_service) {
|
||||
|
||||
echo '<span style="clear: both;" />' . "\n";
|
||||
}
|
||||
$cnt++;
|
||||
if ($cnt > 10000) break;
|
||||
$duration = $entry->timestamp - $current_offset;
|
||||
if ($next_color === null) {
|
||||
$color = stateColor($entry->last_state);
|
||||
} else {
|
||||
$color = $next_color;
|
||||
}
|
||||
$next_color = stateColor($entry->state);
|
||||
|
||||
if ($entry->state == 0) {
|
||||
$offset = ceil($duration / 3600 / 6);
|
||||
} else {
|
||||
$offset = floor($duration / 3600 / 6);
|
||||
}
|
||||
echo '<div style="overflow: hidden; height: 10px; float: left; width: ' . $offset . 'px; background-color:' . $color . ';"> </div>';
|
||||
$current_offset += $duration;
|
||||
|
||||
$last_host = $entry->hostname;
|
||||
$last_service = $entry->service;
|
||||
|
||||
}
|
||||
|
||||
|
||||
?></div>
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Module\Businessprocess\ImportedNode;
|
||||
use Icinga\Module\Businessprocess\BpNode;
|
||||
|
||||
$count = $this->bp->countChildren();
|
||||
$howMany = 'normal';
|
||||
|
||||
if ($count < 20) {
|
||||
$howMany = 'few';
|
||||
} elseif ($count > 50) {
|
||||
$howMany = 'many';
|
||||
}
|
||||
|
||||
?>
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<h1><form method="post" action="<?= $this->url()->without('node')->without('unlocked') ?>">
|
||||
<?= $this->formSelect('config', $this->configName, array('class' => 'autosubmit'), $this->processList) ?>
|
||||
</form>
|
||||
<a href="<?= $this->url()->without('mode') ?>" title="<?= $this->escape('Switch to tree view') ?>" style="float: right"><?= $this->icon('sitemap') ?></a>
|
||||
</h1>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="content<?= $this->compact ? ' compact' : '' ?>" data-base-target="_next">
|
||||
<div class="toplevel <?= $howMany ?>" data-base-target="_next">
|
||||
<?php foreach ($this->bp->getChildren() as $name => $node): ?>
|
||||
<div class="<?= strtolower($node->getStateName()) ?><?= $node->isHandled() ? ' handled' : '' ?>">
|
||||
<?php if ($node instanceof ImportedNode): ?>
|
||||
<a href="<?= $this->url('businessprocess/process/show', array('config' => $node->getConfigName(), 'node' => $name)) ?>">
|
||||
<?php else: ?>
|
||||
<a href="<?= $this->url('businessprocess/process/show', array('config' => $this->configName, 'node' => $name)) ?>">
|
||||
<?php endif ?>
|
||||
<?= $this->escape($node->getAlias()) ?><?php
|
||||
|
||||
if ($node instanceof BpNode) {
|
||||
echo $this->renderStateBadges($node->getStateSummary());
|
||||
}
|
||||
|
||||
?></a>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?= $this->render('warnings.phtml') ?>
|
||||
</div>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?php if ($this->warnings): ?>
|
||||
<h2><?= $this->translate('Warnings') ?></h2>
|
||||
<?php foreach ($this->warnings as $warning): ?>
|
||||
<?= $this->escape($warning) ?><br />
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
Loading…
Reference in a new issue