Support for starting wireshark

This commit is contained in:
Piotr Pekala
2019-09-24 04:14:44 -07:00
parent a989a88dbb
commit 679a0d02bb
4 changed files with 32 additions and 6 deletions

View File

@ -0,0 +1,4 @@
<button mat-menu-item *ngIf="link.capturing" (click)="startCapture()">
<mat-icon>search</mat-icon>
<span>Start Wireshark</span>
</button>

View File

@ -0,0 +1,24 @@
import { Component, Input } from '@angular/core';
import { Server } from '../../../../../models/server';
import { Link } from '../../../../../models/link';
import { Project } from '../../../../../models/project';
import { PacketCaptureService } from '../../../../../services/packet-capture.service';
@Component({
selector: 'app-start-capture-on-started-link-action',
templateUrl: './start-capture-on-started-link.component.html'
})
export class StartCaptureOnStartedLinkActionComponent {
@Input() server: Server;
@Input() project: Project;
@Input() link: Link;
constructor(
private packetCaptureService: PacketCaptureService
) {}
startCapture() {
var splittedFileName = this.link.capture_file_name.split('.');
this.packetCaptureService.startCapture(this.server, this.project, this.link, splittedFileName[0]);
}
}