index.jsp 1.77 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1 2
<!DOCTYPE html>

3
<%@ include file="/WEB-INF/jsp/init.jsp" %>
Matija Obreza's avatar
Matija Obreza committed
4
<%@ taglib prefix="sec"
5
	uri="http://www.springframework.org/security/tags" %>
Matija Obreza's avatar
Matija Obreza committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

<html>
<head>
<title><spring:message code="loggers.list.page" /></title>
</head>
<body>

	<table class="table table-striped">
		<thead>
			<tr>
				<th class="col-xs-8"><spring:message code="logger.name" /></th>
				<th class="col-xs-4 text-right"><spring:message
						code="logger.log-level" /></th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${loggers.content}" var="logger" varStatus="status">
				<tr>
					<td class="col-xs-8 form-control-static"><a
Matija Obreza's avatar
Matija Obreza committed
25
						href="<c:url value="/admin/logger/${logger.name}." />"><c:out value="${logger.name}" /></a>
Matija Obreza's avatar
Matija Obreza committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
					</td>
					<td class="col-xs-4 text-right form-control-static"><c:out
							value="${logger.level}" /></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>

	<div class="row">
		<form method="post" action=<c:url value="/admin/logger/addLoger"/>>
			<div class="form-group col-xs-8">
				<input class="form-control" type="text" name="nameNewLogger"
					placeholder="com.example.package.Class" />
			</div>
			<div class="form-group col-xs-4">
				<select class="form-control" name="loggerLevel">
					<c:forTokens items="all,debug,info,warn,error,fatal,off,trace"
						delims="," var="level">
						<option value="${level}" ${level == "debug" ? "selected" : ""}>
Matija Obreza's avatar
Matija Obreza committed
45
							<c:out value="${level}" /></option>
Matija Obreza's avatar
Matija Obreza committed
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
					</c:forTokens>
				</select>
			</div>
			<div class="form-group col-xs-2">
				<input type="submit" class="btn btn-primary"
					value="<spring:message code="logger.add-logger" />" />
			</div>

			<!-- CSRF protection -->
			<input type="hidden" name="${_csrf.parameterName}"
				value="${_csrf.token}" />
		</form>
	</div>
	
	
	<local:paginate2 page="${loggers}" />
	
	
</body>
</html>