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