Dashboards: add Infrastructure dashboard

fixes #14017
This commit is contained in:
Thomas Gelf 2017-01-16 08:50:18 +01:00
parent 83b5b27803
commit d3e55ed5c9
6 changed files with 94 additions and 5 deletions

View File

@ -0,0 +1,30 @@
<?php
namespace Icinga\Module\Director\Dashboard\Dashlet;
class InfrastructureDashlet extends Dashlet
{
protected $icon = 'cloud';
public function getTitle()
{
return $this->translate('Icinga Infrastructure');
}
public function getEscapedSummary()
{
return $this->translate(
'Manage your Icinga 2 infrastructure: Masters, Zones, Satellites and more'
);
}
public function getUrl()
{
return 'director/dashboard?name=infrastructure';
}
public function listRequiredPermissions()
{
return array('director/admin');
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace Icinga\Module\Director\Dashboard\Dashlet;
class KickstartDashlet extends Dashlet
{
protected $icon = 'gauge';
public function getTitle()
{
return $this->translate('Kickstart Helper');
}
public function getEscapedSummary()
{
return $this->translate(
'This syncronizes Icinga Director to your Icinga 2 infrastructure'
);
}
public function getUrl()
{
return 'director/kickstart';
}
public function listRequiredPermissions()
{
return array('director/admin');
}
}

View File

@ -7,7 +7,6 @@ class DataDashboard extends Dashboard
protected $dashletNames = array( protected $dashletNames = array(
'ImportSource', 'ImportSource',
'Sync', 'Sync',
'Job',
'Datafield', 'Datafield',
'Datalist', 'Datalist',
); );

View File

@ -7,9 +7,8 @@ class DeploymentDashboard extends Dashboard
protected $dashletNames = array( protected $dashletNames = array(
'Deployment', 'Deployment',
'ActivityLog', 'ActivityLog',
'ApiUserObject', 'Job',
'EndpointObject', 'Infrastructure',
'ZoneObject',
); );
public function getTitle() public function getTitle()

View File

@ -0,0 +1,32 @@
<?php
namespace Icinga\Module\Director\Dashboard;
class InfrastructureDashboard extends Dashboard
{
protected $dashletNames = array(
'Kickstart',
'ApiUserObject',
'EndpointObject',
'ZoneObject',
);
public function getTitle()
{
return $this->translate('Manage your Icinga Infrastructure');
}
public function getDescription()
{
return $this->translate(
'This is where you manage your Icinga 2 infrastructure. When adding'
. ' a new Icinga Master or Satellite please re-run the Kickstart'
. ' Helper once.'
. "\n\n"
. 'When you feel the desire to manually create Zone or Endpoint'
. ' objects please rethink this twice. Doing so is mostly the wrong'
. ' way, might lead to a dead end, requiring quite some effort to'
. ' clean up the whole mess afterwards.'
);
}
}

View File

@ -9,7 +9,6 @@ class ObjectsDashboard extends Dashboard
'ServiceObject', 'ServiceObject',
'CommandObject', 'CommandObject',
'Notifications', 'Notifications',
'TimeperiodObject',
); );
public function getTitle() public function getTitle()