diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-types-version-load.component.html b/ui-ngx/src/app/modules/home/components/vc/entity-types-version-load.component.html index 828b5eac1e..f37e58e48a 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-types-version-load.component.html +++ b/ui-ngx/src/app/modules/home/components/vc/entity-types-version-load.component.html @@ -75,7 +75,7 @@ - {{ 'version-control.load-calculated-fields' | translate }} + {{ (entityTypeFormGroup.get('entityType').value === entityTypes.CUSTOMER ? 'version-control.load-alarm-rules' : 'version-control.load-calculated-fields') | translate }} diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html index 5004160919..f913946b3c 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html +++ b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html @@ -49,7 +49,7 @@ {{ 'version-control.export-relations' | translate }} - {{ 'version-control.export-calculated-fields' | translate }} + {{ (entityId.entityType === entityTypes.CUSTOMER ? 'version-control.export-alarm-rules' : 'version-control.export-calculated-fields') | translate }} diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-version-restore.component.html b/ui-ngx/src/app/modules/home/components/vc/entity-version-restore.component.html index e4312e0c98..e2392679e6 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-version-restore.component.html +++ b/ui-ngx/src/app/modules/home/components/vc/entity-version-restore.component.html @@ -37,7 +37,7 @@ {{ 'version-control.load-relations' | translate }} - {{ 'version-control.load-calculated-fields' | translate }} + {{ ( externalEntityId?.entityType === EntityType.CUSTOMER ? 'version-control.load-alarm-rules' : 'version-control.load-calculated-fields') | translate }} diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-version-restore.component.ts b/ui-ngx/src/app/modules/home/components/vc/entity-version-restore.component.ts index 4456eb7ce7..a5310deb32 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-version-restore.component.ts +++ b/ui-ngx/src/app/modules/home/components/vc/entity-version-restore.component.ts @@ -33,6 +33,7 @@ import { delay, share } from 'rxjs/operators'; import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; import { Observable, Subscription } from 'rxjs'; import { parseHttpErrorMessage } from '@core/utils'; +import { EntityType } from '@shared/models/entity-type.models'; @Component({ selector: 'tb-entity-version-restore', @@ -62,6 +63,8 @@ export class EntityVersionRestoreComponent extends PageComponent implements OnIn errorMessage: SafeHtml; + EntityType = EntityType; + versionLoadResult$: Observable; private versionLoadResultSubscription: Subscription; diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index 5e083ec165..e4b2353cf9 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -7258,6 +7258,7 @@ "load-attributes": "Load attributes", "load-credentials": "Load credentials", "load-calculated-fields": "Load calculated fields and alarm rules", + "load-alarm-rules": "Load alarm rules", "compare-with-current": "Compare with current", "diff-entity-with-version": "Diff with entity version '{{versionName}}'", "previous-difference": "Previous Difference",