mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-03 03:26:42 +00:00
update deprecated angular API's
This commit is contained in:
parent
002569ed75
commit
a172b7d41f
@ -106,6 +106,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
public toolbarVisibility: boolean = true;
|
public toolbarVisibility: boolean = true;
|
||||||
public symbolScaling: boolean = true;
|
public symbolScaling: boolean = true;
|
||||||
private instance: ComponentRef<TopologySummaryComponent>;
|
private instance: ComponentRef<TopologySummaryComponent>;
|
||||||
|
// private instance: any
|
||||||
|
|
||||||
tools = {
|
tools = {
|
||||||
selection: true,
|
selection: true,
|
||||||
@ -175,10 +176,16 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
private nodeConsoleService: NodeConsoleService,
|
private nodeConsoleService: NodeConsoleService,
|
||||||
private symbolService: SymbolService,
|
private symbolService: SymbolService,
|
||||||
private cd: ChangeDetectorRef,
|
private cd: ChangeDetectorRef,
|
||||||
private cfr: ComponentFactoryResolver,
|
// private cfr: ComponentFactoryResolver,
|
||||||
private injector: Injector
|
// private injector: Injector,
|
||||||
|
private viewContainerRef: ViewContainerRef
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// constructor(private viewContainerRef: ViewContainerRef) {}
|
||||||
|
// createMyComponent() {this.viewContainerRef.createComponent(MyComponent);}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getSettings();
|
this.getSettings();
|
||||||
this.progressService.activate();
|
this.progressService.activate();
|
||||||
@ -221,8 +228,10 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
async lazyLoadTopologySummary() {
|
async lazyLoadTopologySummary() {
|
||||||
if (this.isTopologySummaryVisible) {
|
if (this.isTopologySummaryVisible) {
|
||||||
const {TopologySummaryComponent} = await import('../topology-summary/topology-summary.component');
|
const {TopologySummaryComponent} = await import('../topology-summary/topology-summary.component');
|
||||||
const componentFactory = this.cfr.resolveComponentFactory(TopologySummaryComponent);
|
this.instance = this.viewContainerRef.createComponent(TopologySummaryComponent)
|
||||||
this.instance = this.topologySummaryContainer.createComponent(componentFactory, null, this.injector);
|
|
||||||
|
// const componentFactory = this.cfr.resolveComponentFactory(TopologySummaryComponent);
|
||||||
|
// this.instance = this.topologySummaryContainer.createComponent(componentFactory, null, this.injector);
|
||||||
this.instance.instance.server = this.server;
|
this.instance.instance.server = this.server;
|
||||||
this.instance.instance.project = this.project;
|
this.instance.instance.project = this.project;
|
||||||
} else if (this.instance) {
|
} else if (this.instance) {
|
||||||
@ -471,6 +480,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.projectws.onerror = (event: MessageEvent) => {
|
this.projectws.onerror = (event: MessageEvent) => {
|
||||||
|
debugger
|
||||||
this.toasterService.error(`Connection to host lost. Error: ${event.data}`);
|
this.toasterService.error(`Connection to host lost. Error: ${event.data}`);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user