mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-18 14:58:15 +00:00
Initial implementation
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
<button mat-menu-item (click)="openPacketFilters()">
|
||||
<mat-icon>filter_list</mat-icon>
|
||||
<span>Packet filters</span>
|
||||
</button>
|
@ -0,0 +1,30 @@
|
||||
import { Component, Input } from "@angular/core";
|
||||
import { Link } from '../../../../../models/link';
|
||||
import { Server } from '../../../../../models/server';
|
||||
import { Project } from '../../../../../models/project';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { PacketFiltersDialogComponent } from '../../../packet-capturing/packet-filters/packet-filters.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-packet-filters-action',
|
||||
templateUrl: './packet-filters-action.component.html'
|
||||
})
|
||||
export class PacketFiltersActionComponent {
|
||||
@Input() server: Server;
|
||||
@Input() project: Project;
|
||||
@Input() link: Link;
|
||||
|
||||
constructor(private dialog: MatDialog) {}
|
||||
|
||||
openPacketFilters() {
|
||||
const dialogRef = this.dialog.open(PacketFiltersDialogComponent, {
|
||||
width: '900px',
|
||||
height: '400px',
|
||||
autoFocus: false
|
||||
});
|
||||
let instance = dialogRef.componentInstance;
|
||||
instance.server = this.server;
|
||||
instance.project = this.project;
|
||||
instance.link = this.link;
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
<button mat-menu-item *ngIf="!link.capturing" (click)="startCapture()">
|
||||
<mat-icon>loupe</mat-icon>
|
||||
<span>Start capture</span>
|
||||
</button>
|
@ -0,0 +1,26 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Server } from '../../../../../models/server';
|
||||
import { Link } from '../../../../../models/link';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { StartCaptureDialogComponent } from '../../../packet-capturing/start-capture/start-capture.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-start-capture-action',
|
||||
templateUrl: './start-capture-action.component.html'
|
||||
})
|
||||
export class StartCaptureActionComponent {
|
||||
@Input() server: Server;
|
||||
@Input() link: Link;
|
||||
|
||||
constructor(private dialog: MatDialog) {}
|
||||
|
||||
startCapture() {
|
||||
const dialogRef = this.dialog.open(StartCaptureDialogComponent, {
|
||||
width: '400px',
|
||||
autoFocus: false
|
||||
});
|
||||
let instance = dialogRef.componentInstance;
|
||||
instance.server = this.server;
|
||||
instance.link = this.link;
|
||||
}
|
||||
}
|
@ -26,6 +26,17 @@
|
||||
[nodes]="nodes"
|
||||
[drawings]="drawings"
|
||||
></app-move-layer-down-action>
|
||||
<app-start-capture-action
|
||||
*ngIf="!projectService.isReadOnly(project) && drawings.length===0 && nodes.length===0 && links.length===1"
|
||||
[server]="server"
|
||||
[link]="links[0]"
|
||||
></app-start-capture-action>
|
||||
<app-packet-filters-action
|
||||
*ngIf="!projectService.isReadOnly(project) && drawings.length===0 && nodes.length===0 && links.length===1"
|
||||
[server]="server"
|
||||
[project]="project"
|
||||
[link]="links[0]"
|
||||
></app-packet-filters-action>
|
||||
<app-delete-action
|
||||
*ngIf="!projectService.isReadOnly(project)"
|
||||
[server]="server"
|
||||
|
Reference in New Issue
Block a user