parent
151f058286
commit
20b43a92f1
|
@ -143,7 +143,7 @@ class DashboardController extends ActionController
|
|||
$dashboard->activate($pane);
|
||||
}
|
||||
|
||||
$this->view->configPath = IcingaConfig::$configDir . DIRECTORY_SEPARATOR . self::DEFAULT_CONFIG;
|
||||
$this->view->configPath = IcingaConfig::resolvePath(self::DEFAULT_CONFIG);
|
||||
|
||||
if ($dashboard === null) {
|
||||
$this->view->title = 'Dashboard';
|
||||
|
|
|
@ -9,11 +9,13 @@
|
|||
<div class="content">
|
||||
<h1>No dashboard configuration found!</h1>
|
||||
<p>
|
||||
We tried to load a dashboard configuration with no success.
|
||||
Please have look that the configuration does exist:
|
||||
<?=
|
||||
$this->translate('We tried to load a dashboard configuration with no success.'
|
||||
. ' Please have look that the configuration does exist:');
|
||||
?>
|
||||
|
||||
<code>
|
||||
<?= $this->configPath ?>.ini
|
||||
<?= $this->escape($this->configPath) ?>.ini
|
||||
</code>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -31,6 +31,7 @@ namespace Icinga\Web\Widget;
|
|||
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Application\Config as IcingaConfig;
|
||||
use Icinga\Exception\ConfigurationError;
|
||||
use Icinga\Exception\ProgrammingError;
|
||||
use Icinga\Web\Widget\AbstractWidget;
|
||||
use Icinga\Web\Widget\Dashboard\Pane;
|
||||
|
@ -305,7 +306,12 @@ class Dashboard extends AbstractWidget
|
|||
$active = $this->setDefaultPane();
|
||||
}
|
||||
}
|
||||
return isset($this->panes[$active]) ? $this->panes[$active] : null;
|
||||
|
||||
if (isset($this->panes[$active])) {
|
||||
return $this->panes[$active];
|
||||
}
|
||||
|
||||
throw new ConfigurationError('Could not determine active pane');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue