Commit 47c05827 authored by michael.simon's avatar michael.simon
Browse files

add check button for invalid registries

parent 4f029a2b
...@@ -37,6 +37,7 @@ public class ServiceAdminUserListBean implements Serializable { ...@@ -37,6 +37,7 @@ public class ServiceAdminUserListBean implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private GenericLazyDataModel<RegistryEntity, RegistryService, Long> list; private GenericLazyDataModel<RegistryEntity, RegistryService, Long> list;
private GenericLazyDataModel<RegistryEntity, RegistryService, Long> allList;
private GenericLazyDataModel<RegistryEntity, RegistryService, Long> otherList; private GenericLazyDataModel<RegistryEntity, RegistryService, Long> otherList;
private GenericLazyDataModel<RegistryEntity, RegistryService, Long> deletedList; private GenericLazyDataModel<RegistryEntity, RegistryService, Long> deletedList;
private GenericLazyDataModel<RegistryEntity, RegistryService, Long> lostAccessList; private GenericLazyDataModel<RegistryEntity, RegistryService, Long> lostAccessList;
...@@ -64,6 +65,10 @@ public class ServiceAdminUserListBean implements Serializable { ...@@ -64,6 +65,10 @@ public class ServiceAdminUserListBean implements Serializable {
throw new NotAuthorizedException("Nicht autorisiert"); throw new NotAuthorizedException("Nicht autorisiert");
} }
public RegistryStatus[] getRegistryStatusList() {
return RegistryStatus.values();
}
public ServiceEntity getServiceEntity() { public ServiceEntity getServiceEntity() {
return serviceEntity; return serviceEntity;
} }
...@@ -90,6 +95,15 @@ public class ServiceAdminUserListBean implements Serializable { ...@@ -90,6 +95,15 @@ public class ServiceAdminUserListBean implements Serializable {
return list; return list;
} }
public GenericLazyDataModel<RegistryEntity, RegistryService, Long> getAllList() {
if (allList == null) {
Map<String, Object> filterMap = new HashMap<String, Object>();
filterMap.put("service", serviceEntity);
allList = new GenericLazyDataModelImpl<RegistryEntity, RegistryService, Long>(service, filterMap);
}
return allList;
}
public GenericLazyDataModel<RegistryEntity, RegistryService, Long> getOtherList() { public GenericLazyDataModel<RegistryEntity, RegistryService, Long> getOtherList() {
if (otherList == null) { if (otherList == null) {
Map<String, Object> filterMap = new HashMap<String, Object>(); Map<String, Object> filterMap = new HashMap<String, Object>();
......
...@@ -29,15 +29,17 @@ ...@@ -29,15 +29,17 @@
<div id="panelInline"> <div id="panelInline">
<p:tabView id="tabVw" dynamic="true" cache="false" > <p:tabView id="tabVw" dynamic="true" cache="false" >
<p:tab id="tab1" title="#{messages.active}"> <p:tab id="tab0" title="#{messages.all}">
<p:dataTable id="registeredTable1" var="registry" value="#{serviceAdminUserListBean.list}" paginator="true" <p:dataTable id="registeredTable0" var="registry" value="#{serviceAdminUserListBean.allList}" paginator="true"
lazy="true" rows="15" style="width:auto; font-size: 1.2rem;"> lazy="true" rows="15" style="width:auto; font-size: 1.2rem;">
<p:column sortBy="#{registry.id}"> <p:column sortBy="#{registry.id}">
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{messages.id}" /> <h:outputText value="#{messages.id}" />
</f:facet> </f:facet>
<h:outputText value="#{registry.id}" /> <h:link outcome="show-service-registry.xhtml" value="#{registry.id}" filterMatchMode="contains">
<f:param name="id" value="#{registry.id}"/>
</h:link>
</p:column> </p:column>
<p:column sortBy="#{registry.user.eppn}" filterBy="#{registry.user.eppn}" filterMatchMode="contains"> <p:column sortBy="#{registry.user.eppn}" filterBy="#{registry.user.eppn}" filterMatchMode="contains">
<f:facet name="header"> <f:facet name="header">
...@@ -71,10 +73,57 @@ ...@@ -71,10 +73,57 @@
</f:facet> </f:facet>
<h:outputText value="#{of:formatDate(registry.lastStatusChange, 'dd.MM.yyyy HH:mm')}" /> <h:outputText value="#{of:formatDate(registry.lastStatusChange, 'dd.MM.yyyy HH:mm')}" />
</p:column> </p:column>
<p:column sortBy="#{registry.registryStatus}"> <p:column field="registryStatus" headerText="#{messages.status}" sortBy="#{registry.registryStatus}">
<h:outputText value="#{registry.registryStatus}" />
</p:column>
</p:dataTable>
</p:tab>
<p:tab id="tab1" title="#{messages.active}">
<p:dataTable id="registeredTable1" var="registry" value="#{serviceAdminUserListBean.list}" paginator="true"
lazy="true" rows="15" style="width:auto; font-size: 1.2rem;">
<p:column sortBy="#{registry.id}">
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{messages.status}" /> <h:outputText value="#{messages.id}" />
</f:facet>
<h:link outcome="show-service-registry.xhtml" value="#{registry.id}" filterMatchMode="contains">
<f:param name="id" value="#{registry.id}"/>
</h:link>
</p:column>
<p:column sortBy="#{registry.user.eppn}" filterBy="#{registry.user.eppn}" filterMatchMode="contains">
<f:facet name="header">
<h:outputText value="#{messages.eppn}" />
</f:facet>
<h:link outcome="show-service-registry.xhtml" value="#{registry.user.eppn}" filterMatchMode="contains">
<f:param name="id" value="#{registry.id}"/>
</h:link>
</p:column>
<p:column sortBy="#{registry.user.surName}" filterBy="#{registry.user.surName}" filterMatchMode="contains">
<f:facet name="header">
<h:outputText value="#{messages.sur_name}" />
</f:facet>
<h:outputText value="#{registry.user.surName}" />
</p:column>
<p:column sortBy="#{registry.user.givenName}" filterBy="#{registry.user.givenName}">
<f:facet name="header">
<h:outputText value="#{messages.given_name}" />
</f:facet>
<h:outputText value="#{registry.user.givenName}" />
</p:column>
<p:column sortBy="#{registry.agreedTime}">
<f:facet name="header">
<h:outputText value="#{messages.registered_time}" />
</f:facet> </f:facet>
<h:outputText value="#{of:formatDate(registry.agreedTime, 'dd.MM.yyyy HH:mm')}" />
</p:column>
<p:column sortBy="#{registry.lastStatusChange}">
<f:facet name="header">
<h:outputText value="#{messages.last_status_change}" />
</f:facet>
<h:outputText value="#{of:formatDate(registry.lastStatusChange, 'dd.MM.yyyy HH:mm')}" />
</p:column>
<p:column field="registryStatus" headerText="#{messages.status}" sortBy="#{registry.registryStatus}">
<h:outputText value="#{registry.registryStatus}" /> <h:outputText value="#{registry.registryStatus}" />
</p:column> </p:column>
</p:dataTable> </p:dataTable>
...@@ -87,7 +136,9 @@ ...@@ -87,7 +136,9 @@
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{messages.id}" /> <h:outputText value="#{messages.id}" />
</f:facet> </f:facet>
<h:outputText value="#{registry.id}" /> <h:link outcome="show-service-registry.xhtml" value="#{registry.id}" filterMatchMode="contains">
<f:param name="id" value="#{registry.id}"/>
</h:link>
</p:column> </p:column>
<p:column sortBy="#{registry.user.eppn}" filterBy="#{registry.user.eppn}"> <p:column sortBy="#{registry.user.eppn}" filterBy="#{registry.user.eppn}">
<f:facet name="header"> <f:facet name="header">
...@@ -137,7 +188,9 @@ ...@@ -137,7 +188,9 @@
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{messages.id}" /> <h:outputText value="#{messages.id}" />
</f:facet> </f:facet>
<h:outputText value="#{registry.id}" /> <h:link outcome="show-service-registry.xhtml" value="#{registry.id}" filterMatchMode="contains">
<f:param name="id" value="#{registry.id}"/>
</h:link>
</p:column> </p:column>
<p:column sortBy="#{registry.user.eppn}" filterBy="#{registry.user.eppn}"> <p:column sortBy="#{registry.user.eppn}" filterBy="#{registry.user.eppn}">
<f:facet name="header"> <f:facet name="header">
...@@ -187,7 +240,9 @@ ...@@ -187,7 +240,9 @@
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{messages.id}" /> <h:outputText value="#{messages.id}" />
</f:facet> </f:facet>
<h:outputText value="#{registry.id}" /> <h:link outcome="show-service-registry.xhtml" value="#{registry.id}" filterMatchMode="contains">
<f:param name="id" value="#{registry.id}"/>
</h:link>
</p:column> </p:column>
<p:column sortBy="#{registry.user.eppn}" filterBy="#{registry.user.eppn}"> <p:column sortBy="#{registry.user.eppn}" filterBy="#{registry.user.eppn}">
<f:facet name="header"> <f:facet name="header">
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<p:commandButton id="fullReconId" action="#{serviceAdminUserDetailBean.fullReconsiliation()}" <p:commandButton id="fullReconId" action="#{serviceAdminUserDetailBean.fullReconsiliation()}"
value="#{messages.full_reconsiliation}" update="@form" /> value="#{messages.full_reconsiliation}" update="@form" />
</h:panelGroup> </h:panelGroup>
<h:panelGroup rendered="#{(serviceAdminUserDetailBean.entity.registryStatus == 'ACTIVE' || serviceAdminUserDetailBean.entity.registryStatus == 'LOST_ACCESS' || serviceAdminUserDetailBean.entity.registryStatus == 'ON_HOLD')}"> <h:panelGroup rendered="#{(serviceAdminUserDetailBean.entity.registryStatus == 'ACTIVE' || serviceAdminUserDetailBean.entity.registryStatus == 'LOST_ACCESS' || serviceAdminUserDetailBean.entity.registryStatus == 'ON_HOLD' || serviceAdminUserDetailBean.entity.registryStatus == 'INVALID')}">
<p:commandButton id="checkRegId" action="#{serviceAdminUserDetailBean.checkRegistry()}" <p:commandButton id="checkRegId" action="#{serviceAdminUserDetailBean.checkRegistry()}"
value="Check Access" update="@form" /> value="Check Access" update="@form" />
<p:commandButton id="delUsr" action="#{serviceAdminUserDetailBean.deregister()}" value="#{messages.deregister}" <p:commandButton id="delUsr" action="#{serviceAdminUserDetailBean.deregister()}" value="#{messages.deregister}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment