Skip to content

Commit

Permalink
Remove class Documentation
Browse files Browse the repository at this point in the history
Because of only one usage we don't have to keep a whole class to print a
documentation link.
  • Loading branch information
jrauh01 committed Jan 10, 2025
1 parent 059eb78 commit 23f91e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 116 deletions.
25 changes: 14 additions & 11 deletions application/controllers/MonitoringController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Icinga\Module\Vspheredb\Web\Table\Monitoring\MonitoringRuleProblemHistoryTable;
use Icinga\Module\Vspheredb\Web\Table\Monitoring\MonitoringRuleProblemTable;
use Icinga\Module\Vspheredb\Web\Table\TableWithVCenterFilter;
use Icinga\Module\Vspheredb\Web\Widget\Documentation;
use Icinga\Web\Notification;
use ipl\Html\Html;
use Ramsey\Uuid\Uuid;
Expand All @@ -39,24 +38,24 @@ public function init()
$tabs = $this->tabs();
$tabs->add('index', [
'label' => $this->translate('Monitoring'),
'url' => 'vspheredb/monitoring'
'url' => 'vspheredb/monitoring'
])->add('history', [
'label' => $this->translate('History'),
'url' => 'vspheredb/monitoring/history'
'url' => 'vspheredb/monitoring/history'
]);
if ($this->hasPermission('vspheredb/admin')) {
$tabs->add('configuration', [
'label' => $this->translate('Configuration'),
'url' => 'vspheredb/monitoring/configuration'
'url' => 'vspheredb/monitoring/configuration'
])->add('hosttree', [
'label' => $this->translate('Hosts'),
'url' => 'vspheredb/monitoring/hosttree'
'url' => 'vspheredb/monitoring/hosttree'
])->add('vmtree', [
'label' => $this->translate('Virtual Machines'),
'url' => 'vspheredb/monitoring/vmtree'
'url' => 'vspheredb/monitoring/vmtree'
])->add('datastoretree', [
'label' => $this->translate('Datastores'),
'url' => 'vspheredb/monitoring/datastoretree'
'url' => 'vspheredb/monitoring/datastoretree'
]);
}
$tabs->activate($action);
Expand Down Expand Up @@ -133,11 +132,15 @@ public function configurationAction()
Html::tag('h2', $this->translate('Defining Check Commands')),
Html::tag('p', Html::sprintf(
$this->translate('Check our %s for instructions of how to set them up'),
Documentation::link(
Html::tag(
'a',
[
'href' => 'https://icinga.com/docs/icinga-vsphere-integration/latest/doc/32-Monitoring_Rules/',
'class' => 'icon-book',
'title' => $this->translate('Click to read our documentation: Icinga vSphereDB Check Commands'),
'target' => '_blank'
],
$this->translate('Documentation'),
'icinga-vsphere-integration',
'32-Monitoring_Rules',
$this->translate('Icinga vSphereDB Check Commands')
)
))
]);
Expand Down
105 changes: 0 additions & 105 deletions library/Vspheredb/Web/Widget/Documentation.php

This file was deleted.

0 comments on commit 23f91e0

Please sign in to comment.