32 lines
571 B
PHP
32 lines
571 B
PHP
<?php
|
|
|
|
namespace Drone\Controller;
|
|
|
|
use Cockpit\AuthController;
|
|
|
|
/**
|
|
* Admin controller class.
|
|
*/
|
|
class Admin extends AuthController
|
|
{
|
|
|
|
/**
|
|
* Default index controller.
|
|
*/
|
|
public function index()
|
|
{
|
|
if (!$this->app->module('cockpit')->hasaccess('drone', 'manage.view')) {
|
|
return false;
|
|
}
|
|
|
|
$data = $this->app->module('drone')->fetchDeploys();
|
|
|
|
return $this->render('drone:views/deploys/index.php', [
|
|
'deploys' => $data['deploys'] ?? [],
|
|
'building' => $data['building'] ?? FALSE,
|
|
'build' => $data['build']
|
|
]);
|
|
}
|
|
|
|
}
|