init
This commit is contained in:
31
Controller/Admin.php
Normal file
31
Controller/Admin.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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']
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user