-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kamu UI 499 flow config separation #507
base: master
Are you sure you want to change the base?
Conversation
…o kamu-ui-499-flow-config-separation
@@ -15,6 +15,7 @@ export class FeatureFlagDirective { | |||
|
|||
@Input("appFeatureFlag") public featureName: string; | |||
|
|||
/* istanbul ignore next */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that this affects the percentage of test coverage, so I deleted it.
@@ -37,6 +38,7 @@ export class FeatureFlagDirective { | |||
} | |||
} | |||
|
|||
/* istanbul ignore next */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same
// it("should check set dataset flow batching with error", () => { | ||
// const errorMessage = mockSetDatasetFlowBatchingError.datasets.byId?.flows.configs.setConfigTransform.message; | ||
// spyOn(datasetFlowApi, "setDatasetFlowBatching").and.returnValue(of(mockSetDatasetFlowBatchingError)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Garbage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
/> | ||
<ng-container | ||
*ngIf=" | ||
pollingForm?.get('every')?.errors?.range && | ||
(pollingForm.get('every')?.touched || pollingForm.get('every')?.dirty) | ||
" | ||
> | ||
<div class="text-danger fs-12 ms-4 text-break" data-test-id="range-error"> | ||
{{ pollingForm.get("every")?.errors?.range.message }} | ||
</div> | ||
</ng-container> | ||
</div> | ||
</mat-radio-button> | ||
<mat-radio-button [value]="pollingGroupEnum.CRON_5_COMPONENT_EXPRESSION"> | ||
<div class="d-flex align-items-center" data-test-id="button-cron-expression"> | ||
<div class="d-flex align-middle"> | ||
<span class="form-control-label d-block"> Cron expression : </span> | ||
</div> | ||
<input | ||
type="text" | ||
formControlName="cronExpression" | ||
placeholder="Example: * * * * ?" | ||
class="form-control form-control-expression" | ||
data-test-id="cron-expression-input" | ||
data-test-id="polling-group-cron-expression" | ||
/> | ||
|
||
<ng-container | ||
*ngIf=" | ||
pollingForm?.get('cronExpression')?.errors?.invalidCronExpression && | ||
(pollingForm.get('cronExpression')?.touched || | ||
pollingForm.get('cronExpression')?.dirty); | ||
else nextTimeTemplate | ||
" | ||
> | ||
<div | ||
class="text-danger fs-12 ms-4 text-break" | ||
data-test-id="cronExpression-error" | ||
> | ||
Invalid expression | ||
</div> | ||
</ng-container> | ||
<ng-template #nextTimeTemplate> | ||
<span *ngIf="pollingForm?.get('cronExpression')?.valid" class="fs-12 ms-4" | ||
>Next time: {{ nextTime }}</span | ||
> | ||
</ng-template> | ||
</div> | ||
</mat-radio-button> | ||
</mat-radio-group> | ||
<div class="text-muted fs-12 border-top border-bottom px-4 py-4 mt-4"> | ||
Cron expression accepted values | ||
<div class="fs-12">1. minutes: 0-59 * , -</div> | ||
<div class="fs-12">2. hours: 0-23 * , -</div> | ||
<div class="fs-12">3. day of month: 1-31 * , - ?</div> | ||
<div class="fs-12">4. months: (JAN-DEC or 1-12) * , -</div> | ||
<div class="fs-12">5. day of week: (SUN-SAT or 1-7) * , - ?</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="mb-4 mt-2 d-flex justify-content-end me-4"> | ||
<button | ||
type="button" | ||
class="btn btn-success" | ||
[disabled]="pollingForm.invalid" | ||
(click)="savePollingTriggers()" | ||
data-test-id="save-config-options" | ||
> | ||
Save Trigger | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="position-relative border border-1 rounded-3 w-50 align-self-start px-4 pb-4"> | ||
<form [formGroup]="ingestConfigurationForm"> | ||
<span class="position-absolute text-muted group-box-label text-uppercase">Configuration</span> | ||
|
||
<div class="d-flex align-items-center mt-4"> | ||
<input | ||
class="checkbox-uncacheable me-3" | ||
type="checkbox" | ||
data-test-id="fetchUncacheable" | ||
formControlName="fetchUncacheable" | ||
/> | ||
<span class="d-inline-block">Fetch uncacheable</span> | ||
</div> | ||
<div class="border-top mt-4"></div> | ||
<div class="mt-4 d-flex justify-content-end"> | ||
<button | ||
type="button" | ||
class="btn btn-success" | ||
(click)="saveIngestConfiguration()" | ||
data-test-id="save-polling-configuration" | ||
> | ||
Save configuration | ||
</button> | ||
</div> | ||
</form> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend to split this on multiple components. Definitely, trigger choices will be useful in other settings as well, let's say GC schedule in future Admin dashboard, or maybe regular Soft Compacting schedule, once we implement it.
It seems natural to split by main panels: triggers and configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -64,6 +67,8 @@ export class DatasetFlowDetailsHelpers { | |||
return { icon: "downloading", class: "text-muted" }; | |||
case "FlowEventScheduledForActivation": | |||
return { icon: "timer", class: "text-muted" }; | |||
case "FlowConfigSnapshotModified": | |||
return { icon: "downloading", class: "text-muted" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think FlowEventStartConditionUpdated
and FlowConfigSnapshotModified
should have different icons. Start condition represents state change of the flow while it's waiting (we are waiting for schedule, throttling, executor, ...), and config snapshot represents the changes have been made to the configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed icon
…o kamu-ui-499-flow-config-separation
Closes: #499
Result: