diff --git a/doc/24-Working-with-agents.md b/doc/24-Working-with-agents.md index dc019ccc..24473db5 100644 --- a/doc/24-Working-with-agents.md +++ b/doc/24-Working-with-agents.md @@ -4,8 +4,8 @@ Working with Icinga 2 Agents can be quite tricky, as each Agent needs its own Endpoint and Zone definition, correct parent, peering host and log settings. There may always be reasons for a completely custom-made -configuration. However, I'd strongly suggest to give the Director-assisted -variant at least a try first. It might save you a lot of headaches. +configuration. However, I'd **strongly suggest** using the **Director- +assisted** variant. It will save you a lot of headaches. Preparation diff --git a/doc/screenshot/director/24-agents/2401_agent_template.png b/doc/screenshot/director/24-agents/2401_agent_template.png index 8fae2dc9..28ec8cfd 100644 Binary files a/doc/screenshot/director/24-agents/2401_agent_template.png and b/doc/screenshot/director/24-agents/2401_agent_template.png differ diff --git a/library/Director/Dashboard/Dashboard.php b/library/Director/Dashboard/Dashboard.php index b3d380e6..de8970c7 100644 --- a/library/Director/Dashboard/Dashboard.php +++ b/library/Director/Dashboard/Dashboard.php @@ -14,6 +14,7 @@ use Icinga\Module\Director\Restriction\HostgroupRestriction; use Icinga\Module\Director\Dashboard\Dashlet\Dashlet; use Icinga\Module\Director\Db; use Icinga\Web\Widget\Tab; +use ipl\Html\ValidHtml; use Zend_Db_Select as ZfSelect; abstract class Dashboard extends HtmlDocument @@ -60,7 +61,9 @@ abstract class Dashboard extends HtmlDocument */ protected function addDescription($description) { - if ($description !== null) { + if ($description instanceof ValidHtml) { + $this->add(Html::tag('p', $description)); + } elseif ($description !== null) { $this->add(Html::tag( 'p', null, diff --git a/library/Director/Dashboard/InfrastructureDashboard.php b/library/Director/Dashboard/InfrastructureDashboard.php index ee1fd9ff..2b369fc9 100644 --- a/library/Director/Dashboard/InfrastructureDashboard.php +++ b/library/Director/Dashboard/InfrastructureDashboard.php @@ -2,7 +2,13 @@ namespace Icinga\Module\Director\Dashboard; +use gipfl\Web\Widget\Hint; +use Icinga\Application\Icinga; +use Icinga\Authentication\Auth; use Icinga\Module\Director\Web\Tabs\InfraTabs; +use Icinga\Module\Director\Web\Widget\Documentation; +use ipl\Html\Html; +use ipl\Html\HtmlDocument; class InfrastructureDashboard extends Dashboard { @@ -20,16 +26,31 @@ class InfrastructureDashboard extends Dashboard 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.' + $documentation = new Documentation(Icinga::app(), Auth::getInstance()); + + $link = $documentation->getModuleLink( + $this->translate('documentation'), + 'director', + '24-Working-with-agents', + $this->translate('Working with Agents and Config Zones') ); + return (new HtmlDocument())->add([ + $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.' + ), + Hint::warning($this->translate( + '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.' + )), + Html::sprintf( + $this->translate('Want to connect to your Icinga Agents? Have a look at our %s!'), + $link + ) + ]); } public function getTabs()