Browse Source

Merge remote-tracking branch 'origin/master' into develop/3.5.2

pull/8644/head
Andrii Shvaika 3 years ago
parent
commit
b322ef449a
  1. 4
      ui-ngx/src/app/modules/home/components/alarm/alarm-details-dialog.component.ts
  2. 3
      ui-ngx/src/app/modules/home/components/alarm/alarm-table-config.ts
  3. 2
      ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html
  4. 30
      ui-ngx/src/app/modules/home/pages/api-usage/api_usage_json.raw
  5. 2
      ui-ngx/src/app/shared/components/file-input.component.scss
  6. 2
      ui-ngx/src/app/shared/components/image-input.component.scss
  7. 2
      ui-ngx/src/app/shared/components/multiple-image-input.component.scss
  8. 4
      ui-ngx/src/app/shared/components/notification/notification.component.html
  9. 5
      ui-ngx/src/app/shared/components/notification/notification.component.ts

4
ui-ngx/src/app/modules/home/components/alarm/alarm-details-dialog.component.ts

@ -35,6 +35,7 @@ import { DatePipe } from '@angular/common';
import { TranslateService } from '@ngx-translate/core';
import { AlarmCommentComponent } from '@home/components/alarm/alarm-comment.component';
import { MillisecondsToTimeStringPipe } from '@shared/pipe/milliseconds-to-time-string.pipe';
import { UtilsService } from '@core/services/utils.service';
export interface AlarmDetailsDialogData {
alarmId?: string;
@ -79,6 +80,7 @@ export class AlarmDetailsDialogComponent extends DialogComponent<AlarmDetailsDia
private translate: TranslateService,
@Inject(MAT_DIALOG_DATA) public data: AlarmDetailsDialogData,
private alarmService: AlarmService,
private utils: UtilsService,
public dialogRef: MatDialogRef<AlarmDetailsDialogComponent, boolean>,
public fb: UntypedFormBuilder) {
super(store, router, dialogRef);
@ -136,7 +138,7 @@ export class AlarmDetailsDialogComponent extends DialogComponent<AlarmDetailsDia
}
this.alarmFormGroup.get('duration').patchValue(duration);
}
this.alarmFormGroup.get('type').patchValue(alarm.type);
this.alarmFormGroup.get('type').patchValue(this.utils.customTranslation(alarm.type, alarm.type));
this.alarmFormGroup.get('alarmStatus')
.patchValue(this.translate.instant(alarmStatusTranslations.get(alarm.status)));
this.alarmFormGroup.get('alarmDetails').patchValue(alarm.details);

3
ui-ngx/src/app/modules/home/components/alarm/alarm-table-config.ts

@ -116,7 +116,8 @@ export class AlarmTableConfig extends EntityTableConfig<AlarmInfo, TimePageLink>
new EntityTableColumn<AlarmInfo>('originatorName', 'alarm.originator', '25%',
(entity) => entity.originatorName, entity => ({}), false));
this.columns.push(
new EntityTableColumn<AlarmInfo>('type', 'alarm.type', '25%'));
new EntityTableColumn<AlarmInfo>('type', 'alarm.type', '25%',
entity => this.utilsService.customTranslation(entity.type, entity.type)));
this.columns.push(
new EntityTableColumn<AlarmInfo>('severity', 'alarm.severity', '25%',
(entity) => this.translate.instant(alarmSeverityTranslations.get(entity.severity)),

2
ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html

@ -139,7 +139,7 @@
<table mat-table [dataSource]="dataSource"
matSort [matSortActive]="pageLink.sortOrder.property" [matSortDirection]="pageLink.sortDirection()" matSortDisableClear>
<ng-container matColumnDef="select" sticky>
<mat-header-cell *matHeaderCellDef style="width: 30px;">
<mat-header-cell *matHeaderCellDef style="width: 40px;">
<mat-checkbox (change)="$event ? dataSource.masterToggle() : null"
[checked]="dataSource.selection.hasValue() && (dataSource.isAllSelected() | async)"
[indeterminate]="dataSource.selection.hasValue() && !(dataSource.isAllSelected() | async)">

30
ui-ngx/src/app/modules/home/pages/api-usage/api_usage_json.raw

@ -32,8 +32,8 @@
"units": null,
"decimals": null,
"funcBody": null,
"usePostProcessing": null,
"postFuncBody": null
"usePostProcessing": true,
"postFuncBody": "return value ? value : 'ENABLED';"
},
{
"name": "jsExecutionLimit",
@ -72,7 +72,7 @@
"decimals": null,
"funcBody": null,
"usePostProcessing": true,
"postFuncBody": "return value ? value.toLowerCase() : '';"
"postFuncBody": "return value ? value.toLowerCase() : 'enabled';"
},
{
"name": "jsExecutionApiState",
@ -190,8 +190,8 @@
"units": null,
"decimals": null,
"funcBody": null,
"usePostProcessing": null,
"postFuncBody": null
"usePostProcessing": true,
"postFuncBody": "return value ? value : 'ENABLED';"
},
{
"name": "storageDataPointsLimit",
@ -230,7 +230,7 @@
"decimals": null,
"funcBody": null,
"usePostProcessing": true,
"postFuncBody": "return value ? value.toLowerCase() : '';"
"postFuncBody": "return value ? value.toLowerCase() : 'enabled';"
},
{
"name": "dbApiState",
@ -348,8 +348,8 @@
"units": null,
"decimals": null,
"funcBody": null,
"usePostProcessing": null,
"postFuncBody": null
"usePostProcessing": true,
"postFuncBody": "return value ? value : 'ENABLED';"
},
{
"name": "ruleEngineExecutionLimit",
@ -388,7 +388,7 @@
"decimals": null,
"funcBody": null,
"usePostProcessing": true,
"postFuncBody": "return value ? value.toLowerCase() : '';"
"postFuncBody": "return value ? value.toLowerCase() : 'enabled';"
},
{
"name": "ruleEngineApiState",
@ -516,8 +516,8 @@
"units": null,
"decimals": null,
"funcBody": null,
"usePostProcessing": null,
"postFuncBody": null
"usePostProcessing": true,
"postFuncBody": "return value ? value : 'ENABLED';"
},
{
"name": "transportMsgLimit",
@ -556,7 +556,7 @@
"decimals": null,
"funcBody": null,
"usePostProcessing": true,
"postFuncBody": "return value ? value.toLowerCase() : '';"
"postFuncBody": "return value ? value.toLowerCase() : 'enabled';"
},
{
"name": "transportApiState",
@ -687,8 +687,8 @@
"units": null,
"decimals": null,
"funcBody": null,
"usePostProcessing": null,
"postFuncBody": null
"usePostProcessing": true,
"postFuncBody": "return value ? value : 'ENABLED';"
},
{
"name": "createdAlarmsLimit",
@ -727,7 +727,7 @@
"decimals": null,
"funcBody": null,
"usePostProcessing": true,
"postFuncBody": "return value ? value.toLowerCase() : '';"
"postFuncBody": "return value ? value.toLowerCase() : 'enabled';"
},
{
"name": "alarmApiState",

2
ui-ngx/src/app/shared/components/file-input.component.scss

@ -87,7 +87,7 @@ $previewSize: 100px !default;
button.browse-file {
padding: 0;
font-size: 16px;
span.mdc-button__label {
label {
display: block;
cursor: pointer;
padding: 0 16px;

2
ui-ngx/src/app/shared/components/image-input.component.scss

@ -141,7 +141,7 @@ $previewSize: 96px !default;
button.browse-file {
padding: 0;
font-size: 16px;
span.mdc-button__label {
label {
display: block;
cursor: pointer;
padding: 0 16px;

2
ui-ngx/src/app/shared/components/multiple-image-input.component.scss

@ -157,7 +157,7 @@ $previewSize: 64px !default;
button.browse-file {
padding: 0;
font-size: 16px;
span.mdc-button__label {
label {
display: block;
cursor: pointer;
padding: 0 16px;

4
ui-ngx/src/app/shared/components/notification/notification.component.html

@ -28,8 +28,8 @@
</mat-icon>
</ng-template>
<div class="content" fxFlex>
<div class="title" [innerHTML]="(notification.subject | safe: 'html' )"></div>
<div class="message" [innerHTML]="(notification.text | safe: 'html' )"></div>
<div class="title" [innerHTML]="(title | safe: 'html' )"></div>
<div class="message" [innerHTML]="(message | safe: 'html' )"></div>
<button *ngIf="showButton" mat-stroked-button class="button" color="primary"
(click)="navigate($event)">
{{ buttonLabel }}

5
ui-ngx/src/app/shared/components/notification/notification.component.ts

@ -62,6 +62,9 @@ export class NotificationComponent implements OnInit {
currentDate = Date.now();
title = '';
message = '';
constructor(
private utils: UtilsService,
private router: Router
@ -72,6 +75,8 @@ export class NotificationComponent implements OnInit {
this.showIcon = this.notification.additionalConfig?.icon?.enabled;
this.showButton = this.notification.additionalConfig?.actionButtonConfig?.enabled;
this.hideMarkAsReadButton = this.notification.status === NotificationStatus.READ;
this.title = this.utils.customTranslation(this.notification.subject, this.notification.subject);
this.message = this.utils.customTranslation(this.notification.text, this.notification.text);
if (this.showButton) {
this.buttonLabel = this.utils.customTranslation(this.notification.additionalConfig.actionButtonConfig.text,
this.notification.additionalConfig.actionButtonConfig.text);

Loading…
Cancel
Save