|
|
|
@ -15,161 +15,182 @@ |
|
|
|
limitations under the License. |
|
|
|
|
|
|
|
--> |
|
|
|
|
|
|
|
<form [formGroup]="queueFormGroup" fxLayout="column" fxLayoutGap="0.5em"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>admin.queue-name</mat-label> |
|
|
|
<input matInput formControlName="name" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('name').hasError('required')"> |
|
|
|
{{ 'queue.name-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.poll-interval</mat-label> |
|
|
|
<input type="number" matInput formControlName="pollInterval" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('pollInterval').hasError('required')"> |
|
|
|
{{ 'queue.poll-interval-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('pollInterval').hasError('min') && |
|
|
|
!queueFormGroup.get('pollInterval').hasError('required')"> |
|
|
|
{{ 'queue.poll-interval-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.partitions</mat-label> |
|
|
|
<input type="number" matInput formControlName="partitions" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('partitions').hasError('required')"> |
|
|
|
{{ 'queue.partitions-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('partitions').hasError('min') && |
|
|
|
!queueFormGroup.get('partitions').hasError('required')"> |
|
|
|
{{ 'queue.partitions-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-checkbox class="hinted-checkbox" formControlName="consumerPerPartition"> |
|
|
|
<div>{{ 'queue.consumer-per-partition' | translate }}</div> |
|
|
|
<div class="tb-hint">{{'queue.consumer-per-partition-hint' | translate}}</div> |
|
|
|
</mat-checkbox> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.processing-timeout</mat-label> |
|
|
|
<input type="number" matInput formControlName="packProcessingTimeout" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('packProcessingTimeout').hasError('required')"> |
|
|
|
{{ 'queue.pack-processing-timeout-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('packProcessingTimeout').hasError('min') && |
|
|
|
!queueFormGroup.get('packProcessingTimeout').hasError('required')"> |
|
|
|
{{ 'queue.pack-processing-timeout-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-accordion class="queue-strategy" [multi]="true"> |
|
|
|
<mat-expansion-panel> |
|
|
|
<mat-expansion-panel-header> |
|
|
|
<mat-panel-title translate> |
|
|
|
queue.submit-strategy |
|
|
|
</mat-panel-title> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<ng-template matExpansionPanelContent> |
|
|
|
<div formGroupName="submitStrategy"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.submit-strategy</mat-label> |
|
|
|
<mat-select formControlName="type" required> |
|
|
|
<mat-option *ngFor="let strategy of submitStrategies" [value]="strategy"> |
|
|
|
{{ strategy }} |
|
|
|
</mat-option> |
|
|
|
</mat-select> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('submitStrategy.type').hasError('required')"> |
|
|
|
{{ 'queue.submit-strategy-type-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block" *ngIf="hideBatchSize"> |
|
|
|
<mat-label translate>queue.batch-size</mat-label> |
|
|
|
<input type="number" matInput formControlName="batchSize" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('submitStrategy.batchSize').hasError('required')"> |
|
|
|
{{ 'queue.batch-size-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('submitStrategy.batchSize').hasError('min') && |
|
|
|
!queueFormGroup.get('submitStrategy.batchSize').hasError('required')"> |
|
|
|
{{ 'queue.batch-size-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
</mat-expansion-panel> |
|
|
|
<mat-expansion-panel> |
|
|
|
<mat-expansion-panel-header> |
|
|
|
<mat-panel-title translate> |
|
|
|
queue.processing-strategy |
|
|
|
</mat-panel-title> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<ng-template matExpansionPanelContent> |
|
|
|
<div formGroupName="processingStrategy"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.processing-strategy</mat-label> |
|
|
|
<mat-select formControlName="type" required> |
|
|
|
<mat-option *ngFor="let strategy of processingStrategies" [value]="strategy"> |
|
|
|
{{ strategy }} |
|
|
|
</mat-option> |
|
|
|
</mat-select> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.type').hasError('required')"> |
|
|
|
{{ 'queue.processing-strategy-type-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.retries</mat-label> |
|
|
|
<input type="number" matInput formControlName="retries" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.retries').hasError('required')"> |
|
|
|
{{ 'queue.retries-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.retries').hasError('min') && |
|
|
|
!queueFormGroup.get('processingStrategy.retries').hasError('required')"> |
|
|
|
{{ 'queue.retries-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.failure-percentage</mat-label> |
|
|
|
<input type="number" matInput formControlName="failurePercentage" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.failurePercentage').hasError('required')"> |
|
|
|
{{ 'queue.failure-percentage-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.failurePercentage').hasError('min') && |
|
|
|
!queueFormGroup.get('processingStrategy.failurePercentage').hasError('required') && |
|
|
|
!queueFormGroup.get('processingStrategy.failurePercentage').hasError('max')"> |
|
|
|
{{ 'queue.failure-percentage-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.failurePercentage').hasError('max') && |
|
|
|
!queueFormGroup.get('processingStrategy.failurePercentage').hasError('required') && |
|
|
|
!queueFormGroup.get('processingStrategy.failurePercentage').hasError('min')"> |
|
|
|
{{ 'queue.failure-percentage-max-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.pause-between-retries</mat-label> |
|
|
|
<input type="number" matInput formControlName="pauseBetweenRetries" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.pauseBetweenRetries').hasError('required')"> |
|
|
|
{{ 'queue.pause-between-retries-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.pauseBetweenRetries').hasError('min') && |
|
|
|
!queueFormGroup.get('processingStrategy.pauseBetweenRetries').hasError('required')"> |
|
|
|
{{ 'queue.pause-between-retries-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.max-pause-between-retries</mat-label> |
|
|
|
<input type="number" matInput formControlName="maxPauseBetweenRetries" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.maxPauseBetweenRetries').hasError('required')"> |
|
|
|
{{ 'queue.max-pause-between-retries-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.maxPauseBetweenRetries').hasError('min') && |
|
|
|
!queueFormGroup.get('processingStrategy.maxPauseBetweenRetries').hasError('required')"> |
|
|
|
{{ 'queue.max-pause-between-retries-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
</mat-expansion-panel> |
|
|
|
</mat-accordion> |
|
|
|
<mat-form-field class="mat-block" formGroupName="additionalInfo"> |
|
|
|
<mat-label translate>queue.description</mat-label> |
|
|
|
<textarea matInput formControlName="description" rows="2"></textarea> |
|
|
|
</mat-form-field> |
|
|
|
</form> |
|
|
|
<mat-expansion-panel fxFlex [(expanded)]="expanded"> |
|
|
|
<mat-expansion-panel-header> |
|
|
|
<div fxFlex fxLayout="row" fxLayoutAlign="start center"> |
|
|
|
<mat-panel-title> |
|
|
|
{{ queueTitle }} |
|
|
|
</mat-panel-title> |
|
|
|
<span fxFlex></span> |
|
|
|
<button *ngIf="!mainQueue && !disabled" mat-icon-button style="min-width: 40px;" |
|
|
|
type="button" |
|
|
|
(click)="removeQueue.emit()" |
|
|
|
matTooltip="{{ 'action.remove' | translate }}" |
|
|
|
matTooltipPosition="above"> |
|
|
|
<mat-icon>delete</mat-icon> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<ng-template matExpansionPanelContent> |
|
|
|
<form [formGroup]="queueFormGroup" fxLayout="column" fxLayoutGap="0.5em"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>admin.queue-name</mat-label> |
|
|
|
<input matInput formControlName="name" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('name').hasError('required')"> |
|
|
|
{{ 'queue.name-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('name').hasError('unique')"> |
|
|
|
{{ 'queue.name-unique' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.poll-interval</mat-label> |
|
|
|
<input type="number" matInput formControlName="pollInterval" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('pollInterval').hasError('required')"> |
|
|
|
{{ 'queue.poll-interval-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('pollInterval').hasError('min') && |
|
|
|
!queueFormGroup.get('pollInterval').hasError('required')"> |
|
|
|
{{ 'queue.poll-interval-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.partitions</mat-label> |
|
|
|
<input type="number" matInput formControlName="partitions" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('partitions').hasError('required')"> |
|
|
|
{{ 'queue.partitions-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('partitions').hasError('min') && |
|
|
|
!queueFormGroup.get('partitions').hasError('required')"> |
|
|
|
{{ 'queue.partitions-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-checkbox class="hinted-checkbox" formControlName="consumerPerPartition"> |
|
|
|
<div>{{ 'queue.consumer-per-partition' | translate }}</div> |
|
|
|
<div class="tb-hint">{{'queue.consumer-per-partition-hint' | translate}}</div> |
|
|
|
</mat-checkbox> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.processing-timeout</mat-label> |
|
|
|
<input type="number" matInput formControlName="packProcessingTimeout" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('packProcessingTimeout').hasError('required')"> |
|
|
|
{{ 'queue.pack-processing-timeout-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('packProcessingTimeout').hasError('min') && |
|
|
|
!queueFormGroup.get('packProcessingTimeout').hasError('required')"> |
|
|
|
{{ 'queue.pack-processing-timeout-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-accordion class="queue-strategy" [multi]="true"> |
|
|
|
<mat-expansion-panel [expanded]="false"> |
|
|
|
<mat-expansion-panel-header> |
|
|
|
<mat-panel-title translate> |
|
|
|
queue.submit-strategy |
|
|
|
</mat-panel-title> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<ng-template matExpansionPanelContent> |
|
|
|
<div formGroupName="submitStrategy"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.submit-strategy</mat-label> |
|
|
|
<mat-select formControlName="type" required> |
|
|
|
<mat-option *ngFor="let strategy of submitStrategies" [value]="strategy"> |
|
|
|
{{ strategy }} |
|
|
|
</mat-option> |
|
|
|
</mat-select> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('submitStrategy.type').hasError('required')"> |
|
|
|
{{ 'queue.submit-strategy-type-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block" *ngIf="hideBatchSize"> |
|
|
|
<mat-label translate>queue.batch-size</mat-label> |
|
|
|
<input type="number" matInput formControlName="batchSize" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('submitStrategy.batchSize').hasError('required')"> |
|
|
|
{{ 'queue.batch-size-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('submitStrategy.batchSize').hasError('min') && |
|
|
|
!queueFormGroup.get('submitStrategy.batchSize').hasError('required')"> |
|
|
|
{{ 'queue.batch-size-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
</mat-expansion-panel> |
|
|
|
<mat-expansion-panel [expanded]="false"> |
|
|
|
<mat-expansion-panel-header> |
|
|
|
<mat-panel-title translate> |
|
|
|
queue.processing-strategy |
|
|
|
</mat-panel-title> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<ng-template matExpansionPanelContent> |
|
|
|
<div formGroupName="processingStrategy"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.processing-strategy</mat-label> |
|
|
|
<mat-select formControlName="type" required> |
|
|
|
<mat-option *ngFor="let strategy of processingStrategies" [value]="strategy"> |
|
|
|
{{ strategy }} |
|
|
|
</mat-option> |
|
|
|
</mat-select> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.type').hasError('required')"> |
|
|
|
{{ 'queue.processing-strategy-type-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.retries</mat-label> |
|
|
|
<input type="number" matInput formControlName="retries" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.retries').hasError('required')"> |
|
|
|
{{ 'queue.retries-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.retries').hasError('min') && |
|
|
|
!queueFormGroup.get('processingStrategy.retries').hasError('required')"> |
|
|
|
{{ 'queue.retries-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.failure-percentage</mat-label> |
|
|
|
<input type="number" matInput formControlName="failurePercentage" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.failurePercentage').hasError('required')"> |
|
|
|
{{ 'queue.failure-percentage-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.failurePercentage').hasError('min') && |
|
|
|
!queueFormGroup.get('processingStrategy.failurePercentage').hasError('required') && |
|
|
|
!queueFormGroup.get('processingStrategy.failurePercentage').hasError('max')"> |
|
|
|
{{ 'queue.failure-percentage-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.failurePercentage').hasError('max') && |
|
|
|
!queueFormGroup.get('processingStrategy.failurePercentage').hasError('required') && |
|
|
|
!queueFormGroup.get('processingStrategy.failurePercentage').hasError('min')"> |
|
|
|
{{ 'queue.failure-percentage-max-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.pause-between-retries</mat-label> |
|
|
|
<input type="number" matInput formControlName="pauseBetweenRetries" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.pauseBetweenRetries').hasError('required')"> |
|
|
|
{{ 'queue.pause-between-retries-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.pauseBetweenRetries').hasError('min') && |
|
|
|
!queueFormGroup.get('processingStrategy.pauseBetweenRetries').hasError('required')"> |
|
|
|
{{ 'queue.pause-between-retries-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>queue.max-pause-between-retries</mat-label> |
|
|
|
<input type="number" matInput formControlName="maxPauseBetweenRetries" required> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.maxPauseBetweenRetries').hasError('required')"> |
|
|
|
{{ 'queue.max-pause-between-retries-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
<mat-error *ngIf="queueFormGroup.get('processingStrategy.maxPauseBetweenRetries').hasError('min') && |
|
|
|
!queueFormGroup.get('processingStrategy.maxPauseBetweenRetries').hasError('required')"> |
|
|
|
{{ 'queue.max-pause-between-retries-min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
</mat-expansion-panel> |
|
|
|
</mat-accordion> |
|
|
|
<mat-form-field class="mat-block" formGroupName="additionalInfo"> |
|
|
|
<mat-label translate>queue.description</mat-label> |
|
|
|
<textarea matInput formControlName="description" rows="2"></textarea> |
|
|
|
</mat-form-field> |
|
|
|
</form> |
|
|
|
</ng-template> |
|
|
|
</mat-expansion-panel> |
|
|
|
|