config/file: show single files
This commit is contained in:
parent
a93bcee68a
commit
b73806d69c
|
@ -59,6 +59,18 @@ class ConfigController extends ActionController
|
||||||
$this->render('objects/table', null, true);
|
$this->render('objects/table', null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show a single file
|
||||||
|
public function fileAction()
|
||||||
|
{
|
||||||
|
$this->view->config = IcingaConfig::load(Util::hex2binary($this->params->get('config_checksum')), $this->db());
|
||||||
|
$filename = $this->view->filename = $this->params->get('file_path');
|
||||||
|
$this->view->title = sprintf(
|
||||||
|
$this->translate('Config file "%s"'),
|
||||||
|
$filename
|
||||||
|
);
|
||||||
|
$this->view->file = $this->view->config->getFile($filename);
|
||||||
|
}
|
||||||
|
|
||||||
public function showAction()
|
public function showAction()
|
||||||
{
|
{
|
||||||
$tabs = $this->getTabs();
|
$tabs = $this->getTabs();
|
||||||
|
|
|
@ -27,7 +27,7 @@ class GeneratedConfigFileTable extends QuickTable
|
||||||
|
|
||||||
protected function getActionUrl($row)
|
protected function getActionUrl($row)
|
||||||
{
|
{
|
||||||
return $this->url('director/config/file', array('checksum' => $row->checksum));
|
return $this->url('director/config/file', array('config_checksum' => $row->config_checksum, 'file_path' => $row->file_path));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitles()
|
public function getTitles()
|
||||||
|
|
|
@ -105,6 +105,11 @@ class IcingaConfig
|
||||||
return array_keys($this->files);
|
return array_keys($this->files);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getFile($name)
|
||||||
|
{
|
||||||
|
return $this->files[$name];
|
||||||
|
}
|
||||||
|
|
||||||
public function getMissingFiles($missing)
|
public function getMissingFiles($missing)
|
||||||
{
|
{
|
||||||
$files = array();
|
$files = array();
|
||||||
|
|
Loading…
Reference in New Issue