mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
parent
d1f67c6ec9
commit
907b7f24cc
@ -31,7 +31,7 @@
|
|||||||
use \Icinga\Application\Benchmark;
|
use \Icinga\Application\Benchmark;
|
||||||
use \Icinga\Data\Db\Query;
|
use \Icinga\Data\Db\Query;
|
||||||
use \Icinga\File\Csv;
|
use \Icinga\File\Csv;
|
||||||
use \Icinga\Web\Controller\ActionController;
|
use \Icinga\Module\Monitoring\Controller as MonitoringController;
|
||||||
use \Icinga\Web\Hook;
|
use \Icinga\Web\Hook;
|
||||||
use \Icinga\Web\Widget\Tabextension\DashboardAction;
|
use \Icinga\Web\Widget\Tabextension\DashboardAction;
|
||||||
use \Icinga\Web\Widget\Tabextension\OutputFormat;
|
use \Icinga\Web\Widget\Tabextension\OutputFormat;
|
||||||
@ -47,7 +47,7 @@ use Icinga\Module\Monitoring\DataView\Contactgroup as ContactgroupView;
|
|||||||
use Icinga\Module\Monitoring\DataView\HostAndServiceStatus as HostAndServiceStatusView;
|
use Icinga\Module\Monitoring\DataView\HostAndServiceStatus as HostAndServiceStatusView;
|
||||||
use Icinga\Module\Monitoring\DataView\Comment as CommentView;
|
use Icinga\Module\Monitoring\DataView\Comment as CommentView;
|
||||||
|
|
||||||
class Monitoring_ListController extends ActionController
|
class Monitoring_ListController extends MonitoringController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The backend used for this controller
|
* The backend used for this controller
|
||||||
@ -137,39 +137,7 @@ class Monitoring_ListController extends ActionController
|
|||||||
public function servicesAction()
|
public function servicesAction()
|
||||||
{
|
{
|
||||||
$this->compactView = 'services-compact';
|
$this->compactView = 'services-compact';
|
||||||
$query = HostAndServiceStatusView::fromRequest(
|
$this->view->services = $this->fetchServices();
|
||||||
$this->_request,
|
|
||||||
array(
|
|
||||||
'host_name',
|
|
||||||
'host_state',
|
|
||||||
'host_state_type',
|
|
||||||
'host_last_state_change',
|
|
||||||
'host_address',
|
|
||||||
'host_handled',
|
|
||||||
'service_description',
|
|
||||||
'service_display_name',
|
|
||||||
'service_state' => 'service_state',
|
|
||||||
'service_in_downtime',
|
|
||||||
'service_acknowledged',
|
|
||||||
'service_handled',
|
|
||||||
'service_output',
|
|
||||||
'service_last_state_change' => 'service_last_state_change',
|
|
||||||
'service_icon_image',
|
|
||||||
'service_long_output',
|
|
||||||
'service_is_flapping',
|
|
||||||
'service_state_type',
|
|
||||||
'service_handled',
|
|
||||||
'service_severity',
|
|
||||||
'service_last_check',
|
|
||||||
'service_notifications_enabled',
|
|
||||||
'service_action_url',
|
|
||||||
'service_notes_url',
|
|
||||||
'service_last_comment',
|
|
||||||
'service_active_checks_enabled',
|
|
||||||
'service_passive_checks_enabled'
|
|
||||||
)
|
|
||||||
)->getQuery();
|
|
||||||
$this->view->services = $query->paginate();
|
|
||||||
$this->setupSortControl(array(
|
$this->setupSortControl(array(
|
||||||
'service_last_check' => 'Last Service Check',
|
'service_last_check' => 'Last Service Check',
|
||||||
'service_severity' => 'Severity',
|
'service_severity' => 'Severity',
|
||||||
@ -182,7 +150,6 @@ class Monitoring_ListController extends ActionController
|
|||||||
'host_address' => 'Host Address',
|
'host_address' => 'Host Address',
|
||||||
'host_last_check' => 'Last Host Check'
|
'host_last_check' => 'Last Host Check'
|
||||||
));
|
));
|
||||||
$this->handleFormatRequest($query);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
// @codingStandardsIgnoreStart
|
// @codingStandardsIgnoreStart
|
||||||
use \Icinga\Module\Monitoring\Backend;
|
use \Icinga\Module\Monitoring\Backend;
|
||||||
use \Icinga\Web\Controller\ActionController;
|
use Icinga\Module\Monitoring\Controller as MonitoringController;
|
||||||
use \Icinga\Web\Hook;
|
use \Icinga\Web\Hook;
|
||||||
use \Icinga\Module\Monitoring\Object\Host;
|
use \Icinga\Module\Monitoring\Object\Host;
|
||||||
use \Icinga\Module\Monitoring\Object\Service;
|
use \Icinga\Module\Monitoring\Object\Service;
|
||||||
@ -43,7 +43,7 @@ use \Icinga\Web\Widget\Tabs;
|
|||||||
*
|
*
|
||||||
* Actions for show context
|
* Actions for show context
|
||||||
*/
|
*/
|
||||||
class Monitoring_ShowController extends ActionController
|
class Monitoring_ShowController extends MonitoringController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var Backend
|
* @var Backend
|
||||||
@ -86,7 +86,6 @@ class Monitoring_ShowController extends ActionController
|
|||||||
public function serviceAction()
|
public function serviceAction()
|
||||||
{
|
{
|
||||||
$this->view->object->prefetch();
|
$this->view->object->prefetch();
|
||||||
$this->view->object->eventHistory = $this->view->object->eventHistory->limit(10)->fetchAll();
|
|
||||||
$this->view->preserve = array();
|
$this->view->preserve = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,14 +95,27 @@ class Monitoring_ShowController extends ActionController
|
|||||||
public function hostAction()
|
public function hostAction()
|
||||||
{
|
{
|
||||||
$this->view->object->prefetch();
|
$this->view->object->prefetch();
|
||||||
$this->view->object->eventHistory = $this->view->object->eventHistory->limit(10)->fetchAll();
|
|
||||||
$this->view->preserve = array();
|
$this->view->preserve = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function historyAction()
|
||||||
|
{
|
||||||
|
$this->view->object->fetchEventHistory();
|
||||||
|
$this->view->history = $this->view->object->eventHistory->limit(10)->paginate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function servicesAction()
|
||||||
|
{
|
||||||
|
$params = $this->_request->getParams();
|
||||||
|
unset($params['service']);
|
||||||
|
$this->view->services = $this->fetchServices($params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* History entries for objects
|
* History entries for objects
|
||||||
*/
|
*/
|
||||||
public function historyAction()
|
/* public function historyAction()
|
||||||
{
|
{
|
||||||
$this->view->history = $this->backend->select()
|
$this->view->history = $this->backend->select()
|
||||||
->from(
|
->from(
|
||||||
@ -130,7 +142,7 @@ class Monitoring_ShowController extends ActionController
|
|||||||
$this->view->preserve['sort'] = $this->_getParam('sort');
|
$this->view->preserve['sort'] = $this->_getParam('sort');
|
||||||
}
|
}
|
||||||
$this->view->preserve = $this->view->history->getAppliedFilter()->toParams();
|
$this->view->preserve = $this->view->history->getAppliedFilter()->toParams();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creating tabs for this controller
|
* Creating tabs for this controller
|
||||||
@ -140,26 +152,66 @@ class Monitoring_ShowController extends ActionController
|
|||||||
{
|
{
|
||||||
$object = $this->view->object;
|
$object = $this->view->object;
|
||||||
$tabs = $this->getTabs();
|
$tabs = $this->getTabs();
|
||||||
if (!$this->view->host) {
|
|
||||||
return $tabs;
|
|
||||||
}
|
|
||||||
$params = array(
|
$params = array(
|
||||||
'host' => $this->view->host->host_name,
|
'host' => $object->host_name,
|
||||||
);
|
);
|
||||||
if ($backend = $this->_getParam('backend')) {
|
|
||||||
$params['backend'] = $backend;
|
|
||||||
}
|
|
||||||
if ($object instanceof Service) {
|
if ($object instanceof Service) {
|
||||||
$params['service'] = $object->service_description;
|
$params['service'] = $object->service_description;
|
||||||
} elseif ($service = $this->_getParam('service')) {
|
} elseif ($service = $this->_getParam('service')) {
|
||||||
$params['service'] = $service;
|
$params['service'] = $service;
|
||||||
}
|
}
|
||||||
|
if (isset($params['service'])) {
|
||||||
|
$tabs->add(
|
||||||
|
'service',
|
||||||
|
array(
|
||||||
|
'title' => 'Service',
|
||||||
|
'icon' => '',
|
||||||
|
'url' => 'monitoring/show/service',
|
||||||
|
'urlParams' => $params,
|
||||||
|
'tagParams' => array(
|
||||||
|
'data-icinga-target' => 'detail'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$tabs->add(
|
||||||
|
'host',
|
||||||
|
array(
|
||||||
|
'title' => 'Host',
|
||||||
|
'icon' => '',
|
||||||
|
'url' => 'monitoring/show/host',
|
||||||
|
'urlParams' => $params,
|
||||||
|
'tagParams' => array(
|
||||||
|
'data-icinga-target' => 'detail'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$tabs->add(
|
||||||
|
'services',
|
||||||
|
array(
|
||||||
|
'title' => 'Services',
|
||||||
|
'icon' => 'img/classic/service.png',
|
||||||
|
'url' => 'monitoring/show/services',
|
||||||
|
'urlParams' => $params,
|
||||||
|
'tagParams' => array(
|
||||||
|
'data-icinga-target' => 'detail'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$tabs->add(
|
||||||
|
'history',
|
||||||
|
array(
|
||||||
|
'title' => 'History',
|
||||||
|
'icon' => '',
|
||||||
|
'url' => 'monitoring/show/history',
|
||||||
|
'urlParams' => $params,
|
||||||
|
'tagParams' => array(
|
||||||
|
'data-icinga-target' => 'detail'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
$tabs->extend(new OutputFormat())
|
$tabs->extend(new OutputFormat())
|
||||||
->extend(new DashboardAction())
|
->extend(new DashboardAction());
|
||||||
->extend(new BasketAction);
|
|
||||||
|
|
||||||
return $tabs;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// @codingStandardsIgnoreEnd
|
// @codingStandardsIgnoreEnd
|
||||||
|
@ -8,7 +8,7 @@ $viewHelper = $this->getHelper('MonitoringState');
|
|||||||
<div data-icinga-component="app/mainDetailGrid">
|
<div data-icinga-component="app/mainDetailGrid">
|
||||||
|
|
||||||
<?= $this->sortControl->render($this); ?>
|
<?= $this->sortControl->render($this); ?>
|
||||||
<?= $this->paginationControl($this->services, null, null, array('preserve' => $this->preserve)); ?>
|
<?= $this->paginationControl($services, null, null, array('preserve' => $this->preserve)); ?>
|
||||||
|
|
||||||
<table class="table table-condensed">
|
<table class="table table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -1,29 +1,19 @@
|
|||||||
<?php if (!empty($object->comments)): ?>
|
<div>
|
||||||
<?
|
Comments
|
||||||
$commets = array();
|
<?php if (!empty($object->comments)): ?>
|
||||||
foreach ($object->comments as $comment) {
|
<blockquote>
|
||||||
$text = $this->escape($comment->comment_data);
|
<?php foreach ($object->comments as $comment): ?>
|
||||||
$commets[] = sprintf(
|
<p>
|
||||||
|
<?= sprintf(
|
||||||
'[%s] %s (%s): %s',
|
'[%s] %s (%s): %s',
|
||||||
$this->escape($comment->comment_author),
|
$this->escape($comment->comment_author),
|
||||||
$this->format()->timeSince($comment->comment_timestamp),
|
$this->format()->timeSince($comment->comment_timestamp),
|
||||||
$comment->comment_type,
|
$comment->comment_type,
|
||||||
$text
|
$comment->comment_data
|
||||||
);
|
); ?>
|
||||||
}
|
<a href="#" class="button">{{REMOVE_ICON}}</a>
|
||||||
?>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endforeach; ?>
|
||||||
<div class="panel panel-default ">
|
</blockquote>
|
||||||
<div class="panel-heading">
|
|
||||||
<span>{{COMMENT_ICON}} Comments</span>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<a href="#" class="button">{{COMMENT_COMMAND_BUTTON}}</a>
|
|
||||||
<a href="#" class="button">{{NOTIFICATION_COMMAND_BUTTON}}</a><br/>
|
|
||||||
<?php if (!empty($object->comments)): ?>
|
|
||||||
<blockquote> <?= implode('<br />', $commets); ?><a href="#" class="button">{{REMOVE_COMMENT_COMMAND}}</a></blockquote>
|
|
||||||
<?php else: ?>
|
|
||||||
No comments
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,103 +0,0 @@
|
|||||||
<?php if (!empty($object->eventHistory)): ?>
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">
|
|
||||||
<span>History</span>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<table class="table table-condensed">
|
|
||||||
<tbody>
|
|
||||||
<?php foreach ($object->eventHistory as $event): ?>
|
|
||||||
<tr>
|
|
||||||
<td><?= date('d.m. H:i', $event->timestamp); ?></td>
|
|
||||||
|
|
||||||
<td>
|
|
||||||
<?php if ($object instanceof Icinga\Module\Monitoring\Object\Service): ?>
|
|
||||||
<a href="<?= $this->href('monitoring/show/service', array(
|
|
||||||
'host' => $object->host_name,
|
|
||||||
'service' => $event->service_description
|
|
||||||
)); ?>">
|
|
||||||
<?= $event->service_description ?>
|
|
||||||
</a>
|
|
||||||
<?php else: ?>
|
|
||||||
<a href="<?= $this->href('monitoring/show/host', array(
|
|
||||||
'host' => $object->host_name
|
|
||||||
)); ?>">
|
|
||||||
<?= $event->host_name ?>
|
|
||||||
</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td>
|
|
||||||
<?php
|
|
||||||
switch ($event->type) {
|
|
||||||
case 'notify':
|
|
||||||
$icon = '{{NOTIFICATION_ICON}}';
|
|
||||||
$title = 'Notification';
|
|
||||||
$msg = $event->output;
|
|
||||||
break;
|
|
||||||
case 'comment':
|
|
||||||
$icon = '{{COMMENT_ICON}}';
|
|
||||||
$title = 'Comment';
|
|
||||||
$msg = $event->output;
|
|
||||||
break;
|
|
||||||
case 'ack':
|
|
||||||
$icon = '{{ACKNOWLEDGEMENT_ICON}}';
|
|
||||||
$title = 'Acknowledgement';
|
|
||||||
$msg = '';
|
|
||||||
break;
|
|
||||||
case 'dt_comment':
|
|
||||||
$icon = '{{IN_DOWNTIME_ICON}}';
|
|
||||||
$title = 'In Downtime';
|
|
||||||
$msg = $event->output;
|
|
||||||
break;
|
|
||||||
case 'flapping':
|
|
||||||
$icon = '{{FLAPPING_ICON}}';
|
|
||||||
$title = 'Flapping';
|
|
||||||
$msg = '';
|
|
||||||
break;
|
|
||||||
case 'hard_state':
|
|
||||||
$icon = '{{HARDSTATE_ICON}}';
|
|
||||||
$title = 'Hard State';
|
|
||||||
$msg = '[' . $event->attempt . '/' . $event->max_attempts . ']';
|
|
||||||
break;
|
|
||||||
case 'soft_state':
|
|
||||||
$icon = '{{SOFTSTATE_ICON}}';
|
|
||||||
$title = 'Soft State';
|
|
||||||
$msg = '[' . $event->attempt . '/' . $event->max_attempts . ']';
|
|
||||||
break;
|
|
||||||
case 'dt_start':
|
|
||||||
$icon = '{{DOWNTIME_START_ICON}}';
|
|
||||||
$title = 'Downtime Start';
|
|
||||||
$msg = $event->output;
|
|
||||||
break;
|
|
||||||
case 'dt_end':
|
|
||||||
$icon = '{{DOWNTIME_END_ICON}}';
|
|
||||||
$title = 'Downtime End';
|
|
||||||
$msg = $event->output;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<a href="#" title="<?= $title ?>"><i><?= $icon ?></i></a>
|
|
||||||
<?php if (!empty($msg)) { echo $msg; } ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<? endforeach; ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<?php if ($object instanceof Icinga\Module\Monitoring\Object\Service): ?>
|
|
||||||
<a href="<?= $this->href('monitoring/list/eventhistory', array(
|
|
||||||
'host' => $object->host_name,
|
|
||||||
'service' => $object->service_description
|
|
||||||
)); ?>">
|
|
||||||
All events for <?= $event->service_description ?>
|
|
||||||
</a>
|
|
||||||
<?php else: ?>
|
|
||||||
<a href="<?= $this->href('monitoring/list/eventhistory', array(
|
|
||||||
'host' => $object->host_name
|
|
||||||
)); ?>">
|
|
||||||
All events for <?= $event->host_name ?>
|
|
||||||
</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
@ -1,7 +1,103 @@
|
|||||||
<?= $this->render('show/components/header.phtml') ?>
|
<?= $this->tabs->render($this); ?>
|
||||||
<?php
|
|
||||||
$history->limit(10);
|
|
||||||
$hhistory = $this->history->paginate();
|
|
||||||
|
|
||||||
?>
|
<h1>History</h1>
|
||||||
|
|
||||||
|
<?php if (!empty($history)): ?>
|
||||||
|
<div data-icinga-component="app/mainDetailGrid">
|
||||||
|
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($history as $event): ?>
|
||||||
|
<tr>
|
||||||
|
<td><?= date('d.m. H:i', $event->timestamp); ?></td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php if ($object instanceof Icinga\Module\Monitoring\Object\Service): ?>
|
||||||
|
<a href="<?= $this->href('monitoring/show/service', array(
|
||||||
|
'host' => $object->host_name,
|
||||||
|
'service' => $event->service_description
|
||||||
|
)); ?>">
|
||||||
|
<?= $event->service_description ?>
|
||||||
|
</a>
|
||||||
|
<?php else: ?>
|
||||||
|
<a href="<?= $this->href('monitoring/show/host', array(
|
||||||
|
'host' => $object->host_name
|
||||||
|
)); ?>">
|
||||||
|
<?= $event->host_name ?>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
switch ($event->type) {
|
||||||
|
case 'notify':
|
||||||
|
$icon = '{{NOTIFICATION_ICON}}';
|
||||||
|
$title = 'Notification';
|
||||||
|
$msg = $event->output;
|
||||||
|
break;
|
||||||
|
case 'comment':
|
||||||
|
$icon = '{{COMMENT_ICON}}';
|
||||||
|
$title = 'Comment';
|
||||||
|
$msg = $event->output;
|
||||||
|
break;
|
||||||
|
case 'ack':
|
||||||
|
$icon = '{{ACKNOWLEDGEMENT_ICON}}';
|
||||||
|
$title = 'Acknowledgement';
|
||||||
|
$msg = '';
|
||||||
|
break;
|
||||||
|
case 'dt_comment':
|
||||||
|
$icon = '{{IN_DOWNTIME_ICON}}';
|
||||||
|
$title = 'In Downtime';
|
||||||
|
$msg = $event->output;
|
||||||
|
break;
|
||||||
|
case 'flapping':
|
||||||
|
$icon = '{{FLAPPING_ICON}}';
|
||||||
|
$title = 'Flapping';
|
||||||
|
$msg = '';
|
||||||
|
break;
|
||||||
|
case 'hard_state':
|
||||||
|
$icon = '{{HARDSTATE_ICON}}';
|
||||||
|
$title = 'Hard State';
|
||||||
|
$msg = '[' . $event->attempt . '/' . $event->max_attempts . ']';
|
||||||
|
break;
|
||||||
|
case 'soft_state':
|
||||||
|
$icon = '{{SOFTSTATE_ICON}}';
|
||||||
|
$title = 'Soft State';
|
||||||
|
$msg = '[' . $event->attempt . '/' . $event->max_attempts . ']';
|
||||||
|
break;
|
||||||
|
case 'dt_start':
|
||||||
|
$icon = '{{DOWNTIME_START_ICON}}';
|
||||||
|
$title = 'Downtime Start';
|
||||||
|
$msg = $event->output;
|
||||||
|
break;
|
||||||
|
case 'dt_end':
|
||||||
|
$icon = '{{DOWNTIME_END_ICON}}';
|
||||||
|
$title = 'Downtime End';
|
||||||
|
$msg = $event->output;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<a href="#" title="<?= $title ?>"><i><?= $icon ?></i></a>
|
||||||
|
<?php if (!empty($msg)) { echo $msg; } ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<? endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?php if ($object instanceof Icinga\Module\Monitoring\Object\Service): ?>
|
||||||
|
<a href="<?= $this->href('monitoring/list/eventhistory', array(
|
||||||
|
'host' => $object->host_name,
|
||||||
|
'service' => $object->service_description
|
||||||
|
)); ?>">
|
||||||
|
All events for <?= $event->service_description ?>
|
||||||
|
</a>
|
||||||
|
<?php else: ?>
|
||||||
|
<a href="<?= $this->href('monitoring/list/eventhistory', array(
|
||||||
|
'host' => $object->host_name
|
||||||
|
)); ?>">
|
||||||
|
All events for <?= $event->host_name ?>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
@ -1,14 +1,57 @@
|
|||||||
<div class="panel panel-default">
|
<?= $this->tabs->render($this); ?>
|
||||||
<div class="panel-heading">
|
|
||||||
|
<div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
<?php if ($this->object->host_icon_image): ?>
|
<?php if ($this->object->host_icon_image): ?>
|
||||||
<img src="<?= $this->object->host_icon_image; ?>" alt="Host image" />
|
<img src="<?= $this->object->host_icon_image; ?>" alt="Host image" />
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
{{HOST_ICON}}
|
{{HOST_ICON}}
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<h1>Host Status <?= $this->escape($this->object->host_name); ?></h1>
|
<h4>
|
||||||
|
Host Status
|
||||||
|
<?= $this->escape($this->object->host_name); ?>
|
||||||
|
<?php if ($this->object->host_address && $this->object->host_address !== $this->object->host_name): ?>
|
||||||
|
(<?= $this->object->host_address; ?>)
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($this->object->host_alias) && $this->object->host_alias !== $this->object->host_name): ?>
|
||||||
|
(<?= $this->object->host_alias; ?>)
|
||||||
|
<?php endif; ?>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<?= $this->util()->getHostStateName($this->object->host_state); ?>
|
||||||
|
since <?= $this->timeSince($this->object->host_last_state_change); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-body">
|
<div>
|
||||||
|
<?= $this->pluginOutput($this->object->output); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a class="button" href="#">{{RECHECK_COMMAND}</a>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<?= $this->perfdata($this->object->perfdata); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<?= $this->pluginOutput($this->object->long_output); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?= $this->render('show/components/comments.phtml'); ?>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
Check Statistics
|
||||||
|
<dl class="dl-horizontal">
|
||||||
|
<dt>Last Check</dt>
|
||||||
|
<dd><?= $object->last_check; ?></dd>
|
||||||
|
<dt>Next Check</dt>
|
||||||
|
<dd><?= $object->next_check; ?> <a href="#" class="button">{{RESCHEDULE_COMMAND}}</a></dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<?php if (!$object->host_handled && $object->host_state > 0): ?>
|
<?php if (!$object->host_handled && $object->host_state > 0): ?>
|
||||||
@ -27,37 +70,19 @@
|
|||||||
<i>{{ACKNOWLEDGED_ICON}}</i>
|
<i>{{ACKNOWLEDGED_ICON}}</i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<?php else: ?>
|
|
||||||
<td>
|
|
||||||
Status
|
|
||||||
</td>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<td>
|
|
||||||
<?= $this->util()->getHostStateName($this->object->host_state); ?>
|
|
||||||
since <?= $this->timeSince($this->object->host_last_state_change); ?>
|
|
||||||
</td>
|
|
||||||
<td><a class="button" href="#">{{RECHECK_COMMAND_BUTTON}</a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Last Check</td>
|
<td>Last Check</td>
|
||||||
<td><?= $object->last_check ?></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Next Check</td>
|
<td>Next Check</td>
|
||||||
<td><?= $object->next_check ?></td>
|
<td></td>
|
||||||
<td><a href="#" class="button">{{RESCHEDULE_COMMAND_BUTTON}}</a></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ($this->object->host_address && $this->object->host_address !== $this->object->host_name): ?>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Host Address</td>
|
|
||||||
<td><?= $this->escape($this->object->host_address); ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (isset($this->object->host_alias) && $this->object->host_alias !== $this->object->host_name): ?>
|
|
||||||
<tr>
|
|
||||||
<td>Alias</td>
|
|
||||||
<td><?= $this->object->host_alias; ?></td>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if ($this->object->host_action_url || $this->object->host_notes_url): ?>
|
<?php if ($this->object->host_action_url || $this->object->host_notes_url): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="2">
|
<td rowspan="2">
|
||||||
@ -70,16 +95,6 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<tr>
|
|
||||||
<td>Plugin Output</td>
|
|
||||||
<td>
|
|
||||||
<?= $this->pluginOutput($this->object->output); ?>
|
|
||||||
<?= $this->pluginOutput($this->object->long_output); ?>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a class="button" href="#">{{SUBMIT_PASSIVE_CHECK_RESULT_COMMAND}}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php if ($this->object->perfdata): ?>
|
<?php if ($this->object->perfdata): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Performance Data</td>
|
<td>Performance Data</td>
|
||||||
@ -102,8 +117,6 @@
|
|||||||
|
|
||||||
<?= $this->render('show/components/downtime.phtml'); ?>
|
<?= $this->render('show/components/downtime.phtml'); ?>
|
||||||
|
|
||||||
<?= $this->render('show/components/comments.phtml'); ?>
|
|
||||||
|
|
||||||
<?= $this->render('show/components/properties.phtml'); ?>
|
<?= $this->render('show/components/properties.phtml'); ?>
|
||||||
|
|
||||||
<?= $this->render('show/components/flags.phtml'); ?>
|
<?= $this->render('show/components/flags.phtml'); ?>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<?= $this->tabs->render($this); ?>
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
{{SERVICE_ICON}} <h1>Service Status <?= $this->escape($this->object->service_description); ?></h1>
|
{{SERVICE_ICON}} <h1>Service Status <?= $this->escape($this->object->service_description); ?></h1>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user