quemgmt.xhtml
4.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:map="http://java.sun.com/jsf/composite/cditools/map"
xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:p="http://primefaces.org/ui">
<h:body>
<ui:composition template="#{sessionHandler.template}">
<f:metadata>
<f:viewParam name="mapId" value="#{queueManageView.mapId}" />
<f:event type="preRenderView" listener="#{queueManageView.initView}" />
</f:metadata>
<ui:define name="content">
<h2>Queue properties</h2>
<ui:fragment rendered="#{ajaxMapView.queueEnabled}">
<h:outputText value="#{i18n['queuemgmt.queueEnabled']}"/>
</ui:fragment>
<ui:fragment rendered="#{not ajaxMapView.queueEnabled}">
<h:outputText value="#{i18n['queuemgmt.queueDisabled']}: "/>
</ui:fragment>
<br />
<h:form>
<p:panelGrid columns="3" id="queueGrid">
<p:outputLabel for="minslots" value="#{i18n['queuemgmt.minimumSlotsInQueue']}" />
<p:inputText id="minslots" value="#{queueManageView.queue.minimumSlotsInQueue}" />
<h:outputText value="#{i18n['queuemgmt.inDatabase']}: #{queueManageView.defaultValues.minimumSlotsInQueue}" />
<p:outputLabel for="reservingsize" value="#{i18n['queuemgmt.reservingSize']}" />
<p:inputText id="reservingsize" value="#{queueManageView.queue.reservingSize}" />
<h:outputText value="#{i18n['queuemgmt.inDatabase']}: #{queueManageView.defaultValues.reservingSize}" />
<p:outputLabel for="defaultTimeout" value="#{i18n['queuemgmt.defaultTimeoutMin']}" />
<p:inputText id="defaultTimeout" value="#{queueManageView.queue.defaultTimeoutMin}" />
<h:outputText value="#{i18n['queuemgmt.inDatabase']}: #{queueManageView.defaultValues.defaultTimeoutMin}" />
<p:outputLabel for="biggestFirst" value="#{i18n['queuemgmt.biggestFirst']}" />
<p:selectBooleanCheckbox id="biggestFirst" value="#{queueManageView.queue.biggestFirst}" />
<h:outputText value="#{i18n['queuemgmt.inDatabase']}: #{queueManageView.defaultValues.biggestFirst}" />
</p:panelGrid>
<p:commandButton value="#{i18n['queuemgmt.saveProperties']}" actionListener="#{queueManageView.saveToDatabase}" update="queueGrid" ></p:commandButton>
</h:form>
<h2>Manage queue</h2>
<h:form>
<p:panelGrid columns="2">
<p:outputLabel for="username" value="#{i18n['queuemgmt.username']}" />
<p:inputText id="username" value="#{queueManageView.username}" />
<p:outputLabel for="expiretime" value="#{i18n['queuemgmt.time']}" />
<p:calendar id="expiretime" label="" value="#{queueManageView.time}" pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
</p:panelGrid>
<p:commandButton action="#{queueManageView.addToReserving}" ajax="false" value="#{i18n['queuemgmt.adduser']}" />
<p:commandButton action="#{queueManageView.forceRemove}" ajax="false" value="#{i18n['queuemgmt.remove']}" />
</h:form>
<h:outputText value="#{queueManageView.now}">
<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
</h:outputText>
<h2>Currently reserving</h2>
<p:dataTable var="u" value="#{queueManageView.userReserving}">
<p:column>
<p:link outcome="/useradmin/edit" value="#{u.user.user.login}">
<f:param name="userid" value="#{u.user.user.id}" />
</p:link>
</p:column>
<p:column headerText="Created">
<h:outputText value="#{u.created}">
<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
</h:outputText>
</p:column>
<p:column headerText="Reservation timeout">
<h:outputText value="#{u.reservationTimeout}">
<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
</h:outputText>
</p:column>
</p:dataTable>
<h2>In queue</h2>
Queue size: #{queueManageView.userQueue.rowCount}<br />
<p:dataTable var="u" value="#{queueManageView.userQueue}">
<p:column>
<p:link outcome="/useradmin/edit" value="#{u.user.user.login}">
<f:param name="userid" value="#{u.user.user.id}" />
</p:link>
</p:column>
<p:column headerText="Created">
<h:outputText value="#{u.created}">
<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
</h:outputText>
</p:column>
<p:column headerText="Seen time">
<p:calendar value="#{u.seenTime}" pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" showOn="button" />
</p:column>
</p:dataTable>
</ui:define>
</ui:composition>
</h:body>
</html>