Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
fix(snapshot-hourly-schedule): Show localized message when error for …(
Browse files Browse the repository at this point in the history
…closes #722) (#803)

* fix(snapshot-hourly-schedule): Show localized message when error for set up hourly schedule for snapshot appears

* fix(snapshot-hourly-schedule): show localized message when error for set up hourly schedule appears
  • Loading branch information
HeyRoach committed Dec 25, 2017
1 parent 519c894 commit bcad896
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/app/shared/services/error.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ export class ErrorService {
{
regex: /Value greater than max allowed length (\d+) for param: volumeName/,
translation: 'ERRORS.VOLUME.NAME_TOO_LONG'
},
{
regex: /maxSnaps exceeds limit: (\d+) for interval type: hourly/,
translation: 'ERRORS.SNAPSHOT_POLICIES.HOURLY_TURN_OFF'
}
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class RecurringSnapshotsComponent implements OnInit {
})
}

private onError(error: any): void {
private onError(error): void {
this.dialogService.alert({
message: {
translationToken: error.message,
Expand Down
3 changes: 3 additions & 0 deletions src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@
"UNABLE_TO_FIND_PRIMARY_STORAGE": "Unable to find suitable primary storage when creating volume {{val1}}",
"VOLUME_BUSY": "There is other active snapshot tasks on the instance to which the volume is attached, please try again later",
"VOLUME_LIMIT_EXCEEDED": "Volume limit has been exceeded. You need to delete some of your volumes to create a new one."
},
"SNAPSHOT_POLICIES": {
"HOURLY_TURN_OFF": "Hourly schedule is turned off"
}
},
"JOB_NOTIFICATIONS": {
Expand Down
3 changes: 3 additions & 0 deletions src/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@
"UNABLE_TO_FIND_PRIMARY_STORAGE": "Не удалось найти подходящее основное хранилище при создании диска {{val1}}",
"VOLUME_BUSY": "На виртуальной машине, к которой прикреплен этот диск, уже выполняется другое действие над снимками. Повторите попытку позже.",
"VOLUME_LIMIT_EXCEEDED": "Лимит дисков превышен. Для создания новых дисков вам нужно удалить какие-либо из ранее созданных дисков."
},
"SNAPSHOT_POLICIES": {
"HOURLY_TURN_OFF": "Почасовое расписание отключено"
}
},
"JOB_NOTIFICATIONS": {
Expand Down

0 comments on commit bcad896

Please sign in to comment.