mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-05 18:49:54 +00:00
Resolve the top-right menu url issue
This commit is contained in:
parent
dc94d22822
commit
97a04a2fba
@ -92,9 +92,9 @@ const routes: Routes = [
|
||||
canActivate: [LoginGuard],
|
||||
resolve: { controller: ControllerResolve },
|
||||
},
|
||||
{ path: 'help', component: HelpComponent },
|
||||
{ path: 'settings', component: SettingsComponent },
|
||||
{ path: 'settings/console', component: ConsoleComponent },
|
||||
{ path: 'controller/:controller_id/help', component: HelpComponent },
|
||||
{ path: 'controller/:controller_id/settings', component: SettingsComponent },
|
||||
{ path: 'controller/:controller_id/settings/console', component: ConsoleComponent },
|
||||
{
|
||||
path: 'controller/:controller_id/management/users/:user_id',
|
||||
component: UserDetailComponent,
|
||||
|
@ -38,7 +38,10 @@
|
||||
<mat-icon>collections</mat-icon>
|
||||
<span>Image manager</span>
|
||||
</button>
|
||||
<button mat-menu-item routerLink="/settings">
|
||||
<button mat-menu-item
|
||||
[disabled]="!controllerId"
|
||||
[routerLink]="['controller', controllerId, 'settings']"
|
||||
>
|
||||
<mat-icon>settings</mat-icon>
|
||||
<span>Settings</span>
|
||||
</button>
|
||||
@ -48,7 +51,10 @@
|
||||
<mat-icon>groups</mat-icon>
|
||||
<span>Management</span>
|
||||
</button>
|
||||
<button mat-menu-item routerLink="/help">
|
||||
<button mat-menu-item
|
||||
[disabled]="!controllerId"
|
||||
[routerLink]="['controller', controllerId, 'help']"
|
||||
>
|
||||
<mat-icon>help</mat-icon>
|
||||
<span>Help</span>
|
||||
</button>
|
||||
|
@ -41,6 +41,7 @@ export class DefaultLayoutComponent implements OnInit, OnDestroy {
|
||||
private controllerService: ControllerService
|
||||
) {
|
||||
this.router.events.subscribe((data) => {
|
||||
debugger
|
||||
if (data instanceof NavigationEnd) {
|
||||
this.controllerId = this.route.children[0].snapshot.paramMap.get("controller_id");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user