Browse Source

Merge pull request #14921 from thingsboard/lts-4.3

Merge lts-4.3 to rc
pull/14943/head
Vladyslav Prykhodko 6 months ago
committed by GitHub
parent
commit
c220fbbe26
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 9
      ui-ngx/src/app/core/http/image.service.ts
  2. 4
      ui-ngx/src/app/modules/home/components/widget/lib/chart/bar-chart-with-labels-widget.component.scss
  3. 4
      ui-ngx/src/app/modules/home/components/widget/lib/chart/range-chart-widget.component.scss
  4. 2
      ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/api-usage-settings.component.models.ts
  5. 2
      ui-ngx/src/app/shared/components/entity/entity-select.component.html
  6. 7
      ui-ngx/src/app/shared/components/image/gallery-image-input.component.ts
  7. 2
      ui-ngx/src/app/shared/pipe/image.pipe.ts
  8. 727
      ui-ngx/src/assets/locale/locale.constant-el_GR.json
  9. 8
      ui-ngx/src/assets/locale/locale.constant-en_US.json
  10. 778
      ui-ngx/src/assets/locale/locale.constant-es_ES.json
  11. 713
      ui-ngx/src/assets/locale/locale.constant-hi_IN.json
  12. 2
      ui-ngx/src/assets/locale/locale.constant-nl_NL.json
  13. 1152
      ui-ngx/src/assets/locale/locale.constant-no_NO.json

9
ui-ngx/src/app/core/http/image.service.ts

@ -31,7 +31,7 @@ import {
removeTbImagePrefix,
ResourceSubType
} from '@shared/models/resource.models';
import { catchError, map, switchMap } from 'rxjs/operators';
import { catchError, finalize, map, switchMap } from 'rxjs/operators';
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
import { blobToBase64, blobToText } from '@core/utils';
import { ResourcesService } from '@core/services/resources.service';
@ -116,16 +116,15 @@ export class ImageService {
request = new ReplaySubject<Blob>(1);
this.imagesLoading[imageLink] = request;
const options = defaultHttpOptionsFromConfig({ignoreLoading: true, ignoreErrors: true});
this.http.get(imageLink, {...options, ...{ responseType: 'blob' } }).subscribe({
this.http.get(imageLink, {...options, ...{ responseType: 'blob' } }).pipe(
finalize(()=> delete this.imagesLoading[imageLink])
).subscribe({
next: (value) => {
request.next(value);
request.complete();
},
error: err => {
request.error(err);
},
complete: () => {
delete this.imagesLoading[imageLink];
}
});
}

4
ui-ngx/src/app/modules/home/components/widget/lib/chart/bar-chart-with-labels-widget.component.scss

@ -20,9 +20,7 @@
display: flex;
flex-direction: column;
gap: 8px;
&.overlay {
padding: 20px 24px 24px 24px;
}
padding: 20px 24px 24px 24px;
> div:not(.tb-bar-chart-overlay) {
z-index: 1;
}

4
ui-ngx/src/app/modules/home/components/widget/lib/chart/range-chart-widget.component.scss

@ -20,9 +20,7 @@
display: flex;
flex-direction: column;
gap: 8px;
&.overlay {
padding: 20px 24px 24px 24px;
}
padding: 20px 24px 24px 24px;
> div:not(.tb-range-chart-overlay) {
z-index: 1;
}

2
ui-ngx/src/app/modules/home/components/widget/lib/settings/cards/api-usage-settings.component.models.ts

@ -89,7 +89,7 @@ export const apiUsageDefaultSettings: ApiUsageWidgetSettings = {
generateDataKey('{i18n:api-usage.data-points-storage-days}', 'dbApiState', 'storageDataPointsLimit', 'storageDataPointsCount'),
generateDataKey('{i18n:api-usage.alarms-created}', 'alarmApiState', 'createdAlarmsLimit', 'createdAlarmsCount'),
generateDataKey('{i18n:api-usage.emails}', 'emailApiState', 'emailLimit', 'emailCount'),
generateDataKey('{i18n:api-usage.sms}', 'notificationApiState', 'smsLimit', 'smsCount'),
generateDataKey('{i18n:api-usage.sms}', 'smsApiState', 'smsLimit', 'smsCount'),
],
targetDashboardState: 'default',
background: {

2
ui-ngx/src/app/shared/components/entity/entity-select.component.html

@ -34,7 +34,7 @@
*ngIf="modelValue.entityType && !entityTypeNullUUID.has(modelValue.entityType)"
class="flex-1"
[appearance]="appearance"
[required]="required"
[required]="required && modelValue.entityType !== AliasEntityType.CURRENT_CUSTOMER"
[entityType]="modelValue.entityType"
[useEntityDisplayName]="useEntityDisplayName"
(entityChanged)="changeEntity($event)"

7
ui-ngx/src/app/shared/components/image/gallery-image-input.component.ts

@ -171,9 +171,9 @@ export class GalleryImageInputComponent extends PageComponent implements OnInit,
}
}
private updateModel(value: string) {
private updateModel(value: string, forcedToUpdate = false): void {
this.cd.markForCheck();
if (this.imageUrl !== value) {
if (this.imageUrl !== value || forcedToUpdate) {
this.imageUrl = value;
this.propagateChange(prependTbImagePrefix(this.imageUrl));
}
@ -211,9 +211,10 @@ export class GalleryImageInputComponent extends PageComponent implements OnInit,
}
}).afterClosed().subscribe((image) => {
if (image) {
const forcedToUpdate = this.imageUrl === image.link && this.imageResource?.descriptor?.etag !== image.descriptor.etag;
this.linkType = ImageLinkType.resource;
this.imageResource = image;
this.updateModel(image.link);
this.updateModel(image.link, forcedToUpdate);
}
});
}

