mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-18 23:08:14 +00:00
Capturing packets visible on map
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
<button mat-menu-item *ngIf="link.suspend" (click)="resumeLink()">
|
||||
<mat-icon>play_arrow</mat-icon>
|
||||
<span>Resume</span>
|
||||
</button>
|
@ -0,0 +1,22 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Server } from '../../../../../models/server';
|
||||
import { Link } from '../../../../../models/link';
|
||||
import { LinkService } from '../../../../../services/link.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-resume-link-action',
|
||||
templateUrl: './resume-link-action.component.html'
|
||||
})
|
||||
export class ResumeLinkActionComponent {
|
||||
@Input() server: Server;
|
||||
@Input() link: Link;
|
||||
|
||||
constructor(
|
||||
private linkService: LinkService
|
||||
) {}
|
||||
|
||||
resumeLink() {
|
||||
this.link.suspend = false;
|
||||
this.linkService.updateLink(this.server, this.link).subscribe(() => {});
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
<button mat-menu-item *ngIf="link.capturing" (click)="stopCapture()">
|
||||
<mat-icon>pause_circle_filled</mat-icon>
|
||||
<span>Stop capture</span>
|
||||
</button>
|
@ -0,0 +1,21 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Server } from '../../../../../models/server';
|
||||
import { Link } from '../../../../../models/link';
|
||||
import { LinkService } from '../../../../../services/link.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-stop-capture-action',
|
||||
templateUrl: './stop-capture-action.component.html'
|
||||
})
|
||||
export class StopCaptureActionComponent {
|
||||
@Input() server: Server;
|
||||
@Input() link: Link;
|
||||
|
||||
constructor(
|
||||
private linkService: LinkService
|
||||
) {}
|
||||
|
||||
stopCapture() {
|
||||
this.linkService.stopCaptureOnLink(this.server, this.link).subscribe(() => {});
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
<button mat-menu-item *ngIf="!link.suspend" (click)="suspendLink()">
|
||||
<mat-icon>pause</mat-icon>
|
||||
<span>Suspend</span>
|
||||
</button>
|
@ -0,0 +1,22 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Server } from '../../../../../models/server';
|
||||
import { Link } from '../../../../../models/link';
|
||||
import { LinkService } from '../../../../../services/link.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-suspend-link-action',
|
||||
templateUrl: './suspend-link-action.component.html'
|
||||
})
|
||||
export class SuspendLinkActionComponent {
|
||||
@Input() server: Server;
|
||||
@Input() link: Link;
|
||||
|
||||
constructor(
|
||||
private linkService: LinkService
|
||||
) {}
|
||||
|
||||
suspendLink() {
|
||||
this.link.suspend = true;
|
||||
this.linkService.updateLink(this.server, this.link).subscribe(() => {});
|
||||
}
|
||||
}
|
@ -31,12 +31,27 @@
|
||||
[server]="server"
|
||||
[link]="links[0]"
|
||||
></app-start-capture-action>
|
||||
<app-stop-capture-action
|
||||
*ngIf="!projectService.isReadOnly(project) && drawings.length===0 && nodes.length===0 && links.length===1"
|
||||
[server]="server"
|
||||
[link]="links[0]"
|
||||
></app-stop-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-resume-link-action
|
||||
*ngIf="!projectService.isReadOnly(project) && drawings.length===0 && nodes.length===0 && links.length===1"
|
||||
[server]="server"
|
||||
[link]="links[0]"
|
||||
></app-resume-link-action>
|
||||
<app-suspend-link-action
|
||||
*ngIf="!projectService.isReadOnly(project) && drawings.length===0 && nodes.length===0 && links.length===1"
|
||||
[server]="server"
|
||||
[link]="links[0]"
|
||||
></app-suspend-link-action>
|
||||
<app-delete-action
|
||||
*ngIf="!projectService.isReadOnly(project)"
|
||||
[server]="server"
|
||||
|
Reference in New Issue
Block a user