mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-10 03:01:34 +00:00
I added reset all console connection control on nodes menu and removed red circle from nodes action confirmation dialog
This commit is contained in:
parent
9c3667277c
commit
5bddf9c5fc
@ -1,12 +1,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-10">
|
<div class="col-md-12">
|
||||||
<h5 class="heading-txt">Confirm {{ confirmActionData.actionType}} All</h5>
|
<h5 class="heading-txt">Confirm {{ confirmActionData.actionType}} All</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 txt-align">
|
|
||||||
<button mat-mini-fab color="warn" class="close-btn" mat-dialog-close>
|
|
||||||
<mat-icon class="close-icon">close</mat-icon>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<mat-divider></mat-divider>
|
<mat-divider></mat-divider>
|
||||||
<mat-dialog-content>
|
<mat-dialog-content>
|
||||||
|
@ -44,4 +44,14 @@
|
|||||||
>
|
>
|
||||||
<mat-icon>replay</mat-icon>
|
<mat-icon>replay</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
matTooltip="Reset all console connections"
|
||||||
|
matTooltipClass="custom-tooltip"
|
||||||
|
mat-icon-button
|
||||||
|
(click)="confirmControlsActions('reset')"
|
||||||
|
class="menu-button"
|
||||||
|
>
|
||||||
|
<mat-icon>compare_arrows</mat-icon>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -86,6 +86,13 @@ export class NodesMenuComponent {
|
|||||||
this.toasterService.success('All nodes successfully reloaded');
|
this.toasterService.success('All nodes successfully reloaded');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resetNodes() {
|
||||||
|
this.nodeService.resetAllNodes(this.server, this.project).subscribe(() => {
|
||||||
|
this.toasterService.success('Successfully reset all console connections');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public confirmControlsActions(type) {
|
public confirmControlsActions(type) {
|
||||||
const dialogRef = this.dialog.open(NodesMenuConfirmationDialogComponent, {
|
const dialogRef = this.dialog.open(NodesMenuConfirmationDialogComponent, {
|
||||||
width: '500px',
|
width: '500px',
|
||||||
@ -105,6 +112,7 @@ export class NodesMenuComponent {
|
|||||||
} else if (confirmAction_result.isAction && confirmAction_result.actionType == 'suspend') {
|
} else if (confirmAction_result.isAction && confirmAction_result.actionType == 'suspend') {
|
||||||
this.suspendNodes();
|
this.suspendNodes();
|
||||||
} else {
|
} else {
|
||||||
|
this.resetNodes()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,9 @@ export class NodeService {
|
|||||||
reloadAll(server: Server, project: Project) {
|
reloadAll(server: Server, project: Project) {
|
||||||
return this.httpServer.post(server, `/projects/${project.project_id}/nodes/reload`, {});
|
return this.httpServer.post(server, `/projects/${project.project_id}/nodes/reload`, {});
|
||||||
}
|
}
|
||||||
|
resetAllNodes(server: Server, project: Project) {
|
||||||
|
return this.httpServer.post(server, `/projects/${project.project_id}/nodes/console/reset`, {});
|
||||||
|
}
|
||||||
|
|
||||||
createFromTemplate(
|
createFromTemplate(
|
||||||
server: Server,
|
server: Server,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user