Skip to content

Commit

Permalink
Add descriptions for steps.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Borzenko committed Jul 21, 2023
1 parent c81b714 commit 89405c1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="mt-4">
<div class="border border-1 mt-4 px-2 py-4 rounded-3">
<form [formGroup]="pollingSourceForm">
<mat-stepper [linear]="true" #stepper>
<mat-stepper linear #stepper>
<mat-step [stepControl]="fetchForm">
<ng-template matStepLabel>Fetch</ng-template>
<div class="container-step">
Expand All @@ -12,7 +12,9 @@
[defaultKind]="FETCH_DEFAULT_KIND"
[sectionName]="steps.FETCH"
[eventYamlByHash]="eventYamlByHash"
eventHistory
[description]="
'Determines where data is sourced from'
"
></app-base-step>
<app-stepper-navigation
[prevStep]="null"
Expand All @@ -22,7 +24,10 @@
></app-stepper-navigation>
</div>
</mat-step>
<mat-step [stepControl]="prepareForm" [optional]="false">
<mat-step
[stepControl]="prepareForm"
errorMessage="Field is required"
>
<ng-template matStepLabel>Prepare</ng-template>
<div class="container-step">
<app-prepare-step
Expand All @@ -46,6 +51,9 @@
[defaultKind]="READ_DEFAULT_KIND"
[sectionName]="steps.READ"
[eventYamlByHash]="eventYamlByHash"
[description]="
'Defines how data is read into structured format'
"
></app-base-step>
<app-stepper-navigation
[prevStep]="steps.PREPARE"
Expand All @@ -55,7 +63,7 @@
></app-stepper-navigation>
</div>
</mat-step>
<mat-step>
<mat-step [stepControl]="readForm">
<ng-template matStepLabel>Preprocess</ng-template>
<div class="container-step">
<app-preprocess-step
Expand Down Expand Up @@ -83,6 +91,9 @@
[defaultKind]="MERGE_DEFAULT_KIND"
[sectionName]="steps.MERGE"
[eventYamlByHash]="eventYamlByHash"
[description]="
'Determines how newly-ingested data should be merged with existing history'
"
>
<div
*ngIf="errorMessage"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<h2 class="text-center">
{{ title }}
</h2>
<p class="text-center mb-4">{{ description }}</p>
<app-select-kind-field
[form]="sectionForm"
[data]="sectionStepRadioData"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class BaseStepComponent extends BaseComponent implements OnInit {
@Input() public sectionStepRadioData: RadioControlType[];
@Input() public sectionFormData: JsonFormData;
@Input() public defaultKind: string;
@Input() public description: string;
@Input() public sectionName: SetPollingSourceSection;
@Input() public eventYamlByHash: MaybeNull<string> = null;
private editFormValue: EditFormType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<h2 class="text-center">Preprocess</h2>
<p class="text-center mb-4">Pre-processing query that shapes the data.</p>
<div class="d-flex justify-content-center flex-column align-items-center mt-4">
<div class="form-check">
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export class PreprocessStepComponent extends BaseComponent implements OnInit {
} else {
this.initDefaultQueriesSection();
}
} else {
this.initDefaultQueriesSection();
}
}

Expand All @@ -55,7 +57,9 @@ export class PreprocessStepComponent extends BaseComponent implements OnInit {
}

private initDefaultQueriesSection(query = ""): void {
console.log("2");
if (!this.preprocessValue.queries.length) {
console.log("3");
this.preprocessValue.queries.push({
alias: this.getDatasetInfoFromUrl().datasetName,
query,
Expand Down

0 comments on commit 89405c1

Please sign in to comment.