98 lines
3.9 KiB
HTML
98 lines
3.9 KiB
HTML
<h1 mat-dialog-title>Workflow Configuration</h1>
|
|
|
|
<div mat-dialog-content>
|
|
|
|
<mat-vertical-stepper [linear]="true" #stepper>
|
|
<mat-step [stepControl]="wfConfFormStep1">
|
|
<form [formGroup]="wfConfFormStep1">
|
|
<ng-template matStepLabel>Choose Workflow</ng-template>
|
|
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%;">
|
|
<mat-label>Workflow</mat-label>
|
|
<input matInput formControlName="workflow" />
|
|
<mat-error *ngIf="wfConfFormStep1.get('workflow')?.invalid">This field is
|
|
<strong>required</strong></mat-error>
|
|
</mat-form-field>
|
|
<div>
|
|
<button mat-stroked-button color="primary" matStepperNext>Next</button>
|
|
</div>
|
|
</form>
|
|
</mat-step>
|
|
<mat-step [stepControl]="wfConfFormStep2" label="General">
|
|
<form [formGroup]="wfConfFormStep2">
|
|
<section>
|
|
<mat-checkbox formControlName="enabled">enabled</mat-checkbox>
|
|
</section>
|
|
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%;" *ngIf="data.id">
|
|
<mat-label>ID</mat-label>
|
|
<input matInput readonly value="{{data.id}}" />
|
|
</mat-form-field>
|
|
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%;">
|
|
<mat-label>Name</mat-label>
|
|
<input matInput formControlName="name" />
|
|
<mat-error *ngIf="wfConfFormStep2.get('name')?.invalid">This field is <strong>required</strong></mat-error>
|
|
</mat-form-field>
|
|
<mat-form-field appearance="fill" floatLabel="always" style="width: 40%;">
|
|
<mat-label>Priority</mat-label>
|
|
<input matInput formControlName="priority" type="number" step="1" min="1" max="100" />
|
|
<mat-error *ngIf="wfConfFormStep2.get('priority')?.invalid">Numeric value (range: 1-100)</mat-error>
|
|
</mat-form-field>
|
|
<div>
|
|
<button mat-stroked-button color="primary" matStepperPrevious>Back</button>
|
|
<button mat-stroked-button color="primary" matStepperNext>Next</button>
|
|
</div>
|
|
</form>
|
|
</mat-step>
|
|
<mat-step [stepControl]="wfConfFormStep3" label="Worflow Parameters">
|
|
<form [formGroup]="wfConfFormStep3">
|
|
|
|
<div>
|
|
<button mat-stroked-button color="primary" matStepperPrevious>Back</button>
|
|
<button mat-stroked-button color="primary" matStepperNext>Next</button>
|
|
</div>
|
|
</form>
|
|
</mat-step>
|
|
<mat-step [stepControl]="wfConfFormStep4" label="Scheduling">
|
|
<form [formGroup]="wfConfFormStep4">
|
|
<section>
|
|
<mat-checkbox formControlName="schedulingEnabled">Enabled</mat-checkbox>
|
|
</section>
|
|
<div *ngIf="wfConfFormStep4.get('schedulingEnabled')?.value">
|
|
<mat-form-field appearance="fill" floatLabel="always" style="width: 50%;">
|
|
<mat-label>Cron Expression</mat-label>
|
|
<input matInput formControlName="cronExpression" />
|
|
<mat-error *ngIf="wfConfFormStep4.get('cronExpression')?.invalid">This field is
|
|
<strong>required</strong></mat-error>
|
|
</mat-form-field>
|
|
<mat-form-field appearance="fill" floatLabel="always" style="width: 50%;">
|
|
<mat-label>Min Interval (in minutes)</mat-label>
|
|
<input matInput formControlName="cronMinInterval" type="number" step="10" min="10" max="10080" />
|
|
<mat-error *ngIf="wfConfFormStep4.get('cronMinInterval')?.invalid">This field is
|
|
<strong>required</strong></mat-error>
|
|
</mat-form-field>
|
|
</div>
|
|
<div>
|
|
<button mat-stroked-button color="primary" matStepperPrevious>Back</button>
|
|
<button mat-stroked-button color="primary" matStepperNext>Next</button>
|
|
</div>
|
|
</form>
|
|
</mat-step>
|
|
|
|
<mat-step>
|
|
<ng-template matStepLabel>Done</ng-template>
|
|
<p>You are now done.</p>
|
|
<div>
|
|
<form [formGroup]="wfConfFormFinal" (ngSubmit)="onSubmit()">
|
|
<button mat-stroked-button color="primary" type="submit">Submit</button>
|
|
<mat-error *ngIf="wfConfFormFinal.errors?.['serverError']">
|
|
{{ wfConfFormFinal.errors?.['serverError'] }}
|
|
</mat-error>
|
|
</form>
|
|
</div>
|
|
</mat-step>
|
|
</mat-vertical-stepper>
|
|
</div>
|
|
|
|
<div mat-dialog-actions>
|
|
<button mat-stroked-button color="primary" mat-dialog-close>Close</button>
|
|
</div>
|