deployment/show: new controller and action

This commit is contained in:
Thomas Gelf 2015-09-30 08:38:39 +02:00
parent 1c86d9ebf7
commit fcb4177a87
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,12 @@
<?php
use Icinga\Module\Director\Web\Controller\ActionController;
use Icinga\Module\Director\Objects\DirectorDeploymentLog;
class Director_DeploymentController extends ActionController
{
public function showAction()
{
$this->view->deployment = DirectorDeploymentLog::load($this->params->get('id'), $this->db());
}
}

View File

@ -0,0 +1,15 @@
<div class="controls">
<?= $this->tabs ?>
</div>
<div class="content">
<h1><?= $this->escape($this->title) ?></h1>
<?php if ($this->deployment->startup_succeeded === 'y'): ?>
<div style="color: green; font-weight: bold">Startup succeeded</div>
<?php else: ?>
<div style="color: red; font-weight: bold">Startup failed</div>
<?php endif ?>
<pre>
<?= $this->escape($this->deployment->startup_log) ?>
</pre>
</div>