mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-06 09:11:36 +00:00
Unisolate action added
This commit is contained in:
parent
8b177013d1
commit
fa22ce5d0f
@ -130,6 +130,7 @@ import { StartCaptureActionComponent } from './components/project-map/context-me
|
|||||||
import { StartNodeActionComponent } from './components/project-map/context-menu/actions/start-node-action/start-node-action.component';
|
import { StartNodeActionComponent } from './components/project-map/context-menu/actions/start-node-action/start-node-action.component';
|
||||||
import { StopCaptureActionComponent } from './components/project-map/context-menu/actions/stop-capture/stop-capture-action.component';
|
import { StopCaptureActionComponent } from './components/project-map/context-menu/actions/stop-capture/stop-capture-action.component';
|
||||||
import { IsolateNodeActionComponent } from './components/project-map/context-menu/actions/isolate-node-action/isolate-node-action.component';
|
import { IsolateNodeActionComponent } from './components/project-map/context-menu/actions/isolate-node-action/isolate-node-action.component';
|
||||||
|
import { UnisolateNodeActionComponent } from './components/project-map/context-menu/actions/unisolate-node-action/unisolate-node-action.component';
|
||||||
import { StopNodeActionComponent } from './components/project-map/context-menu/actions/stop-node-action/stop-node-action.component';
|
import { StopNodeActionComponent } from './components/project-map/context-menu/actions/stop-node-action/stop-node-action.component';
|
||||||
import { SuspendLinkActionComponent } from './components/project-map/context-menu/actions/suspend-link/suspend-link-action.component';
|
import { SuspendLinkActionComponent } from './components/project-map/context-menu/actions/suspend-link/suspend-link-action.component';
|
||||||
import { SuspendNodeActionComponent } from './components/project-map/context-menu/actions/suspend-node-action/suspend-node-action.component';
|
import { SuspendNodeActionComponent } from './components/project-map/context-menu/actions/suspend-node-action/suspend-node-action.component';
|
||||||
@ -292,6 +293,7 @@ import { LoggedUserComponent } from './components/users/logged-user/logged-user.
|
|||||||
ContextConsoleMenuComponent,
|
ContextConsoleMenuComponent,
|
||||||
StartNodeActionComponent,
|
StartNodeActionComponent,
|
||||||
IsolateNodeActionComponent,
|
IsolateNodeActionComponent,
|
||||||
|
UnisolateNodeActionComponent,
|
||||||
StopNodeActionComponent,
|
StopNodeActionComponent,
|
||||||
TemplateComponent,
|
TemplateComponent,
|
||||||
TemplateListDialogComponent,
|
TemplateListDialogComponent,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<button mat-menu-item (click)="isolate()">
|
<button mat-menu-item (click)="isolate()">
|
||||||
<mat-icon>link_off</mat-icon>
|
<mat-icon>gps_off</mat-icon>
|
||||||
<span>Isolate</span>
|
<span>Isolate</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -11,7 +11,6 @@ import { ToasterService } from '../../../../../services/toaster.service';
|
|||||||
export class IsolateNodeActionComponent implements OnInit {
|
export class IsolateNodeActionComponent implements OnInit {
|
||||||
@Input() server: Server;
|
@Input() server: Server;
|
||||||
@Input() node: Node;
|
@Input() node: Node;
|
||||||
isNodeWithStoppedStatus: boolean;
|
|
||||||
|
|
||||||
constructor(private nodeService: NodeService, private toasterService: ToasterService) {}
|
constructor(private nodeService: NodeService, private toasterService: ToasterService) {}
|
||||||
|
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
<button mat-menu-item (click)="unisolate()">
|
||||||
|
<mat-icon>gps_not_fixed</mat-icon>
|
||||||
|
<span>Un-isolate</span>
|
||||||
|
</button>
|
@ -0,0 +1,27 @@
|
|||||||
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
|
import { Node } from '../../../../../cartography/models/node';
|
||||||
|
import { Server } from '../../../../../models/server';
|
||||||
|
import { NodeService } from '../../../../../services/node.service';
|
||||||
|
import { ToasterService } from '../../../../../services/toaster.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-unisolate-node-action',
|
||||||
|
templateUrl: './unisolate-node-action.component.html',
|
||||||
|
})
|
||||||
|
export class UnisolateNodeActionComponent implements OnInit {
|
||||||
|
@Input() server: Server;
|
||||||
|
@Input() node: Node;
|
||||||
|
|
||||||
|
constructor(private nodeService: NodeService, private toasterService: ToasterService) {}
|
||||||
|
|
||||||
|
ngOnInit() {}
|
||||||
|
|
||||||
|
unisolate() {
|
||||||
|
this.nodeService.unisolate(this.server, this.node).subscribe(
|
||||||
|
(n: Node) => {},
|
||||||
|
(error) => {
|
||||||
|
this.toasterService.error(error.error.message);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -32,9 +32,8 @@
|
|||||||
[server]="server"
|
[server]="server"
|
||||||
[node]="nodes[0]"
|
[node]="nodes[0]"
|
||||||
></app-open-file-explorer-action>
|
></app-open-file-explorer-action>
|
||||||
|
|
||||||
<app-isolate-node-action *ngIf="nodes.length === 1" [server]="server" [node]="nodes[0]"></app-isolate-node-action>
|
<app-isolate-node-action *ngIf="nodes.length === 1" [server]="server" [node]="nodes[0]"></app-isolate-node-action>
|
||||||
|
<app-unisolate-node-action *ngIf="nodes.length === 1" [server]="server" [node]="nodes[0]"></app-unisolate-node-action>
|
||||||
<app-change-hostname-action
|
<app-change-hostname-action
|
||||||
*ngIf="!projectService.isReadOnly(project) && nodes.length === 1"
|
*ngIf="!projectService.isReadOnly(project) && nodes.length === 1"
|
||||||
[server]="server"
|
[server]="server"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user