Drop all old object- and command-view scripts
This commit is contained in:
parent
8b377cd651
commit
5382f73c53
|
@ -1,28 +0,0 @@
|
|||
<div class="controls">
|
||||
<?= $this->tabs->remove('dashboard') ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<h1><?= $title ?> <?= /** @var \Icinga\Module\Monitoring\Forms\Command\CommandForm $form */ $this->icon('help', $form->getHelp()) ?></h1>
|
||||
<table class="objectlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->icon('host') ?> <?= $this->translate('Host') ?></th>
|
||||
<th><?= $this->icon('conf') ?> <?= $this->translate('Service') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($form->getObjects() as $object): /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */ ?>
|
||||
<tr>
|
||||
<?php if ($object->getType() === $object::TYPE_HOST): ?>
|
||||
<td colspan="2"><?= $this->escape($object->getName()) ?></td>
|
||||
<?php else: ?>
|
||||
<td><?= $this->escape($object->getHost()->getName()) ?></td>
|
||||
<td><?= $this->escape($object->getName()) ?></td>
|
||||
<?php endif ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<?= $form ?>
|
||||
</div>
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Module\Monitoring\Object\Host;
|
||||
use Icinga\Module\Monitoring\Object\Service;
|
||||
|
||||
$isService = $object->getType() === $object::TYPE_SERVICE;
|
||||
|
||||
?>
|
||||
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $tabs ?>
|
||||
<?php endif ?>
|
||||
|
||||
<table class="objectstate">
|
||||
<tr class="state <?= Host::getStateText($object->host_state); ?><?= $object->host_handled ? ' handled' : '' ?>">
|
||||
<td class="state"<?= $isService ? '' : ' rowspan="2"' ?>>
|
||||
<strong><?= Host::getStateText($object->host_state, true); ?></strong><br>
|
||||
<?= $this->prefixedTimeSince($object->host_last_state_change, true) ?>
|
||||
</td>
|
||||
<td>
|
||||
<b><?= $this->escape($object->host_display_name) ?></b>
|
||||
<?php if ($object->host_display_name !== $object->host_name): ?>
|
||||
<small>(<?= $this->escape($object->host_name) ?>)</small>
|
||||
<?php endif ?>
|
||||
<?php if ($object->host_address && $object->host_address !== $object->host_name): ?>
|
||||
<br>
|
||||
<?= $this->escape($object->host_address) ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($isService): ?>
|
||||
<tr class="state <?= Service::getStateText($object->service_state); ?><?= $object->service_handled ? ' handled' : '' ?>">
|
||||
<td class="state">
|
||||
<strong><?= Service::getStateText($object->service_state, true); ?></strong><br>
|
||||
<?= $this->prefixedTimeSince($object->service_last_state_change, true) ?>
|
||||
</td>
|
||||
<td>
|
||||
<b><?= $this->translate('Service') ?>: <?= $this->escape($object->service_display_name) ?></b>
|
||||
<?php if ($object->service_display_name !== $object->service_description): ?>
|
||||
<small>(<?= $this->escape($object->service_description) ?>)</small>
|
||||
<?php endif ?>
|
||||
<?= $this->render('show/components/statusIcons.phtml') ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
</table>
|
|
@ -1,89 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Web\Url;
|
||||
$selfUrl = Url::fromPath('monitoring/show/services', array('host' => $this->object->host_name));
|
||||
$currentUrl = Url::fromRequest()->without('limit')->getRelativeUrl();
|
||||
|
||||
?>
|
||||
<h1 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||
<?php if ($object->stats->services_total > 0): ?>
|
||||
<?= $this->qlink(sprintf($this->translatePlural('%d configured service:', '%d configured services:', $object->stats->services_total), $object->stats->services_total), $selfUrl) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->translate('No services configured on this host'); ?>
|
||||
<?php endif; ?>
|
||||
<span class="badges">
|
||||
<?php if ($object->stats->services_ok > 0): ?>
|
||||
<span class="state ok<?= $currentUrl === $selfUrl->with('service_state', 0)->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
|
||||
$object->stats->services_ok,
|
||||
$selfUrl,
|
||||
array('service_state' => 0),
|
||||
array('title' => sprintf($this->translate('Services with state %s'), $this->translate('OK')))
|
||||
) ?></span>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
|
||||
foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $state) {
|
||||
$pre = 'services_' . $state;
|
||||
if ($object->stats->$pre) {
|
||||
$handled = $pre . '_handled';
|
||||
$unhandled = $pre . '_unhandled';
|
||||
$paramsHandled = array('service_state' => $stateId, 'service_handled' => 1);
|
||||
$paramsUnhandled = array('service_state' => $stateId, 'service_handled' => 0);
|
||||
if ($object->stats->$unhandled) {
|
||||
$compareUrl = $selfUrl->with($paramsUnhandled)->getRelativeUrl();
|
||||
} else {
|
||||
$compareUrl = $selfUrl->with($paramsHandled)->getRelativeUrl();
|
||||
}
|
||||
|
||||
if ($compareUrl === $currentUrl) {
|
||||
$active = ' active';
|
||||
} else {
|
||||
$active = '';
|
||||
}
|
||||
|
||||
echo '<span class="state ' . $state . $active . ($object->stats->$unhandled ? '' : ' handled') . '">';
|
||||
if ($object->stats->$unhandled) {
|
||||
|
||||
echo $this->qlink(
|
||||
$object->stats->$unhandled,
|
||||
$selfUrl,
|
||||
$paramsUnhandled,
|
||||
array('title' => sprintf($this->translate('Unhandled services with state %s'), $this->translate(strtoupper($state))))
|
||||
);
|
||||
}
|
||||
if ($object->stats->$handled) {
|
||||
|
||||
if ($selfUrl->with($paramsHandled)->getRelativeUrl() === $currentUrl) {
|
||||
$active = ' active';
|
||||
} else {
|
||||
$active = '';
|
||||
}
|
||||
if ($object->stats->$unhandled) {
|
||||
echo '<span class="state handled ' . $state . $active . '">';
|
||||
}
|
||||
echo $this->qlink(
|
||||
$object->stats->$handled,
|
||||
$selfUrl,
|
||||
$paramsHandled,
|
||||
array('title' => sprintf($this->translate('Handled services with state %s'), $this->translate(strtoupper($state))))
|
||||
);
|
||||
if ($object->stats->$unhandled) {
|
||||
echo "</span>\n";
|
||||
}
|
||||
}
|
||||
echo "</span>\n";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<?php if ($object->stats->services_pending): ?>
|
||||
<span class="state pending<?= $currentUrl === $selfUrl->with('service_state', 99)->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
|
||||
$object->stats->services_pending,
|
||||
$selfUrl,
|
||||
array('service_state' => 99),
|
||||
array('title' => sprintf($this->translate('Services with state %s'), $this->translate('PENDING')))
|
||||
) ?></span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</h1>
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Module\Monitoring\Object\Service;
|
||||
|
||||
$o = $this->object;
|
||||
|
||||
$isService = $o instanceof Service;
|
||||
$obj = new \stdClass();
|
||||
$obj->handled =
|
||||
($isService) ? $o->service_handled : $o->host_handled;
|
||||
$obj->state =
|
||||
($isService) ? $o->service_state : $o->host_state;
|
||||
$obj->acknowledged =
|
||||
($isService) ? $o->service_acknowledged : $o->host_acknowledged;
|
||||
$obj->in_downtime =
|
||||
($isService) ? $o->in_downtime : $o->host_in_downtime;
|
||||
$obj->notifications_enabled =
|
||||
($isService) ? $o->notifications_enabled : $o->service_notifications_enabled;
|
||||
$obj->active_checks_enabled =
|
||||
($isService) ? $o->active_checks_enabled : $o->host_active_checks_enabled;
|
||||
$obj->passive_checks_enabled =
|
||||
($isService) ? $o->passive_checks_enabled : $o->host_passive_checks_enabled;
|
||||
|
||||
$i = array();
|
||||
if (! $obj->handled && $obj->state > 0) {
|
||||
$i[] = $this->icon('attention-alt', $this->translate('Unhandled'));
|
||||
}
|
||||
|
||||
if ($obj->acknowledged && ! $obj->in_downtime) {
|
||||
$i[] = $this->icon('ok', $this->translate('Acknowledged'));
|
||||
}
|
||||
|
||||
if (!$obj->notifications_enabled) {
|
||||
$i[] = $this->icon('bell-of-empty', $this->translate('Notifications Disabled'));
|
||||
}
|
||||
|
||||
if ($obj->in_downtime) {
|
||||
$i[] = $this->icon('plug', $this->translate('In Downtime'));
|
||||
}
|
||||
|
||||
if (! $obj->active_checks_enabled) {
|
||||
if ($obj->passive_checks_enabled) {
|
||||
$i[] = $this->icon('eye-off', $this->translate('Active Checks Disabled'));
|
||||
} else {
|
||||
$i[] = $this->icon('eye-off', $this->translate('Active And Passive Checks Disabled'));
|
||||
}
|
||||
}
|
||||
|
||||
?><?= implode("\n", $i) ?>
|
|
@ -1,31 +0,0 @@
|
|||
<?php if ($object->host_name !== false): ?>
|
||||
<div class="controls">
|
||||
<?= $this->render('show/components/header.phtml') ?>
|
||||
<?= $this->render('show/components/hostservicesummary.phtml') ?>
|
||||
</div>
|
||||
<div class="content" data-base-target="_next">
|
||||
<?= $this->render('show/components/output.phtml') ?>
|
||||
<?= $this->render('show/components/grapher.phtml') ?>
|
||||
|
||||
<table class="avp newsection">
|
||||
<tbody>
|
||||
<?= $this->render('show/components/acknowledgement.phtml') ?>
|
||||
<?= $this->render('show/components/comments.phtml') ?>
|
||||
<?= $this->render('show/components/notifications.phtml') ?>
|
||||
<?= $this->render('show/components/downtime.phtml') ?>
|
||||
<?= $this->render('show/components/flapping.phtml') ?>
|
||||
<?= $this->render('show/components/perfdata.phtml') ?>
|
||||
<?= $this->render('show/components/checksource.phtml') ?>
|
||||
<?= $this->render('show/components/actions.phtml') ?>
|
||||
<?= $this->render('show/components/command.phtml') ?>
|
||||
<?= $this->render('show/components/hostgroups.phtml') ?>
|
||||
<?= $this->render('show/components/contacts.phtml') ?>
|
||||
<?= $this->render('show/components/checkstatistics.phtml') ?>
|
||||
<?= $this->render('show/components/customvars.phtml') ?>
|
||||
<?= $this->render('show/components/flags.phtml') ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p> Host not found </p>
|
||||
<?php endif ?>
|
|
@ -1,31 +0,0 @@
|
|||
<?php if ($object->host_name !== false): ?>
|
||||
<div class="controls">
|
||||
<?= $this->render('show/components/header.phtml') ?>
|
||||
<h1><?= $this->translate("Service detail information") ?></h1>
|
||||
</div>
|
||||
<div class="content" data-base-target="_next">
|
||||
<?= $this->render('show/components/output.phtml') ?>
|
||||
<?= $this->render('show/components/grapher.phtml') ?>
|
||||
|
||||
<table class="avp newsection">
|
||||
<tbody>
|
||||
<?= $this->render('show/components/acknowledgement.phtml') ?>
|
||||
<?= $this->render('show/components/comments.phtml') ?>
|
||||
<?= $this->render('show/components/notifications.phtml') ?>
|
||||
<?= $this->render('show/components/downtime.phtml') ?>
|
||||
<?= $this->render('show/components/flapping.phtml') ?>
|
||||
<?= $this->render('show/components/perfdata.phtml') ?>
|
||||
<?= $this->render('show/components/checksource.phtml') ?>
|
||||
<?= $this->render('show/components/actions.phtml') ?>
|
||||
<?= $this->render('show/components/command.phtml') ?>
|
||||
<?= $this->render('show/components/servicegroups.phtml') ?>
|
||||
<?= $this->render('show/components/contacts.phtml') ?>
|
||||
<?= $this->render('show/components/checkstatistics.phtml') ?>
|
||||
<?= $this->render('show/components/customvars.phtml') ?>
|
||||
<?= $this->render('show/components/flags.phtml') ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p> Service not found </p>
|
||||
<?php endif ?>
|
Loading…
Reference in New Issue