mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-06-09 05:48:20 +00:00
66 lines
3.0 KiB
HTML
66 lines
3.0 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
|
|
<head th:replace="~{fragments/resources::head}">
|
|
</head>
|
|
<body>
|
|
<div class="bg-light main-wrapper">
|
|
<nav th:replace="~{fragments/resources :: navbar}"></nav>
|
|
<div class="d-flex">
|
|
<div th:replace="~{fragments/resources :: sidebar('console')}"></div>
|
|
<div class="main-content bg-lighter">
|
|
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-terminal"></i><span class="align-middle"> SQL console</span></h1>
|
|
<div class="row mt-4">
|
|
<div class="col">
|
|
<div class="w-100 d-flex inner-navigation">
|
|
<a th:each="query : ${tabs}" th:href="|/${dbadmin_baseUrl}/console/run/${query.getId()}|"
|
|
class="d-inline-block"
|
|
th:classAppend="${query.getId() == activeQuery.getId() ? 'active' : ''}">
|
|
<div class="ui-tab ps-5 pe-5 p-3">
|
|
<i class="bi bi-filetype-sql pe-2"></i>
|
|
<span th:text="${query.getTitle()}"></span>
|
|
</div>
|
|
</a>
|
|
<div class="inner-navigation-border flex-grow-1 align-items-center d-flex">
|
|
<h3 class="ms-3 mt-0 mb-0">
|
|
<a th:href="|/${dbadmin_baseUrl}/console/new|">
|
|
<i class="bi bi-plus-square-fill align-middle"></i>
|
|
</a>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
<div class="box with-navigation">
|
|
<form th:action="|/${dbadmin_baseUrl}/console/run/${activeQuery.getId()}|" method="GET">
|
|
<span class="text-muted fw-bold mb-1 d-inline-block">Query title</span>
|
|
<input type="text" class="form-control mb-3"
|
|
name="queryTitle" th:value="${activeQuery.getTitle()}">
|
|
<span class="text-muted fw-bold mb-1 d-inline-block">SQL</span>
|
|
<textarea class="form-control" rows="6" name="query"
|
|
th:text="${activeQuery.getSql()}"></textarea>
|
|
<input class="ui-btn btn btn-primary mt-3" type="submit" value="Run">
|
|
<a href="#" class="ms-4 ui-btn btn btn-danger mt-3" id="console-delete-btn">Delete</a>
|
|
</form>
|
|
<div class="d-flex justify-content-end">
|
|
<form th:action="|/${dbadmin_baseUrl}/console/delete/${activeQuery.getId()}|" method="POST"
|
|
id="console-delete-form">
|
|
</form>
|
|
</div>
|
|
|
|
|
|
<div th:if="${error == null && activeQuery.getSql() != null}">
|
|
<div class="separator mt-3 mb-3"></div>
|
|
<div th:replace="~{fragments/generic_table :: table(results=${results})}"></div>
|
|
</div>
|
|
<div th:if="${error != null}">
|
|
<div class="separator mt-3 mb-3"></div>
|
|
<th:block th:replace="~{fragments/resources :: alerts}"></th:block>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript" th:src="|/${dbadmin_baseUrl}/js/console.js|"></script>
|
|
</body>
|
|
</html>
|