mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-22 21:34:28 +02:00
Clean up service list view script, obsolete compact variant
This commit is contained in:
parent
7cb26a0d34
commit
b61a732eaa
@ -169,7 +169,6 @@ class Monitoring_ListController extends MonitoringController
|
|||||||
))->activate('services');
|
))->activate('services');
|
||||||
$this->view->title = 'Service Status';
|
$this->view->title = 'Service Status';
|
||||||
$this->setAutorefreshInterval(10);
|
$this->setAutorefreshInterval(10);
|
||||||
$this->compactView = 'services-compact';
|
|
||||||
$query = $this->fetchServices();
|
$query = $this->fetchServices();
|
||||||
$this->applyRestrictions($query);
|
$this->applyRestrictions($query);
|
||||||
$this->view->services = $query->paginate();
|
$this->view->services = $query->paginate();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$helper = $this->getHelper('MonitoringState');
|
$helper = $this->getHelper('MonitoringState');
|
||||||
?>
|
|
||||||
|
if (!$this->compact): ?>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs ?>
|
<?= $this->tabs ?>
|
||||||
<div style="display: inline-block; margin: 1em; vertical-align: top;">
|
<div style="display: inline-block; margin: 1em; vertical-align: top;">
|
||||||
@ -14,7 +15,8 @@ $helper = $this->getHelper('MonitoringState');
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<table class="action multiselect">
|
<?php endif ?>
|
||||||
|
<table class="action multiselect<?php if ($this->compact): ?> compact<?php endif ?>">
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@ -34,94 +36,84 @@ foreach ($services as $service):
|
|||||||
);
|
);
|
||||||
$serviceStateName = strtolower($this->util()->getServiceStateName($service->service_state));
|
$serviceStateName = strtolower($this->util()->getServiceStateName($service->service_state));
|
||||||
?>
|
?>
|
||||||
<!-- <tr <?= ($this->activeRowHref === $serviceLink) ? 'class="active"' : ''; ?>>-->
|
<tr class="state <?= $serviceStateName ?><?= $service->service_handled ? ' handled' : '' ?>">
|
||||||
<tr class="state <?= $serviceStateName ?><?= $service->service_handled ? ' handled' : '' ?>">
|
<td class="state" title="<?= $helper->getStateTitle($service, 'service'); ?>">
|
||||||
<!-- Color column -->
|
<strong><?= strtoupper($helper->monitoringState($service, 'service')); ?></strong><br />
|
||||||
<!--
|
|
||||||
<td class="tacheader-status-<?= $serviceStateName; ?>">
|
|
||||||
<a style="visibility:hidden" href="<?= $serviceLink; ?>"></a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a style="visibility:hidden" href="<?= $serviceLink; ?>"></a>
|
|
||||||
<?php if (!$service->service_handled && $service->service_state > 0): ?>
|
|
||||||
<a href="#" title="Unhandled">
|
|
||||||
<i class="icon-table icinga-icon-unhandled"></i>
|
|
||||||
</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if ($service->service_acknowledged && !$service->service_in_downtime): ?>
|
<?php if (!$this->compact): ?>Since <?php endif ?><?= $this->timeSince($service->service_last_state_change); ?>
|
||||||
<a href="#" title="Acknowledged">
|
<?php if ($service->service_state > 0 && (int) $service->service_state_type === 0): ?>
|
||||||
<i class="icon-table icinga-icon-acknowledgement"></i>
|
<br />
|
||||||
</a>
|
<strong>Soft <?= $service->service_attempt ?></strong>
|
||||||
<?php endif; ?>
|
<?php endif ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
<?php if ($service->service_is_flapping): ?>
|
<td title="<?= $helper->getStateTitle($service, 'host'); ?>">
|
||||||
<a href="#" title="Flapping">
|
|
||||||
<i class="icon-table icinga-icon-flapping"></i>
|
|
||||||
</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if (!$service->service_notifications_enabled): ?>
|
|
||||||
<a href="#" title="Notifications Disabled">
|
|
||||||
<i class="icon-table icinga-icon-notification-disabled"></i>
|
|
||||||
</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if ($service->service_in_downtime): ?>
|
|
||||||
<a href="#" title="In Downtime">
|
|
||||||
<i class="icon-table icinga-icon-in-downtime"></i>
|
|
||||||
</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if (!$service->service_active_checks_enabled): ?>
|
|
||||||
<?php if (!$service->service_passive_checks_enabled): ?>
|
|
||||||
<a href="#" title="Active And Passive Checks Disabled">
|
|
||||||
<i class="icon-table icinga-icon-active-passive-checks-disabled"></i>
|
|
||||||
</a>
|
|
||||||
<?php else: ?>
|
|
||||||
<a href="#" title="Active Checks Disabled">
|
|
||||||
<i class="icon-table icinga-icon-active-checks-disabled"></i>
|
|
||||||
</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if (isset($service->service_last_comment) && $service->service_last_comment !== null): ?>
|
|
||||||
<a href="#" title="Comments">
|
|
||||||
<i class="icon-table icinga-icon-comment"></i>
|
|
||||||
</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
</td>
|
|
||||||
-->
|
|
||||||
<td class="state" title="<?= $helper->getStateTitle($service, 'service'); ?>">
|
|
||||||
<strong><?= strtoupper($helper->monitoringState($service, 'service')); ?></strong><br />
|
|
||||||
|
|
||||||
<div class="small-row">
|
|
||||||
Since <?= $this->timeSince($service->service_last_state_change); ?>
|
|
||||||
<?php if ($service->service_state): ?>
|
|
||||||
<br />
|
|
||||||
<strong><?= ($service->service_state_type === '1') ? 'Hard' : 'Soft'; ?> </strong>
|
|
||||||
<?= $service->service_attempt; ?>
|
|
||||||
<?php endif ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td title="<?= $helper->getStateTitle($service, 'host'); ?>">
|
|
||||||
<?= $this->perfdata($service->service_perfdata, true) ?>
|
<?= $this->perfdata($service->service_perfdata, true) ?>
|
||||||
<!-- <?php if ($service->service_icon_image): ?>
|
|
||||||
<div class="pull-left" style="margin-right: 2px;">
|
<?php if (!$service->service_handled && $service->service_state > 0): ?>
|
||||||
<i class="inline-image" style="background-image: url(<?= $this->escape($this->resolveMacros($service->service_icon_image, $service)); ?>);"></i>
|
<?= $this->img('img/icons/unhandled.png', array(
|
||||||
</div>
|
'title' => 'Unhandled',
|
||||||
<?php endif; ?>-->
|
'align' => 'right'
|
||||||
|
)) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php if ($service->service_acknowledged && !$service->service_in_downtime): ?>
|
||||||
|
<?= $this->img('img/icons/acknowledgement.png', array(
|
||||||
|
'title' => 'Acknowledged',
|
||||||
|
'align' => 'right'
|
||||||
|
)) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php if ($service->service_is_flapping): ?>
|
||||||
|
<?= $this->img('img/icons/flapping.png', array(
|
||||||
|
'title' => 'Flapping',
|
||||||
|
'align' => 'right'
|
||||||
|
)) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php if (!$service->service_notifications_enabled): ?>
|
||||||
|
<?= $this->img('img/icons/notification_disabled.png', array(
|
||||||
|
'title' => 'Notifications Disabled',
|
||||||
|
'align' => 'right'
|
||||||
|
)) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php if ($service->service_in_downtime): ?>
|
||||||
|
<?= $this->img('img/icons/in_downtime.png', array(
|
||||||
|
'title' => 'In Downtime',
|
||||||
|
'align' => 'right'
|
||||||
|
)) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php if (!$service->service_active_checks_enabled): ?>
|
||||||
|
<?php if (!$service->service_passive_checks_enabled): ?>
|
||||||
|
<?= $this->img('img/icons/active_passive_checks_disabled.png', array(
|
||||||
|
'title' => 'Active And Passive Checks Disabled',
|
||||||
|
'align' => 'right'
|
||||||
|
)) ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<?= $this->img('img/icons/active_checks_disabled.png', array(
|
||||||
|
'title' => 'Active Checks Disabled',
|
||||||
|
'align' => 'right'
|
||||||
|
)) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php if ($service->service_icon_image): ?>
|
||||||
|
<?= $this->img($this->resolveMacros($service->service_icon_image, $service), array('align' => 'left')) ?>
|
||||||
|
<?php endif ?>
|
||||||
<a href="<?= $serviceLink ?>"><?= $service->service_display_name ?></a> on <a href="<?= $hostLink ?>"><?= $service->host_name; ?>
|
<a href="<?= $serviceLink ?>"><?= $service->service_display_name ?></a> on <a href="<?= $hostLink ?>"><?= $service->host_name; ?>
|
||||||
<?php if ($service->host_state != 0): ?>
|
<?php if ($service->host_state != 0): ?>
|
||||||
(<?= ucfirst($helper->monitoringState($service, 'host')); ?>)
|
(<?= ucfirst($helper->monitoringState($service, 'host')); ?>)
|
||||||
<?php endif; ?>
|
<?php endif ?>
|
||||||
</a><br />
|
</a><br />
|
||||||
<p class="pluginoutput"><?= $this->escape(substr(strip_tags($service->service_output), 0, 10000)); ?></p>
|
<p class="pluginoutput"><?= $this->escape(substr(strip_tags($service->service_output), 0, 10000)); ?></p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<?php if (!$this->compact): ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user