mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-05-18 08:22:55 +00:00
Merge pull request #697 from GNS3/Project-name-as-page-title
Project name as page title
This commit is contained in:
commit
cd111fde13
@ -1,5 +1,5 @@
|
|||||||
import * as Raven from 'raven-js';
|
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 { NgModule, ErrorHandler } from '@angular/core';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { CdkTableModule } from '@angular/cdk/table';
|
import { CdkTableModule } from '@angular/cdk/table';
|
||||||
@ -538,7 +538,8 @@ if (environment.production) {
|
|||||||
NotificationService,
|
NotificationService,
|
||||||
Gns3vmService,
|
Gns3vmService,
|
||||||
ThemeService,
|
ThemeService,
|
||||||
GoogleAnalyticsService
|
GoogleAnalyticsService,
|
||||||
|
Title
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
AddServerDialogComponent,
|
AddServerDialogComponent,
|
||||||
|
@ -66,6 +66,7 @@ import { ConfirmationBottomSheetComponent } from '../projects/confirmation-botto
|
|||||||
import { NodeAddedEvent } from '../template/template-list-dialog/template-list-dialog.component';
|
import { NodeAddedEvent } from '../template/template-list-dialog/template-list-dialog.component';
|
||||||
import { NotificationService } from '../../services/notification.service';
|
import { NotificationService } from '../../services/notification.service';
|
||||||
import { ThemeService } from '../../services/theme.service';
|
import { ThemeService } from '../../services/theme.service';
|
||||||
|
import { Title } from '@angular/platform-browser';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -153,7 +154,8 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
private serialLinkWidget: SerialLinkWidget,
|
private serialLinkWidget: SerialLinkWidget,
|
||||||
private bottomSheet: MatBottomSheet,
|
private bottomSheet: MatBottomSheet,
|
||||||
private notificationService: NotificationService,
|
private notificationService: NotificationService,
|
||||||
private themeService: ThemeService
|
private themeService: ThemeService,
|
||||||
|
private title: Title
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@ -178,6 +180,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
}),
|
}),
|
||||||
mergeMap((project: Project) => {
|
mergeMap((project: Project) => {
|
||||||
this.project = project;
|
this.project = project;
|
||||||
|
this.title.setTitle(this.project.name);
|
||||||
|
|
||||||
if (this.mapSettingsService.interfaceLabels.has(project.project_id)) {
|
if (this.mapSettingsService.interfaceLabels.has(project.project_id)) {
|
||||||
this.isInterfaceLabelVisible = this.mapSettingsService.interfaceLabels.get(project.project_id);
|
this.isInterfaceLabelVisible = this.mapSettingsService.interfaceLabels.get(project.project_id);
|
||||||
@ -819,6 +822,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ngOnDestroy() {
|
public ngOnDestroy() {
|
||||||
|
this.title.setTitle('GNS3 Web UI');
|
||||||
this.drawingsDataSource.clear();
|
this.drawingsDataSource.clear();
|
||||||
this.nodesDataSource.clear();
|
this.nodesDataSource.clear();
|
||||||
this.linksDataSource.clear();
|
this.linksDataSource.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user