mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-05-19 17:03:08 +00:00
Fix for auto_close
This commit is contained in:
parent
d6808ba1d7
commit
a7f5a5fa09
@ -33,7 +33,7 @@
|
|||||||
Start all nodes when this project is opened
|
Start all nodes when this project is opened
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
|
|
||||||
<mat-checkbox [ngModelOptions]="{standalone: true}" [(ngModel)]="!project.auto_close">
|
<mat-checkbox [ngModelOptions]="{standalone: true}" [(ngModel)]="auto_close">
|
||||||
Leave this project running in the background after closing
|
Leave this project running in the background after closing
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
|
|
||||||
|
@ -22,6 +22,8 @@ export class EditProjectDialogComponent implements OnInit {
|
|||||||
displayedColumns: string[] = ['name', 'value', 'actions'];
|
displayedColumns: string[] = ['name', 'value', 'actions'];
|
||||||
variables: ProjectVariable[] = [];
|
variables: ProjectVariable[] = [];
|
||||||
|
|
||||||
|
auto_close: boolean;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialogRef: MatDialogRef<EditProjectDialogComponent>,
|
public dialogRef: MatDialogRef<EditProjectDialogComponent>,
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
@ -52,6 +54,7 @@ export class EditProjectDialogComponent implements OnInit {
|
|||||||
if (this.project.variables) {
|
if (this.project.variables) {
|
||||||
this.project.variables.forEach(n => this.variables.push(n));
|
this.project.variables.forEach(n => this.variables.push(n));
|
||||||
}
|
}
|
||||||
|
this.auto_close = !this.project.auto_close;
|
||||||
}
|
}
|
||||||
|
|
||||||
addVariable() {
|
addVariable() {
|
||||||
@ -83,6 +86,8 @@ export class EditProjectDialogComponent implements OnInit {
|
|||||||
this.project.grid_size = this.formGroup.get('nodeGridSize').value;
|
this.project.grid_size = this.formGroup.get('nodeGridSize').value;
|
||||||
this.project.variables = this.variables;
|
this.project.variables = this.variables;
|
||||||
|
|
||||||
|
this.project.auto_close = !this.project.auto_close;
|
||||||
|
|
||||||
this.projectService.update(this.server, this.project).subscribe((project: Project) => {
|
this.projectService.update(this.server, this.project).subscribe((project: Project) => {
|
||||||
this.toasterService.success(`Project ${project.name} updated.`);
|
this.toasterService.success(`Project ${project.name} updated.`);
|
||||||
this.onNoClick();
|
this.onNoClick();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user