mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
show/config: new test URL added to menu
This commit is contained in:
parent
ccca0f85b0
commit
055895a553
@ -2,6 +2,8 @@
|
||||
|
||||
use Icinga\Module\Director\ActionController;
|
||||
|
||||
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
||||
|
||||
class Director_ShowController extends ActionController
|
||||
{
|
||||
public function activitylogAction()
|
||||
@ -11,4 +13,14 @@ class Director_ShowController extends ActionController
|
||||
$this->view->title = $this->translate('Activity');
|
||||
}
|
||||
}
|
||||
|
||||
public function configAction()
|
||||
{
|
||||
$config = IcingaConfig::fromDb($this->db());
|
||||
$this->view->files = array();
|
||||
|
||||
foreach ($config->getFiles() as $filename => $config) {
|
||||
$this->view->files[$filename] = $config->getContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
12
application/views/scripts/show/config.phtml
Normal file
12
application/views/scripts/show/config.phtml
Normal file
@ -0,0 +1,12 @@
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<?php foreach ($this->files as $file => $content): ?>
|
||||
<h2><?= $this->escape($file) ?></h2>
|
||||
<pre>
|
||||
<?= $this->escape($content) ?>
|
||||
</pre>
|
||||
<?php endforeach ?>
|
||||
</div>
|
@ -50,3 +50,7 @@ $section->add($this->translate('Endpoints'))
|
||||
$section->add($this->translate('Activity Log'))
|
||||
->setUrl('director/list/activitylog')
|
||||
->setPriority(900);
|
||||
$section->add($this->translate('Show config'))
|
||||
->setUrl('director/show/config')
|
||||
->setPriority(902);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user