Alissa Bonas has uploaded a new change for review.

Change subject: core: display eventName when registration failed
......................................................................

core: display eventName when registration failed

Display eventName in error message when registration to
notification failed. Till now there was a generic message
"Notification event is unsupported" for all events.

Change-Id: Ie76b93be205c9f67683154675c85a3b7e494e601
Signed-off-by: Alissa Bonas <abo...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddEventSubscriptionCommand.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
5 files changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/99/15699/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddEventSubscriptionCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddEventSubscriptionCommand.java
index d4b3d4d..9e5bf05 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddEventSubscriptionCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddEventSubscriptionCommand.java
@@ -60,6 +60,7 @@
                         retValue = ValidateAdd(eventNotificationMethods, 
getParameters().getEventSubscriber(), user);
                     }
                 } else {
+                    addCanDoActionMessage(String.format("$eventName %1$s", 
eventName));
                     
addCanDoActionMessage(VdcBllMessages.EN_UNSUPPORTED_NOTIFICATION_EVENT);
                     retValue = false;
                 }
diff --git 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
index a5492b8..7d6aa76 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -413,7 +413,7 @@
 NETWORK_INTERFACE_VM_CANNOT_BE_SET=Cannot ${action} ${type}. VM ID must be 
empty.
 NETWORK_INTERFACE_NAME_ALREADY_IN_USE=Network interface is already in use.
 EN_UNKNOWN_NOTIFICATION_METHOD=The Notification method is unsupported.
-EN_UNSUPPORTED_NOTIFICATION_EVENT=The Notification event is unsupported.
+EN_UNSUPPORTED_NOTIFICATION_EVENT=The notification event ${eventName} is 
unsupported.
 EN_EVENT_UP_SUBJECT_TEXT=Alert Notification.
 EN_EVENT_DOWN_SUBJECT_TEXT=Issue Solved Notification.
 EN_ALREADY_SUBSCRIBED=User is already subscribed to this event with the same 
Notification method.
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
index 3a2ec3a..d898866 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
@@ -1114,7 +1114,7 @@
     @DefaultStringValue("The Notification method is unsupported.")
     String EN_UNKNOWN_NOTIFICATION_METHOD();
 
-    @DefaultStringValue("The Notification event is unsupported.")
+    @DefaultStringValue("The notification event ${eventName} is unsupported.")
     String EN_UNSUPPORTED_NOTIFICATION_EVENT();
 
     @DefaultStringValue("Alert Notification.")
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
index 220c353..111d1b8 100644
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
@@ -409,7 +409,7 @@
 NETWORK_INTERFACE_VM_CANNOT_BE_SET=Cannot ${action} ${type}. VM ID must be 
empty.
 NETWORK_INTERFACE_NAME_ALREAY_IN_USE=Network interface is already in use.
 EN_UNKNOWN_NOTIFICATION_METHOD=The Notification method is unsupported.
-EN_UNSUPPORTED_NOTIFICATION_EVENT=The Notification event is unsupported.
+EN_UNSUPPORTED_NOTIFICATION_EVENT=The notification event ${eventName} is 
unsupported.
 EN_EVENT_UP_SUBJECT_TEXT=Alert Notification.
 EN_EVENT_DOWN_SUBJECT_TEXT=Issue Solved Notification.
 EN_ALREADY_SUBSCRIBED=User is already subscribed to this event with the same 
Notification method. 
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
index b2f613e..f2acc58 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
+++ 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
@@ -418,7 +418,7 @@
 NETWORK_INTERFACE_VM_CANNOT_BE_SET=Cannot ${action} ${type}. VM ID must be 
empty.
 NETWORK_INTERFACE_NAME_ALREAY_IN_USE=Network interface is already in use.
 EN_UNKNOWN_NOTIFICATION_METHOD=The Notification method is unsupported.
-EN_UNSUPPORTED_NOTIFICATION_EVENT=The Notification event is unsupported.
+EN_UNSUPPORTED_NOTIFICATION_EVENT=The notification event ${eventName} is 
unsupported.
 EN_EVENT_UP_SUBJECT_TEXT=Alert Notification.
 EN_EVENT_DOWN_SUBJECT_TEXT=Issue Solved Notification.
 EN_ALREADY_SUBSCRIBED=User is already subscribed to this event with the same 
Notification method. 


-- 
To view, visit http://gerrit.ovirt.org/15699
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie76b93be205c9f67683154675c85a3b7e494e601
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <abo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to