mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-22 06:17:47 +00:00
Link to the API doc in the menu
This commit is contained in:
parent
44c530d1b5
commit
f721bd0d26
@ -39,6 +39,10 @@
|
||||
<mat-icon>person</mat-icon>
|
||||
<span>User info</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="goToDocumentation()">
|
||||
<mat-icon>person</mat-icon>
|
||||
<span>API documentation</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="logout()">
|
||||
<mat-icon>highlight_off</mat-icon>
|
||||
<span>Logout</span>
|
||||
|
@ -75,6 +75,13 @@ export class DefaultLayoutComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
goToDocumentation() {
|
||||
let serverId = this.router.url.split("/server/")[1].split("/")[0];
|
||||
this.serverService.get(+serverId).then((server: Server) => {
|
||||
(window as any).open(`http://${server.host}:${server.port}/docs`);
|
||||
});
|
||||
}
|
||||
|
||||
checkIfUserIsLoginPage() {
|
||||
if (this.router.url.includes("login")) {
|
||||
this.isLoginPage = true;
|
||||
|
Loading…
Reference in New Issue
Block a user