diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index 2f222de84..24f74986f 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -43,7 +43,7 @@ class IndexController extends ActionController public function preDispatch() { if ($this->getRequest()->getActionName() !== 'welcome') { - $this->redirect('index/welcome'); + $this->redirect('dashboard/index'); } } diff --git a/library/Icinga/Web/Widget/Dashboard/Component.php b/library/Icinga/Web/Widget/Dashboard/Component.php index 1712d3682..6ca0370fb 100644 --- a/library/Icinga/Web/Widget/Dashboard/Component.php +++ b/library/Icinga/Web/Widget/Dashboard/Component.php @@ -52,6 +52,13 @@ class Component implements Widget */ private $url; + /** + * Determines whether this spans a complete row + * + * @var bool + */ + private $fullsize = false; + /** * The title being displayed on top of the component * @var @@ -85,7 +92,7 @@ class Component implements Widget */ private $template =<<<'EOD' -
+

{TITLE}

{REMOVE_BTN}
@@ -205,6 +212,7 @@ EOD; $html = str_replace('{FULL_URL}', $url->getUrlWithout('view')->getAbsoluteUrl(), $html); $html = str_replace('{REMOVE_BTN}', $this->getRemoveForm($view), $html); $html = str_replace('{DIMENSION}', $this->getBoxSizeAsCSS(), $html); + $html = str_replace('{{IS_FULL}}', $this->fullsize ? 'row' : '' , $html); $html = str_replace('{TITLE}', htmlentities($this->getTitle()), $html); return $html; } @@ -238,6 +246,11 @@ EOD; return $form->render($view); } + public function setFullsize($bool) + { + $this->fullsize = $bool; + } + /** * Return the height and width deifnition (if given) in CSS format * @@ -283,6 +296,9 @@ EOD; } $cmp = new Component($title, Url::fromPath($url, $parameters), $pane); + if (isset($parameters['row'])) { + $cmp->setFullsize(true); + } $cmp->setHeight($height); $cmp->setWidth($width); return $cmp; diff --git a/modules/monitoring/application/views/scripts/chart/hostgroup.phtml b/modules/monitoring/application/views/scripts/chart/hostgroup.phtml index ad8a21ab0..4ad5f61dc 100644 --- a/modules/monitoring/application/views/scripts/chart/hostgroup.phtml +++ b/modules/monitoring/application/views/scripts/chart/hostgroup.phtml @@ -1,5 +1,5 @@ -
+
render(); ?> diff --git a/modules/monitoring/public/css/main.less b/modules/monitoring/public/css/main.less index 3582dde32..0013e3692 100644 --- a/modules/monitoring/public/css/main.less +++ b/modules/monitoring/public/css/main.less @@ -88,32 +88,32 @@ ========================================================================== */ .status-up { - background-color: @colorUp; + background-color: @colorUp!important; } .status-warning { - background-color: @colorWarning; + background-color: @colorWarning!important; } .status-critical { - background-color: @colorCritical; + background-color: @colorCritical!important; } .status-unknown { - background-color: @colorUnknown; + background-color: @colorUnknown!important; } .status-pending { - background-color: @colorPending; + background-color: @colorPending!important; } /** Service status **/ .tacheader-status-pending { - background-color: @colorPending; + background-color: @colorPending!important; } .tacheader-status-critical { - background-color: @colorCritical; + background-color: @colorCritical!important; } .tacheader-status-ok { @@ -121,21 +121,21 @@ } .tacheader-status-warning { - background-color: @colorWarning; + background-color: @colorWarning!important; } .tacheader-status-unknown { - background-color: @colorUnknown; + background-color: @colorUnknown!important; } /** Host status **/ .tacheader-status-unreachable { - background-color: @colorUnreachable; + background-color: @colorUnreachable!important; } .tacheader-status-down { - background-color: @colorDown; + background-color: @colorDown!important; } .tacheader-status-up { diff --git a/public/css/icinga/main.less b/public/css/icinga/main.less index f6ce0bf18..9a82bc302 100644 --- a/public/css/icinga/main.less +++ b/public/css/icinga/main.less @@ -466,3 +466,8 @@ select.input-sm { padding:1%; margin:1%; } + +.dashboard-component.row { + width:98%; +} + diff --git a/public/js/icinga/components/mainDetailGrid.js b/public/js/icinga/components/mainDetailGrid.js index 5596ceea0..98053698b 100644 --- a/public/js/icinga/components/mainDetailGrid.js +++ b/public/js/icinga/components/mainDetailGrid.js @@ -213,7 +213,7 @@ function(Container, $, logger, URI, tpl, urlMgr, Selectable, TableMultiSelection } break; - case 'none': + default: // don't open the link return; } @@ -332,7 +332,8 @@ function(Container, $, logger, URI, tpl, urlMgr, Selectable, TableMultiSelection this.initRowSelection(); this.registerControls(); }; - - this.construct(gridDomNode); + if (typeof $(gridDomNode).attr('id') === 'undefined') { + this.construct(gridDomNode); + } }; });