Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
accafaed
Commit
accafaed
authored
Apr 13, 2016
by
michael.simon
Browse files
Show auditing on user page for admin
parent
062ad72d
Changes
2
Hide whitespace changes
Inline
Side-by-side
bwreg-webapp/src/main/java/edu/kit/scc/webreg/bean/admin/ShowUserBean.java
View file @
accafaed
...
...
@@ -12,6 +12,7 @@ package edu.kit.scc.webreg.bean.admin;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -23,8 +24,11 @@ import javax.inject.Inject;
import
org.opensaml.saml2.core.Attribute
;
import
org.primefaces.event.TransferEvent
;
import
org.primefaces.model.DualListModel
;
import
org.primefaces.model.LazyDataModel
;
import
org.slf4j.Logger
;
import
edu.kit.scc.webreg.audit.AuditUserEntryService
;
import
edu.kit.scc.webreg.dao.ops.AndPredicate
;
import
edu.kit.scc.webreg.drools.KnowledgeSessionService
;
import
edu.kit.scc.webreg.entity.GroupEntity
;
import
edu.kit.scc.webreg.entity.RegistryEntity
;
...
...
@@ -33,7 +37,9 @@ import edu.kit.scc.webreg.entity.RoleEntity;
import
edu.kit.scc.webreg.entity.UserEntity
;
import
edu.kit.scc.webreg.entity.as.ASUserAttrEntity
;
import
edu.kit.scc.webreg.entity.as.AttributeSourceEntity
;
import
edu.kit.scc.webreg.entity.audit.AuditUserEntity
;
import
edu.kit.scc.webreg.exc.UserUpdateException
;
import
edu.kit.scc.webreg.model.GenericLazyDataModelImpl
;
import
edu.kit.scc.webreg.service.ASUserAttrService
;
import
edu.kit.scc.webreg.service.AttributeSourceService
;
import
edu.kit.scc.webreg.service.GroupService
;
...
...
@@ -72,6 +78,9 @@ public class ShowUserBean implements Serializable {
@Inject
private
AttributeSourceService
attributeSourceService
;
@Inject
private
AuditUserEntryService
auditUserEntryService
;
@Inject
private
SessionManager
sessionManager
;
...
...
@@ -88,7 +97,8 @@ public class ShowUserBean implements Serializable {
private
List
<
ASUserAttrEntity
>
asUserAttrList
;
private
AttributeSourceEntity
selectedAttributeSource
;
private
ASUserAttrEntity
selectedUserAttr
;
private
LazyDataModel
<
AuditUserEntity
>
auditUserEntryList
;
private
Long
id
;
public
void
preRenderView
(
ComponentSystemEvent
ev
)
{
...
...
@@ -224,4 +234,13 @@ public class ShowUserBean implements Serializable {
public
AttributeSourceEntity
getSelectedAttributeSource
()
{
return
selectedAttributeSource
;
}
public
LazyDataModel
<
AuditUserEntity
>
getAuditUserEntryList
()
{
if
(
auditUserEntryList
==
null
)
{
Map
<
String
,
Object
>
additionalFilterMap
=
new
HashMap
<
String
,
Object
>();
additionalFilterMap
.
put
(
"user"
,
new
AndPredicate
(
user
));
auditUserEntryList
=
new
GenericLazyDataModelImpl
<
AuditUserEntity
,
AuditUserEntryService
,
Long
>(
auditUserEntryService
,
additionalFilterMap
);
}
return
auditUserEntryList
;
}
}
bwreg-webapp/src/main/webapp/admin/user/show-user.xhtml
View file @
accafaed
...
...
@@ -241,7 +241,25 @@
</p:column>
</p:dataTable>
</p:tab>
<p:tab
id=
"tab8"
title=
"#{messages.audit}"
>
<p:dataTable
id=
"auditData"
style=
"min-width: 500px;"
value=
"#{showUserBean.auditUserEntryList}"
var=
"audit"
paginator=
"true"
lazy=
"true"
rows=
"15"
>
<p:column
sortBy=
"#{audit.id}"
>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{messages.id}"
/>
</f:facet>
<h:outputText
value=
"#{audit.id}"
/>
</p:column>
<p:column
sortBy=
"#{audit.name}"
>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{messages.name}"
/>
</f:facet>
<h:outputText
value=
"#{audit.name}"
/>
</p:column>
</p:dataTable>
</p:tab>
</p:tabView>
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment