Dashboard: show description if any
This commit is contained in:
parent
fe489ce094
commit
a6962dc326
|
@ -12,6 +12,13 @@
|
|||
<?php endif ?>
|
||||
<?php foreach ($this->dashboards as $dashboard): ?>
|
||||
<h1><?= $this->escape($dashboard->getTitle()) ?></h1>
|
||||
<?php
|
||||
|
||||
$description = $dashboard->getDescription();
|
||||
|
||||
if ($description !== null): ?>
|
||||
<p><?= nl2br($this->escape($description)) ?></p>
|
||||
<?php endif ?>
|
||||
<ul class="main-actions" data-base-target="_next">
|
||||
<?php foreach ($dashboard->dashlets() as $dashlet): ?>
|
||||
<li>
|
||||
|
|
|
@ -53,7 +53,10 @@ abstract class Dashboard implements Countable
|
|||
|
||||
abstract public function getTitle();
|
||||
|
||||
abstract public function getDescription();
|
||||
public function getDescription()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function count()
|
||||
{
|
||||
|
|
|
@ -4,8 +4,6 @@ namespace Icinga\Module\Director\Dashboard;
|
|||
|
||||
class DataDashboard extends Dashboard
|
||||
{
|
||||
protected $name;
|
||||
|
||||
protected $dashletNames = array(
|
||||
'ImportSource',
|
||||
'Sync',
|
||||
|
@ -18,9 +16,4 @@ class DataDashboard extends Dashboard
|
|||
{
|
||||
return $this->translate('Do more with your data');
|
||||
}
|
||||
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->translate('...');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@ namespace Icinga\Module\Director\Dashboard;
|
|||
|
||||
class DeploymentDashboard extends Dashboard
|
||||
{
|
||||
protected $name;
|
||||
|
||||
protected $dashletNames = array(
|
||||
'Deployment',
|
||||
'ActivityLog',
|
||||
|
@ -18,9 +16,4 @@ class DeploymentDashboard extends Dashboard
|
|||
{
|
||||
return $this->translate('Deploy configuration to your Icinga nodes');
|
||||
}
|
||||
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->translate('...');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@ namespace Icinga\Module\Director\Dashboard;
|
|||
|
||||
class ObjectsDashboard extends Dashboard
|
||||
{
|
||||
protected $name;
|
||||
|
||||
protected $dashletNames = array(
|
||||
'HostObject',
|
||||
'ServiceObject',
|
||||
|
@ -19,9 +17,4 @@ class ObjectsDashboard extends Dashboard
|
|||
{
|
||||
return $this->translate('Define whatever you want to be monitored');
|
||||
}
|
||||
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->translate('...');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue