Browse Source
Merge pull request #13533 from vvlladd28/improvement/ota-updated/confirm-change
Added "Confirm OTA Update" title to the OTA update confirmation dialog
pull/13547/head
Igor Kulikov
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
7 additions and
5 deletions
-
ui-ngx/src/app/core/http/ota-package.service.ts
-
ui-ngx/src/assets/locale/locale.constant-en_US.json
|
|
|
@ -129,15 +129,16 @@ export class OtaPackageService { |
|
|
|
} |
|
|
|
return forkJoin(tasks).pipe( |
|
|
|
mergeMap(([deviceFirmwareUpdate, deviceSoftwareUpdate]) => { |
|
|
|
let text = ''; |
|
|
|
const lines: string[] = []; |
|
|
|
if (deviceFirmwareUpdate > 0) { |
|
|
|
text += this.translate.instant('ota-update.change-firmware', {count: deviceFirmwareUpdate}); |
|
|
|
lines.push(this.translate.instant('ota-update.change-firmware', {count: deviceFirmwareUpdate})); |
|
|
|
} |
|
|
|
if (deviceSoftwareUpdate > 0) { |
|
|
|
text += text.length ? ' ' : ''; |
|
|
|
text += this.translate.instant('ota-update.change-software', {count: deviceSoftwareUpdate}); |
|
|
|
lines.push(this.translate.instant('ota-update.change-software', {count: deviceSoftwareUpdate})); |
|
|
|
} |
|
|
|
return text !== '' ? this.dialogService.confirm('', text, null, this.translate.instant('common.proceed')) : of(true); |
|
|
|
return lines.length |
|
|
|
? this.dialogService.confirm(this.translate.instant('ota-update.change-ota-setting-title'), lines.join('<br/>'), null, this.translate.instant('common.proceed')) |
|
|
|
: of(true); |
|
|
|
}) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
@ -4168,6 +4168,7 @@ |
|
|
|
"checksum-copied-message": "Package checksum has been copied to clipboard", |
|
|
|
"change-firmware": "Change of the firmware may cause update of { count, plural, =1 {1 device} other {# devices} }.", |
|
|
|
"change-software": "Change of the software may cause update of { count, plural, =1 {1 device} other {# devices} }.", |
|
|
|
"change-ota-setting-title": "Are you sure you want to change OTA settings?", |
|
|
|
"chose-compatible-device-profile": "The uploaded package will be available only for devices with the chosen profile.", |
|
|
|
"chose-firmware-distributed-device": "Choose firmware that will be distributed to the devices", |
|
|
|
"chose-software-distributed-device": "Choose software that will be distributed to the devices", |
|
|
|
|