mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Various style fixes, changed icon size, fixed show/service
This commit is contained in:
parent
f2be16621b
commit
16124989dd
@ -21,7 +21,7 @@ $title_next = sprintf(
|
||||
);
|
||||
|
||||
?>
|
||||
<ul class="pagination pagination-sm">
|
||||
<ul class="pagination">
|
||||
<!-- Previous page link -->
|
||||
|
||||
<?php if (isset($this->previous)): ?>
|
||||
|
@ -64,8 +64,8 @@ class FilterBox implements Widget
|
||||
*/
|
||||
private static $TPL = <<<'EOT'
|
||||
<div class="row">
|
||||
<div class="col-md-12">{{FORM}}</div>
|
||||
<div class="col-md-12">{{BADGES}}</div>
|
||||
{{FORM}}
|
||||
{{BADGES}}
|
||||
</div>
|
||||
EOT;
|
||||
|
||||
|
@ -52,7 +52,8 @@ class DashboardAction implements Tabextension
|
||||
$tabs->addAsDropdown(
|
||||
'dashboard',
|
||||
array(
|
||||
'title' => '{{DASHBOARD_ICON}} Add To Dashboard',
|
||||
'iconCls' => 'icinga-icon-dashboard',
|
||||
'title' => 'Add To Dashboard',
|
||||
'url' => Url::fromPath('dashboard/addurl'),
|
||||
'urlParams' => array(
|
||||
'url' => Url::fromRequest()->getRelativeUrl()
|
||||
|
@ -57,8 +57,8 @@ EOT;
|
||||
*/
|
||||
private $dropdownTpl = <<< 'EOT'
|
||||
<li class="dropdown pull-right ">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<b class="caret"></b>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="margin-top:3px">
|
||||
<i style="" class="caret"></i> Actions
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
{TABS}
|
||||
|
@ -63,7 +63,6 @@ class Monitoring_ListController extends MonitoringController
|
||||
* @var Backend
|
||||
*/
|
||||
protected $backend;
|
||||
|
||||
/**
|
||||
* Compact layout name
|
||||
*
|
||||
@ -72,7 +71,7 @@ class Monitoring_ListController extends MonitoringController
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $compactView;
|
||||
protected $compactView;
|
||||
|
||||
/**
|
||||
* Retrieve backend and hooks for this controller
|
||||
@ -168,6 +167,7 @@ class Monitoring_ListController extends MonitoringController
|
||||
'host_address' => 'Host Address',
|
||||
'host_last_check' => 'Last Host Check'
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -379,39 +379,6 @@ class Monitoring_ListController extends MonitoringController
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the 'format' and 'view' parameter
|
||||
*
|
||||
* @param Query $query The current query
|
||||
*/
|
||||
private function handleFormatRequest($query)
|
||||
{
|
||||
if ($this->compactView !== null && ($this->_getParam('view', false) === 'compact')) {
|
||||
$this->_helper->viewRenderer($this->compactView);
|
||||
}
|
||||
|
||||
|
||||
if ($this->getParam('format') === 'sql'
|
||||
&& IcingaConfig::app()->global->get('environment', 'production') === 'development') {
|
||||
echo '<pre>'
|
||||
. htmlspecialchars(wordwrap($query->dump()))
|
||||
. '</pre>';
|
||||
exit;
|
||||
}
|
||||
if ($this->_getParam('format') === 'json'
|
||||
|| $this->_request->getHeader('Accept') === 'application/json')
|
||||
{
|
||||
header('Content-type: application/json');
|
||||
echo json_encode($query->fetchAll());
|
||||
exit;
|
||||
}
|
||||
if ($this->_getParam('format') === 'csv'
|
||||
|| $this->_request->getHeader('Accept') === 'text/csv') {
|
||||
Csv::fromQuery($query)->dump();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a sort control box at the 'sortControl' view parameter
|
||||
*
|
||||
@ -446,7 +413,7 @@ class Monitoring_ListController extends MonitoringController
|
||||
private function createTabs()
|
||||
{
|
||||
$tabs = $this->getTabs();
|
||||
$tabs->extend(new OutputFormat())
|
||||
$tabs//->extend(new OutputFormat())
|
||||
->extend(new DashboardAction());
|
||||
}
|
||||
}
|
||||
|
@ -3,14 +3,19 @@
|
||||
|
||||
/** @var Zend_View_Helper_CommandForm $commandHelper */
|
||||
$commandHelper = $this->getHelper('CommandForm');
|
||||
?>
|
||||
<?= $this->tabs->render($this); ?>
|
||||
|
||||
<?php
|
||||
$viewHelper = $this->getHelper('MonitoringState');
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="pull-left">
|
||||
<h1>Comments</h1>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="single">
|
||||
|
||||
|
@ -1,10 +1,17 @@
|
||||
<?= $this->tabs->render($this); ?>
|
||||
|
||||
<?php
|
||||
$viewHelper = $this->getHelper('MonitoringState');
|
||||
$knownGroups = array()
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="pull-left">
|
||||
<h1>Contact Groups</h1>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="none">
|
||||
<?= $this->sortControl->render($this); ?>
|
||||
<?= $this->paginationControl($contactgroups, null, null, array('preserve' => $this->preserve)); ?>
|
||||
|
@ -1,10 +1,15 @@
|
||||
<?= $this->tabs->render($this); ?>
|
||||
|
||||
<?php
|
||||
$viewHelper = $this->getHelper('MonitoringState');
|
||||
$contactHelper = $this->getHelper('ContactFlags');
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="pull-left">
|
||||
<h1>Contacts</h1>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="none">
|
||||
<?= $this->sortControl->render($this); ?>
|
||||
<?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
|
||||
|
@ -1,7 +1,14 @@
|
||||
<?php
|
||||
$commandHelper = $this->getHelper('CommandForm');
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="pull-left">
|
||||
<h1>Downtimes</h1>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="single">
|
||||
<div>
|
||||
<?= $this->sortControl->render($this); ?>
|
||||
|
@ -1,4 +1,11 @@
|
||||
<div class="row">
|
||||
<div class="pull-left">
|
||||
<h1>History</h1>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (!empty($history)): ?>
|
||||
<div data-icinga-component="app/mainDetailGrid">
|
||||
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
|
||||
|
@ -1,3 +1,11 @@
|
||||
<div class="row">
|
||||
<div class="pull-left">
|
||||
<h1>Hostgroups</h1>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="single">
|
||||
<?= $this->sortControl->render($this); ?>
|
||||
<?= $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
|
||||
|
@ -1,9 +1,15 @@
|
||||
<?php
|
||||
$viewHelper = $this->getHelper('MonitoringState');
|
||||
?>
|
||||
|
||||
<?= $this->tabs->render($this); ?>
|
||||
<div class="row">
|
||||
<div class="pull-left">
|
||||
<h1>Hosts Status</h1>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="multi">
|
||||
|
||||
<div class="container pull-left">
|
||||
|
@ -1,4 +1,11 @@
|
||||
<div class="row">
|
||||
<div class="pull-left">
|
||||
<h1>Notifications</h1>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($notifications)): ?>
|
||||
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="single">
|
||||
|
@ -1,3 +1,12 @@
|
||||
<div class="row">
|
||||
<div class="pull-left">
|
||||
<h1>Servicegroups</h1>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="single">
|
||||
<?= $this->sortControl->render($this); ?>
|
||||
<?= $this->paginationControl($servicegroups, null, null, array('preserve' => $this->preserve)); ?>
|
||||
|
@ -2,102 +2,106 @@
|
||||
$viewHelper = $this->getHelper('MonitoringState');
|
||||
?>
|
||||
|
||||
<?php if (empty($services)): ?>
|
||||
<div>
|
||||
Sorry, no services found for this search
|
||||
</div>
|
||||
<?php return; endif ?>
|
||||
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="multi">
|
||||
|
||||
<?= $this->paginationControl($services, null, null, array('preserve' => $this->preserve)) ?>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Status</th>
|
||||
<th>Service</th>
|
||||
<th>Output</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<table class="table table-condensed pull-left">
|
||||
<tbody>
|
||||
<?php foreach ($services as $service): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
<?php if ($service->service_icon_image) : ?>
|
||||
<img src="<?= $service->service_icon_image; ?>"/>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
$serviceLink = $this->href(
|
||||
'monitoring/show/service',
|
||||
array(
|
||||
'host' => $service->host_name,
|
||||
'service' => $service->service_description
|
||||
)
|
||||
);
|
||||
$hostLink = $this->href(
|
||||
'monitoring/show/host',
|
||||
array(
|
||||
'host' => $service->host_name,
|
||||
)
|
||||
);
|
||||
$serviceStateName = strtolower($this->util()->getServiceStateName($service->service_state));
|
||||
?>
|
||||
<tr <?= ($this->activeRowHref === $serviceLink) ? 'class="active"' : ''; ?>>
|
||||
<!-- Color column -->
|
||||
<td class="tacheader-status-<?= $serviceStateName; ?>">
|
||||
<a style="visibility:hidden" href="<?= $serviceLink; ?>"></a>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<a style="visibility:hidden" href="<?= $serviceLink; ?>"></a>
|
||||
<?php if (!$service->service_handled && $service->service_state > 0): ?>
|
||||
<a href="#" title="<?= 'Unhandled service' ?>">
|
||||
<i>{{UNHANDLED_ICON}}</i>
|
||||
<a href="#" title="Unhandled">
|
||||
<i class="icon-table icinga-icon-unhandled"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($service->service_acknowledged && !$service->service_in_downtime): ?>
|
||||
<a href="#" title="<?= 'Acknowledged' ?>">
|
||||
<i>{{ACKNOWLEDGED_ICON}}</i>
|
||||
<a href="#" title="Acknowledged">
|
||||
<i class="icon-table icinga-icon-acknowledgement"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($service->service_is_flapping): ?>
|
||||
<a href="#" title="<?= 'Flapping' ?>">
|
||||
<i>{{FLAPPING_ICON}}</i>
|
||||
<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>{{NOTIFICATIONS_DISABLED_ICON}}</i>
|
||||
<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>{{IN_DOWNTIME_ICON}}</i>
|
||||
<a href="#" title="In Downtime">
|
||||
<i class="icon-table icinga-icon-in-downtime"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td title="<?= $viewHelper->getStateTitle($service, 'service'); ?>">
|
||||
<div>
|
||||
<?= ucfirst($viewHelper->monitoringState($service, 'service')); ?></b>
|
||||
<div> Since '
|
||||
<?= $this->timeSince($service->service_last_state_change); ?>
|
||||
<?php if ($service->service_state_type == 0): ?>
|
||||
<a href="#" title="<?= 'Soft state' ?>">
|
||||
<i>{{SOFTSTATE_ICON}}</i>
|
||||
<?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; ?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="servicename">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($service->service_last_comment !== null): ?>
|
||||
<a href="#" title="<?= 'Comments' ?>">
|
||||
<i>{{COMMENT_ICON}}</i>
|
||||
<a href="#" title="Comments">
|
||||
<i class="icon-table icinga-icon-comment"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<b> <?= $service->service_display_name; ?></b>
|
||||
<br/>
|
||||
<?= $service->host_name; ?>
|
||||
|
||||
<?php if ($service->service_action_url != ""): ?>
|
||||
<a href="<?= $service->service_action_url; ?>">Action</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($service->service_notes_url != ""): ?>
|
||||
<a href="<?= $service->service_notes_url; ?>">Notes</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<td title="<?= $viewHelper->getStateTitle($service, 'service'); ?>">
|
||||
<strong><?= ucfirst($viewHelper->monitoringState($service, 'service')); ?></strong><br />
|
||||
|
||||
<div class="small-row">
|
||||
Since <?= $this->timeSince($service->service_last_state_change); ?>
|
||||
<?php if ($service->service_state): ?>
|
||||
<br />
|
||||
<strong>Attempt:</strong>
|
||||
<?= $service->service_attempt; ?>
|
||||
(<?= ($service->service_state_type === '1') ? 'Hard' : 'Soft'; ?>)
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td title="<?= $viewHelper->getStateTitle($service, 'host'); ?>">
|
||||
<div class="output-text">
|
||||
<?= $this->escape(substr(strip_tags($service->service_output), 0, 10000)); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
@ -1,9 +1,14 @@
|
||||
<?php
|
||||
$viewHelper = $this->getHelper('MonitoringState');
|
||||
?>
|
||||
|
||||
<?= $this->tabs->render($this); ?>
|
||||
<div class="row">
|
||||
<div class="pull-left">
|
||||
<h1>Services Status</h1>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="multi">
|
||||
|
||||
<div class="container pull-left">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$object = $this->object;
|
||||
$type = (isset($object->service_description) === true) ? 'service' : 'host';
|
||||
|
||||
$type = $object->type === 2 ? 'service' : 'host';
|
||||
|
||||
/** @var Zend_View_Helper_CommandForm $cf */
|
||||
$cf = $this->getHelper('CommandForm');
|
||||
@ -16,6 +16,7 @@
|
||||
<div>
|
||||
<div class="panel-heading border-status-<?= $objectStateName ?>">
|
||||
<div class="panel-hostname">
|
||||
<?= $type ; ?>
|
||||
<?php if ($type === 'host'): ?>
|
||||
<a title="View all services for this host"
|
||||
href="<?= $this->href('monitoring/list/services', array('host' => $object->host_name)); ?>">
|
||||
|
@ -71,8 +71,13 @@ class Controller extends ActionController
|
||||
return $query->paginate();
|
||||
}
|
||||
|
||||
private function handleFormatRequest($query)
|
||||
protected function handleFormatRequest($query)
|
||||
{
|
||||
if ($this->compactView !== null && ($this->_getParam('view', false) === 'compact')) {
|
||||
$this->_helper->viewRenderer($this->compactView);
|
||||
}
|
||||
|
||||
|
||||
if ($this->_getParam('format') === 'sql'
|
||||
&& IcingaConfig::app()->global->get('environment', 'production') === 'development') {
|
||||
echo '<pre>'
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 823 B After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 779 B After Width: | Height: | Size: 2.9 KiB |
Loading…
x
Reference in New Issue
Block a user