new: [topology improvements] added acl, menu access, downloader
parent
58f75e44c1
commit
49d4c959aa
|
@ -107,6 +107,7 @@ class ACLComponent extends Component
|
|||
'viewTags' => ['*']
|
||||
],
|
||||
'Instance' => [
|
||||
'downloadTopology' => ['perm_admin'],
|
||||
'home' => ['*'],
|
||||
'migrate' => ['perm_admin'],
|
||||
'migrationIndex' => ['perm_admin'],
|
||||
|
@ -114,7 +115,8 @@ class ACLComponent extends Component
|
|||
'saveSetting' => ['perm_admin'],
|
||||
'searchAll' => ['*'],
|
||||
'settings' => ['perm_admin'],
|
||||
'status' => ['*']
|
||||
'status' => ['*'],
|
||||
'topology' => ['perm_admin'],
|
||||
],
|
||||
'LocalTools' => [
|
||||
'action' => ['perm_admin'],
|
||||
|
|
|
@ -113,6 +113,11 @@ class Sidemenu {
|
|||
'label' => __('Instance'),
|
||||
'icon' => $this->iconTable['Instance'],
|
||||
'children' => [
|
||||
'Topology' => [
|
||||
'label' => __('Topology'),
|
||||
'url' => '/instance/topology',
|
||||
'icon' => 'project-diagram',
|
||||
],
|
||||
'Settings' => [
|
||||
'label' => __('Settings'),
|
||||
'url' => '/instance/settings',
|
||||
|
|
|
@ -188,4 +188,14 @@ class InstanceController extends AppController
|
|||
$this->set('description', __('A list of all instances and local tools connected .'));
|
||||
$this->set('data', $this->Instance->getTopology());
|
||||
}
|
||||
|
||||
public function downloadTopology()
|
||||
{
|
||||
$topologyMd = $this->Instance->getTopology();
|
||||
$response = $this->response;
|
||||
$response = $response->withStringBody($topologyMd);
|
||||
$response = $response->withType('text/markdown');
|
||||
$response = $response->withDownload('topology.md');
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue