-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
136 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea/modules.xml | ||
.idea/jarRepositories.xml | ||
.idea/compiler.xml | ||
.idea/libraries/ | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### Eclipse ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Mac OS ### | ||
.DS_Store | ||
|
||
/example-configs/* | ||
|
||
/converter/src/main/resources/tools/* |
16 changes: 16 additions & 0 deletions
16
config/editor/src/app/modules/config-editor/component/save-dialog/save-dialog.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<h1 mat-dialog-title>Save editor content</h1> | ||
<div mat-dialog-content> | ||
<form [formGroup]="platform" class="form1"> | ||
|
||
<mat-label>Reload</mat-label> | ||
<mat-checkbox [formControl]="reloadCtrl"></mat-checkbox> | ||
|
||
<mat-label>Show logs</mat-label> | ||
<mat-checkbox [formControl]="showLogsCtrl"></mat-checkbox> | ||
|
||
</form> | ||
</div> | ||
<div mat-dialog-actions> | ||
<button mat-raised-button color="warn" (click)="uploadCache()">in cache</button> | ||
<button mat-raised-button color="primary" (click)="uploadConfig()">in config</button> | ||
</div> |
Empty file.
21 changes: 21 additions & 0 deletions
21
.../editor/src/app/modules/config-editor/component/save-dialog/save-dialog.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { SaveDialogComponent } from './save-dialog.component'; | ||
|
||
describe('SaveDialogComponent', () => { | ||
let component: SaveDialogComponent; | ||
let fixture: ComponentFixture<SaveDialogComponent>; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [SaveDialogComponent] | ||
}); | ||
fixture = TestBed.createComponent(SaveDialogComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
56 changes: 56 additions & 0 deletions
56
config/editor/src/app/modules/config-editor/component/save-dialog/save-dialog.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import {Component, Inject} from '@angular/core'; | ||
import {FormBuilder, FormControl, Validators} from "@angular/forms"; | ||
import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from "@angular/material/dialog"; | ||
import {CoverConfig} from "../../../../definition/actuator/CoverConfig"; | ||
import {ExtensionsService} from "../../extensions.service"; | ||
|
||
@Component({ | ||
selector: 'app-save-dialog', | ||
templateUrl: './save-dialog.component.html', | ||
styleUrls: ['./save-dialog.component.scss'] | ||
}) | ||
export class SaveDialogComponent { | ||
|
||
|
||
reloadCtrl = new FormControl(true, Validators.required); | ||
showLogsCtrl = new FormControl(true, Validators.required); | ||
|
||
|
||
platform = this._formBuilder.group({ | ||
reload: this.reloadCtrl, | ||
showLogs: this.showLogsCtrl, | ||
}); | ||
|
||
constructor(private _formBuilder: FormBuilder, | ||
public dialogRef: MatDialogRef<SaveDialogComponent, SaveCommand>, | ||
@Inject(MAT_DIALOG_DATA) public data: { config: CoverConfig }, | ||
public es: ExtensionsService, | ||
public dialog: MatDialog | ||
) { | ||
} | ||
|
||
|
||
uploadCache() { | ||
let rawValue = this.platform.getRawValue(); | ||
this.dialogRef.close({ | ||
target: "cache", | ||
reload: (rawValue.reload) as boolean, | ||
showLogs: (rawValue.showLogs) as boolean | ||
}) | ||
} | ||
|
||
uploadConfig() { | ||
let rawValue = this.platform.getRawValue(); | ||
this.dialogRef.close({ | ||
target: "config", | ||
reload: (rawValue.reload) as boolean, | ||
showLogs: (rawValue.showLogs) as boolean | ||
}) | ||
} | ||
} | ||
|
||
export interface SaveCommand { | ||
target: string; | ||
reload: boolean; | ||
showLogs: boolean | ||
} |