Skip to content

Commit

Permalink
Dashboards: add Infrastructure dashboard
Browse files Browse the repository at this point in the history
fixes #14017
  • Loading branch information
Thomas-Gelf committed Jan 16, 2017
1 parent 83b5b27 commit d3e55ed
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 5 deletions.
30 changes: 30 additions & 0 deletions library/Director/Dashboard/Dashlet/InfrastructureDashlet.php
@@ -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');
}
}
30 changes: 30 additions & 0 deletions library/Director/Dashboard/Dashlet/KickstartDashlet.php
@@ -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');
}
}
1 change: 0 additions & 1 deletion library/Director/Dashboard/DataDashboard.php
Expand Up @@ -7,7 +7,6 @@ class DataDashboard extends Dashboard
protected $dashletNames = array(
'ImportSource',
'Sync',
'Job',
'Datafield',
'Datalist',
);
Expand Down
5 changes: 2 additions & 3 deletions library/Director/Dashboard/DeploymentDashboard.php
Expand Up @@ -7,9 +7,8 @@ class DeploymentDashboard extends Dashboard
protected $dashletNames = array(
'Deployment',
'ActivityLog',
'ApiUserObject',
'EndpointObject',
'ZoneObject',
'Job',
'Infrastructure',
);

public function getTitle()
Expand Down
32 changes: 32 additions & 0 deletions library/Director/Dashboard/InfrastructureDashboard.php
@@ -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.'
);
}
}
1 change: 0 additions & 1 deletion library/Director/Dashboard/ObjectsDashboard.php
Expand Up @@ -9,7 +9,6 @@ class ObjectsDashboard extends Dashboard
'ServiceObject',
'CommandObject',
'Notifications',
'TimeperiodObject',
);

public function getTitle()
Expand Down

0 comments on commit d3e55ed

Please sign in to comment.