mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-20 13:33:06 +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="col-md-10">
|
||||
<div class="col-md-12">
|
||||
<h5 class="heading-txt">Confirm {{ confirmActionData.actionType}} All</h5>
|
||||
</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>
|
||||
<mat-divider></mat-divider>
|
||||
<mat-dialog-content>
|
||||
|
@ -44,4 +44,14 @@
|
||||
>
|
||||
<mat-icon>replay</mat-icon>
|
||||
</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>
|
||||
|
@ -86,6 +86,13 @@ export class NodesMenuComponent {
|
||||
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) {
|
||||
const dialogRef = this.dialog.open(NodesMenuConfirmationDialogComponent, {
|
||||
width: '500px',
|
||||
@ -105,6 +112,7 @@ export class NodesMenuComponent {
|
||||
} else if (confirmAction_result.isAction && confirmAction_result.actionType == 'suspend') {
|
||||
this.suspendNodes();
|
||||
} else {
|
||||
this.resetNodes()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -55,6 +55,9 @@ export class NodeService {
|
||||
reloadAll(server: Server, project: Project) {
|
||||
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(
|
||||
server: Server,
|
||||
|
Loading…
Reference in New Issue
Block a user