diff --git a/application/views/scripts/joystickPagination.phtml b/application/views/scripts/joystickPagination.phtml new file mode 100644 index 000000000..371fdf72e --- /dev/null +++ b/application/views/scripts/joystickPagination.phtml @@ -0,0 +1,99 @@ +count() <= 1 && $yAxisPaginator->count() <= 1) { + return; // Display this pagination only if there are multiple pages +} + +$fromTo = t('%s: %d to %d of %d'); +$xAxisPages = $xAxisPaginator->getPages('all'); +$yAxisPages = $yAxisPaginator->getPages('all'); + +$totalYAxisPages = $yAxisPaginator->count(); +$currentYAxisPage = $yAxisPaginator->getCurrentPageNumber(); +$prevYAxisPage = $currentYAxisPage > 1 ? $currentYAxisPage - 1 : null; +$nextYAxisPage = $currentYAxisPage < $totalYAxisPages ? $currentYAxisPage + 1 : null; + +$totalXAxisPages = $xAxisPaginator->count(); +$currentXAxisPage = $xAxisPaginator->getCurrentPageNumber(); +$prevXAxisPage = $currentXAxisPage > 1 ? $currentXAxisPage - 1 : null; +$nextXAxisPage = $currentXAxisPage < $totalXAxisPages ? $currentXAxisPage + 1 : null; + +?> + + + + + + + + + + + + + + + + + + + +
  + + icon('up_petrol.png'); ?> + + icon('up.png'); ?> + +  
+ + icon('prev_petrol.png'); ?> + + icon('prev.png'); ?> + +   + + icon('next_petrol.png'); ?> + + icon('next.png'); ?> + +
  + + icon('down_petrol.png'); ?> + + icon('down.png'); ?> + +  
\ No newline at end of file diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 8c9906def..b60ae0a31 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -572,12 +572,12 @@ class Monitoring_ListController extends Controller $this->view->history = $query->paginate(); } - public function servicematrixAction() + public function servicegridAction() { if ($url = $this->hasBetterUrl()) { return $this->redirectNow($url); } - $this->addTitleTab('servicematrix'); + $this->addTitleTab('servicegrid', $this->translate('Service Grid')); $this->setAutorefreshInterval(15); $query = $this->backend->select()->from('serviceStatus', array( 'host_name', diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml new file mode 100644 index 000000000..2bbfb343f --- /dev/null +++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml @@ -0,0 +1,77 @@ +compact): ?> +
+ tabs; ?> +
+ translate('Sort by'); ?> sortControl; ?> +
+
+ +
+ +pivot->toArray(); +$hostFilter = '(' . implode('|', array_keys($pivotData)) . ')'; +?> + + + translate('No Services matching the filter'); ?> + + + $serviceStates): ?> + + + + + + + + + + + + + + + + + + + + + + +
partial( + 'joystickPagination.phtml', + 'default', + array( + 'xAxisPaginator' => $horizontalPaginator, + 'yAxisPaginator' => $verticalPaginator + ) + ); ?> + +
+ + + + ·
+
diff --git a/modules/monitoring/application/views/scripts/list/servicematrix.phtml b/modules/monitoring/application/views/scripts/list/servicematrix.phtml deleted file mode 100644 index 62676a2d2..000000000 --- a/modules/monitoring/application/views/scripts/list/servicematrix.phtml +++ /dev/null @@ -1,84 +0,0 @@ -compact): ?> -
- tabs; ?> -
- translate('Sort by') ?> sortControl ?> -
- partial( - 'pivottablePagination.phtml', - 'default', - array( - 'xAxisPaginator' => $this->horizontalPaginator, - 'yAxisPaginator' => $this->verticalPaginator - ) - ); ?> -
- -
- -pivot->toArray(); -$hostFilter = '(' . implode('|', array_keys($pivotData)) . ')'; -?> - - - translate('No Services matching the filter'); ?> - - - $serviceStates): ?> - - - - - - - - - - - - - - - - - - - - - - - -
  - -
- - - - ·
-
diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index edcd37a24..d6d8ed676 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -74,8 +74,8 @@ $section->add($this->translate('Services'), array( 'url' => 'monitoring/list/services', 'priority' => 50 )); -$section->add($this->translate('Servicematrix'), array( - 'url' => 'monitoring/list/servicematrix?service_problem=1', +$section->add($this->translate('Service Grid'), array( + 'url' => 'monitoring/list/servicegrid?service_problem=1', 'priority' => 51 )); $section->add($this->translate('Servicegroups'), array( diff --git a/public/css/icinga/monitoring-colors.less b/public/css/icinga/monitoring-colors.less index c7a1c7054..e1d764e72 100644 --- a/public/css/icinga/monitoring-colors.less +++ b/public/css/icinga/monitoring-colors.less @@ -581,6 +581,15 @@ div.pivot-pagination { } } +table.joystick-pagination { + margin-bottom: -1em; + + td { + width: 1.25em; + height: 1.3em; + } +} + table.pivot { a { text-decoration: none; @@ -591,7 +600,7 @@ table.pivot { } } - thead { + & > thead { th { height: 6em; @@ -629,7 +638,7 @@ table.pivot { } } - tbody { + & > tbody { th { padding: 0 14px 0 0; white-space: nowrap;