Eli Mesika has uploaded a new change for review.

Change subject: core: user who added external events does not...
......................................................................

core: user who added external events does not...

user who added external events does not appear in UI

Actually this will occurs also to VMs Hosts & Templates
Fixing code to get the Name in case that the User/VM/Host/Template id is
not null.

Change-Id: I750fb1873d730c14ddab761062c3ec85157f0a77
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=949557
Signed-off-by: Eli Mesika <emes...@redhat.com>
---
M 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/17924/1

diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
index deea980..ed9ec77 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
@@ -932,13 +932,13 @@
                     severity,
                     resolvedMessage,
                     auditLogable.getUserId(),
-                    auditLogable.getUserName(),
+                    auditLogable.getUserId() != null ? 
getDbFacadeInstance().getDbUserDao().get(auditLogable.getUserId()).getLoginName()
 : null,
                     auditLogable.getVmIdRef(),
-                    auditLogable.getVmName(),
+                    auditLogable.getVmIdRef() != null ? 
getDbFacadeInstance().getVmDao().get(auditLogable.getVmIdRef()).getName() : 
null,
                     auditLogable.getVdsIdRef(),
-                    auditLogable.getVdsName(),
+                    auditLogable.getVdsIdRef() != null ? 
getDbFacadeInstance().getVdsDao().get(auditLogable.getVdsIdRef()).getName() : 
null,
                     auditLogable.getVmTemplateIdRef(),
-                    auditLogable.getVmTemplateName(),
+                    auditLogable.getVmTemplateIdRef() != null ? 
getDbFacadeInstance().getVmTemplateDao().get(auditLogable.getVmTemplateIdRef()).getName()
 : null,
                     auditLogable.getOrigin(),
                     auditLogable.getCustomEventId(),
                     auditLogable.getEventFloodInSec(),


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

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

Reply via email to