summaryrefslogtreecommitdiffstats
path: root/application/controllers/DeploymentController.php
blob: 2d35f3c890c9081729f4aca5a07bdcd1805bcb51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

namespace Icinga\Module\Director\Controllers;

use Icinga\Module\Director\Web\Controller\ActionController;
use Icinga\Module\Director\Objects\DirectorDeploymentLog;
use Icinga\Module\Director\Web\Widget\DeploymentInfo;

class DeploymentController extends ActionController
{
    protected function checkDirectorPermissions()
    {
        $this->assertPermission('director/deploy');
    }

    public function indexAction()
    {
        $info = new DeploymentInfo(DirectorDeploymentLog::load(
            $this->params->get('id'),
            $this->db()
        ));
        $this->addTitle($this->translate('Deployment details'));
        $this->tabs(
            $info->getTabs($this->getAuth(), $this->getRequest())
        )->activate('deployment');
        $this->content()->add($info);
    }
}