mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Merge branch 'bugfix/make-all-views-dashboard-compliant-7876'
fixes #7876
This commit is contained in:
commit
cc573c1b3f
application
controllers
views/scripts
library/Icinga/Web
modules
doc/application/views/scripts/index
monitoring
application
controllers
AlertsummaryController.phpChartController.phpHostsController.phpListController.phpProcessController.phpServicesController.phpShowController.phpTacticalController.phpTimelineController.php
views/scripts
alertsummary
host
hosts
list
comments.phtmlcontactgroups.phtmlcontacts.phtmldowntimes.phtmleventgrid.phtmleventhistory.phtmlhostgroups.phtmlhosts.phtmlnotifications.phtmlservicegrid.phtmlservicegroups.phtmlservices.phtml
partials
process
service
services
show
timeline
library/Monitoring
public
public
@ -11,14 +11,14 @@ use Icinga\Forms\Config\GeneralConfigForm;
|
||||
use Icinga\Forms\Config\ResourceConfigForm;
|
||||
use Icinga\Forms\ConfirmRemovalForm;
|
||||
use Icinga\Security\SecurityException;
|
||||
use Icinga\Web\Controller\ActionController;
|
||||
use Icinga\Web\Controller;
|
||||
use Icinga\Web\Notification;
|
||||
use Icinga\Web\Widget;
|
||||
|
||||
/**
|
||||
* Application and module configuration
|
||||
*/
|
||||
class ConfigController extends ActionController
|
||||
class ConfigController extends Controller
|
||||
{
|
||||
/**
|
||||
* The first allowed config action according to the user's permissions
|
||||
@ -130,6 +130,14 @@ class ConfigController extends ActionController
|
||||
->order('enabled', 'desc')
|
||||
->order('name')
|
||||
->paginate();
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->modules);
|
||||
// TODO: Not working
|
||||
/*$this->setupSortControl(array(
|
||||
'name' => $this->translate('Modulename'),
|
||||
'path' => $this->translate('Installation Path'),
|
||||
'enabled' => $this->translate('State')
|
||||
));*/
|
||||
}
|
||||
|
||||
public function moduleAction()
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
use Icinga\Module\Monitoring\Controller;
|
||||
use Icinga\Web\Url;
|
||||
use Icinga\Web\Widget\Tabextension\DashboardAction;
|
||||
use Icinga\Web\Widget\Tabextension\OutputFormat;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Data\ConfigObject;
|
||||
@ -29,7 +31,7 @@ class ListController extends Controller
|
||||
'list/'
|
||||
. str_replace(' ', '', $action)
|
||||
)
|
||||
))->activate($action);
|
||||
))->extend(new OutputFormat())->extend(new DashboardAction())->activate($action);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -52,5 +54,8 @@ class ListController extends Controller
|
||||
'fields' => $pattern
|
||||
)));
|
||||
$this->view->logData = $resource->select()->order('DESC')->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->logData);
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,12 @@
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<?= $this->paginationControl($modules) ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<table class="action" data-base-target="_next">
|
||||
<tbody>
|
||||
|
@ -1,9 +1,12 @@
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs->render($this) ?>
|
||||
<div style="margin-top: 1em"></div>
|
||||
<?= $this->logData ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<?php if ($this->logData !== null): ?>
|
||||
<table class="action">
|
||||
|
@ -3,8 +3,10 @@
|
||||
|
||||
namespace Icinga\Web;
|
||||
|
||||
use Zend_Paginator;
|
||||
use Icinga\Web\Controller\ModuleActionController;
|
||||
use Icinga\Web\Widget\SortBox;
|
||||
use Icinga\Web\Widget\Limiter;
|
||||
|
||||
/**
|
||||
* This is the controller all modules should inherit from
|
||||
@ -14,17 +16,77 @@ use Icinga\Web\Widget\SortBox;
|
||||
class Controller extends ModuleActionController
|
||||
{
|
||||
/**
|
||||
* Create a sort control box at the 'sortControl' view parameter
|
||||
* Create a SortBox widget at the `sortBox' view property
|
||||
*
|
||||
* @param array $columns An array containing the sort columns, with the
|
||||
* submit value as the key and the label as the value
|
||||
* In case the current view has been requested as compact this method does nothing.
|
||||
*
|
||||
* @param array $columns An array containing the sort columns, with the
|
||||
* submit value as the key and the label as the value
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
protected function setupSortControl(array $columns)
|
||||
{
|
||||
$req = $this->getRequest();
|
||||
$this->view->sortControl = SortBox::create(
|
||||
'sortbox-' . $req->getActionName(),
|
||||
$columns
|
||||
)->applyRequest($req);
|
||||
if (! $this->view->compact) {
|
||||
$req = $this->getRequest();
|
||||
$this->view->sortBox = SortBox::create(
|
||||
'sortbox-' . $req->getActionName(),
|
||||
$columns
|
||||
)->applyRequest($req);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Limiter widget at the `limiter' view property
|
||||
*
|
||||
* In case the current view has been requested as compact this method does nothing.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
protected function setupLimitControl()
|
||||
{
|
||||
if (! $this->view->compact) {
|
||||
$this->view->limiter = new Limiter();
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the view property `paginator' to the given Zend_Paginator
|
||||
*
|
||||
* In case the current view has been requested as compact this method does nothing.
|
||||
*
|
||||
* @param Zend_Paginator $paginator The Zend_Paginator for which to show a pagination control
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
protected function setupPaginationControl(Zend_Paginator $paginator)
|
||||
{
|
||||
if (! $this->view->compact) {
|
||||
$this->view->paginator = $paginator;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the view property `filterEditor' to the given FilterEditor
|
||||
*
|
||||
* In case the current view has been requested as compact this method does nothing.
|
||||
*
|
||||
* @param Form $editor The FilterEditor
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
protected function setupFilterControl($editor)
|
||||
{
|
||||
if (! $this->view->compact) {
|
||||
$this->view->filterEditor = $editor;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
@ -87,6 +87,7 @@ class ActionController extends Zend_Controller_Action
|
||||
$this->_helper->layout()->isIframe = $request->getUrl()->shift('isIframe');
|
||||
$this->_helper->layout()->moduleName = false;
|
||||
|
||||
$this->view->compact = $request->getParam('view') === 'compact';
|
||||
if ($this->rerenderLayout = $request->getUrl()->shift('renderLayout')) {
|
||||
$this->xhrLayout = 'body';
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ class StyleSheet
|
||||
'css/icinga/pagination.less',
|
||||
'css/icinga/monitoring-colors.less',
|
||||
'css/icinga/selection-toolbar.less',
|
||||
'css/icinga/login.less'
|
||||
'css/icinga/login.less',
|
||||
'css/icinga/controls.less'
|
||||
);
|
||||
|
||||
public static function compileForPdf()
|
||||
|
@ -649,7 +649,7 @@ class FilterEditor extends AbstractWidget
|
||||
|
||||
public function renderSearch()
|
||||
{
|
||||
$html = ' <form method="post" class="inline dontprint" action="'
|
||||
$html = ' <form method="post" class="search inline dontprint" action="'
|
||||
. $this->preservedUrl()
|
||||
. '"><input type="text" name="q" style="width: 8em" class="search" value="" placeholder="'
|
||||
. t('Search...')
|
||||
@ -678,20 +678,22 @@ class FilterEditor extends AbstractWidget
|
||||
public function render()
|
||||
{
|
||||
if (! $this->preservedUrl()->getParam('modifyFilter')) {
|
||||
return $this->renderSearch() . $this->shorten($this->filter, 50);
|
||||
return '<div class="filter">' . $this->renderSearch() . $this->shorten($this->filter, 50) . '</div>';
|
||||
}
|
||||
return $this->renderSearch()
|
||||
. '<form action="'
|
||||
. Url::fromRequest()
|
||||
. '" class="filterEditor" method="POST">'
|
||||
. '<ul class="tree widgetFilter"><li>'
|
||||
. $this->renderFilter($this->filter)
|
||||
. '</li></ul>'
|
||||
. '<div style="float: right">'
|
||||
. '<input type="submit" name="submit" value="Apply" />'
|
||||
. '<input type="submit" name="cancel" value="Cancel" />'
|
||||
. '</div>'
|
||||
. '</form>';
|
||||
return '<div class="filter">'
|
||||
. $this->renderSearch()
|
||||
. '<form action="'
|
||||
. Url::fromRequest()
|
||||
. '" class="editor" method="POST">'
|
||||
. '<ul class="tree"><li>'
|
||||
. $this->renderFilter($this->filter)
|
||||
. '</li></ul>'
|
||||
. '<div class="buttons">'
|
||||
. '<input type="submit" name="submit" value="Apply" />'
|
||||
. '<input type="submit" name="cancel" value="Cancel" />'
|
||||
. '</div>'
|
||||
. '</form>'
|
||||
. '</div>';
|
||||
}
|
||||
|
||||
protected function shorten($string, $length)
|
||||
|
@ -3,64 +3,57 @@
|
||||
|
||||
namespace Icinga\Web\Widget;
|
||||
|
||||
use Zend_Form_Element_Submit;
|
||||
use Icinga\Web\Form;
|
||||
use Icinga\Web\Request;
|
||||
use Icinga\Web\Form\Decorator\ConditionalHidden;
|
||||
|
||||
/**
|
||||
* Sortbox widget
|
||||
* SortBox widget
|
||||
*
|
||||
* The "SortBox" Widget allows you to create a generic sort input for sortable views.
|
||||
* It automatically creates a form containing a select box with all sort options and a
|
||||
* dropbox with the sort direction. It also handles automatic submission of sorting changes and draws an additional
|
||||
* submit button when JavaScript is disabled.
|
||||
* The "SortBox" Widget allows you to create a generic sort input for sortable views. It automatically creates a form
|
||||
* containing a select box with all sort options and a dropbox with the sort direction. It also handles automatic
|
||||
* submission of sorting changes and draws an additional submit button when JavaScript is disabled.
|
||||
*
|
||||
* The constructor takes an string for the component name ad an array containing the select options, where the key is
|
||||
* the value to be submitted and the value is the label that will be shown. You then should call applyRequest in order
|
||||
* to make sure the form is correctly populated when a request with a sort parameter is being made.
|
||||
* The constructor takes an string for the component name and an array containing the select options, where the key is
|
||||
* the value to be submitted and the value is the label that will be shown. You then should call applyRequest in order
|
||||
* to make sure the form is correctly populated when a request with a sort parameter is being made.
|
||||
*
|
||||
* Example:
|
||||
* <pre><code>
|
||||
* Example:
|
||||
* <pre><code>
|
||||
* $this->view->sortControl = new SortBox(
|
||||
* $this->getRequest()->getActionName(),
|
||||
* $this->getRequest()->getActionName(),
|
||||
* $columns
|
||||
* );
|
||||
* $this->view->sortControl->applyRequest($this->getRequest());
|
||||
* </code></pre>
|
||||
* By default the sortBox uses the GET parameter 'sort' for the sorting key and 'dir' for the sorting direction
|
||||
*
|
||||
* </code></pre>
|
||||
*/
|
||||
class SortBox extends AbstractWidget
|
||||
{
|
||||
|
||||
/**
|
||||
* An array containing all sort columns with their associated labels
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $sortFields;
|
||||
protected $sortFields;
|
||||
|
||||
/**
|
||||
* The name of the form that will be created
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* A request object used for initial form population
|
||||
*
|
||||
* @var \Icinga\Web\Request
|
||||
* @var Request
|
||||
*/
|
||||
private $request;
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Create a SortBox with the entries from $sortFields
|
||||
*
|
||||
* @param string $name The name of the sort form
|
||||
* @param array $sortFields An array containing the columns and their labels to be displayed
|
||||
* in the sort select box
|
||||
* @param string $name The name for the SortBox
|
||||
* @param array $sortFields An array containing the columns and their labels to be displayed in the SortBox
|
||||
*/
|
||||
public function __construct($name, array $sortFields)
|
||||
{
|
||||
@ -69,13 +62,12 @@ class SortBox extends AbstractWidget
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a SortBox with the entries from $sortFields
|
||||
* Create a SortBox
|
||||
*
|
||||
* @param string $name The name of the sort form
|
||||
* @param array $sortFields An array containing the columns and their labels to be displayed
|
||||
* in the sort select box
|
||||
* @param string $name The name for the SortBox
|
||||
* @param array $sortFields An array containing the columns and their labels to be displayed in the SortBox
|
||||
*
|
||||
* @return static
|
||||
* @return SortBox
|
||||
*/
|
||||
public static function create($name, array $sortFields)
|
||||
{
|
||||
@ -85,9 +77,9 @@ class SortBox extends AbstractWidget
|
||||
/**
|
||||
* Apply the parameters from the given request on this SortBox
|
||||
*
|
||||
* @param Request $request The request to use for populating the form
|
||||
* @param Request $request The request to use for populating the form
|
||||
*
|
||||
* @return $this
|
||||
* @return $this
|
||||
*/
|
||||
public function applyRequest($request)
|
||||
{
|
||||
@ -96,60 +88,49 @@ class SortBox extends AbstractWidget
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a submit button that is hidden via the ConditionalDecorator
|
||||
* in order to allow sorting changes to be submitted in a JavaScript-less environment
|
||||
*
|
||||
* @return Zend_Form_Element_Submit The submit button that is hidden by default
|
||||
* @see ConditionalDecorator
|
||||
*/
|
||||
private function createFallbackSubmitButton()
|
||||
{
|
||||
$manualSubmitButton = new Zend_Form_Element_Submit(
|
||||
array(
|
||||
'name' => 'submit_' . $this->name,
|
||||
'label' => 'Sort',
|
||||
'class' => '',
|
||||
'condition' => 0,
|
||||
'value' => '{{SUBMIT_ICON}}'
|
||||
)
|
||||
);
|
||||
$manualSubmitButton->addDecorator(new ConditionalHidden());
|
||||
$manualSubmitButton->setAttrib('addLabelPlaceholder', true);
|
||||
return $manualSubmitButton;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders this widget via the given view and returns the
|
||||
* HTML as a string
|
||||
* Render this SortBox as HTML
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
$form = new Form();
|
||||
$form->setAttrib('class', 'inline');
|
||||
$form->setMethod('POST');
|
||||
$form->setTokenDisabled();
|
||||
$form->setName($this->name);
|
||||
$form->addElement('select', 'sort', array(
|
||||
'label' => 'Sort By',
|
||||
'multiOptions' => $this->sortFields,
|
||||
'style' => 'width: 12em',
|
||||
'autosubmit' => true
|
||||
$form->setAttrib('class', 'sort-control inline');
|
||||
|
||||
$form->addElement(
|
||||
'select',
|
||||
'sort',
|
||||
array(
|
||||
'autosubmit' => true,
|
||||
'label' => $this->view()->translate('Sort by'),
|
||||
'multiOptions' => $this->sortFields
|
||||
)
|
||||
);
|
||||
$form->getElement('sort')->setDecorators(array(
|
||||
array('ViewHelper'),
|
||||
array('Label')
|
||||
));
|
||||
$form->addElement('select', 'dir', array(
|
||||
'multiOptions' => array(
|
||||
'asc' => 'Asc',
|
||||
'desc' => 'Desc',
|
||||
),
|
||||
'style' => 'width: 5em',
|
||||
'autosubmit' => true
|
||||
));
|
||||
$sort = $form->getElement('sort')->setDecorators(array('ViewHelper'));
|
||||
$dir = $form->getElement('dir')->setDecorators(array('ViewHelper'));
|
||||
$form->addElement(
|
||||
'select',
|
||||
'dir',
|
||||
array(
|
||||
'autosubmit' => true,
|
||||
'multiOptions' => array(
|
||||
'asc' => 'Asc',
|
||||
'desc' => 'Desc',
|
||||
),
|
||||
'decorators' => array(
|
||||
array('ViewHelper')
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if ($this->request) {
|
||||
$form->populate($this->request->getParams());
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<div class="controls"></div>
|
||||
<div class="controls">
|
||||
<?= /** @var \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton(); ?>
|
||||
<h1><?= $this->translate('Available documentations'); ?></h1>
|
||||
</div>
|
||||
<div class="content">
|
||||
<ul>
|
||||
<li><?= $this->qlink(
|
||||
|
@ -6,6 +6,7 @@ use Icinga\Chart\Unit\LinearUnit;
|
||||
use Icinga\Chart\Unit\StaticAxis;
|
||||
use Icinga\Module\Monitoring\Controller;
|
||||
use Icinga\Module\Monitoring\Web\Widget\SelectBox;
|
||||
use Icinga\Web\Widget\Tabextension\DashboardAction;
|
||||
use Icinga\Web\Url;
|
||||
|
||||
class Monitoring_AlertsummaryController extends Controller
|
||||
@ -44,7 +45,7 @@ class Monitoring_AlertsummaryController extends Controller
|
||||
'label' => $this->translate('Alert Summary'),
|
||||
'url' => Url::fromRequest()
|
||||
)
|
||||
)->activate('alertsummary');
|
||||
)->extend(new DashboardAction())->activate('alertsummary');
|
||||
$this->view->title = $this->translate('Alert Summary');
|
||||
|
||||
$this->view->intervalBox = $this->createIntervalBox();
|
||||
@ -69,8 +70,10 @@ class Monitoring_AlertsummaryController extends Controller
|
||||
'notification_state'
|
||||
)
|
||||
);
|
||||
|
||||
$this->view->notifications = $query->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->notifications);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,11 +16,6 @@ use Icinga\Chart\Unit\LinearUnit;
|
||||
|
||||
class Monitoring_ChartController extends Controller
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
$this->view->compact = $this->_request->getParam('view') === 'compact';
|
||||
}
|
||||
|
||||
private function drawLogChart1()
|
||||
{
|
||||
$chart = new GridChart();
|
||||
|
@ -15,6 +15,7 @@ use Icinga\Module\Monitoring\Object\Host;
|
||||
use Icinga\Module\Monitoring\Object\HostList;
|
||||
use Icinga\Web\Url;
|
||||
use Icinga\Web\Widget\Chart\InlinePie;
|
||||
use Icinga\Web\Widget\Tabextension\DashboardAction;
|
||||
|
||||
class Monitoring_HostsController extends Controller
|
||||
{
|
||||
@ -26,7 +27,7 @@ class Monitoring_HostsController extends Controller
|
||||
public function init()
|
||||
{
|
||||
$hostList = new HostList($this->backend);
|
||||
$hostList->setFilter(Filter::fromQueryString((string) $this->params));
|
||||
$hostList->setFilter(Filter::fromQueryString((string) $this->params->without('view')));
|
||||
$this->hostList = $hostList;
|
||||
}
|
||||
|
||||
@ -80,7 +81,7 @@ class Monitoring_HostsController extends Controller
|
||||
'label' => $this->translate('Hosts'),
|
||||
'url' => Url::fromRequest()
|
||||
)
|
||||
)->activate('show');
|
||||
)->extend(new DashboardAction())->activate('show');
|
||||
$this->setAutorefreshInterval(15);
|
||||
$checkNowForm = new CheckNowCommandForm();
|
||||
$checkNowForm
|
||||
|
@ -21,11 +21,6 @@ class Monitoring_ListController extends Controller
|
||||
public function init()
|
||||
{
|
||||
$this->createTabs();
|
||||
$this->view->compact = $this->_request->getParam('view') === 'compact';
|
||||
if ($this->_request->getParam('view') === 'inline') {
|
||||
$this->view->compact = true;
|
||||
$this->view->inline = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -122,18 +117,8 @@ class Monitoring_ListController extends Controller
|
||||
'host_current_check_attempt',
|
||||
'host_max_check_attempts'
|
||||
), $this->extraColumns()));
|
||||
|
||||
$this->filterQuery($query);
|
||||
|
||||
$this->applyRestriction('monitoring/hosts/filter', $query);
|
||||
|
||||
$this->setupSortControl(array(
|
||||
'host_severity' => $this->translate('Severity'),
|
||||
'host_state' => $this->translate('Current State'),
|
||||
'host_display_name' => $this->translate('Hostname'),
|
||||
'host_address' => $this->translate('Address'),
|
||||
'host_last_check' => $this->translate('Last Check')
|
||||
));
|
||||
$this->view->hosts = $query->paginate();
|
||||
|
||||
$this->view->stats = $this->backend->select()->from('statusSummary', array(
|
||||
@ -147,6 +132,16 @@ class Monitoring_ListController extends Controller
|
||||
'hosts_unreachable_unhandled',
|
||||
'hosts_pending',
|
||||
))->getQuery()->fetchRow();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->hosts);
|
||||
$this->setupSortControl(array(
|
||||
'host_severity' => $this->translate('Severity'),
|
||||
'host_state' => $this->translate('Current State'),
|
||||
'host_display_name' => $this->translate('Hostname'),
|
||||
'host_address' => $this->translate('Address'),
|
||||
'host_last_check' => $this->translate('Last Check')
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -210,11 +205,12 @@ class Monitoring_ListController extends Controller
|
||||
'max_check_attempts' => 'service_max_check_attempts'
|
||||
), $this->extraColumns());
|
||||
$query = $this->backend->select()->from('serviceStatus', $columns);
|
||||
|
||||
$this->filterQuery($query);
|
||||
|
||||
$this->applyRestriction('monitoring/services/filter', $query);
|
||||
$this->view->services = $query->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->services);
|
||||
$this->setupSortControl(array(
|
||||
'service_severity' => $this->translate('Service Severity'),
|
||||
'service_state' => $this->translate('Current Service State'),
|
||||
@ -226,14 +222,6 @@ class Monitoring_ListController extends Controller
|
||||
'host_address' => $this->translate('Host Address'),
|
||||
'host_last_check' => $this->translate('Last Host Check')
|
||||
));
|
||||
$limit = $this->params->get('limit');
|
||||
$this->view->limit = $limit;
|
||||
if ($limit === 0) {
|
||||
$this->view->services = $query->getQuery()->fetchAll();
|
||||
} else {
|
||||
// TODO: Workaround, paginate should be able to fetch limit from new params
|
||||
$this->view->services = $query->paginate($this->params->get('limit'));
|
||||
}
|
||||
|
||||
$this->view->stats = $this->backend->select()->from('statusSummary', array(
|
||||
'services_total',
|
||||
@ -252,7 +240,6 @@ class Monitoring_ListController extends Controller
|
||||
'services_unknown_handled',
|
||||
'services_pending',
|
||||
))->getQuery()->fetchRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -263,8 +250,10 @@ class Monitoring_ListController extends Controller
|
||||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
|
||||
$this->addTitleTab('downtimes', $this->translate('Downtimes'), $this->translate('List downtimes'));
|
||||
$this->setAutorefreshInterval(12);
|
||||
|
||||
$query = $this->backend->select()->from('downtime', array(
|
||||
'id' => 'downtime_internal_id',
|
||||
'objecttype' => 'downtime_objecttype',
|
||||
@ -286,9 +275,11 @@ class Monitoring_ListController extends Controller
|
||||
'host_display_name',
|
||||
'service_display_name'
|
||||
));
|
||||
|
||||
$this->filterQuery($query);
|
||||
$this->view->downtimes = $query->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->downtimes);
|
||||
$this->setupSortControl(array(
|
||||
'downtime_is_in_effect' => $this->translate('Is In Effect'),
|
||||
'host_display_name' => $this->translate('Host'),
|
||||
@ -302,8 +293,6 @@ class Monitoring_ListController extends Controller
|
||||
'downtime_duration' => $this->translate('Duration')
|
||||
));
|
||||
|
||||
$this->view->downtimes = $query->paginate();
|
||||
|
||||
if ($this->Auth()->hasPermission('monitoring/command/downtime/delete')) {
|
||||
$this->view->delDowntimeForm = new DeleteDowntimeCommandForm();
|
||||
}
|
||||
@ -317,12 +306,14 @@ class Monitoring_ListController extends Controller
|
||||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
|
||||
$this->addTitleTab(
|
||||
'notifications',
|
||||
$this->translate('Notifications'),
|
||||
$this->translate('List notifications')
|
||||
);
|
||||
$this->setAutorefreshInterval(15);
|
||||
|
||||
$query = $this->backend->select()->from('notification', array(
|
||||
'host_name',
|
||||
'service_description',
|
||||
@ -335,6 +326,9 @@ class Monitoring_ListController extends Controller
|
||||
));
|
||||
$this->filterQuery($query);
|
||||
$this->view->notifications = $query->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->notifications);
|
||||
$this->setupSortControl(array(
|
||||
'notification_start_time' => $this->translate('Notification Start')
|
||||
));
|
||||
@ -345,7 +339,9 @@ class Monitoring_ListController extends Controller
|
||||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
|
||||
$this->addTitleTab('contacts', $this->translate('Contacts'), $this->translate('List contacts'));
|
||||
|
||||
$query = $this->backend->select()->from('contact', array(
|
||||
'contact_name',
|
||||
'contact_id',
|
||||
@ -369,6 +365,8 @@ class Monitoring_ListController extends Controller
|
||||
$this->filterQuery($query);
|
||||
$this->view->contacts = $query->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->contacts);
|
||||
$this->setupSortControl(array(
|
||||
'contact_name' => $this->translate('Name'),
|
||||
'contact_alias' => $this->translate('Alias'),
|
||||
@ -426,11 +424,13 @@ class Monitoring_ListController extends Controller
|
||||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
|
||||
$this->addTitleTab(
|
||||
'contactgroups',
|
||||
$this->translate('Contact Groups'),
|
||||
$this->translate('List contact groups')
|
||||
);
|
||||
|
||||
$query = $this->backend->select()->from('contactgroup', array(
|
||||
'contactgroup_name',
|
||||
'contactgroup_alias',
|
||||
@ -438,7 +438,7 @@ class Monitoring_ListController extends Controller
|
||||
'contact_alias',
|
||||
'contact_email',
|
||||
'contact_pager',
|
||||
))->order('contactgroup_alias');
|
||||
));
|
||||
$this->filterQuery($query);
|
||||
|
||||
// Fetch and prepare all contact groups:
|
||||
@ -455,6 +455,11 @@ class Monitoring_ListController extends Controller
|
||||
}
|
||||
// TODO: Find a better naming
|
||||
$this->view->groupData = $groupData;
|
||||
|
||||
$this->setupSortControl(array(
|
||||
'contactgroup_name' => $this->translate('Contactgroup Name'),
|
||||
'contactgroup_alias' => $this->translate('Contactgroup Alias')
|
||||
));
|
||||
}
|
||||
|
||||
public function commentsAction()
|
||||
@ -462,8 +467,10 @@ class Monitoring_ListController extends Controller
|
||||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
|
||||
$this->addTitleTab('comments', $this->translate('Comments'), $this->translate('List comments'));
|
||||
$this->setAutorefreshInterval(12);
|
||||
|
||||
$query = $this->backend->select()->from('comment', array(
|
||||
'id' => 'comment_internal_id',
|
||||
'objecttype' => 'comment_objecttype',
|
||||
@ -481,6 +488,8 @@ class Monitoring_ListController extends Controller
|
||||
$this->filterQuery($query);
|
||||
$this->view->comments = $query->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->comments);
|
||||
$this->setupSortControl(
|
||||
array(
|
||||
'comment_timestamp' => $this->translate('Comment Timestamp'),
|
||||
@ -501,12 +510,14 @@ class Monitoring_ListController extends Controller
|
||||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
|
||||
$this->addTitleTab(
|
||||
'servicegroups',
|
||||
$this->translate('Service Groups'),
|
||||
$this->translate('List service groups')
|
||||
);
|
||||
$this->setAutorefreshInterval(12);
|
||||
|
||||
$query = $this->backend->select()->from('groupsummary', array(
|
||||
'servicegroup_name',
|
||||
'servicegroup_alias',
|
||||
@ -538,6 +549,9 @@ class Monitoring_ListController extends Controller
|
||||
// service groups. We should separate them.
|
||||
$this->filterQuery($query);
|
||||
$this->view->servicegroups = $query->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->servicegroups);
|
||||
$this->setupSortControl(array(
|
||||
'services_severity' => $this->translate('Severity'),
|
||||
'servicegroup_alias' => $this->translate('Service Group Name'),
|
||||
@ -555,8 +569,10 @@ class Monitoring_ListController extends Controller
|
||||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
|
||||
$this->addTitleTab('hostgroups', $this->translate('Host Groups'), $this->translate('List host groups'));
|
||||
$this->setAutorefreshInterval(12);
|
||||
|
||||
$query = $this->backend->select()->from('groupsummary', array(
|
||||
'hostgroup_name',
|
||||
'hostgroup_alias',
|
||||
@ -588,6 +604,9 @@ class Monitoring_ListController extends Controller
|
||||
// service groups. We should separate them.
|
||||
$this->filterQuery($query);
|
||||
$this->view->hostgroups = $query->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->hostgroups);
|
||||
$this->setupSortControl(array(
|
||||
'services_severity' => $this->translate('Severity'),
|
||||
'hostgroup_alias' => $this->translate('Host Group Name'),
|
||||
@ -605,6 +624,7 @@ class Monitoring_ListController extends Controller
|
||||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
|
||||
$this->addTitleTab(
|
||||
'eventhistory',
|
||||
$this->translate('Event Overview'),
|
||||
@ -626,11 +646,13 @@ class Monitoring_ListController extends Controller
|
||||
));
|
||||
|
||||
$this->filterQuery($query);
|
||||
$this->view->history = $query->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->history);
|
||||
$this->setupSortControl(array(
|
||||
'timestamp' => $this->translate('Occurence')
|
||||
));
|
||||
$this->view->history = $query->paginate();
|
||||
}
|
||||
|
||||
public function servicegridAction()
|
||||
@ -667,7 +689,7 @@ class Monitoring_ListController extends Controller
|
||||
->handleRequest($this->getRequest());
|
||||
$query->applyFilter($editor->getFilter());
|
||||
|
||||
$this->view->filterEditor = $editor;
|
||||
$this->setupFilterControl($editor);
|
||||
$this->view->filter = $editor->getFilter();
|
||||
|
||||
if ($sort = $this->params->get('sort')) {
|
||||
@ -706,15 +728,6 @@ class Monitoring_ListController extends Controller
|
||||
*/
|
||||
private function createTabs()
|
||||
{
|
||||
$tabs = $this->getTabs();
|
||||
if (in_array($this->_request->getActionName(), array(
|
||||
'hosts',
|
||||
'services',
|
||||
'eventhistory',
|
||||
'eventgrid',
|
||||
'notifications'
|
||||
))) {
|
||||
$tabs->extend(new OutputFormat())->extend(new DashboardAction());
|
||||
}
|
||||
$this->getTabs()->extend(new OutputFormat())->extend(new DashboardAction());
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||
|
||||
use Icinga\Web\Widget\Tabextension\DashboardAction;
|
||||
use Icinga\Module\Monitoring\Controller;
|
||||
use Icinga\Module\Monitoring\Forms\Command\Instance\DisableNotificationsExpireCommandForm;
|
||||
use Icinga\Module\Monitoring\Forms\Command\Instance\ToggleInstanceFeaturesCommandForm;
|
||||
@ -29,7 +30,7 @@ class Monitoring_ProcessController extends Controller
|
||||
'label' => $this->translate('Monitoring Health'),
|
||||
'url' =>'monitoring/process/info'
|
||||
)
|
||||
);
|
||||
)->extend(new DashboardAction());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@ use Icinga\Module\Monitoring\Object\Service;
|
||||
use Icinga\Module\Monitoring\Object\ServiceList;
|
||||
use Icinga\Web\Url;
|
||||
use Icinga\Web\Widget\Chart\InlinePie;
|
||||
use Icinga\Web\Widget\Tabextension\DashboardAction;
|
||||
|
||||
class Monitoring_ServicesController extends Controller
|
||||
{
|
||||
@ -27,7 +28,9 @@ class Monitoring_ServicesController extends Controller
|
||||
public function init()
|
||||
{
|
||||
$serviceList = new ServiceList($this->backend);
|
||||
$serviceList->setFilter(Filter::fromQueryString((string) $this->params->without('service_problem', 'service_handled')));
|
||||
$serviceList->setFilter(Filter::fromQueryString(
|
||||
(string) $this->params->without(array('service_problem', 'service_handled', 'view'))
|
||||
));
|
||||
$this->serviceList = $serviceList;
|
||||
}
|
||||
|
||||
@ -101,7 +104,7 @@ class Monitoring_ServicesController extends Controller
|
||||
'label' => $this->translate('Services'),
|
||||
'url' => Url::fromRequest()
|
||||
)
|
||||
)->activate('show');
|
||||
)->extend(new DashboardAction())->activate('show');
|
||||
$this->setAutorefreshInterval(15);
|
||||
$checkNowForm = new CheckNowCommandForm();
|
||||
$checkNowForm
|
||||
|
@ -73,6 +73,9 @@ class Monitoring_ShowController extends Controller
|
||||
$this->view->history = $this->view->object->eventhistory->getQuery()->paginate($this->params->get('limit', 50));
|
||||
$this->handleFormatRequest($this->view->object->eventhistory);
|
||||
$this->fetchHostStats();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->history);
|
||||
}
|
||||
|
||||
public function servicesAction()
|
||||
@ -142,9 +145,7 @@ class Monitoring_ShowController extends Controller
|
||||
'contact_notify_host_flapping',
|
||||
'contact_notify_host_downtime',
|
||||
));
|
||||
|
||||
$query->where('contact_name', $contactName);
|
||||
|
||||
$contact = $query->getQuery()->fetchRow();
|
||||
|
||||
if ($contact) {
|
||||
@ -167,9 +168,9 @@ class Monitoring_ShowController extends Controller
|
||||
));
|
||||
|
||||
$notifications->where('contact_object_id', $contact->contact_object_id);
|
||||
|
||||
$this->view->compact = true;
|
||||
$this->view->notifications = $notifications->paginate();
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->notifications);
|
||||
}
|
||||
|
||||
$this->view->contact = $contact;
|
||||
|
@ -2,6 +2,7 @@
|
||||
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||
|
||||
use Icinga\Module\Monitoring\Controller as MonitoringController;
|
||||
use Icinga\Web\Widget\Tabextension\DashboardAction;
|
||||
use Icinga\Web\Url;
|
||||
|
||||
class Monitoring_TacticalController extends MonitoringController
|
||||
@ -18,7 +19,7 @@ class Monitoring_TacticalController extends MonitoringController
|
||||
'label' => $this->translate('Tactical Overview'),
|
||||
'url' => Url::fromRequest()
|
||||
)
|
||||
)->activate('tactical_overview');
|
||||
)->extend(new DashboardAction())->activate('tactical_overview');
|
||||
|
||||
$this->view->statusSummary = $this->backend->select()->from(
|
||||
'statusSummary',
|
||||
|
@ -10,6 +10,7 @@ use Icinga\Module\Monitoring\Controller;
|
||||
use Icinga\Module\Monitoring\Timeline\TimeLine;
|
||||
use Icinga\Module\Monitoring\Timeline\TimeRange;
|
||||
use Icinga\Module\Monitoring\Web\Widget\SelectBox;
|
||||
use Icinga\Web\Widget\Tabextension\DashboardAction;
|
||||
|
||||
class Monitoring_TimelineController extends Controller
|
||||
{
|
||||
@ -22,7 +23,7 @@ class Monitoring_TimelineController extends Controller
|
||||
'label' => $this->translate('Timeline'),
|
||||
'url' => Url::fromRequest()
|
||||
)
|
||||
)->activate('timeline');
|
||||
)->extend(new DashboardAction())->activate('timeline');
|
||||
$this->view->title = $this->translate('Timeline');
|
||||
|
||||
// TODO: filter for hard_states (precedence adjustments necessary!)
|
||||
|
@ -1,12 +1,13 @@
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div style="margin: 1em;" class="dontprint">
|
||||
<?= $this->tabs; ?>
|
||||
<div style="float: right;" class="dontprint">
|
||||
<?= $intervalBox; ?>
|
||||
</div>
|
||||
<?= $this->widget('limiter') ?>
|
||||
<?= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)) ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
</div>
|
||||
|
||||
<?php endif ?>
|
||||
<div class="content alertsummary">
|
||||
<!-- <h1><?= $this->translate('Alert summary'); ?></h1> -->
|
||||
|
||||
@ -59,8 +60,7 @@
|
||||
<div class="alertsummary-flex">
|
||||
<?= $this->partial('list/notifications.phtml', array(
|
||||
'notifications' => $this->recentAlerts,
|
||||
'compact' => true,
|
||||
'inline' => true
|
||||
'compact' => true
|
||||
)); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -71,8 +71,7 @@
|
||||
<div class="alertsummary-flex">
|
||||
<?= $this->partial('list/notifications.phtml', array(
|
||||
'notifications' => $this->notifications,
|
||||
'compact' => true,
|
||||
'inline' => true
|
||||
'compact' => true
|
||||
)); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,7 @@
|
||||
<div class="controls">
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?php endif ?>
|
||||
<?= $this->render('partials/host/object-header.phtml') ?>
|
||||
<?= $this->render('partials/host/servicesummary.phtml') ?>
|
||||
</div>
|
||||
|
@ -1,9 +1,12 @@
|
||||
<div class="controls">
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $tabs; ?>
|
||||
<?php endif ?>
|
||||
<?= $this->render('partials/host/objects-header.phtml'); ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php if (($hostCount = count($objects)) === 0): ?>
|
||||
<?= $this->translate('No hosts matching the filter'); ?>
|
||||
<?= $this->translate('No hosts found matching the filter'); ?>
|
||||
<?php else: ?>
|
||||
<h3><?= sprintf($this->translatePlural('%u Host', '%u Hosts', $hostCount), $hostCount); ?></h3>
|
||||
<div><?= $this->qlink(
|
||||
|
@ -1,20 +1,20 @@
|
||||
<?php if (false === $this->compact): ?>
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
<div style="margin: 1em" class="dontprint">
|
||||
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
|
||||
</div>
|
||||
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $comments->count())); ?>
|
||||
<?= $this->paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="content">
|
||||
<?php if (count($comments) === 0): ?>
|
||||
<?= $this->translate('No comments matching the filter'); ?>
|
||||
</div>
|
||||
<?php return; endif ?>
|
||||
<?php
|
||||
|
||||
if (count($comments) === 0) {
|
||||
echo $this->translate('No comments found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<table data-base-target="_next" class="action comments">
|
||||
<tbody>
|
||||
<?php foreach ($comments as $comment): ?>
|
||||
|
@ -1,17 +1,22 @@
|
||||
<?php if (!$this->compact): ?>
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<div class="boxview" data-base-target="_next">
|
||||
|
||||
<?php
|
||||
if (count($groupData) === 0) {
|
||||
echo mt('monitoring', 'No contacts matching the filter');
|
||||
}
|
||||
|
||||
foreach ($groupData as $groupName => $groupInfo): ?>
|
||||
if (count($groupData) === 0) {
|
||||
echo $this->translate('No contactgroups found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="boxview" data-base-target="_next">
|
||||
<?php foreach ($groupData as $groupName => $groupInfo): ?>
|
||||
<div class="box contactgroup">
|
||||
<h2><?= $groupInfo['alias']; ?></h2>
|
||||
<?php if ($groupInfo['alias'] !== $groupName): ?>
|
||||
|
@ -1,18 +1,21 @@
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div style="margin: 1em">
|
||||
<?= $this->sortControl->render($this); ?>
|
||||
</div>
|
||||
<?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
|
||||
<?php endif ?>
|
||||
<div data-base-target="_next" class="content contacts">
|
||||
<?php
|
||||
if (count($contacts) === 0) {
|
||||
echo $this->translate('No contacts matching the filter');
|
||||
return;
|
||||
}
|
||||
foreach ($contacts as $contact): ?>
|
||||
<?php
|
||||
|
||||
if (count($contacts) === 0) {
|
||||
echo $this->translate('No contacts found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<?php foreach ($contacts as $contact): ?>
|
||||
<div class="contact">
|
||||
<?= $this->img('/static/gravatar', array('email' => $contact->contact_email)); ?>
|
||||
<strong><?= $this->qlink(
|
||||
|
@ -1,30 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Icinga\Module\Monitoring\Object\Host;
|
||||
use Icinga\Module\Monitoring\Object\Service;
|
||||
|
||||
?>
|
||||
|
||||
<?php if (false === $this->compact): ?>
|
||||
if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
<div style="margin: 1em" class="dontprint">
|
||||
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
|
||||
<?php if (! $this->filterEditor): ?>
|
||||
<?= $this->filterPreview ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $downtimes->count())); ?>
|
||||
<?= $this->paginationControl($downtimes, null, null, array('preserve' => $this->preserve)); ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="content">
|
||||
<?= $this->filterEditor ?>
|
||||
<?php if (count($downtimes) === 0): ?>
|
||||
<?= $this->translate('No active downtimes'); ?>
|
||||
</div>
|
||||
<?php return; endif ?>
|
||||
<?php
|
||||
|
||||
if (count($downtimes) === 0) {
|
||||
echo $this->translate('No downtimes found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<table data-base-target="_next" class="action">
|
||||
<tbody>
|
||||
|
@ -1,21 +1,25 @@
|
||||
<?php
|
||||
use Icinga\Data\Filter\Filter;
|
||||
use Icinga\Web\Widget\Chart\HistoryColorGrid;
|
||||
?>
|
||||
|
||||
|
||||
<? if (! $compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs->render($this); ?>
|
||||
<div class="fake-controls">
|
||||
<?= $form ?>
|
||||
</div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
|
||||
if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
<?= $form; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<div class="content" data-base-target="_next">
|
||||
<?php
|
||||
|
||||
if (count($summary) === 0) {
|
||||
echo $this->translate('No state changes in the selected time period.') . '</div>';
|
||||
return;
|
||||
}
|
||||
|
||||
$settings = array(
|
||||
'cnt_up' => array(
|
||||
'tooltip' => $this->translate('%d hosts ok on %s'),
|
||||
@ -63,11 +67,8 @@ $to = intval($form->getValue('to', time()));
|
||||
if ($to - $from > 315360000) {
|
||||
$from = $to - 315360000;
|
||||
}
|
||||
$data = array();
|
||||
|
||||
if (count($summary) === 0) {
|
||||
echo $this->translate('No state changes in the selected time period.');
|
||||
}
|
||||
$data = array();
|
||||
foreach ($summary as $entry) {
|
||||
$day = $entry->day;
|
||||
$value = $entry->$column;
|
||||
|
@ -1,32 +1,23 @@
|
||||
<?php
|
||||
|
||||
use Icinga\Module\Monitoring\Object\Host;
|
||||
use Icinga\Module\Monitoring\Object\Service;
|
||||
|
||||
?>
|
||||
|
||||
<?php if (false === $this->compact): ?>
|
||||
if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div style="margin: 1em" class="dontprint">
|
||||
<div style="float: right">
|
||||
<?= $this->translate('Sort by') ?> <?= $this->sortControl ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $this->history->count())); ?>
|
||||
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
|
||||
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="content">
|
||||
<?= $this->filterEditor ?>
|
||||
<?php if (count($history) === 0): ?>
|
||||
<?= $this->translate('No history events matching the filter') ?>
|
||||
</div>
|
||||
<?php return; endif ?>
|
||||
|
||||
<?php
|
||||
if (count($history) === 0) {
|
||||
echo $this->translate('No history events found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<table data-base-target="_next" class="action">
|
||||
<tbody>
|
||||
<?php foreach ($history as $event): ?>
|
||||
|
@ -1,24 +1,20 @@
|
||||
<?php if ($this->compact): ?>
|
||||
<div class="content">
|
||||
<?php else: ?>
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div style="margin: 1em;" class="dontprint">
|
||||
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
|
||||
</div>
|
||||
<?= $this->widget('limiter')->setMaxLimit(count($hostgroups)); ?>
|
||||
<?= $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
if (count($hostgroups) === 0) {
|
||||
echo $this->translate('No host groups matching the filter');
|
||||
echo '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="content">
|
||||
<?php
|
||||
|
||||
if (count($hostgroups) === 0) {
|
||||
echo $this->translate('No hostgroups found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<table class="groupview" data-base-target="_next">
|
||||
<thead>
|
||||
<th><?= $this->translate('Last Problem'); ?></th>
|
||||
|
@ -1,33 +1,25 @@
|
||||
<?php
|
||||
use Icinga\Module\Monitoring\Object\Host;
|
||||
|
||||
if ($this->compact): ?>
|
||||
<div class="content">
|
||||
<?php else: ?>
|
||||
if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div style="margin: 1em;" class="dontprint">
|
||||
<?= $this->render('list/components/selectioninfo.phtml') ?>
|
||||
<?= $this->render('list/components/hostssummary.phtml') ?>
|
||||
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this) ?>
|
||||
<?= $this->tabs; ?>
|
||||
<div class="dontprint">
|
||||
<?= $this->render('list/components/selectioninfo.phtml'); ?>
|
||||
<?= $this->render('list/components/hostssummary.phtml'); ?>
|
||||
</div>
|
||||
|
||||
<?= $this->widget('limiter')->setMaxLimit($this->hosts->count()) ?>
|
||||
<?= $this->paginationControl($hosts, null, null, array('preserve' => $this->preserve)) ?>
|
||||
<?= $this->selectionToolbar('multi', $this->href('monitoring/hosts/show?' . $this->filter->toQueryString())) ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->selectionToolbar('multi', $this->href('monitoring/hosts/show?' . $this->filter->toQueryString())); ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<?= $this->filterEditor ?>
|
||||
<?php
|
||||
|
||||
endif;
|
||||
|
||||
if ($hosts->count() === 0) {
|
||||
echo $this->translate('No hosts matching the filter');
|
||||
if (! $this->compact) {
|
||||
echo '</div>';
|
||||
}
|
||||
if (count($hosts) === 0) {
|
||||
echo $this->translate('No hosts found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
@ -1,26 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Icinga\Module\Monitoring\Object\Host;
|
||||
use Icinga\Module\Monitoring\Object\Service;
|
||||
|
||||
?>
|
||||
|
||||
<?php if (! $this->compact): ?>
|
||||
if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div class="dontprint" style="margin: 1em;">
|
||||
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this) ?>
|
||||
</div>
|
||||
<?= $this->widget('limiter') ?>
|
||||
<?= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)) ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="content">
|
||||
<?php if (count($notifications) === 0): ?>
|
||||
<?= $this->translate('No notifications matching the filter') ?>
|
||||
<?php return; endif ?>
|
||||
<?php
|
||||
|
||||
if (count($notifications) === 0) {
|
||||
echo $this->translate('No notifications found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<table data-base-target="_next" class="action">
|
||||
<tbody>
|
||||
<?php foreach ($notifications as $notification):
|
||||
|
@ -1,28 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Icinga\Module\Monitoring\Object\Service;
|
||||
|
||||
?>
|
||||
<?php if (!$this->compact): ?>
|
||||
if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs; ?>
|
||||
<div style="margin: 1em;" class="dontprint">
|
||||
<?= $this->translate('Sort by'); ?> <?= $this->sortControl; ?>
|
||||
</div>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<div class="content" data-base-target="_next">
|
||||
<table class="pivot servicestates">
|
||||
<?php
|
||||
|
||||
$hasHeader = false;
|
||||
$pivotData = $this->pivot->toArray();
|
||||
if (count($pivotData) === 0) {
|
||||
echo $this->translate('No services found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
|
||||
$hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ')';
|
||||
?>
|
||||
|
||||
<?php if (count($pivotData) === 0): ?>
|
||||
<?= $this->translate('No Services matching the filter'); ?>
|
||||
<?php endif ?>
|
||||
|
||||
<table class="pivot servicestates">
|
||||
<?php foreach ($pivotData as $host_name => $serviceStates): ?>
|
||||
<?php if (!$hasHeader): ?>
|
||||
<thead>
|
||||
|
@ -1,24 +1,20 @@
|
||||
<?php if ($this->compact): ?>
|
||||
<div class="content">
|
||||
<?php else: ?>
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div style="margin: 1em;" class="dontprint">
|
||||
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
|
||||
</div>
|
||||
<?= $this->widget('limiter')->setMaxLimit(count($servicegroups)); ?>
|
||||
<?= $this->paginationControl($servicegroups, null, null, array('preserve' => $this->preserve)); ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
if (count($servicegroups) === 0) {
|
||||
echo $this->translate('No service groups matching the filter');
|
||||
echo '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="content">
|
||||
<?php
|
||||
|
||||
if (count($servicegroups) === 0) {
|
||||
echo $this->translate('No servicegroups found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<table class="groupview" data-base-target="_next">
|
||||
<thead>
|
||||
<th><?= $this->translate('Last Problem'); ?></th>
|
||||
|
@ -4,41 +4,33 @@ use Icinga\Module\Monitoring\Object\Service;
|
||||
|
||||
$selfUrl = 'monitoring/list/services';
|
||||
|
||||
if (!$this->compact): ?>
|
||||
if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div style="margin: 1em;" class="dontprint">
|
||||
<?= $this->render('list/components/selectioninfo.phtml') ?>
|
||||
<?= $this->render('list/components/servicesummary.phtml') ?>
|
||||
<div style="float: right">
|
||||
<?= $this->translate('Sort by') ?> <?= $this->sortControl ?>
|
||||
<?= $this->tabs; ?>
|
||||
<div class="dontprint">
|
||||
<?= $this->render('list/components/selectioninfo.phtml'); ?>
|
||||
<?= $this->render('list/components/servicesummary.phtml'); ?>
|
||||
</div>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($this->limit === 0): ?>
|
||||
<?= $this->widget('limiter') ?>
|
||||
<?php else: ?>
|
||||
<?= $this->widget('limiter')->setCurrentPageCount($this->services->count()) ?>
|
||||
<?= $this->paginationControl($services, null, null, array('preserve' => $this->preserve)) ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<?= $this->filterEditor ?>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
|
||||
<div class="content">
|
||||
<?php endif ?>
|
||||
if (count($services) === 0) {
|
||||
echo $this->translate('No services found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<table data-base-target="_next"
|
||||
class="action multiselect <?php if ($this->compact): ?> compact<?php endif ?>" style="table-layout: auto;"
|
||||
data-icinga-multiselect-url="<?= $this->href("monitoring/services/show") ?>"
|
||||
data-icinga-multiselect-data="service_description,host_name">
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if (count($services) === 0) {
|
||||
echo mt('monitoring', 'No services matching the filter');
|
||||
}
|
||||
foreach ($services as $service):
|
||||
<?php foreach ($services as $service):
|
||||
$serviceLink = $this->href(
|
||||
'monitoring/service/show',
|
||||
array(
|
||||
|
@ -1,11 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Icinga\Module\Monitoring\Object\Host;
|
||||
|
||||
?>
|
||||
<?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">
|
||||
|
@ -1,6 +1,3 @@
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $tabs; ?>
|
||||
<?php endif ?>
|
||||
<?php if (($hostCount = count($objects)) > 0): ?>
|
||||
<div class="hbox-item">
|
||||
<strong><?= sprintf($this->translatePlural('Host (%u)', 'Hosts (%u)', $hostCount), $hostCount); ?></strong>
|
||||
|
@ -1,12 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Icinga\Module\Monitoring\Object\Host;
|
||||
use Icinga\Module\Monitoring\Object\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">
|
||||
|
@ -1,6 +1,3 @@
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $tabs; ?>
|
||||
<?php endif ?>
|
||||
<?php if (($serviceCount = count($objects)) > 0): ?>
|
||||
<div class="hbox">
|
||||
<div class="hbox-item" style="width: 6em;">
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs->showOnlyCloseButton() ?>
|
||||
<?= $this->tabs->showOnlyCloseButton(); ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<h1><?= $title; ?></h1>
|
||||
<?php if ((bool) $programStatus->notifications_enabled === false): ?>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
$rv = $this->runtimeVariables()->create($this->runtimevariables);
|
||||
$cp = $this->checkPerformance()->create($this->checkperformance);
|
||||
|
||||
?>
|
||||
if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<?= $this->tabs; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="content processinfo">
|
||||
<div class="boxview">
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<?= $this->tabs; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<?= sprintf($this->translate('%s is currently not up and running'), $this->backendName) ?>
|
||||
</div>
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<?= $this->tabs; ?>
|
||||
</div>
|
||||
<?php
|
||||
<?php endif;
|
||||
|
||||
$rv = $this->runtimeVariables()->create($this->runtimevariables);
|
||||
$cp = $this->checkPerformance()->create($this->checkperformance);
|
||||
|
@ -1,4 +1,7 @@
|
||||
<div class="controls">
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?php endif ?>
|
||||
<?= $this->render('partials/service/object-header.phtml') ?>
|
||||
<h1><?= $this->translate("Service detail information") ?></h1>
|
||||
</div>
|
||||
|
@ -1,9 +1,12 @@
|
||||
<div class="controls">
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $tabs; ?>
|
||||
<?php endif ?>
|
||||
<?= $this->render('partials/service/objects-header.phtml'); ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php if (($serviceCount = count($objects)) === 0): ?>
|
||||
<?= $this->translate('No services matching the filter'); ?>
|
||||
<?= $this->translate('No services found matching the filter'); ?>
|
||||
<?php else: ?>
|
||||
<h3><?= sprintf($this->translatePlural('%u Service', '%u Services', $serviceCount), $serviceCount); ?></h3>
|
||||
<div><?= $this->qlink(
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php $contactHelper = $this->getHelper('ContactFlags') ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?php endif ?>
|
||||
<h1><?= $this->translate('Contact details') ?></h1>
|
||||
<div class="circular" style="background-image: url('<?=
|
||||
$this->href('static/gravatar', array('email' => $contact->contact_email))
|
||||
@ -54,10 +56,15 @@
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<h1><?= $this->translate('Notifications sent to this contact') ?></h1>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
</div>
|
||||
|
||||
<?php if (count($notifications)): ?>
|
||||
<?= $this->render('list/notifications.phtml') ?>
|
||||
<?= $this->partial('list/notifications.phtml', array(
|
||||
'notifications' => $notifications,
|
||||
'compact' => true
|
||||
)); ?>
|
||||
<?php else: ?>
|
||||
<div class="content"><?= $this->translate('No notifications have been sent for this contact') ?></div>
|
||||
<?php endif ?>
|
||||
|
@ -1,29 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Icinga\Module\Monitoring\Object\Host;
|
||||
use Icinga\Module\Monitoring\Object\Service;
|
||||
|
||||
$self = $this;
|
||||
$hostContext = $object->getType() === 'host';
|
||||
|
||||
?>
|
||||
|
||||
if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?php if ($hostContext): ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?php if ($hostContext): ?>
|
||||
<?= $this->render('partials/host/object-header.phtml'); ?>
|
||||
<?php else: ?>
|
||||
<?php else: ?>
|
||||
<?= $this->render('partials/service/object-header.phtml'); ?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<h1><?= $this->translate('This Object\'s Event History'); ?></h1>
|
||||
<?= $this->widget('limiter', array('url' => $url, 'max' => $history->count())); ?>
|
||||
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<?php if (count($history) === 0): ?>
|
||||
<?= $this->translate('No history available for this object'); ?>
|
||||
</div>
|
||||
<?php return; endif ?>
|
||||
<?php
|
||||
|
||||
if (count($history) === 0) {
|
||||
echo $this->translate('No history available for this object') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
function contactsLink($match, $view) {
|
||||
|
@ -1,4 +1,7 @@
|
||||
<div class="controls">
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?php endif ?>
|
||||
<?= $this->render('partials/host/object-header.phtml') ?>
|
||||
<?= $this->render('partials/host/servicesummary.phtml') ?>
|
||||
</div>
|
||||
|
@ -3,13 +3,12 @@ use Icinga\Web\Url;
|
||||
use Icinga\Util\Color;
|
||||
|
||||
$groupInfo = $timeline->getGroupInfo();
|
||||
$firstRow = !$beingExtended;
|
||||
$firstRow = ! $beingExtended;
|
||||
|
||||
?>
|
||||
<?php if (!$beingExtended): ?>
|
||||
if (! $beingExtended && !$this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div style="margin: 1em;" class="dontprint">
|
||||
<?= $this->tabs; ?>
|
||||
<div style="float: right;" class="dontprint">
|
||||
<?= $intervalBox; ?>
|
||||
</div>
|
||||
<div style="margin: 1em;" class="timeline-legend">
|
||||
@ -21,6 +20,8 @@ $firstRow = !$beingExtended;
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if (! $beingExtended): ?>
|
||||
<div class="content" data-base-target="_next">
|
||||
<div class="timeline">
|
||||
<?php endif ?>
|
||||
|
@ -21,16 +21,6 @@ class Controller extends IcingaWebController
|
||||
*/
|
||||
protected $backend;
|
||||
|
||||
/**
|
||||
* Compact layout name
|
||||
*
|
||||
* Set to a string containing the compact layout name to use when
|
||||
* 'compact' is set as the layout parameter, otherwise null
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $compactView;
|
||||
|
||||
protected function moduleInit()
|
||||
{
|
||||
$this->backend = Backend::createBackend($this->_getParam('backend'));
|
||||
@ -39,10 +29,6 @@ class Controller extends IcingaWebController
|
||||
|
||||
protected function handleFormatRequest($query)
|
||||
{
|
||||
if ($this->compactView !== null && ($this->_getParam('view', false) === 'compact')) {
|
||||
$this->_helper->viewRenderer($this->compactView);
|
||||
}
|
||||
|
||||
if ($this->_getParam('format') === 'sql') {
|
||||
echo '<pre>'
|
||||
. htmlspecialchars(wordwrap($query->dump()))
|
||||
|
@ -94,11 +94,14 @@ div.contacts div.notification-periods {
|
||||
div.tinystatesummary {
|
||||
.page-header();
|
||||
font-size: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
|
||||
.badges {
|
||||
display: inline-block;
|
||||
margin-bottom: 4px;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.state > a {
|
||||
color: white;
|
||||
font-size: 0.8em;
|
||||
|
@ -44,7 +44,8 @@
|
||||
/**
|
||||
* Prepare the timer to handle the timeline's infinite loading
|
||||
*/
|
||||
if ($('div.timeline').length) {
|
||||
var $timeline = $('div.timeline');
|
||||
if ($timeline.length && !$timeline.closest('.dashboard').length) {
|
||||
if (this.scrollCheckTimer === null) {
|
||||
this.scrollCheckTimer = this.module.icinga.timer.register(
|
||||
this.checkTimelinePosition,
|
||||
|
21
public/css/icinga/controls.less
Normal file
21
public/css/icinga/controls.less
Normal file
@ -0,0 +1,21 @@
|
||||
/*! Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||
|
||||
form.sort-control {
|
||||
.dontprint;
|
||||
float: right;
|
||||
|
||||
label {
|
||||
width: auto;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
select[name=sort] {
|
||||
width: 12em;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
select[name=dir] {
|
||||
width: 5em;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
@ -119,12 +119,12 @@ html {
|
||||
.container .controls {
|
||||
top: 0;
|
||||
background-color: white;
|
||||
padding: 0;
|
||||
padding: 1em 1em 0;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.container .fake-controls {
|
||||
padding: 0;
|
||||
padding: 1em 1em 0;
|
||||
}
|
||||
|
||||
.container .controls .pagination {
|
||||
@ -149,10 +149,6 @@ html {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.container .controls > * {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.container .controls .pagination {
|
||||
margin-left: 1.2em;
|
||||
}
|
||||
@ -167,7 +163,7 @@ html {
|
||||
}
|
||||
|
||||
.dashboard .controls {
|
||||
display: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Not growing larger than 3840px at 1em=16px right now */
|
||||
|
@ -118,7 +118,6 @@ table.avp a:hover {
|
||||
|
||||
/* Definitively monitoring-only: */
|
||||
table.objectstate {
|
||||
margin: 1em;
|
||||
border-collapse: separate;
|
||||
border-spacing: 1px;
|
||||
}
|
||||
@ -194,11 +193,6 @@ table.benchmark {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* controls have no padding as of tabs */
|
||||
.controls > h1 {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
@ -814,6 +814,10 @@ div.timeline {
|
||||
|
||||
/* Monitoring groupsummary styles */
|
||||
|
||||
.dashboard table.groupview {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
table.groupview {
|
||||
width: 100%;
|
||||
margin-top: 1em;
|
||||
|
@ -1,12 +1,13 @@
|
||||
/*! Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||
|
||||
ul.tabs {
|
||||
padding: 1em 0 0 0;
|
||||
padding: 0;
|
||||
list-style-type: inside;
|
||||
}
|
||||
|
||||
.controls ul.tabs {
|
||||
margin-left: 0em;
|
||||
margin-left: -1em;
|
||||
margin-right: -1em;
|
||||
margin-top: -3.54em;
|
||||
height: 2.6em;
|
||||
overflow: hidden;
|
||||
|
@ -48,8 +48,22 @@ table.multiselect tr[href] td {
|
||||
-ms-user-select: none;
|
||||
}
|
||||
|
||||
#main form.filterEditor input[type=text], #main form.filterEditor select {
|
||||
width: 12em;
|
||||
#main div.filter {
|
||||
margin-top: 1em;
|
||||
|
||||
form.editor {
|
||||
input[type=text], select {
|
||||
width: 12em;
|
||||
}
|
||||
|
||||
ul.tree li.active {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
div.buttons {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul.datafilter li {
|
||||
@ -281,10 +295,6 @@ li li .badge {
|
||||
background-color: @colorUnknown;
|
||||
}
|
||||
|
||||
.widgetFilter li.active {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.sparkline-box {
|
||||
position: relative;
|
||||
top: -3px;
|
||||
|
@ -760,12 +760,8 @@
|
||||
// $container.html(content);
|
||||
|
||||
} else {
|
||||
if ($container.closest('.dashboard').length
|
||||
) {
|
||||
if (! $('h1', $content).length) {
|
||||
var title = $('h1', $container).first().detach();
|
||||
$('h1', $content).first().detach();
|
||||
}
|
||||
if ($container.closest('.dashboard').length) {
|
||||
var title = $('h1', $container).first().detach();
|
||||
$container.html(title).append(content);
|
||||
} else if (action === 'replace') {
|
||||
$container.html(content);
|
||||
|
@ -716,8 +716,6 @@
|
||||
},
|
||||
|
||||
initializeControls: function (parent) {
|
||||
|
||||
var self = this;
|
||||
if ($(parent).closest('.dashboard').length) {
|
||||
return;
|
||||
}
|
||||
@ -747,7 +745,6 @@
|
||||
},
|
||||
|
||||
fixControls: function ($parent) {
|
||||
|
||||
var self = this;
|
||||
|
||||
if ('undefined' === typeof $parent) {
|
||||
@ -773,6 +770,11 @@
|
||||
|
||||
$('.controls', $parent).each(function (idx, el) {
|
||||
var $el = $(el);
|
||||
|
||||
if ($el.closest('.dashboard').length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $fake = $el.next('.fake-controls');
|
||||
var y = $parent.scrollTop();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user