Skip to content

Commit 23f91e0

Browse files
committed
Remove class Documentation
Because of only one usage we don't have to keep a whole class to print a documentation link.
1 parent 059eb78 commit 23f91e0

File tree

2 files changed

+14
-116
lines changed

2 files changed

+14
-116
lines changed

application/controllers/MonitoringController.php

+14-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use Icinga\Module\Vspheredb\Web\Table\Monitoring\MonitoringRuleProblemHistoryTable;
2020
use Icinga\Module\Vspheredb\Web\Table\Monitoring\MonitoringRuleProblemTable;
2121
use Icinga\Module\Vspheredb\Web\Table\TableWithVCenterFilter;
22-
use Icinga\Module\Vspheredb\Web\Widget\Documentation;
2322
use Icinga\Web\Notification;
2423
use ipl\Html\Html;
2524
use Ramsey\Uuid\Uuid;
@@ -39,24 +38,24 @@ public function init()
3938
$tabs = $this->tabs();
4039
$tabs->add('index', [
4140
'label' => $this->translate('Monitoring'),
42-
'url' => 'vspheredb/monitoring'
41+
'url' => 'vspheredb/monitoring'
4342
])->add('history', [
4443
'label' => $this->translate('History'),
45-
'url' => 'vspheredb/monitoring/history'
44+
'url' => 'vspheredb/monitoring/history'
4645
]);
4746
if ($this->hasPermission('vspheredb/admin')) {
4847
$tabs->add('configuration', [
4948
'label' => $this->translate('Configuration'),
50-
'url' => 'vspheredb/monitoring/configuration'
49+
'url' => 'vspheredb/monitoring/configuration'
5150
])->add('hosttree', [
5251
'label' => $this->translate('Hosts'),
53-
'url' => 'vspheredb/monitoring/hosttree'
52+
'url' => 'vspheredb/monitoring/hosttree'
5453
])->add('vmtree', [
5554
'label' => $this->translate('Virtual Machines'),
56-
'url' => 'vspheredb/monitoring/vmtree'
55+
'url' => 'vspheredb/monitoring/vmtree'
5756
])->add('datastoretree', [
5857
'label' => $this->translate('Datastores'),
59-
'url' => 'vspheredb/monitoring/datastoretree'
58+
'url' => 'vspheredb/monitoring/datastoretree'
6059
]);
6160
}
6261
$tabs->activate($action);
@@ -133,11 +132,15 @@ public function configurationAction()
133132
Html::tag('h2', $this->translate('Defining Check Commands')),
134133
Html::tag('p', Html::sprintf(
135134
$this->translate('Check our %s for instructions of how to set them up'),
136-
Documentation::link(
135+
Html::tag(
136+
'a',
137+
[
138+
'href' => 'https://icinga.com/docs/icinga-vsphere-integration/latest/doc/32-Monitoring_Rules/',
139+
'class' => 'icon-book',
140+
'title' => $this->translate('Click to read our documentation: Icinga vSphereDB Check Commands'),
141+
'target' => '_blank'
142+
],
137143
$this->translate('Documentation'),
138-
'icinga-vsphere-integration',
139-
'32-Monitoring_Rules',
140-
$this->translate('Icinga vSphereDB Check Commands')
141144
)
142145
))
143146
]);

library/Vspheredb/Web/Widget/Documentation.php

-105
This file was deleted.

0 commit comments

Comments
 (0)