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
37002fc1
Commit
37002fc1
authored
Mar 25, 2015
by
michael.simon
Browse files
renice view for app config
parent
30b99839
Changes
2
Hide whitespace changes
Inline
Side-by-side
bwreg-webapp/src/main/java/edu/kit/scc/webreg/bean/admin/config/IndexConfigBean.java
View file @
37002fc1
...
...
@@ -13,6 +13,7 @@ package edu.kit.scc.webreg.bean.admin.config;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -101,4 +102,11 @@ public class IndexConfigBean implements Serializable {
this
.
newValue
=
newValue
;
}
public
Date
getLastLoad
()
{
return
appConfig
.
getLastLoad
();
}
public
boolean
getScheduledReload
()
{
return
(
appConfig
.
getLastLoad
().
compareTo
(
appConfig
.
getNextScheduledReload
())
<
0
);
}
}
bwreg-webapp/src/main/webapp/admin/config/index.xhtml
View file @
37002fc1
...
...
@@ -5,7 +5,8 @@
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:bw=
"http://www.scc.kit.edu/bwfacelets"
xmlns:p=
"http://primefaces.org/ui"
>
xmlns:p=
"http://primefaces.org/ui"
xmlns:of=
"http://omnifaces.org/functions"
>
<head>
<title></title>
</head>
...
...
@@ -25,6 +26,7 @@
<h:form
id=
"form"
>
<div
id=
"panelInline"
>
<p:panel
id=
"basePanel"
header=
"#{messages.server_config}"
>
<p:dataTable
value=
"#{indexConfigBean.keyList}"
var=
"key"
>
<p:column
headerText=
"#{messages.key}"
>
#{key}
</p:column>
<p:column
headerText=
"#{messages.value}"
>
...
...
@@ -46,7 +48,16 @@
</p:panel>
<p:panel
id=
"toolsPanel"
header=
"#{messages.tools}"
style=
"margin-top: 16px;"
>
<p:commandButton
value=
"#{messages.reload_app_config}"
action=
"#{indexConfigBean.scheduleReload()}"
/>
<h:panelGrid
columns=
"2"
>
<h:outputLabel
value=
"#{messages.last_scheduled_reload}"
/>
<h:panelGroup>
<h:outputText
value=
"#{of:formatDate(indexConfigBean.lastLoad, 'dd.MM.yyyy HH:mm:ss')}"
/>
<h:outputText
value=
" (Reload is scheduled)"
rendered=
"#{indexConfigBean.scheduledReload}"
/>
</h:panelGroup>
</h:panelGrid>
<p:commandButton
value=
"#{messages.reload_app_config}"
action=
"#{indexConfigBean.scheduleReload()}"
update=
":form:basePanel :form:toolsPanel"
/>
</p:panel>
</div>
</h:form>
...
...
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