Commit be6ed964 authored by Matija Obreza's avatar Matija Obreza
Browse files

Used common names index.jsp and edit.jsp

Admin menu
parent c3af6ac7
......@@ -33,7 +33,7 @@ public class LoggerController {
@Value("${paginator.default.pageSize}")
int defaultPageSize;
@RequestMapping(method = RequestMethod.GET, value = "/adjustLogger")
@RequestMapping(method = RequestMethod.GET, value = "/")
public String adjustLogger(Model model, @RequestParam(value = "page", defaultValue = "1") int page) {
// first element on page
int firstelement = (page - 1) * defaultPageSize;
......@@ -48,10 +48,10 @@ public class LoggerController {
PageImpl<Logger> pagedData = new PageImpl<Logger>(loggers, new PageRequest(page, defaultPageSize), allLoggers.size());
model.addAttribute("loggers", pagedData);
return "/admin/adjust-logger/loggersList";
return "/admin/logger/index";
}
@RequestMapping(method = RequestMethod.GET, value = "/adjustLoggerPage/{loggerName}")
@RequestMapping(method = RequestMethod.GET, value = "/{loggerName}")
public String adjustLoggerPage(Model model, @PathVariable(value = "loggerName") String loggerName) {
Logger logger;
......@@ -62,7 +62,7 @@ public class LoggerController {
model.addAttribute("logger", logger);
model.addAttribute("appenders", logger.getRootLogger().getAllAppenders());
return "/admin/adjust-logger/adjustLoggerPage";
return "/admin/logger/edit";
}
@RequestMapping(method = RequestMethod.POST, value = "/changeLoger")
......@@ -80,7 +80,7 @@ public class LoggerController {
logger.setLevel(loggerLevel == null ? null : Level.toLevel(loggerLevel));
}
return "redirect:/admin/logger/adjustLoggerPage/" + loggerName + ".";
return "redirect:/admin/logger/" + loggerName + ".";
}
private List<Logger> getAllLoggers() {
......@@ -119,7 +119,7 @@ public class LoggerController {
Logger logger = Logger.getLogger(nameNewLogger);
logger.setLevel(Level.INFO);
return "redirect:/admin/logger/adjustLogger";
return "redirect:/admin/logger/";
}
}
......@@ -586,3 +586,4 @@ logger.name=Logger name
logger.log-level=Log level
logger.appenders=Log appenders
menu.admin.loggers=Loggers
......@@ -11,6 +11,12 @@
<h1>
<spring:message code="admin.page.title" />
</h1>
<div class="main-col-header clearfix">
<div class="nav-header pull-left">
<a class="" href="<c:url value="/admin/logger/" />"><spring:message code="menu.admin.loggers" /></a>
</div>
</div>
<h3>Full-text Search</h3>
<form method="post" action="<c:url value="/admin/cache/clearTilesCache" />">
......@@ -126,9 +132,5 @@
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
</form>
<div class="adjust-logger-block">
<a class="btn btn-default" href="<c:url value="/admin/logger/adjustLogger" />">Adjust logger</a>
</div>
</body>
</html>
\ No newline at end of file
......@@ -19,14 +19,14 @@
<div class="col-sm-4"><label><spring:message code="logger.log-level" /><label></div>
<div class="col-sm-8 control-label"><p class=".form-control-static">${logger.level}</p></div>
</div>
<ul class="funny-list">
<c:forEach items="${appenders}" var="appender">
<li>
<c:out value="${appender.name}" />
</li>
</c:forEach>
</ul>
<div class="row">
<div class="col-sm-4"><label><spring:message code="logger.appenders" /><label></div>
<div class="col-sm-8">
<c:forEach items="${appenders}" var="appender">
<p class=".form-control-static"><c:out value="${appender.name}" /></p>
</c:forEach>
</div>
</div>
<form method="post" class="form-horizontal" action=<c:url value="/admin/logger/changeLoger"/> >
<!-- CSRF protection -->
......@@ -49,7 +49,7 @@
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<input type="submit" class="btn btn-group-sm" value="<spring:message code="save" />">
<a class="btn btn-default" href="<c:url value="/admin/logger/adjustLogger" />"><spring:message code="cancel" /></a>
<a class="btn btn-default" href="<c:url value="/admin/logger/" />"><spring:message code="cancel" /></a>
</div>
</div>
......
......@@ -37,7 +37,7 @@
<ul class="funny-list">
<c:forEach items="${loggers.content}" var="logger" varStatus="status">
<li class="${status.count % 2 == 0 ? 'even' : 'odd'}">
<a class="adjust-logger-config" href="<c:url value="/admin/logger/adjustLoggerPage/${logger.name}." />">${logger.name}</a>
<a href="<c:url value="/admin/logger/${logger.name}." />">${logger.name}</a>
<div class="pull-right"><c:out value="${logger.level}" /></div>
</li>
</c:forEach>
......
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