mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
Dashboard: no more view scripts
This commit is contained in:
parent
cea78db5af
commit
eda559ce53
@ -26,11 +26,20 @@ class DashboardController extends ActionController
|
||||
$this->addSingleTab($this->translate('Overview'));
|
||||
}
|
||||
|
||||
$cntDashboards = 0;
|
||||
foreach ($names as $name) {
|
||||
$dashboard = Dashboard::loadByName($name, $this->db());
|
||||
if ($dashboard->isAvailable()) {
|
||||
$cntDashboards++;
|
||||
$this->content()->add($dashboard);
|
||||
}
|
||||
}
|
||||
|
||||
if ($cntDashboards === 0) {
|
||||
$msg = $this->translate(
|
||||
'No dashboard available, you might have not enough permissions'
|
||||
);
|
||||
$this->content()->add($msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<?php if ($this->errorMessage): ?>
|
||||
<p class="error"><?= $this->errorMessage ?></p>
|
||||
<?php endif ?>
|
||||
<?= $this->form ?>
|
||||
<?php if (empty($this->dashboards)): ?>
|
||||
<?= $this->translate('No dashboard available, you might have not enough permissions') ?>
|
||||
<?php endif ?>
|
||||
<?php foreach ($this->dashboards as $dashboard): ?>
|
||||
<?= $dashboard ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
@ -1,5 +0,0 @@
|
||||
<a<?= $dashlet->renderClassAttribute()?> href="<?= $this->url($dashlet->getUrl()) ?>">
|
||||
<?= $this->escape($dashlet->getTitle()) ?>
|
||||
<?= $this->icon($this->dashlet->getIconName()) ?>
|
||||
<p><?= $dashlet->getEscapedSummary() ?></p>
|
||||
</a>
|
Loading…
x
Reference in New Issue
Block a user