Fix for configurator name

This commit is contained in:
Piotr Pekala 2019-09-10 04:07:08 -07:00
parent 32dc9e3c07
commit 9ab7616d89
6 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,4 @@
<h1 mat-dialog-title>Configurator for node {{node.name}}</h1> <h1 mat-dialog-title>Configurator for node {{name}}</h1>
<div class="modal-form-container"> <div class="modal-form-container">
<div class="content"> <div class="content">

View File

@ -18,7 +18,7 @@ export class ConfiguratorDialogEthernetSwitchComponent implements OnInit {
@ViewChild(PortsComponent, {static: false}) portsComponent: PortsComponent; @ViewChild(PortsComponent, {static: false}) portsComponent: PortsComponent;
server: Server; server: Server;
node: Node; node: Node;
name: string;
inputForm: FormGroup; inputForm: FormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
@ -37,6 +37,7 @@ export class ConfiguratorDialogEthernetSwitchComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.nodeService.getNode(this.server, this.node).subscribe((node: Node) => { this.nodeService.getNode(this.server, this.node).subscribe((node: Node) => {
this.node = node; this.node = node;
this.name = this.node.name;
this.getConfiguration(); this.getConfiguration();
}) })
} }

View File

@ -1,4 +1,4 @@
<h1 mat-dialog-title>Configurator for node {{node.name}}</h1> <h1 mat-dialog-title>Configurator for node {{name}}</h1>
<div class="modal-form-container"> <div class="modal-form-container">
<div class="content"> <div class="content">

View File

@ -20,6 +20,7 @@ export class ConfiguratorDialogEthernetHubComponent implements OnInit {
inputForm: FormGroup; inputForm: FormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
categories = []; categories = [];
name: string;
constructor( constructor(
public dialogRef: MatDialogRef<ConfiguratorDialogEthernetHubComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogEthernetHubComponent>,
@ -36,6 +37,7 @@ export class ConfiguratorDialogEthernetHubComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.nodeService.getNode(this.server, this.node).subscribe((node: Node) => { this.nodeService.getNode(this.server, this.node).subscribe((node: Node) => {
this.node = node; this.node = node;
this.name = this.node.name;
this.numberOfPorts = this.node.ports.length; this.numberOfPorts = this.node.ports.length;
this.getConfiguration(); this.getConfiguration();
}) })

View File

@ -1,4 +1,4 @@
<h1 mat-dialog-title>Configurator for node {{node.name}}</h1> <h1 mat-dialog-title>Configurator for node {{name}}</h1>
<div class="modal-form-container"> <div class="modal-form-container">
<div class="content"> <div class="content">

View File

@ -16,7 +16,7 @@ import { MatDialogRef } from '@angular/material';
export class ConfiguratorDialogVpcsComponent implements OnInit { export class ConfiguratorDialogVpcsComponent implements OnInit {
server: Server; server: Server;
node: Node; node: Node;
name: string;
inputForm: FormGroup; inputForm: FormGroup;
consoleTypes: string[] = []; consoleTypes: string[] = [];
@ -35,6 +35,7 @@ export class ConfiguratorDialogVpcsComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.nodeService.getNode(this.server, this.node).subscribe((node: Node) => { this.nodeService.getNode(this.server, this.node).subscribe((node: Node) => {
this.node = node; this.node = node;
this.name = node.name;
this.getConfiguration(); this.getConfiguration();
}) })
} }