Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dashboards: add Infrastructure dashboard
fixes #14017
- Loading branch information
1 parent
83b5b27
commit d3e55ed
Showing
6 changed files
with
94 additions
and
5 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
library/Director/Dashboard/Dashlet/InfrastructureDashlet.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.' | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters