mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
Merge branch 'feature/emphasize-infra-hint-2231'
This commit is contained in:
commit
bca77fdca9
@ -4,8 +4,8 @@
|
|||||||
Working with Icinga 2 Agents can be quite tricky, as each Agent needs
|
Working with Icinga 2 Agents can be quite tricky, as each Agent needs
|
||||||
its own Endpoint and Zone definition, correct parent, peering host and
|
its own Endpoint and Zone definition, correct parent, peering host and
|
||||||
log settings. There may always be reasons for a completely custom-made
|
log settings. There may always be reasons for a completely custom-made
|
||||||
configuration. However, I'd strongly suggest to give the Director-assisted
|
configuration. However, I'd **strongly suggest** using the **Director-
|
||||||
variant at least a try first. It might save you a lot of headaches.
|
assisted** variant. It will save you a lot of headaches.
|
||||||
|
|
||||||
|
|
||||||
Preparation
|
Preparation
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 46 KiB |
@ -14,6 +14,7 @@ use Icinga\Module\Director\Restriction\HostgroupRestriction;
|
|||||||
use Icinga\Module\Director\Dashboard\Dashlet\Dashlet;
|
use Icinga\Module\Director\Dashboard\Dashlet\Dashlet;
|
||||||
use Icinga\Module\Director\Db;
|
use Icinga\Module\Director\Db;
|
||||||
use Icinga\Web\Widget\Tab;
|
use Icinga\Web\Widget\Tab;
|
||||||
|
use ipl\Html\ValidHtml;
|
||||||
use Zend_Db_Select as ZfSelect;
|
use Zend_Db_Select as ZfSelect;
|
||||||
|
|
||||||
abstract class Dashboard extends HtmlDocument
|
abstract class Dashboard extends HtmlDocument
|
||||||
@ -60,7 +61,9 @@ abstract class Dashboard extends HtmlDocument
|
|||||||
*/
|
*/
|
||||||
protected function addDescription($description)
|
protected function addDescription($description)
|
||||||
{
|
{
|
||||||
if ($description !== null) {
|
if ($description instanceof ValidHtml) {
|
||||||
|
$this->add(Html::tag('p', $description));
|
||||||
|
} elseif ($description !== null) {
|
||||||
$this->add(Html::tag(
|
$this->add(Html::tag(
|
||||||
'p',
|
'p',
|
||||||
null,
|
null,
|
||||||
|
@ -2,7 +2,13 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Director\Dashboard;
|
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\Tabs\InfraTabs;
|
||||||
|
use Icinga\Module\Director\Web\Widget\Documentation;
|
||||||
|
use ipl\Html\Html;
|
||||||
|
use ipl\Html\HtmlDocument;
|
||||||
|
|
||||||
class InfrastructureDashboard extends Dashboard
|
class InfrastructureDashboard extends Dashboard
|
||||||
{
|
{
|
||||||
@ -20,16 +26,31 @@ class InfrastructureDashboard extends Dashboard
|
|||||||
|
|
||||||
public function getDescription()
|
public function getDescription()
|
||||||
{
|
{
|
||||||
return $this->translate(
|
$documentation = new Documentation(Icinga::app(), Auth::getInstance());
|
||||||
'This is where you manage your Icinga 2 infrastructure. When adding'
|
|
||||||
. ' a new Icinga Master or Satellite please re-run the Kickstart'
|
$link = $documentation->getModuleLink(
|
||||||
. ' Helper once.'
|
$this->translate('documentation'),
|
||||||
. "\n\n"
|
'director',
|
||||||
. 'When you feel the desire to manually create Zone or Endpoint'
|
'24-Working-with-agents',
|
||||||
. ' objects please rethink this twice. Doing so is mostly the wrong'
|
$this->translate('Working with Agents and Config Zones')
|
||||||
. ' way, might lead to a dead end, requiring quite some effort to'
|
|
||||||
. ' clean up the whole mess afterwards.'
|
|
||||||
);
|
);
|
||||||
|
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()
|
public function getTabs()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user