Merge pull request #6643 from ArtemDzhereleiko/AD/queues/improvement

[3.4] UI: Improvement for queues
This commit is contained in:
Igor Kulikov 2022-06-09 16:48:35 +03:00 committed by GitHub
commit 7357d8effa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 7 deletions

View File

@ -108,7 +108,7 @@ export class MenuService {
name: 'admin.system-settings', name: 'admin.system-settings',
type: 'toggle', type: 'toggle',
path: '/settings', path: '/settings',
height: '280px', height: '320px',
icon: 'settings', icon: 'settings',
pages: [ pages: [
{ {

View File

@ -95,7 +95,7 @@ export class TenantProfileDataComponent implements ControlValueAccessor, OnInit,
if (this.tenantProfileDataFormGroup.valid) { if (this.tenantProfileDataFormGroup.valid) {
tenantProfileData = this.tenantProfileDataFormGroup.getRawValue(); tenantProfileData = this.tenantProfileDataFormGroup.getRawValue();
} }
this.propagateChange(tenantProfileData.configuration); this.propagateChange(tenantProfileData?.configuration);
} }
} }

View File

@ -16,7 +16,7 @@
--> -->
<form [formGroup]="queueFormGroup" fxLayout="column" fxLayoutGap="0.5em"> <form [formGroup]="queueFormGroup" fxLayout="column">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>admin.queue-name</mat-label> <mat-label translate>admin.queue-name</mat-label>
<input matInput formControlName="name" required> <input matInput formControlName="name" required>

View File

@ -17,6 +17,10 @@
.queue-strategy { .queue-strategy {
padding-bottom: 16px; padding-bottom: 16px;
.mat-expansion-panel-header {
height: 50px;
}
.mat-expansion-panel-body { .mat-expansion-panel-body {
padding-bottom: 0 !important; padding-bottom: 0 !important;
} }

View File

@ -158,6 +158,8 @@ export class QueueFormComponent implements ControlValueAccessor, OnInit, OnDestr
this.modelValue = value; this.modelValue = value;
if (isDefinedAndNotNull(this.modelValue)) { if (isDefinedAndNotNull(this.modelValue)) {
this.queueFormGroup.patchValue(this.modelValue, {emitEvent: false}); this.queueFormGroup.patchValue(this.modelValue, {emitEvent: false});
this.queueFormGroup.get('additionalInfo').get('description')
.patchValue(this.modelValue.additionalInfo?.description, {emitEvent: false});
this.submitStrategyTypeChanged(); this.submitStrategyTypeChanged();
} }
if (!this.disabled && !this.queueFormGroup.valid) { if (!this.disabled && !this.queueFormGroup.valid) {

View File

@ -17,7 +17,12 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router';
import { EntityTableColumn, EntityTableConfig } from '@home/models/entity/entities-table-config.models'; import { EntityTableColumn, EntityTableConfig } from '@home/models/entity/entities-table-config.models';
import { QueueInfo, ServiceType } from '@shared/models/queue.models'; import {
QueueInfo,
QueueProcessingStrategyTypesMap,
QueueSubmitStrategyTypesMap,
ServiceType
} from '@shared/models/queue.models';
import { select, Store } from '@ngrx/store'; import { select, Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
import { BroadcastService } from '@core/services/broadcast.service'; import { BroadcastService } from '@core/services/broadcast.service';
@ -83,14 +88,14 @@ export class QueuesTableConfigResolver implements Resolve<EntityTableConfig<Queu
new EntityTableColumn<QueueInfo>('partitions', 'admin.queue-partitions', '25%'), new EntityTableColumn<QueueInfo>('partitions', 'admin.queue-partitions', '25%'),
new EntityTableColumn<QueueInfo>('submitStrategy', 'admin.queue-submit-strategy', '25%', new EntityTableColumn<QueueInfo>('submitStrategy', 'admin.queue-submit-strategy', '25%',
(entity: QueueInfo) => { (entity: QueueInfo) => {
return entity.submitStrategy.type; return this.translate.instant(QueueSubmitStrategyTypesMap.get(entity.submitStrategy.type).label);
}, },
() => ({}), () => ({}),
false false
), ),
new EntityTableColumn<QueueInfo>('processingStrategy', 'admin.queue-processing-strategy', '25%', new EntityTableColumn<QueueInfo>('processingStrategy', 'admin.queue-processing-strategy', '25%',
(entity: QueueInfo) => { (entity: QueueInfo) => {
return entity.processingStrategy.type; return this.translate.instant(QueueProcessingStrategyTypesMap.get(entity.processingStrategy.type).label);
}, },
() => ({}), () => ({}),
false false

View File

@ -75,7 +75,7 @@ export const QueueProcessingStrategyTypesMap = new Map<QueueProcessingStrategyTy
[ [
[QueueProcessingStrategyTypes.RETRY_FAILED_AND_TIMED_OUT, { [QueueProcessingStrategyTypes.RETRY_FAILED_AND_TIMED_OUT, {
label: 'queue.strategies.retry-failed-and-timeout-label', label: 'queue.strategies.retry-failed-and-timeout-label',
hint: 'queue.strategies.retry-failed-and-timout-hint', hint: 'queue.strategies.retry-failed-and-timeout-hint',
}], }],
[QueueProcessingStrategyTypes.SKIP_ALL_FAILURES, { [QueueProcessingStrategyTypes.SKIP_ALL_FAILURES, {
label: 'queue.strategies.skip-all-failures-label', label: 'queue.strategies.skip-all-failures-label',