Commit 588336b3 authored by Matija Obreza's avatar Matija Obreza

/admin/cache updates

parent be6ed964
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>();
......
......@@ -587,3 +587,4 @@ logger.log-level=Log level
logger.appenders=Log appenders
menu.admin.loggers=Loggers
menu.admin.caches=Caches
......@@ -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
......@@ -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>
......
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