2
ui-ngx/src/app/shared/pipe/image.pipe.ts

@ -38,7 +38,7 @@ export class ImagePipe implements PipeTransform {
private sanitizer: DomSanitizer,
private zone: NgZone) { }
transform(urlData: string | UrlHolder, args?: any): Observable<SafeUrl | string> {
transform(urlData: string | UrlHolder, args?: any, triggerUpdate?: number): Observable<SafeUrl | string> {
const ignoreLoadingImage = !!args?.ignoreLoadingImage;
const asString = !!args?.asString;
const emptyUrl = args?.emptyUrl || NO_IMAGE_DATA_URI;

727
ui-ngx/src/assets/locale/locale.constant-el_GR.json

File diff suppressed because it is too large

8
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -810,7 +810,7 @@
"no-assets-matching": "No assets matching '{{entity}}' were found.",
"asset-required": "Asset is required.",
"name-starts-with": "Asset name expression",
"help-text": "Use '%' according to need: '%asset_name_contains%', '%asset_name_ends', 'asset_starts_with'.",
"help-text": "Use '%' according to need: '%asset_name_contains%', '%asset_name_ends', 'asset_starts_with%'.",
"import": "Import assets",
"asset-file": "Asset file",
"label": "Label",
@ -2131,7 +2131,7 @@
"remove-alias": "Remove device alias",
"add-alias": "Add device alias",
"name-starts-with": "Device name expression",
"help-text": "Use '%' according to need: '%device_name_contains%', '%device_name_ends', 'device_starts_with'.",
"help-text": "Use '%' according to need: '%device_name_contains%', '%device_name_ends', 'device_starts_with%'.",
"device-list": "Device list",
"use-device-name-filter": "Use filter",
"device-list-empty": "No devices selected.",
@ -3048,7 +3048,7 @@
"no-entities-text": "No entities found",
"no-entity-types-matching": "No entity types matching '{{entityType}}' were found.",
"name-starts-with": "Name expression",
"help-text": "Use '%' according to need: '%entity_name_contains%', '%entity_name_ends', 'entity_starts_with'.",
"help-text": "Use '%' according to need: '%entity_name_contains%', '%entity_name_ends', 'entity_starts_with%'.",
"use-entity-name-filter": "Use filter",
"entity-list-empty": "No entities selected.",
"entity-type-list-required": "At least one entity type should be selected.",
@ -3251,7 +3251,7 @@
"remove-alias": "Remove entity view alias",
"add-alias": "Add entity view alias",
"name-starts-with": "Entity View name expression",
"help-text": "Use '%' according to need: '%entity-view_name_contains%', '%entity-view_name_ends', 'entity-view_starts_with'.",
"help-text": "Use '%' according to need: '%entity-view_name_contains%', '%entity-view_name_ends', 'entity-view_starts_with%'.",
"entity-view-list": "Entity View list",
"use-entity-view-name-filter": "Use filter",
"entity-view-list-empty": "No entity views selected.",

778
ui-ngx/src/assets/locale/locale.constant-es_ES.json

File diff suppressed because it is too large

713
ui-ngx/src/assets/locale/locale.constant-hi_IN.json

File diff suppressed because it is too large

2
ui-ngx/src/assets/locale/locale.constant-nl_NL.json

@ -936,6 +936,8 @@
"transport-data-points-hourly-activity": "Transportdatapunten: uurlijkse activiteit",
"transport-data-points-daily-activity": "Transportdatapunten: dagelijkse activiteit",
"transport-data-points-monthly-activity": "Transportdatapunten: maandelijkse activiteit",
"view-details": "Details bekijken",
"view-statistics": "Statistieken bekijken",
"transport-messages": "Transportberichten",
"transport-messages-hourly-activity": "Transportberichten: uurlijkse activiteit",
"transport-data-point-hourly-activity": "Transportdatapunt: uurlijkse activiteit",

1152
ui-ngx/src/assets/locale/locale.constant-no_NO.json

File diff suppressed because it is too large
Loading…
Cancel
Save