mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
parent
151f058286
commit
20b43a92f1
@ -143,7 +143,7 @@ class DashboardController extends ActionController
|
|||||||
$dashboard->activate($pane);
|
$dashboard->activate($pane);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->view->configPath = IcingaConfig::$configDir . DIRECTORY_SEPARATOR . self::DEFAULT_CONFIG;
|
$this->view->configPath = IcingaConfig::resolvePath(self::DEFAULT_CONFIG);
|
||||||
|
|
||||||
if ($dashboard === null) {
|
if ($dashboard === null) {
|
||||||
$this->view->title = 'Dashboard';
|
$this->view->title = 'Dashboard';
|
||||||
|
@ -9,11 +9,13 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<h1>No dashboard configuration found!</h1>
|
<h1>No dashboard configuration found!</h1>
|
||||||
<p>
|
<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>
|
<code>
|
||||||
<?= $this->configPath ?>.ini
|
<?= $this->escape($this->configPath) ?>.ini
|
||||||
</code>
|
</code>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,6 +31,7 @@ namespace Icinga\Web\Widget;
|
|||||||
|
|
||||||
use Icinga\Application\Icinga;
|
use Icinga\Application\Icinga;
|
||||||
use Icinga\Application\Config as IcingaConfig;
|
use Icinga\Application\Config as IcingaConfig;
|
||||||
|
use Icinga\Exception\ConfigurationError;
|
||||||
use Icinga\Exception\ProgrammingError;
|
use Icinga\Exception\ProgrammingError;
|
||||||
use Icinga\Web\Widget\AbstractWidget;
|
use Icinga\Web\Widget\AbstractWidget;
|
||||||
use Icinga\Web\Widget\Dashboard\Pane;
|
use Icinga\Web\Widget\Dashboard\Pane;
|
||||||
@ -305,7 +306,12 @@ class Dashboard extends AbstractWidget
|
|||||||
$active = $this->setDefaultPane();
|
$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…
x
Reference in New Issue
Block a user