mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-15 13:28:10 +00:00
Dialog for VPCS added
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
<button mat-menu-item (click)="configureNode()">
|
||||
<mat-icon>settings_applications</mat-icon>
|
||||
<span>Configure</span>
|
||||
</button>
|
@ -0,0 +1,58 @@
|
||||
import { Component, Input, OnInit, OnChanges } from '@angular/core';
|
||||
import { Server } from '../../../../../models/server';
|
||||
import { Node } from '../../../../../cartography/models/node';
|
||||
import { MatDialog, MatDialogRef } from '@angular/material';
|
||||
import { ConfiguratorDialogVpcsComponent } from '../../../node-editors/configurator/vpcs/configurator-vpcs.component';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-config-node-action',
|
||||
templateUrl: './config-action.component.html'
|
||||
})
|
||||
export class ConfigActionComponent {
|
||||
@Input() server: Server;
|
||||
@Input() node: Node;
|
||||
private conf = {
|
||||
width: '600px',
|
||||
autoFocus: false
|
||||
};
|
||||
dialogRef;
|
||||
|
||||
constructor(private dialog: MatDialog) {}
|
||||
|
||||
configureNode() {
|
||||
if (this.node.node_type === 'vpcs') {
|
||||
this.dialogRef = this.dialog.open(ConfiguratorDialogVpcsComponent, this.conf);
|
||||
} else if (this.node.node_type === 'ethernet_hub') {
|
||||
|
||||
} else if (this.node.node_type === 'ethernet_switch') {
|
||||
|
||||
} else if (this.node.node_type === 'cloud') {
|
||||
|
||||
} else if (this.node.node_type === 'dynamips') {
|
||||
|
||||
} else if (this.node.node_type === 'iou') {
|
||||
|
||||
} else if (this.node.node_type === 'qemu') {
|
||||
|
||||
} else if (this.node.node_type === 'virtualbox') {
|
||||
|
||||
} else if (this.node.node_type === 'vmware') {
|
||||
|
||||
} else if (this.node.node_type === 'docker') {
|
||||
|
||||
} else if (this.node.node_type === 'nat') {
|
||||
|
||||
} else if (this.node.node_type === 'frame_relay_switch') {
|
||||
|
||||
} else if (this.node.node_type === 'atm_switch') {
|
||||
|
||||
} else if (this.node.node_type === 'traceng') {
|
||||
|
||||
}
|
||||
|
||||
let instance = this.dialogRef.componentInstance;
|
||||
instance.server = this.server;
|
||||
instance.node = this.node;
|
||||
}
|
||||
}
|
@ -5,6 +5,10 @@
|
||||
[server]="server"
|
||||
[node]="nodes[0]"
|
||||
></app-show-node-action>
|
||||
<app-config-node-action *ngIf="nodes.length===1"
|
||||
[server]="server"
|
||||
[node]="nodes[0]"
|
||||
></app-config-node-action>
|
||||
<app-start-node-action *ngIf="nodes.length && labels.length===0" [server]="server" [nodes]="nodes"></app-start-node-action>
|
||||
<app-suspend-node-action *ngIf="nodes.length && labels.length===0" [server]="server" [nodes]="nodes"></app-suspend-node-action>
|
||||
<app-stop-node-action *ngIf="nodes.length && labels.length===0" [server]="server" [nodes]="nodes"></app-stop-node-action>
|
||||
|
Reference in New Issue
Block a user