mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 06:44:33 +02:00
Revert "DashboardsController: Add index action"
This reverts commit 2be8835f0609ba886678699e3e472a1d426ddc53.
This commit is contained in:
parent
1c44a3306b
commit
dcb4f7f52d
@ -4,34 +4,10 @@
|
|||||||
namespace Icinga\Controllers;
|
namespace Icinga\Controllers;
|
||||||
|
|
||||||
use Icinga\Web\Controller;
|
use Icinga\Web\Controller;
|
||||||
use Icinga\Web\Widget\Dashboard;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dashboards
|
* Dashboards
|
||||||
*/
|
*/
|
||||||
class DashboardsController extends Controller
|
class DashboardsController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Display the dashboard with the pane set in the "pane" request parameter
|
|
||||||
*
|
|
||||||
* If no pane is given or the given one doesn't exist, the default pane is displayed
|
|
||||||
*/
|
|
||||||
public function indexAction()
|
|
||||||
{
|
|
||||||
$dashboard = new Dashboard();
|
|
||||||
$dashboard->setUser($this->Auth()->getUser());
|
|
||||||
$dashboard->load();
|
|
||||||
|
|
||||||
$this->view->title = 'Dashboard';
|
|
||||||
$this->view->tabs = $dashboard->getTabs();
|
|
||||||
|
|
||||||
if ($dashboard->hasPanes()) {
|
|
||||||
if (($pane = $this->params->get('pane')) !== null) {
|
|
||||||
$dashboard->activate($pane);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->view->dashboard = $dashboard;
|
|
||||||
$this->view->title = $dashboard->getActivePane()->getTitle() . ' :: Dashboard';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
<?php if (! $this->compact): ?>
|
|
||||||
<div class="controls">
|
|
||||||
<?= $tabs; ?>
|
|
||||||
</div>
|
|
||||||
<?php endif ?>
|
|
||||||
<?php if ($dashboard): ?>
|
|
||||||
<div class="dashboard content">
|
|
||||||
<?= $dashboard; ?>
|
|
||||||
</div>
|
|
||||||
<?php else: ?>
|
|
||||||
<div class="content">
|
|
||||||
<h1><?= $this->escape($this->translate('Welcome to Icinga Web 2!')); ?></h1>
|
|
||||||
<p>
|
|
||||||
<?php if (! $this->hasPermission('config/modules')): ?>
|
|
||||||
<?= $this->escape($this->translate(
|
|
||||||
'Currently there is no dashboard available. Please contact the administrator.'
|
|
||||||
)); ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<?= sprintf(
|
|
||||||
$this->escape($this->translate(
|
|
||||||
'Currently there is no dashboard available. This might change once you enabled some of the available %smodules%s.'
|
|
||||||
)),
|
|
||||||
substr($this->qlink(null, 'config/modules'), 0, -4),
|
|
||||||
'</a>'
|
|
||||||
); ?>
|
|
||||||
<?php endif ?>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<?php endif ?>
|
|
Loading…
x
Reference in New Issue
Block a user