new: [topology improvements] added acl, menu access, downloader
parent
58f75e44c1
commit
49d4c959aa
|
@ -107,6 +107,7 @@ class ACLComponent extends Component
|
||||||
'viewTags' => ['*']
|
'viewTags' => ['*']
|
||||||
],
|
],
|
||||||
'Instance' => [
|
'Instance' => [
|
||||||
|
'downloadTopology' => ['perm_admin'],
|
||||||
'home' => ['*'],
|
'home' => ['*'],
|
||||||
'migrate' => ['perm_admin'],
|
'migrate' => ['perm_admin'],
|
||||||
'migrationIndex' => ['perm_admin'],
|
'migrationIndex' => ['perm_admin'],
|
||||||
|
@ -114,7 +115,8 @@ class ACLComponent extends Component
|
||||||
'saveSetting' => ['perm_admin'],
|
'saveSetting' => ['perm_admin'],
|
||||||
'searchAll' => ['*'],
|
'searchAll' => ['*'],
|
||||||
'settings' => ['perm_admin'],
|
'settings' => ['perm_admin'],
|
||||||
'status' => ['*']
|
'status' => ['*'],
|
||||||
|
'topology' => ['perm_admin'],
|
||||||
],
|
],
|
||||||
'LocalTools' => [
|
'LocalTools' => [
|
||||||
'action' => ['perm_admin'],
|
'action' => ['perm_admin'],
|
||||||
|
|
|
@ -113,6 +113,11 @@ class Sidemenu {
|
||||||
'label' => __('Instance'),
|
'label' => __('Instance'),
|
||||||
'icon' => $this->iconTable['Instance'],
|
'icon' => $this->iconTable['Instance'],
|
||||||
'children' => [
|
'children' => [
|
||||||
|
'Topology' => [
|
||||||
|
'label' => __('Topology'),
|
||||||
|
'url' => '/instance/topology',
|
||||||
|
'icon' => 'project-diagram',
|
||||||
|
],
|
||||||
'Settings' => [
|
'Settings' => [
|
||||||
'label' => __('Settings'),
|
'label' => __('Settings'),
|
||||||
'url' => '/instance/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('description', __('A list of all instances and local tools connected .'));
|
||||||
$this->set('data', $this->Instance->getTopology());
|
$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