<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<link rel="icon" type="shortcut icon" th:href="@{/img/favicon.ico}" />
	<link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap.min.css}" />
	<link rel="stylesheet" type="text/css" th:href="@{/css/global.css}" />
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
	<title>Echo - 数据统计</title>
</head>
<body>
	<div class="nk-container">
		<!-- 头部 -->
		<header class="bg-dark sticky-top" th:replace="index::header"></header>

		<!-- 内容 -->
		<div class="main">
			<!-- 网站UV -->
			<div class="container pl-5 pr-5 pt-3 pb-3 mt-3">
				<h6 class="mt-3"><b class="square"></b> 网站 UV</h6>
				<form class="form-inline mt-3" method="post" th:action="@{/data/uv}">
					<input type="date" class="form-control" required name="start"
						   th:value="${#dates.format(uvStartDate, 'yyyy-MM-dd')}" />
					<input type="date" class="form-control ml-3" required name="end"
						   th:value="${#dates.format(uvEndDate, 'yyyy-MM-dd')}" />
					<button type="submit" class="btn btn-primary ml-3">开始统计</button>
				</form>
				<ul class="list-group mt-3 mb-3">
					<li class="list-group-item d-flex justify-content-between align-items-center">
						统计结果
						<span class="badge badge-primary badge-danger font-size-14" th:text="${uvResult}"></span>
					</li>
				</ul>
			</div>
			<!-- 活跃用户 -->
			<div class="container pl-5 pr-5 pt-3 pb-3 mt-4">
				<h6 class="mt-3"><b class="square"></b> 活跃用户</h6>
				<form class="form-inline mt-3" method="post" th:action="@{/data/dau}">
					<input type="date" class="form-control" required name="start"
						   th:value="${#dates.format(dauStartDate, 'yyyy-MM-dd')}" />
					<input type="date" class="form-control ml-3" required name="end"
						   th:value="${#dates.format(dauEndDate, 'yyyy-MM-dd')}" />
					<button type="submit" class="btn btn-primary ml-3">开始统计</button>
				</form>
				<ul class="list-group mt-3 mb-3">
					<li class="list-group-item d-flex justify-content-between align-items-center">
						统计结果
						<span class="badge badge-primary badge-danger font-size-14" th:text="${dauResult}"></span>
					</li>
				</ul>
			</div>
		</div>

		<!-- 尾部 -->
		<footer class="bg-dark" th:replace="index::footer"></footer>

	</div>

	<script th:src="@{/js/jquery-3.1.0.min.js}"></script>
	<script th:src="@{/js/popper.min.js}"></script>
	<script th:src="@{/js/bootstrap.min.js}"></script>
	<script th:src="@{/js/global.js}"></script>
</body>
</html>
