diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 55735f9c..428039ff 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,5 +1,5 @@ import * as Raven from 'raven-js'; -import { BrowserModule } from '@angular/platform-browser'; +import { BrowserModule, Title } from '@angular/platform-browser'; import { NgModule, ErrorHandler } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { CdkTableModule } from '@angular/cdk/table'; @@ -538,7 +538,8 @@ if (environment.production) { NotificationService, Gns3vmService, ThemeService, - GoogleAnalyticsService + GoogleAnalyticsService, + Title ], entryComponents: [ AddServerDialogComponent, diff --git a/src/app/components/project-map/project-map.component.ts b/src/app/components/project-map/project-map.component.ts index 99bd4865..7d679810 100644 --- a/src/app/components/project-map/project-map.component.ts +++ b/src/app/components/project-map/project-map.component.ts @@ -66,6 +66,7 @@ import { ConfirmationBottomSheetComponent } from '../projects/confirmation-botto import { NodeAddedEvent } from '../template/template-list-dialog/template-list-dialog.component'; import { NotificationService } from '../../services/notification.service'; import { ThemeService } from '../../services/theme.service'; +import { Title } from '@angular/platform-browser'; @Component({ @@ -153,7 +154,8 @@ export class ProjectMapComponent implements OnInit, OnDestroy { private serialLinkWidget: SerialLinkWidget, private bottomSheet: MatBottomSheet, private notificationService: NotificationService, - private themeService: ThemeService + private themeService: ThemeService, + private title: Title ) {} ngOnInit() { @@ -178,6 +180,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy { }), mergeMap((project: Project) => { this.project = project; + this.title.setTitle(this.project.name); if (this.mapSettingsService.interfaceLabels.has(project.project_id)) { this.isInterfaceLabelVisible = this.mapSettingsService.interfaceLabels.get(project.project_id); @@ -819,6 +822,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy { } public ngOnDestroy() { + this.title.setTitle('GNS3 Web UI'); this.drawingsDataSource.clear(); this.nodesDataSource.clear(); this.linksDataSource.clear();