ConfigController: no rendering, no deployment...

...for branches
This commit is contained in:
Thomas Gelf 2021-08-25 11:33:23 +02:00
parent bdd9e2b1e5
commit a851f58e42

View File

@ -66,13 +66,15 @@ class ConfigController extends ActionController
// No problem, Icinga might be reloading // No problem, Icinga might be reloading
} }
// TODO: a form! if (! $this->getBranch()->isBranch()) {
$this->actions()->add(Link::create( // TODO: a form!
$this->translate('Render config'), $this->actions()->add(Link::create(
'director/config/store', $this->translate('Render config'),
null, 'director/config/store',
['class' => 'icon-wrench'] null,
)); ['class' => 'icon-wrench']
));
}
$this->tabs(new InfraTabs($this->Auth()))->activate('deploymentlog'); $this->tabs(new InfraTabs($this->Auth()))->activate('deploymentlog');
$table = new DeploymentLogTable($this->db()); $table = new DeploymentLogTable($this->db());
@ -184,7 +186,7 @@ class ConfigController extends ActionController
['class' => 'icon-user', 'data-base-target' => '_self'] ['class' => 'icon-user', 'data-base-target' => '_self']
)); ));
} }
if ($this->hasPermission('director/deploy')) { if ($this->hasPermission('director/deploy') && ! $this->getBranch()->isBranch()) {
if ($this->db()->hasDeploymentEndpoint()) { if ($this->db()->hasDeploymentEndpoint()) {
$this->actions()->add(DeployConfigForm::load() $this->actions()->add(DeployConfigForm::load()
->setDb($this->db()) ->setDb($this->db())