mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-21 10:01:44 +00:00
Project name as page title
This commit is contained in:
parent
e11281ddf6
commit
2e851cd6d2
@ -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,
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user