diff --git a/frontends/dnet-is-application/src/app/app.module.ts b/frontends/dnet-is-application/src/app/app.module.ts index 0391345f..076e804d 100644 --- a/frontends/dnet-is-application/src/app/app.module.ts +++ b/frontends/dnet-is-application/src/app/app.module.ts @@ -40,6 +40,7 @@ import { EmailDialog, EmailsComponent } from './emails/emails.component'; import { WfConfsComponent, WfConfDialog } from './wf-confs/wf-confs.component'; import { MatTabsModule } from '@angular/material/tabs'; import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatStepperModule } from '@angular/material/stepper'; @NgModule({ declarations: [ @@ -105,7 +106,8 @@ import { MatCheckboxModule } from '@angular/material/checkbox'; MatSnackBarModule, MatPaginatorModule, MatProgressSpinnerModule, - MatTabsModule + MatTabsModule, + MatStepperModule ], providers: [{ provide: HTTP_INTERCEPTORS, diff --git a/frontends/dnet-is-application/src/app/wf-confs/wf-conf-dialog.html b/frontends/dnet-is-application/src/app/wf-confs/wf-conf-dialog.html index e3a0af69..82d94f7e 100644 --- a/frontends/dnet-is-application/src/app/wf-confs/wf-conf-dialog.html +++ b/frontends/dnet-is-application/src/app/wf-confs/wf-conf-dialog.html @@ -1,83 +1,97 @@ -
-

Workflow Configuration

+

Workflow Configuration

-
-
- enabled -
+
- - - Description - - + + + + Choose Workflow + + Workflow + + This field is + required + +
+ +
+ +
+ +
+
+ enabled +
ID - - + Name - This field is required + This field is required - - + Priority - - This field is required + + Numeric value (range: 1-100) - - +
+ + +
+ +
+ +
- - - Workflow parameters - - - - Workflow - - This field is required - - - - - - - Scheduling - - +
+ + +
+ +
+ +
Enabled
-
+
Cron Expression - This field is + This field is required - - Min Interval - - This field is + Min Interval (in minutes) + + This field is required
- +
+ + +
+ + - + + Done +

You are now done.

+
+
+ + + {{ wfConfFormFinal.errors?.['serverError'] }} + +
+
+
+ +
-
- -
- - - - {{ wfConfForm.errors?.['serverError'] }} - -
- - +
+ +
diff --git a/frontends/dnet-is-application/src/app/wf-confs/wf-confs.component.ts b/frontends/dnet-is-application/src/app/wf-confs/wf-confs.component.ts index 42a5942c..d3042423 100644 --- a/frontends/dnet-is-application/src/app/wf-confs/wf-confs.component.ts +++ b/frontends/dnet-is-application/src/app/wf-confs/wf-confs.component.ts @@ -57,7 +57,7 @@ export class WfConfsComponent implements OnInit { priority: 75, workflow: '', schedulingEnabled: false, - cronExpression: '', + cronExpression: '0 30 12 1/1 * ?', cronMinInterval: 9600, details: new Map, configured: true, @@ -79,35 +79,51 @@ export class WfConfsComponent implements OnInit { styleUrls: ['./wf-confs.component.css'] }) export class WfConfDialog { - wfConfForm = new FormGroup({ + + wfConfFormStep1 = new FormGroup({ + workflow: new FormControl('', [Validators.required]), + }); + + + wfConfFormStep2 = new FormGroup({ name: new FormControl('', [Validators.required]), //details: Map, enabled: new FormControl(true, [Validators.required]), priority: new FormControl(75, [Validators.required, Validators.min(1), Validators.max(100)]), - schedulingEnabled: new FormControl(false, [Validators.required]), - cronExpression: new FormControl("", [Validators.required]), - cronMinInterval: new FormControl("", [Validators.required]), - workflow: new FormControl('', [Validators.required]), + }); + + wfConfFormStep3 = new FormGroup({ //systemParams: Map, //userParams: Map }); + wfConfFormStep4 = new FormGroup({ + schedulingEnabled: new FormControl(false, [Validators.required]), + cronExpression: new FormControl("", [Validators.required]), + cronMinInterval: new FormControl("", [Validators.required]), + }); + + wfConfFormFinal = new FormGroup({}); + constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any, public service: ISService) { - this.wfConfForm.get('name')?.setValue(data.name); + this.wfConfFormStep1.get('workflow')?.setValue(data.workflow); + + this.wfConfFormStep2.get('name')?.setValue(data.name); + this.wfConfFormStep2.get('enabled')?.setValue(data.enabled); + this.wfConfFormStep2.get('priority')?.setValue(data.priority); //details - this.wfConfForm.get('enabled')?.setValue(data.enabled); - this.wfConfForm.get('priority')?.setValue(data.priority); - this.wfConfForm.get('schedulingEnabled')?.setValue(data.schedulingEnabled); - this.wfConfForm.get('cronExpression')?.setValue(data.cronExpression); - this.wfConfForm.get('cronMinInterval')?.setValue(data.cronMinInterval); - this.wfConfForm.get('workflow')?.setValue(data.workflow); + //systemParams, //userParams + + this.wfConfFormStep4.get('schedulingEnabled')?.setValue(data.schedulingEnabled); + this.wfConfFormStep4.get('cronExpression')?.setValue(data.cronExpression); + this.wfConfFormStep4.get('cronMinInterval')?.setValue(data.cronMinInterval); } onSubmit(): void { - const conf = Object.assign({}, this.data, this.wfConfForm.value); - this.service.saveWfConfiguration(conf, (data: void) => this.dialogRef.close(1), this.wfConfForm); + const conf = Object.assign({}, this.data, this.wfConfFormStep1.value, this.wfConfFormStep2.value, this.wfConfFormStep3.value, this.wfConfFormStep4.value); + this.service.saveWfConfiguration(conf, (data: void) => this.dialogRef.close(1), this.wfConfFormFinal); } onNoClick(): void {