Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
588336b3
Commit
588336b3
authored
Feb 27, 2015
by
Matija Obreza
Browse files
/admin/cache updates
parent
be6ed964
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/servlet/controller/admin/CacheController.java
View file @
588336b3
package
org.genesys2.server.servlet.controller.admin
;
import
com.hazelcast.core.DistributedObject
;
import
com.hazelcast.core.Hazelcast
;
import
com.hazelcast.core.HazelcastInstance
;
import
com.hazelcast.core.IMap
;
import
com.hazelcast.monitor.LocalMapStats
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Set
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.genesys2.server.service.MappingService
;
...
...
@@ -18,9 +17,11 @@ import org.springframework.ui.Model;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Set
;
import
com.hazelcast.core.DistributedObject
;
import
com.hazelcast.core.Hazelcast
;
import
com.hazelcast.core.HazelcastInstance
;
import
com.hazelcast.core.IMap
;
import
com.hazelcast.monitor.LocalMapStats
;
@Controller
@RequestMapping
(
"/admin/cache"
)
...
...
@@ -55,7 +56,7 @@ public class CacheController {
mappingService
.
clearCache
();
LOG
.
info
(
"Tiles cache size="
+
hazelCache
.
size
());
return
"redirect:/admin/"
;
return
"redirect:/admin/
cache/
"
;
}
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/clearCaches"
)
...
...
@@ -65,11 +66,11 @@ public class CacheController {
LOG
.
info
(
"Clearing cache "
+
cacheName
);
cache
.
clear
();
}
return
"redirect:/cache/
cache
"
;
return
"redirect:/
admin/
cache/"
;
}
@RequestMapping
(
"/
cache
"
)
@RequestMapping
(
"/"
)
public
String
cacheStats
(
Model
model
)
{
List
<
CacheStats
>
cacheMaps
=
new
ArrayList
<
CacheStats
>();
List
<
Object
>
cacheOther
=
new
ArrayList
<
Object
>();
...
...
src/main/resources/content/language.properties
View file @
588336b3
...
...
@@ -587,3 +587,4 @@ logger.log-level=Log level
logger.appenders
=
Log appenders
menu.admin.loggers
=
Loggers
menu.admin.caches
=
Caches
src/main/webapp/WEB-INF/jsp/admin/cache.jsp
View file @
588336b3
...
...
@@ -60,7 +60,7 @@
</c:forEach>
<c:forEach
items=
"
${
cacheOthers
}
"
var=
"cacheOther"
>
<h3><c:out
value=
"
${
cacheOther
.
class
.
name
}
"
/>
<c:out
value=
"
${
cacheOther
}
"
/></h3>
<h3><c:out
value=
"
${
cacheOther
}
"
/>
<c:out
value=
"
${
cacheOther
}
"
/></h3>
</c:forEach>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/admin/index.jsp
View file @
588336b3
...
...
@@ -14,6 +14,7 @@
<div
class=
"main-col-header clearfix"
>
<div
class=
"nav-header pull-left"
>
<a
class=
""
href=
"
<c:url
value=
"/admin/cache/"
/>
"
><spring:message
code=
"menu.admin.caches"
/></a>
<a
class=
""
href=
"
<c:url
value=
"/admin/logger/"
/>
"
><spring:message
code=
"menu.admin.loggers"
/></a>
</div>
</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