mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-06-09 05:48:20 +00:00
233 lines
9.8 KiB
HTML
233 lines
9.8 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
|
|
<head th:fragment="head">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" integrity="sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e" crossorigin="anonymous">
|
|
<link rel="stylesheet" href="/css/dbadmin.css">
|
|
<link rel="stylesheet" href="/css/style.css">
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/js/bootstrap.min.js" integrity="sha512-1/RvZTcCDEUjY/CypiMz+iqqtaoQfAITmNSJY17Myp4Ms5mdxPS5UV7iOfdZoxcGhzFbOm6sntTKJppjvuhg4g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
<script type="text/javascript" src="/js/table.js"></script>
|
|
<script type="text/javascript" src="/js/autocomplete.js"></script>
|
|
<script type="text/javascript" src="/js/autocomplete-multi.js"></script>
|
|
<script type="text/javascript" src="/js/filters.js"></script>
|
|
<script type="text/javascript" src="/js/logs.js"></script>
|
|
<script type="text/javascript" src="/js/create.js"></script>
|
|
<title th:text="${title != null ? title + ' | Spring Boot DB Admin Panel' : 'Spring Boot DB Admin Panel'}"></title>
|
|
<script th:inline="javascript">
|
|
let baseUrl = [[ ${baseUrl} ]];
|
|
</script>
|
|
</head>
|
|
|
|
<th:block th:fragment="alerts">
|
|
<div th:if="${message}" class="alert alert-success alert-dismissible fade show" role="alert">
|
|
<p th:text="${message}" class="mb-0"></p>
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
<div th:if="${error}" class="alert alert-danger">
|
|
<h6 class="fw-bold" th:if="${errorTitle}" th:text="${errorTitle}"></h6>
|
|
<p class="mb-0" th:text="${error}"></p>
|
|
</div>
|
|
</th:block>
|
|
|
|
<nav class="navbar fixed-top navbar-expand-lg bg-accent color-white" th:fragment="navbar">
|
|
<div class="container-fluid">
|
|
<a class=" fw-bold navbar-brand" href="/"><i class="bi bi-hexagon-fill"></i> Spring Boot DB Admin Panel</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
</div>
|
|
</nav>
|
|
<div class="sidebar bg-lightest position-relative" th:fragment="sidebar(page)">
|
|
<div class="sidebar-top">
|
|
<h6 class="fw-bold pt-2 ms-3 menu-subheading d-none d-md-block">MENU</h6>
|
|
<ul class="sidebar-menu pb-0 mb-0 ">
|
|
<li th:class="${#strings.equals(activePage, 'home') ? 'active' : ''}">
|
|
<a th:href="|/${baseUrl}|">
|
|
<div class="d-flex align-items-center">
|
|
<div class="menu-icon">
|
|
<i class="bi bi-house"></i>
|
|
</div>
|
|
<div class="menu-entry-text d-none d-md-block">
|
|
Home
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
<li th:class="${#strings.equals(activePage, 'entities') ? 'active' : ''}">
|
|
<a th:href="|/${baseUrl}|">
|
|
<div class="d-flex align-items-center">
|
|
<div class="menu-icon">
|
|
<i class="bi bi-database"></i>
|
|
</div>
|
|
<div class="menu-entry-text d-none d-md-block">
|
|
Entities
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
<li th:class="${#strings.equals(activePage, 'logs') ? 'active' : ''}">
|
|
<a th:href="|/${baseUrl}/logs|">
|
|
<div class="d-flex align-items-center">
|
|
<div class="menu-icon">
|
|
<i class="bi bi-file-text"></i>
|
|
</div>
|
|
<div class="menu-entry-text d-none d-md-block">
|
|
Logs
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
|
|
<!--
|
|
<li th:class="${#strings.equals(activePage, 'console') ? 'active' : ''}">
|
|
<a href="/live">
|
|
<div class="d-flex align-items-center">
|
|
<div class="menu-icon">
|
|
<i class="bi bi-terminal"></i>
|
|
</div>
|
|
<div class="menu-entry-text d-none d-md-block">
|
|
SQL Console
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
<li th:class="${#strings.equals(activePage, 'ai') ? 'active' : ''}">
|
|
<a href="/search">
|
|
<div class="d-flex align-items-center">
|
|
<div class="menu-icon">
|
|
<i class="bi bi-share"></i>
|
|
</div>
|
|
<div class="menu-entry-text d-none d-md-block">
|
|
AI console
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
<li th:class="${#strings.equals(activePage, 'settings') ? 'active' : ''}">
|
|
<a th:href="|/${baseUrl}/settings|">
|
|
<div class="d-flex align-items-center">
|
|
<div class="menu-icon">
|
|
<i class="bi bi-gear"></i>
|
|
</div>
|
|
<div class="menu-entry-text d-none d-md-block">
|
|
Settings
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
-->
|
|
</ul>
|
|
</div>
|
|
<div class="sidebar-bottom">
|
|
<div class="separator"></div>
|
|
<ul class="sidebar-menu mb-0 pb-0">
|
|
<li th:class="${#strings.equals(page, 'about') ? 'active' : ''}">
|
|
<a href="/about">
|
|
<div class="d-flex align-items-center">
|
|
<div class="menu-icon">
|
|
<i class="bi bi-question-circle"></i>
|
|
</div>
|
|
<div class="menu-entry-text d-none d-md-block">
|
|
About
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<nav aria-label="Results pagination" th:fragment="pagination(page)">
|
|
<div class="d-flex justify-content-between">
|
|
<div th:if="${page != null && page.getPagination().getMaxPage() != 1}" class="d-flex">
|
|
<ul class="pagination me-3">
|
|
<li class="page-item" th:if="${page.getPagination().getCurrentPage() != 1}">
|
|
<a class="page-link"
|
|
th:href="@{|${requestUrl}${page.getPagination().getLink(page.getPagination.getCurrentPage() - 1)}|}"
|
|
aria-label="Previous">
|
|
<span aria-hidden="true">«</span>
|
|
<span class="sr-only">Previous</span>
|
|
</a>
|
|
</li>
|
|
|
|
<li class="page-item" th:each="p : ${page.getPagination().getBeforePages()}">
|
|
<a class="page-link"
|
|
th:href="@{|${requestUrl}${page.getPagination().getLink(p)}|}" th:text="${p}"></a>
|
|
</li>
|
|
|
|
<li class="page-item active">
|
|
<a class="page-link" href="#" th:text="${page.getPagination().getCurrentPage()}"></a>
|
|
</li>
|
|
|
|
<li class="page-item" th:each="p : ${page.getPagination().getAfterPages()}">
|
|
<a class="page-link"
|
|
th:href="@{|${requestUrl}${page.getPagination().getLink(p)}|}"
|
|
th:text="${p}"></a>
|
|
</li>
|
|
<li class="page-item">
|
|
<a class="page-link"
|
|
th:if="${!page.getPagination().isLastPage()}"
|
|
th:href="@{|${requestUrl}${page.getPagination().getLink(page.getPagination.getCurrentPage() + 1)}|}"
|
|
aria-label="Next">
|
|
<span class="sr-only">Next</span>
|
|
<span aria-hidden="true">»</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<div class="me-3">
|
|
<form method="GET" th:action="@{|${requestUrl}|}">
|
|
<input type="hidden" th:value="${page.getPagination().getCurrentPage()}" th:name="page">
|
|
<input type="hidden" th:value="${query}" th:name="query">
|
|
<input type="hidden" name="pageSize">
|
|
<th:block th:each="p : ${queryParams.keySet()}">
|
|
<input th:each="v : ${queryParams.get(p)}"
|
|
th:name="${p}" th:value="${v}" type="hidden"
|
|
th:if="${p.startsWith('filter_')}">
|
|
</th:block>
|
|
<select class="form-select page-size">
|
|
<option disabled>Page size</option>
|
|
<option th:selected="${page.getPagination().getPageSize() == 50}">50</option>
|
|
<option th:selected="${page.getPagination().getPageSize() == 100}">100</option>
|
|
<option th:selected="${page.getPagination().getPageSize() == 150}">150</option>
|
|
<option th:selected="${page.getPagination().getPageSize() == 200}">200</option>
|
|
</select>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="d-flex align-items-center" th:if="${page.getPagination().getMaxPage() > 1}">
|
|
<p class="m-0 p-0">
|
|
<i>Showing [[ ${page.getNumberOfResults()} ]] of [[ ${page.getPagination().getMaxElement()} ]] results</i>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex align-items-center" th:if="${page.getPagination().getMaxPage() == 1}">
|
|
<div class="me-3">
|
|
<form method="GET" th:action="@{|${requestUrl}|}">
|
|
<input type="hidden" th:value="${page.getPagination().getCurrentPage()}" th:name="page">
|
|
<input type="hidden" th:value="${query}" th:name="query">
|
|
<input type="hidden" name="pageSize">
|
|
<select class="form-select page-size">
|
|
<option disabled>Page size</option>
|
|
<option th:selected="${page.getPagination().getPageSize() == 50}">50</option>
|
|
<option th:selected="${page.getPagination().getPageSize() == 100}">100</option>
|
|
<option th:selected="${page.getPagination().getPageSize() == 150}">150</option>
|
|
<option th:selected="${page.getPagination().getPageSize() == 200}">200</option>
|
|
</select>
|
|
</form>
|
|
</div>
|
|
<p class="m-0 p-0">
|
|
<i>Showing [[ ${page.getNumberOfResults()} ]] of [[ ${page.getPagination().getMaxElement()} ]] results</i>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="bulk-actions">
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
</html>
|