1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
<?php
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
{
protected $dashletNames = array(
'Kickstart',
'ApiUserObject',
'EndpointObject',
'ZoneObject',
);
public function getTitle()
{
return $this->translate('Manage your Icinga Infrastructure');
}
public function getDescription()
{
$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()
{
return new InfraTabs($this->getAuth());
}
}
|