Rename configuration parameter prefix from dbadmin to snapadmin (#19)

This commit is contained in:
Francesco 2023-11-03 20:04:24 +01:00
commit b55afbd2d6
37 changed files with 177 additions and 152 deletions

View File

@ -65,26 +65,26 @@ Otherwise, go ahead and add these to your `application.properties` file:
```properties ```properties
## The first-level part of the URL path: http://localhost:8080/${baseUrl}/ ## The first-level part of the URL path: http://localhost:8080/${baseUrl}/
dbadmin.baseUrl=admin snapadmin.baseUrl=admin
## The package(s) that contain your @Entity classes ## The package(s) that contain your @Entity classes
## accepts multiple comma separated values ## accepts multiple comma separated values
dbadmin.modelsPackage=your.models.package,your.second.models.package snapadmin.modelsPackage=your.models.package,your.second.models.package
## At the moment, it's required to have open-in-view set to true. ## At the moment, it's required to have open-in-view set to true.
# spring.jpa.open-in-view=true # spring.jpa.open-in-view=true
## OPTIONAL PARAMETERS ## OPTIONAL PARAMETERS
## Whether to enable SnapAdmin ## Whether to enable SnapAdmin
# dbadmin.enabled=true # snapadmin.enabled=true
# #
# #
## Set to true if you need to run the tests, as it will customize ## Set to true if you need to run the tests, as it will customize
## the database configuration for the internal DataSource ## the database configuration for the internal DataSource
# dbadmin.testMode=false # snapadmin.testMode=false
# #
## SQL console enable/disable (true by default) ## SQL console enable/disable (true by default)
# dbadmin.sqlConsoleEnabled=false # snapadmin.sqlConsoleEnabled=false
``` ```
**IMPORTANT**: The configuration prefix `dbadmin.` will change to `snapadmin.` starting from version 0.2.0, as part of the project being renamed. Remember to update your configuration files accordingly. **IMPORTANT**: The configuration prefix `dbadmin.` will change to `snapadmin.` starting from version 0.2.0, as part of the project being renamed. Remember to update your configuration files accordingly.
@ -97,7 +97,7 @@ Now annotate your `@SpringBootApplication` class containing the `main` method wi
This will autoconfigure SnapAdmin when your application starts. You are good to go! This will autoconfigure SnapAdmin when your application starts. You are good to go!
3. At this point, when you run your application, you should be able to visit `http://localhost:${port}/${dbadmin.baseUrl}` and see the web interface. 3. At this point, when you run your application, you should be able to visit `http://localhost:${port}/${snapadmin.baseUrl}` and see the web interface.
## Documentation ## Documentation

View File

@ -41,3 +41,13 @@ p.text {
a { a {
color: #7223D1; color: #7223D1;
} }
.testimonials-img {
width: 33%;
}
.testimonials-img img {
border-radius: 50%;
border: 1px solid #CCC;
}

View File

@ -96,25 +96,25 @@
<pre> <pre>
<code class="language-properties">## The first-level part of the URL path: http://localhost:8080/${baseUrl}/ <code class="language-properties">## The first-level part of the URL path: http://localhost:8080/${baseUrl}/
dbadmin.baseUrl=admin snapadmin.baseUrl=admin
## The package(s) that contain your @Entity classes ## The package(s) that contain your @Entity classes
## accepts multiple comma separated values ## accepts multiple comma separated values
dbadmin.modelsPackage=your.models.package,your.second.models.package snapadmin.modelsPackage=your.models.package,your.second.models.package
## At the moment, it's required to have open-in-view set to true. ## At the moment, it's required to have open-in-view set to true.
# spring.jpa.open-in-view=true # spring.jpa.open-in-view=true
## OPTIONAL PARAMETERS ## OPTIONAL PARAMETERS
## Whether to enable SnapAdmin ## Whether to enable SnapAdmin
# dbadmin.enabled=true # snapadmin.enabled=true
# #
## Set to true if you need to run the tests, as it will customize ## Set to true if you need to run the tests, as it will customize
## the database configuration for the internal DataSource ## the database configuration for the internal DataSource
# dbadmin.testMode=false # snapadmin.testMode=false
# #
## SQL console enable/disable (true by default) ## SQL console enable/disable (true by default)
# dbadmin.sqlConsoleEnabled=false # snapadmin.sqlConsoleEnabled=false
</code> </code>
</pre> </pre>
@ -344,11 +344,11 @@ public class Payment { ... }</code>
<div class="separator"></div> <div class="separator"></div>
<h3 id="settings-panel">3.2 The Settings panel</h3> <h3 id="settings-panel">3.2 The Settings panel</h3>
<p>As mentioned earlier, the Settings panel primarily provides options to customize the branding/appearance of the web interface. These settings are persistent across restarts and are stored in an embedded H2 database (file named <code>dbadmin_internal</code>), along with other data required by SnapAdmin.</p> <p>As mentioned earlier, the Settings panel primarily provides options to customize the branding/appearance of the web interface. These settings are persistent across restarts and are stored in an embedded H2 database (file named <code>snapadmin_internal</code>), along with other data required by SnapAdmin.</p>
<h2 id="security">4. Security</h2> <h2 id="security">4. Security</h2>
<p>SnapAdmin does not implement authentication and/or authorization mechanisms. However, you can use a standard Spring security configuration in order to limit access to the web UI or specific parts of it.</p> <p>SnapAdmin does not implement authentication and/or authorization mechanisms. However, you can use a standard Spring security configuration in order to limit access to the web UI or specific parts of it.</p>
<p>All SnapAdmin routes start with the value of <code>dbadmin.baseUrl</code> property, and all write operations (edit, create, delete) are implemented as <code>POST</code> calls. The following code provides an example security configuration (assuming SnapAdmin runs at <code>/admin</code>):</p> <p>All SnapAdmin routes start with the value of <code>snapadmin.baseUrl</code> property, and all write operations (edit, create, delete) are implemented as <code>POST</code> calls. The following code provides an example security configuration (assuming SnapAdmin runs at <code>/admin</code>):</p>
<pre> <pre>

View File

@ -58,7 +58,7 @@
<section id="features" class="py-5"> <section id="features" class="py-5">
<div class="container"> <div class="container">
<h2 class="text-center mb-4 fw-bold">Features</h2> <h2 class="text-center mb-4 fw-bold">Features</h2>
<p class="text mb-4 mt-3">SnapAdmin scans your existing code base and automatically builds everything at runtime: you won't have to modify your existing code.</p> <p class="text mb-4 mt-3">SnapAdmin saves you time by providing a full-fledged database management interface so you can focus on what matters. It won't be necessary to modify your codebase: SnapAdmin scans your code and builds everything at runtime.</p>
<div class="row pt-3"> <div class="row pt-3">
<div class="col-md-4"> <div class="col-md-4">
<h4 class="fw-bold">First-class CRUD</h4> <h4 class="fw-bold">First-class CRUD</h4>
@ -110,10 +110,10 @@
<p>Add the minimum required properties to your <code>application.properties</code> file.</p> <p>Add the minimum required properties to your <code>application.properties</code> file.</p>
<pre> <pre>
<code class="language-properties"># the root path of all SnapAdmin routes <code class="language-properties"># the root path of all SnapAdmin routes
dbadmin.baseUrl=admin snapadmin.baseUrl=admin
# comma-separated list of packages to scan for @Entity classes # comma-separated list of packages to scan for @Entity classes
dbadmin.modelsPackage=your.models.package snapadmin.modelsPackage=your.models.package
</code> </code>
</pre> </pre>
</div> </div>
@ -132,26 +132,48 @@ dbadmin.modelsPackage=your.models.package
</div> </div>
</section> </section>
<!-- Testimonials -->
<section id="testimonials" class="py-5">
<div class="container">
<h2 class="text-center mb-4 fw-bold">Who is using SnapAdmin</h2>
<p class="text mb-4 mt-3">Here's what some of our users say about SnapAdmin. You can <a href="https://github.com/aileftech/snap-admin/issues/17">leave your comment, too</a>!</p>
<div class="row pt-3" id="testimonials-row">
<div class="col-md-6 d-flex">
<div class="d-flex align-items-center testimonials-img">
<img class="w-100" src="https://avatars.githubusercontent.com/u/3874760?v=4">
</div>
<div class="ps-3">
<p><b>fabienfleureau</b></p>
<p>Hello,
Thanks for you project.
I use it an hidden admin page, mostly as if it is a direct connection to database.
It would be nice to able to run custom queries.</p>
</div>
</div>
</div>
</div>
</section>
<!-- Footer --> <!-- Footer -->
<footer class="footer text-white text-center text-lg-start" style="background-color: #130623;"> <footer class="footer text-white text-center text-lg-start" style="background-color: #130623;">
<div class="container p-4"> <div class="container p-4">
<div class="row mb-4"> <div class="row mb-0 mb-md-4">
<div class="col-md-4 footer-card"> <div class="col-md-4 footer-card mb-md-0 mb-4">
<h6>Github</h6> <h6>Github</h6>
<ul> <ul>
<li><a href="https://github.com/aileftech/snap-admin/issues">Issues</a></li> <li><a href="https://github.com/aileftech/snap-admin/issues">Issues</a></li>
<li><a href="https://github.com/aileftech/snap-admin/releases">Releases</a></li> <li><a href="https://github.com/aileftech/snap-admin/releases">Releases</a></li>
</ul> </ul>
</div> </div>
<div class="col-md-4 footer-card"> <div class="col-md-4 footer-card mb-md-0 mb-4">
<h6>Documentation</h6> <h6>Documentation</h6>
<ul> <ul>
<li><a href="https://javadoc.io/doc/tech.ailef/snap-admin/latest/index.html">Javadoc</a></li>
<li><a href="docs/">Reference Guide</a></li> <li><a href="docs/">Reference Guide</a></li>
<li><a href="https://javadoc.io/doc/tech.ailef/snap-admin/latest/index.html">Javadoc</a></li>
</ul> </ul>
</div> </div>
<div class="col-md-4 footer-card"> <div class="col-md-4 footer-card mb-md-0 mb-4">
<h6>Social</h6> <h6>Social</h6>
<ul> <ul>
<li><a href="https://twitter.com/aileftech">Twitter</a></li> <li><a href="https://twitter.com/aileftech">Twitter</a></li>
@ -164,6 +186,8 @@ dbadmin.modelsPackage=your.models.package
</div> </div>
</div> </div>
</footer> </footer>
<script>hljs.highlightAll();</script> <script>hljs.highlightAll();</script>
</body> </body>
</html> </html>

View File

@ -46,7 +46,7 @@ import tech.ailef.snapadmin.internal.InternalDbAdminConfiguration;
* H2 database which is used by SnapAdmin to store user * H2 database which is used by SnapAdmin to store user
* settings and other information like operations history. * settings and other information like operations history.
*/ */
@ConditionalOnProperty(name = "dbadmin.enabled", matchIfMissing = true) @ConditionalOnProperty(name = "snapadmin.enabled", matchIfMissing = true)
@ComponentScan @ComponentScan
@EnableConfigurationProperties(SnapAdminProperties.class) @EnableConfigurationProperties(SnapAdminProperties.class)
@Configuration @Configuration
@ -72,7 +72,7 @@ public class SnapAdminAutoConfiguration {
if (props.isTestMode()) { if (props.isTestMode()) {
dataSourceBuilder.url("jdbc:h2:mem:test"); dataSourceBuilder.url("jdbc:h2:mem:test");
} else { } else {
dataSourceBuilder.url("jdbc:h2:file:./dbadmin_internal"); dataSourceBuilder.url("jdbc:h2:file:./snapadmin_internal");
} }
dataSourceBuilder.username("sa"); dataSourceBuilder.username("sa");

View File

@ -22,10 +22,10 @@ package tech.ailef.snapadmin.external;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
/** /**
* The 'dbadmin.*' properties that can be set in the properties file * The 'snapadmin.*' properties that can be set in the properties file
* to configure the behaviour of Spring Boot Admin Panel. * to configure the behaviour of Spring Boot Admin Panel.
*/ */
@ConfigurationProperties("dbadmin") @ConfigurationProperties("snapadmin")
public class SnapAdminProperties { public class SnapAdminProperties {
/** /**
* Whether SnapAdmin is enabled. * Whether SnapAdmin is enabled.

View File

@ -71,7 +71,7 @@ import tech.ailef.snapadmin.internal.model.ConsoleQuery;
import tech.ailef.snapadmin.internal.repository.ConsoleQueryRepository; import tech.ailef.snapadmin.internal.repository.ConsoleQueryRepository;
@Controller @Controller
@RequestMapping(value = { "/${dbadmin.baseUrl}/", "/${dbadmin.baseUrl}" }) @RequestMapping(value = { "/${snapadmin.baseUrl}/", "/${snapadmin.baseUrl}" })
public class DataExportController { public class DataExportController {
private static final Logger logger = LoggerFactory.getLogger(DataExportFormat.class); private static final Logger logger = LoggerFactory.getLogger(DataExportFormat.class);

View File

@ -83,7 +83,7 @@ import tech.ailef.snapadmin.internal.service.UserSettingsService;
* The main DbAdmin controller that register most of the routes of the web interface. * The main DbAdmin controller that register most of the routes of the web interface.
*/ */
@Controller @Controller
@RequestMapping(value= {"/${dbadmin.baseUrl}", "/${dbadmin.baseUrl}/"}) @RequestMapping(value= {"/${snapadmin.baseUrl}", "/${snapadmin.baseUrl}/"})
public class DefaultDbAdminController { public class DefaultDbAdminController {
private static final Logger logger = LoggerFactory.getLogger(DefaultDbAdminController.class); private static final Logger logger = LoggerFactory.getLogger(DefaultDbAdminController.class);
@ -439,10 +439,10 @@ public class DefaultDbAdminController {
} }
} }
String c = params.get("__dbadmin_create"); String c = params.get("__snapadmin_create");
if (c == null) { if (c == null) {
throw new ResponseStatusException( throw new ResponseStatusException(
HttpStatus.BAD_REQUEST, "Missing required param __dbadmin_create" HttpStatus.BAD_REQUEST, "Missing required param __snapadmin_create"
); );
} }

View File

@ -47,7 +47,7 @@ import tech.ailef.snapadmin.external.exceptions.DbAdminException;
* Controller to serve file or images (`@DisplayImage`) * Controller to serve file or images (`@DisplayImage`)
*/ */
@Controller @Controller
@RequestMapping(value = {"/${dbadmin.baseUrl}/download", "/${dbadmin.baseUrl}/download/"}) @RequestMapping(value = {"/${snapadmin.baseUrl}/download", "/${snapadmin.baseUrl}/download/"})
public class FileDownloadController { public class FileDownloadController {
@Autowired @Autowired
private DbAdminRepository repository; private DbAdminRepository repository;

View File

@ -56,10 +56,10 @@ public class GlobalController {
model.addAttribute("status", ""); model.addAttribute("status", "");
model.addAttribute("error", "Error"); model.addAttribute("error", "Error");
model.addAttribute("message", e.getMessage()); model.addAttribute("message", e.getMessage());
model.addAttribute("dbadmin_userConf", userConf); model.addAttribute("snapadmin_userConf", userConf);
model.addAttribute("dbadmin_baseUrl", getBaseUrl()); model.addAttribute("snapadmin_baseUrl", getBaseUrl());
model.addAttribute("dbadmin_version", dbAdmin.getVersion()); model.addAttribute("snapadmin_version", dbAdmin.getVersion());
model.addAttribute("dbadmin_properties", props); model.addAttribute("snapadmin_properties", props);
return "other/error"; return "other/error";
} }
@ -68,15 +68,15 @@ public class GlobalController {
model.addAttribute("status", "404"); model.addAttribute("status", "404");
model.addAttribute("error", "Error"); model.addAttribute("error", "Error");
model.addAttribute("message", e.getMessage()); model.addAttribute("message", e.getMessage());
model.addAttribute("dbadmin_userConf", userConf); model.addAttribute("snapadmin_userConf", userConf);
model.addAttribute("dbadmin_baseUrl", getBaseUrl()); model.addAttribute("snapadmin_baseUrl", getBaseUrl());
model.addAttribute("dbadmin_version", dbAdmin.getVersion()); model.addAttribute("snapadmin_version", dbAdmin.getVersion());
model.addAttribute("dbadmin_properties", props); model.addAttribute("snapadmin_properties", props);
response.setStatus(404); response.setStatus(404);
return "other/error"; return "other/error";
} }
@ModelAttribute("dbadmin_version") @ModelAttribute("snapadmin_version")
public String getVersion() { public String getVersion() {
return dbAdmin.getVersion(); return dbAdmin.getVersion();
} }
@ -87,7 +87,7 @@ public class GlobalController {
* @param request the incoming request * @param request the incoming request
* @return multi valued map of request parameters * @return multi valued map of request parameters
*/ */
@ModelAttribute("dbadmin_queryParams") @ModelAttribute("snapadmin_queryParams")
public Map<String, String[]> getQueryParams(HttpServletRequest request) { public Map<String, String[]> getQueryParams(HttpServletRequest request) {
return request.getParameterMap(); return request.getParameterMap();
} }
@ -96,7 +96,7 @@ public class GlobalController {
* The baseUrl as specified in the properties file by the user * The baseUrl as specified in the properties file by the user
* @return * @return
*/ */
@ModelAttribute("dbadmin_baseUrl") @ModelAttribute("snapadmin_baseUrl")
public String getBaseUrl() { public String getBaseUrl() {
return props.getBaseUrl(); return props.getBaseUrl();
} }
@ -106,7 +106,7 @@ public class GlobalController {
* @param request * @param request
* @return * @return
*/ */
@ModelAttribute("dbadmin_requestUrl") @ModelAttribute("snapadmin_requestUrl")
public String getRequestUrl(HttpServletRequest request) { public String getRequestUrl(HttpServletRequest request) {
return request.getRequestURI(); return request.getRequestURI();
} }
@ -116,12 +116,12 @@ public class GlobalController {
* in the settings table. * in the settings table.
* @return * @return
*/ */
@ModelAttribute("dbadmin_userConf") @ModelAttribute("snapadmin_userConf")
public UserConfiguration getUserConf() { public UserConfiguration getUserConf() {
return userConf; return userConf;
} }
@ModelAttribute("dbadmin_properties") @ModelAttribute("snapadmin_properties")
public SnapAdminProperties getProps() { public SnapAdminProperties getProps() {
return props; return props;
} }

View File

@ -39,7 +39,7 @@ import tech.ailef.snapadmin.external.dto.AutocompleteSearchResult;
* API controller for autocomplete results * API controller for autocomplete results
*/ */
@RestController @RestController
@RequestMapping(value= {"/${dbadmin.baseUrl}/api/autocomplete", "/${dbadmin.baseUrl}/api/autocomplete/"}) @RequestMapping(value= {"/${snapadmin.baseUrl}/api/autocomplete", "/${snapadmin.baseUrl}/api/autocomplete/"})
public class AutocompleteController { public class AutocompleteController {
@Autowired @Autowired
private SnapAdmin dbAdmin; private SnapAdmin dbAdmin;

View File

@ -27,7 +27,7 @@ import org.springframework.context.annotation.Configuration;
* Configuration class for the "internal" data source. This is place in the root "internal" * Configuration class for the "internal" data source. This is place in the root "internal"
* package, so as to allow component scanning and detection of models and repositories. * package, so as to allow component scanning and detection of models and repositories.
*/ */
@ConditionalOnProperty(name = "dbadmin.enabled", matchIfMissing = true) @ConditionalOnProperty(name = "snapadmin.enabled", matchIfMissing = true)
@ComponentScan @ComponentScan
@Configuration @Configuration
public class InternalDbAdminConfiguration { public class InternalDbAdminConfiguration {

View File

@ -1,9 +0,0 @@
#spring.jpa.hibernate.ddl-auto=create
#spring.datasource.dbadmin.url=jdbc:h2:file:./database
#spring.datasource.dbadmin.username=sa
#spring.datasource.dbadmin.password=password
#spring.h2.console.enabled=true
#spring.jpa.show-sql=true

View File

@ -6,7 +6,7 @@
<!-- Modal --> <!-- Modal -->
<div class="modal modal-lg fade" id="csvQueryExportModal" tabindex="-1" aria-labelledby="csvQueryExportModalLabel" aria-hidden="true" <div class="modal modal-lg fade" id="csvQueryExportModal" tabindex="-1" aria-labelledby="csvQueryExportModalLabel" aria-hidden="true"
th:if="${results != null}"> th:if="${results != null}">
<form th:action="|/${dbadmin_baseUrl}/console/export/${activeQuery.getId()}|" method="GET"> <form th:action="|/${snapadmin_baseUrl}/console/export/${activeQuery.getId()}|" method="GET">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@ -66,7 +66,7 @@
<div class="row mt-4"> <div class="row mt-4">
<div class="col"> <div class="col">
<div class="w-100 d-flex inner-navigation"> <div class="w-100 d-flex inner-navigation">
<a th:each="query : ${tabs}" th:href="|/${dbadmin_baseUrl}/console/run/${query.getId()}|" <a th:each="query : ${tabs}" th:href="|/${snapadmin_baseUrl}/console/run/${query.getId()}|"
class="d-inline-block query-tab" class="d-inline-block query-tab"
th:classAppend="${query.getId() == activeQuery.getId() ? 'active' : ''}"> th:classAppend="${query.getId() == activeQuery.getId() ? 'active' : ''}">
<div class="ui-tab ps-5 pe-5 p-3"> <div class="ui-tab ps-5 pe-5 p-3">
@ -76,14 +76,14 @@
</a> </a>
<div class="inner-navigation-border flex-grow-1 align-items-center d-flex"> <div class="inner-navigation-border flex-grow-1 align-items-center d-flex">
<h3 class="ms-3 mt-0 mb-0"> <h3 class="ms-3 mt-0 mb-0">
<a th:href="|/${dbadmin_baseUrl}/console/new|"> <a th:href="|/${snapadmin_baseUrl}/console/new|">
<i class="bi bi-plus-square-fill align-middle"></i> <i class="bi bi-plus-square-fill align-middle"></i>
</a> </a>
</h3> </h3>
</div> </div>
</div> </div>
<div class="box with-navigation"> <div class="box with-navigation">
<form th:action="|/${dbadmin_baseUrl}/console/run/${activeQuery.getId()}|" method="GET"> <form th:action="|/${snapadmin_baseUrl}/console/run/${activeQuery.getId()}|" method="GET">
<span class="text-muted fw-bold mb-1 d-inline-block">Query title</span> <span class="text-muted fw-bold mb-1 d-inline-block">Query title</span>
<input type="text" class="form-control mb-3" <input type="text" class="form-control mb-3"
name="queryTitle" th:value="${activeQuery.getTitle()}"> name="queryTitle" th:value="${activeQuery.getTitle()}">
@ -94,7 +94,7 @@
<a href="#" class="ms-4 ui-btn btn btn-danger mt-3" id="console-delete-btn">Delete</a> <a href="#" class="ms-4 ui-btn btn btn-danger mt-3" id="console-delete-btn">Delete</a>
</form> </form>
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
<form th:action="|/${dbadmin_baseUrl}/console/delete/${activeQuery.getId()}|" method="POST" <form th:action="|/${snapadmin_baseUrl}/console/delete/${activeQuery.getId()}|" method="POST"
id="console-delete-form"> id="console-delete-form">
</form> </form>
</div> </div>
@ -110,7 +110,7 @@
<ul class="pagination me-3"> <ul class="pagination me-3">
<li class="page-item" th:if="${pagination.getCurrentPage() != 1}"> <li class="page-item" th:if="${pagination.getCurrentPage() != 1}">
<a class="page-link" <a class="page-link"
th:href="@{|${dbadmin_requestUrl}${pagination.getLink(pagination.getCurrentPage() - 1)}|}" th:href="@{|${snapadmin_requestUrl}${pagination.getLink(pagination.getCurrentPage() - 1)}|}"
aria-label="Previous"> aria-label="Previous">
<span aria-hidden="true">&laquo;</span> <span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span> <span class="sr-only">Previous</span>
@ -119,7 +119,7 @@
<li class="page-item" th:each="p : ${pagination.getBeforePages()}"> <li class="page-item" th:each="p : ${pagination.getBeforePages()}">
<a class="page-link" <a class="page-link"
th:href="@{|${dbadmin_requestUrl}${pagination.getLink(p)}|}" th:text="${p}"></a> th:href="@{|${snapadmin_requestUrl}${pagination.getLink(p)}|}" th:text="${p}"></a>
</li> </li>
<li class="page-item active"> <li class="page-item active">
@ -128,13 +128,13 @@
<li class="page-item" th:each="p : ${pagination.getAfterPages()}"> <li class="page-item" th:each="p : ${pagination.getAfterPages()}">
<a class="page-link" <a class="page-link"
th:href="@{|${dbadmin_requestUrl}${pagination.getLink(p)}|}" th:href="@{|${snapadmin_requestUrl}${pagination.getLink(p)}|}"
th:text="${p}"></a> th:text="${p}"></a>
</li> </li>
<li class="page-item"> <li class="page-item">
<a class="page-link" <a class="page-link"
th:if="${!pagination.isLastPage()}" th:if="${!pagination.isLastPage()}"
th:href="@{|${dbadmin_requestUrl}${pagination.getLink(pagination.getCurrentPage() + 1)}|}" th:href="@{|${snapadmin_requestUrl}${pagination.getLink(pagination.getCurrentPage() + 1)}|}"
aria-label="Next"> aria-label="Next">
<span class="sr-only">Next</span> <span class="sr-only">Next</span>
<span aria-hidden="true">&raquo;</span> <span aria-hidden="true">&raquo;</span>
@ -179,7 +179,7 @@
<ul class="pagination me-3"> <ul class="pagination me-3">
<li class="page-item" th:if="${pagination.getCurrentPage() != 1}"> <li class="page-item" th:if="${pagination.getCurrentPage() != 1}">
<a class="page-link" <a class="page-link"
th:href="@{|${dbadmin_requestUrl}${pagination.getLink(pagination.getCurrentPage() - 1)}|}" th:href="@{|${snapadmin_requestUrl}${pagination.getLink(pagination.getCurrentPage() - 1)}|}"
aria-label="Previous"> aria-label="Previous">
<span aria-hidden="true">&laquo;</span> <span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span> <span class="sr-only">Previous</span>
@ -188,7 +188,7 @@
<li class="page-item" th:each="p : ${pagination.getBeforePages()}"> <li class="page-item" th:each="p : ${pagination.getBeforePages()}">
<a class="page-link" <a class="page-link"
th:href="@{|${dbadmin_requestUrl}${pagination.getLink(p)}|}" th:text="${p}"></a> th:href="@{|${snapadmin_requestUrl}${pagination.getLink(p)}|}" th:text="${p}"></a>
</li> </li>
<li class="page-item active"> <li class="page-item active">
@ -197,13 +197,13 @@
<li class="page-item" th:each="p : ${pagination.getAfterPages()}"> <li class="page-item" th:each="p : ${pagination.getAfterPages()}">
<a class="page-link" <a class="page-link"
th:href="@{|${dbadmin_requestUrl}${pagination.getLink(p)}|}" th:href="@{|${snapadmin_requestUrl}${pagination.getLink(p)}|}"
th:text="${p}"></a> th:text="${p}"></a>
</li> </li>
<li class="page-item"> <li class="page-item">
<a class="page-link" <a class="page-link"
th:if="${!pagination.isLastPage()}" th:if="${!pagination.isLastPage()}"
th:href="@{|${dbadmin_requestUrl}${pagination.getLink(pagination.getCurrentPage() + 1)}|}" th:href="@{|${snapadmin_requestUrl}${pagination.getLink(pagination.getCurrentPage() + 1)}|}"
aria-label="Next"> aria-label="Next">
<span class="sr-only">Next</span> <span class="sr-only">Next</span>
<span aria-hidden="true">&raquo;</span> <span aria-hidden="true">&raquo;</span>
@ -239,6 +239,6 @@
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" th:src="|/${dbadmin_baseUrl}/js/console.js|"></script> <script type="text/javascript" th:src="|/${snapadmin_baseUrl}/js/console.js|"></script>
</body> </body>
</html> </html>

View File

@ -11,10 +11,10 @@
<td class="text-center row-icons"> <td class="text-center row-icons">
<a class="ps-1" <a class="ps-1"
th:classAppend="|${!schema.isEditEnabled() ? 'disable' : ''}|" th:classAppend="|${!schema.isEditEnabled() ? 'disable' : ''}|"
th:href="|/${dbadmin_baseUrl}/model/${schema.getJavaClass().getName()}/edit/${row.getPrimaryKeyValue()}|"> th:href="|/${snapadmin_baseUrl}/model/${schema.getJavaClass().getName()}/edit/${row.getPrimaryKeyValue()}|">
<i class="bi bi-pencil-square"></i></a> <i class="bi bi-pencil-square"></i></a>
<form class="delete-form" method="POST" <form class="delete-form" method="POST"
th:action="|/${dbadmin_baseUrl}/model/${schema.getJavaClass().getName()}/delete/${row.getPrimaryKeyValue()}|"> th:action="|/${snapadmin_baseUrl}/model/${schema.getJavaClass().getName()}/delete/${row.getPrimaryKeyValue()}|">
<button th:class="|${!schema.isDeleteEnabled() ? 'disable' : ''}|"><i class="bi bi-trash"></i></button> <button th:class="|${!schema.isDeleteEnabled() ? 'disable' : ''}|"><i class="bi bi-trash"></i></button>
</form> </form>
</td> </td>
@ -37,7 +37,7 @@
<!-- data-row-field fragment --> <!-- data-row-field fragment -->
<th:block th:fragment="data_row_field(field, object)"> <th:block th:fragment="data_row_field(field, object)">
<th:block th:if="${field.getConnectedType() != null && object.traverse(field) != null}"> <th:block th:if="${field.getConnectedType() != null && object.traverse(field) != null}">
<a th:href="|/${dbadmin_baseUrl}/model/${field.getConnectedType().getName()}/show/${object.traverse(field).getPrimaryKeyValue()}|"> <a th:href="|/${snapadmin_baseUrl}/model/${field.getConnectedType().getName()}/show/${object.traverse(field).getPrimaryKeyValue()}|">
<span th:text="${object.has(field) ? object.traverse(field).getPrimaryKeyValue() : 'NULL'}"></span> <span th:text="${object.has(field) ? object.traverse(field).getPrimaryKeyValue() : 'NULL'}"></span>
</a> </a>
<p class="p-0 m-0" <p class="p-0 m-0"
@ -45,7 +45,7 @@
</th:block> </th:block>
<th:block th:if="${field.getConnectedType() == null}"> <th:block th:if="${field.getConnectedType() == null}">
<th:block th:if="${field.isPrimaryKey()}"> <th:block th:if="${field.isPrimaryKey()}">
<a th:href="|/${dbadmin_baseUrl}/model/${schema.getClassName()}/show/${object.get(field).getValue()}|"> <a th:href="|/${snapadmin_baseUrl}/model/${schema.getClassName()}/show/${object.get(field).getValue()}|">
<span th:text="${object.get(field).getFormattedValue()}"> <span th:text="${object.get(field).getFormattedValue()}">
</span> </span>
</a> </a>
@ -66,11 +66,11 @@
<th:block th:if="${object.get(field).getValue()}"> <th:block th:if="${object.get(field).getValue()}">
<div th:if="${field.isImage()}" class="mb-2"> <div th:if="${field.isImage()}" class="mb-2">
<img class="thumb-image" <img class="thumb-image"
th:src="|/${dbadmin_baseUrl}/download/${schema.getClassName()}/${field.getJavaName()}/${object.getPrimaryKeyValue()}/image|"> th:src="|/${snapadmin_baseUrl}/download/${schema.getClassName()}/${field.getJavaName()}/${object.getPrimaryKeyValue()}/image|">
</div> </div>
<a class="text-decoration-none null-label" <a class="text-decoration-none null-label"
th:href="|/${dbadmin_baseUrl}/download/${schema.getClassName()}/${field.getJavaName()}/${object.getPrimaryKeyValue()}|"> th:href="|/${snapadmin_baseUrl}/download/${schema.getClassName()}/${field.getJavaName()}/${object.getPrimaryKeyValue()}|">
<i class="align-middle bi bi-box-arrow-down"></i><span class="align-middle"> Download <i class="align-middle bi bi-box-arrow-down"></i><span class="align-middle"> Download
<!--/*--> <span class="text-muted">([[ ${object.get(field).getValue().length} ]] bytes)</span> <!--*/--> <!--/*--> <span class="text-muted">([[ ${object.get(field).getValue().length} ]] bytes)</span> <!--*/-->
</span> </span>

View File

@ -21,7 +21,7 @@
<span th:if="${object.get(field) != null}"> <span th:if="${object.get(field) != null}">
<th:block th:if="${field.isForeignKey()}"> <th:block th:if="${field.isForeignKey()}">
<a th:href="|/${dbadmin_baseUrl}/model/${field.getConnectedType().getName()}/show/${object.get(field)}|"> <a th:href="|/${snapadmin_baseUrl}/model/${field.getConnectedType().getName()}/show/${object.get(field)}|">
<span th:text="${object.get(field)}"></span> <span th:text="${object.get(field)}"></span>
</a> </a>
</th:block> </th:block>

View File

@ -148,7 +148,7 @@
<div th:if="${field.isImage()}" class="mb-2"> <div th:if="${field.isImage()}" class="mb-2">
<img class="thumb-image" <img class="thumb-image"
th:id="|__thumb_${name}|" th:id="|__thumb_${name}|"
th:src="|/${dbadmin_baseUrl}/download/${schema.getClassName()}/${field.getJavaName()}/${object.getPrimaryKeyValue()}/image|"> th:src="|/${snapadmin_baseUrl}/download/${schema.getClassName()}/${field.getJavaName()}/${object.getPrimaryKeyValue()}/image|">
</div> </div>
</div> </div>
<!--/*--> File input <!--*/--> <!--/*--> File input <!--*/-->

View File

@ -3,21 +3,21 @@
<head th:fragment="head"> <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 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="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" th:href="|/${dbadmin_baseUrl}/css/dbadmin.css|"> <link rel="stylesheet" th:href="|/${snapadmin_baseUrl}/snapadmin/css/snapadmin.css|">
<link rel="stylesheet" th:href="|/${dbadmin_baseUrl}/css/style.css|"> <link rel="stylesheet" th:href="|/${snapadmin_baseUrl}/snapadmin/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 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" th:src="|/${dbadmin_baseUrl}/js/table.js|"></script> <script type="text/javascript" th:src="|/${snapadmin_baseUrl}/snapadmin/js/table.js|"></script>
<script type="text/javascript" th:src="|/${dbadmin_baseUrl}/js/autocomplete.js|"></script> <script type="text/javascript" th:src="|/${snapadmin_baseUrl}/snapadmin/js/autocomplete.js|"></script>
<script type="text/javascript" th:src="|/${dbadmin_baseUrl}/js/autocomplete-multi.js|"></script> <script type="text/javascript" th:src="|/${snapadmin_baseUrl}/snapadmin/js/autocomplete-multi.js|"></script>
<script type="text/javascript" th:src="|/${dbadmin_baseUrl}/js/filters.js|"></script> <script type="text/javascript" th:src="|/${snapadmin_baseUrl}/snapadmin/js/filters.js|"></script>
<script type="text/javascript" th:src="|/${dbadmin_baseUrl}/js/logs.js|"></script> <script type="text/javascript" th:src="|/${snapadmin_baseUrl}/snapadmin/js/logs.js|"></script>
<script type="text/javascript" th:src="|/${dbadmin_baseUrl}/js/create.js|"></script> <script type="text/javascript" th:src="|/${snapadmin_baseUrl}/snapadmin/js/create.js|"></script>
<title th:text="${title != null ? title + ' | Spring Boot DB Admin Panel' : 'Spring Boot DB Admin Panel'}"></title> <title th:text="${title != null ? title + ' | Spring Boot DB Admin Panel' : 'Spring Boot DB Admin Panel'}"></title>
<script th:inline="javascript"> <script th:inline="javascript">
let baseUrl = [[ ${dbadmin_baseUrl} ]]; let baseUrl = [[ ${snapadmin_baseUrl} ]];
</script> </script>
<style type="text/css" th:if="${dbadmin_userConf != null}"> <style type="text/css" th:if="${snapadmin_userConf != null}">
[( ${dbadmin_userConf.get('additionalCss')} )] [( ${snapadmin_userConf.get('additionalCss')} )]
</style> </style>
</head> </head>
@ -34,8 +34,8 @@
<nav class="navbar fixed-top navbar-expand-lg bg-accent color-white" th:fragment="navbar"> <nav class="navbar fixed-top navbar-expand-lg bg-accent color-white" th:fragment="navbar">
<div class="container-fluid"> <div class="container-fluid">
<a class=" fw-bold navbar-brand" th:href="|/${dbadmin_baseUrl}|"><i class="bi bi-hexagon-fill"></i> <a class=" fw-bold navbar-brand" th:href="|/${snapadmin_baseUrl}|"><i class="bi bi-hexagon-fill"></i>
[[ ${dbadmin_userConf.get('brandName')} ]] [[ ${snapadmin_userConf.get('brandName')} ]]
</a> </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"> <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> <span class="navbar-toggler-icon"></span>
@ -47,7 +47,7 @@
<h6 class="fw-bold pt-2 ms-3 menu-subheading d-none d-md-block">MENU</h6> <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 "> <ul class="sidebar-menu pb-0 mb-0 ">
<li th:class="${#strings.equals(activePage, 'entities') ? 'active' : ''}"> <li th:class="${#strings.equals(activePage, 'entities') ? 'active' : ''}">
<a th:href="|/${dbadmin_baseUrl}|"> <a th:href="|/${snapadmin_baseUrl}|">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<div class="menu-icon"> <div class="menu-icon">
<i class="bi bi-database"></i> <i class="bi bi-database"></i>
@ -59,7 +59,7 @@
</a> </a>
</li> </li>
<li th:class="${#strings.equals(activePage, 'logs') ? 'active' : ''}"> <li th:class="${#strings.equals(activePage, 'logs') ? 'active' : ''}">
<a th:href="|/${dbadmin_baseUrl}/logs|"> <a th:href="|/${snapadmin_baseUrl}/logs|">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<div class="menu-icon"> <div class="menu-icon">
<i class="bi bi-file-text"></i> <i class="bi bi-file-text"></i>
@ -70,9 +70,9 @@
</div> </div>
</a> </a>
</li> </li>
<li th:if="${dbadmin_properties.isSqlConsoleEnabled()}" <li th:if="${snapadmin_properties.isSqlConsoleEnabled()}"
th:class="${#strings.equals(activePage, 'console') ? 'active' : ''}"> th:class="${#strings.equals(activePage, 'console') ? 'active' : ''}">
<a th:href="|/${dbadmin_baseUrl}/console|"> <a th:href="|/${snapadmin_baseUrl}/console|">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<div class="menu-icon"> <div class="menu-icon">
<i class="bi bi-terminal"></i> <i class="bi bi-terminal"></i>
@ -84,7 +84,7 @@
</a> </a>
</li> </li>
<li th:class="${#strings.equals(activePage, 'settings') ? 'active' : ''}"> <li th:class="${#strings.equals(activePage, 'settings') ? 'active' : ''}">
<a th:href="|/${dbadmin_baseUrl}/settings|"> <a th:href="|/${snapadmin_baseUrl}/settings|">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<div class="menu-icon"> <div class="menu-icon">
<i class="bi bi-gear"></i> <i class="bi bi-gear"></i>
@ -115,7 +115,7 @@
<div class="separator"></div> <div class="separator"></div>
<ul class="sidebar-menu mb-0 pb-0"> <ul class="sidebar-menu mb-0 pb-0">
<li th:class="${#strings.equals(page, 'help') ? 'active' : ''}"> <li th:class="${#strings.equals(page, 'help') ? 'active' : ''}">
<a th:href="|/${dbadmin_baseUrl}/help|"> <a th:href="|/${snapadmin_baseUrl}/help|">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<div class="menu-icon"> <div class="menu-icon">
<i class="bi bi-question-circle"></i> <i class="bi bi-question-circle"></i>
@ -123,7 +123,7 @@
<div class="menu-entry-text d-none d-md-block"> <div class="menu-entry-text d-none d-md-block">
Help Help
</div> </div>
<div th:text="|v${dbadmin_version}|" class="text-muted ms-5"></div> <div th:text="|v${snapadmin_version}|" class="text-muted ms-5"></div>
</div> </div>
</a> </a>
</li> </li>
@ -139,7 +139,7 @@
<ul class="pagination me-3"> <ul class="pagination me-3">
<li class="page-item" th:if="${page.getPagination().getCurrentPage() != 1}"> <li class="page-item" th:if="${page.getPagination().getCurrentPage() != 1}">
<a class="page-link" <a class="page-link"
th:href="@{|${dbadmin_requestUrl}${page.getPagination().getLink(page.getPagination.getCurrentPage() - 1)}|}" th:href="@{|${snapadmin_requestUrl}${page.getPagination().getLink(page.getPagination.getCurrentPage() - 1)}|}"
aria-label="Previous"> aria-label="Previous">
<span aria-hidden="true">&laquo;</span> <span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span> <span class="sr-only">Previous</span>
@ -148,7 +148,7 @@
<li class="page-item" th:each="p : ${page.getPagination().getBeforePages()}"> <li class="page-item" th:each="p : ${page.getPagination().getBeforePages()}">
<a class="page-link" <a class="page-link"
th:href="@{|${dbadmin_requestUrl}${page.getPagination().getLink(p)}|}" th:text="${p}"></a> th:href="@{|${snapadmin_requestUrl}${page.getPagination().getLink(p)}|}" th:text="${p}"></a>
</li> </li>
<li class="page-item active"> <li class="page-item active">
@ -157,13 +157,13 @@
<li class="page-item" th:each="p : ${page.getPagination().getAfterPages()}"> <li class="page-item" th:each="p : ${page.getPagination().getAfterPages()}">
<a class="page-link" <a class="page-link"
th:href="@{|${dbadmin_requestUrl}${page.getPagination().getLink(p)}|}" th:href="@{|${snapadmin_requestUrl}${page.getPagination().getLink(p)}|}"
th:text="${p}"></a> th:text="${p}"></a>
</li> </li>
<li class="page-item"> <li class="page-item">
<a class="page-link" <a class="page-link"
th:if="${!page.getPagination().isLastPage()}" th:if="${!page.getPagination().isLastPage()}"
th:href="@{|${dbadmin_requestUrl}${page.getPagination().getLink(page.getPagination.getCurrentPage() + 1)}|}" th:href="@{|${snapadmin_requestUrl}${page.getPagination().getLink(page.getPagination.getCurrentPage() + 1)}|}"
aria-label="Next"> aria-label="Next">
<span class="sr-only">Next</span> <span class="sr-only">Next</span>
<span aria-hidden="true">&raquo;</span> <span aria-hidden="true">&raquo;</span>
@ -171,12 +171,12 @@
</li> </li>
</ul> </ul>
<div class="me-3"> <div class="me-3">
<form method="GET" th:action="@{|${dbadmin_requestUrl}|}"> <form method="GET" th:action="@{|${snapadmin_requestUrl}|}">
<input type="hidden" th:value="${page.getPagination().getCurrentPage()}" th:name="page"> <input type="hidden" th:value="${page.getPagination().getCurrentPage()}" th:name="page">
<input type="hidden" th:value="${query}" th:name="query"> <input type="hidden" th:value="${query}" th:name="query">
<input type="hidden" name="pageSize"> <input type="hidden" name="pageSize">
<th:block th:each="p : ${dbadmin_queryParams.keySet()}"> <th:block th:each="p : ${snapadmin_queryParams.keySet()}">
<input th:each="v : ${dbadmin_queryParams.get(p)}" <input th:each="v : ${snapadmin_queryParams.get(p)}"
th:name="${p}" th:value="${v}" type="hidden" th:name="${p}" th:value="${v}" type="hidden"
th:if="${p.startsWith('filter_')}"> th:if="${p.startsWith('filter_')}">
</th:block> </th:block>
@ -199,7 +199,7 @@
<div class="d-flex align-items-center" th:if="${page.getPagination().getMaxPage() == 1}"> <div class="d-flex align-items-center" th:if="${page.getPagination().getMaxPage() == 1}">
<div class="me-3"> <div class="me-3">
<form method="GET" th:action="@{|${dbadmin_requestUrl}|}"> <form method="GET" th:action="@{|${snapadmin_requestUrl}|}">
<input type="hidden" th:value="${page.getPagination().getCurrentPage()}" th:name="page"> <input type="hidden" th:value="${page.getPagination().getCurrentPage()}" th:name="page">
<input type="hidden" th:value="${query}" th:name="query"> <input type="hidden" th:value="${query}" th:name="query">
<input type="hidden" name="pageSize"> <input type="hidden" name="pageSize">

View File

@ -4,17 +4,17 @@
<body> <body>
<th:block th:fragment="sort_arrow(sortKey, sortOrder, fieldName)"> <th:block th:fragment="sort_arrow(sortKey, sortOrder, fieldName)">
<th:block th:if="${sortKey != fieldName}" > <th:block th:if="${sortKey != fieldName}" >
<a th:href="@{|${dbadmin_requestUrl}${page.getPagination().getSortedPageLink(fieldName, 'DESC')}|}"> <a th:href="@{|${snapadmin_requestUrl}${page.getPagination().getSortedPageLink(fieldName, 'DESC')}|}">
<i title="Sort" class="bi bi-caret-up"></i> <i title="Sort" class="bi bi-caret-up"></i>
</a> </a>
</th:block> </th:block>
<th:block th:unless="${sortKey != fieldName}"> <th:block th:unless="${sortKey != fieldName}">
<a th:if="${sortOrder == 'DESC'}" <a th:if="${sortOrder == 'DESC'}"
th:href="@{|${dbadmin_requestUrl}${page.getPagination().getSortedPageLink(fieldName, 'ASC')}|}"> th:href="@{|${snapadmin_requestUrl}${page.getPagination().getSortedPageLink(fieldName, 'ASC')}|}">
<i title="Sort" class="bi bi-caret-down-fill"></i> <i title="Sort" class="bi bi-caret-down-fill"></i>
</a> </a>
<a th:if="${sortOrder == 'ASC'}" <a th:if="${sortOrder == 'ASC'}"
th:href="@{|${dbadmin_requestUrl}${page.getPagination().getSortedPageLink(fieldName, 'DESC')}|}"> th:href="@{|${snapadmin_requestUrl}${page.getPagination().getSortedPageLink(fieldName, 'DESC')}|}">
<i title="Sort" class="bi bi-caret-up-fill"></i> <i title="Sort" class="bi bi-caret-up-fill"></i>
</a> </a>
</th:block> </th:block>
@ -26,7 +26,7 @@
<p>This table contains no data.</p> <p>This table contains no data.</p>
</div> </div>
<div th:if="${results.size() > 0}"> <div th:if="${results.size() > 0}">
<form id="multi-delete-form" th:action="|/${dbadmin_baseUrl}/model/${schema.getClassName()}/delete|" method="POST"> <form id="multi-delete-form" th:action="|/${snapadmin_baseUrl}/model/${schema.getClassName()}/delete|" method="POST">
</form> </form>
<nav th:replace="~{fragments/resources :: pagination(${page})}"> <nav th:replace="~{fragments/resources :: pagination(${page})}">
</nav> </nav>

View File

@ -9,7 +9,7 @@
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div> <div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter"> <div class="main-content bg-lighter">
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-database"></i><span class="align-middle"> Entities</span></h1> <h1 class="fw-bold mb-4"><i class="align-middle bi bi-database"></i><span class="align-middle"> Entities</span></h1>
<form th:action="|/${dbadmin_baseUrl}|" method="GET"> <form th:action="|/${snapadmin_baseUrl}|" method="GET">
<div class="input-group"> <div class="input-group">
<input type="text" th:value="${query}" <input type="text" th:value="${query}"
placeholder="Type a class or a table name and press ENTER to search" placeholder="Type a class or a table name and press ENTER to search"
@ -37,12 +37,12 @@
<td class="warning-col"> <td class="warning-col">
<a th:if="${!schema.getErrors().isEmpty()}" <a th:if="${!schema.getErrors().isEmpty()}"
title="Some errors or warnings were raised while processing this table." title="Some errors or warnings were raised while processing this table."
th:href="|/${dbadmin_baseUrl}/model/${schema.getClassName()}/schema|"> th:href="|/${snapadmin_baseUrl}/model/${schema.getClassName()}/schema|">
<i class="bi bi-exclamation-triangle"></i></a> <i class="bi bi-exclamation-triangle"></i></a>
</td> </td>
<td> <td>
<a th:text="${schema.getTableName()}" <a th:text="${schema.getTableName()}"
th:href="|/${dbadmin_baseUrl}/model/${schema.getClassName()}|"></a> th:href="|/${snapadmin_baseUrl}/model/${schema.getClassName()}|"></a>
</td> </td>
<td> <td>
<span th:text="${counts.get(schema.getClassName())}"></span> <span th:text="${counts.get(schema.getClassName())}"></span>
@ -51,10 +51,10 @@
<span th:text="${schema.getClassName()}"></span> <span th:text="${schema.getClassName()}"></span>
</td> </td>
<td class="text-end row-icons"> <td class="text-end row-icons">
<a title="List all" th:href="|/${dbadmin_baseUrl}/model/${schema.getClassName()}|"><i class="bi bi-list"></i></i></a> <a title="List all" th:href="|/${snapadmin_baseUrl}/model/${schema.getClassName()}|"><i class="bi bi-list"></i></i></a>
<a th:title="|${!schema.isCreateEnabled() ? 'CREATE disabled for this type' : 'Create new item'}|" <a th:title="|${!schema.isCreateEnabled() ? 'CREATE disabled for this type' : 'Create new item'}|"
th:class="|${!schema.isCreateEnabled() ? 'disable' : ''}|" th:class="|${!schema.isCreateEnabled() ? 'disable' : ''}|"
th:href="|/${dbadmin_baseUrl}/model/${schema.getClassName()}/create|"><i class="bi bi-plus-square"></i> th:href="|/${snapadmin_baseUrl}/model/${schema.getClassName()}/create|"><i class="bi bi-plus-square"></i>
</a> </a>
</td> </td>
</tr> </tr>

View File

@ -17,7 +17,7 @@
<div class="box"> <div class="box">
<h3 class="fw-bold">Logs</h3> <h3 class="fw-bold">Logs</h3>
<div class="w-75"> <div class="w-75">
<form th:action="|/${dbadmin_baseUrl}/logs|" class="mt-3" id="log-filter-form" method="GET"> <form th:action="|/${snapadmin_baseUrl}/logs|" class="mt-3" id="log-filter-form" method="GET">
<div class="input-group"> <div class="input-group">
<span class="input-group-text">Action type</span> <span class="input-group-text">Action type</span>
<select name="actionType" class="form-select"> <select name="actionType" class="form-select">
@ -111,7 +111,7 @@
</td> </td>
<td> <td>
<th:block th:if="${entry.getActionType() != 'DELETE'}"> <th:block th:if="${entry.getActionType() != 'DELETE'}">
<a th:href="|/${dbadmin_baseUrl}/model/${entry.getJavaClass()}/show/${entry.getPrimaryKey()}|" <a th:href="|/${snapadmin_baseUrl}/model/${entry.getJavaClass()}/show/${entry.getPrimaryKey()}|"
th:text="${entry.getPrimaryKey()}"></a> th:text="${entry.getPrimaryKey()}"></a>
</th:block> </th:block>
<th:block th:if="${entry.getActionType() == 'DELETE'}"> <th:block th:if="${entry.getActionType() == 'DELETE'}">

View File

@ -13,9 +13,9 @@
<h1 class="fw-bold mb-4"> <h1 class="fw-bold mb-4">
<i class="align-middle bi bi-database"></i> <i class="align-middle bi bi-database"></i>
<span class="align-middle"><a th:href="|/${dbadmin_baseUrl}|">Entities </a></span> <span class="align-middle"><a th:href="|/${snapadmin_baseUrl}|">Entities </a></span>
<i class="align-middle bi bi-chevron-double-right"></i> <i class="align-middle bi bi-chevron-double-right"></i>
<a class="align-middle" th:href="|/${dbadmin_baseUrl}/model/${schema.getJavaClass().getName()}|"> <a class="align-middle" th:href="|/${snapadmin_baseUrl}/model/${schema.getJavaClass().getName()}|">
[[ ${schema.getJavaClass().getSimpleName()} ]] </a> [[ ${schema.getJavaClass().getSimpleName()} ]] </a>
<i class="align-middle bi bi-chevron-double-right"></i> <i class="align-middle bi bi-chevron-double-right"></i>
<span class="align-middle" th:text="${create ? 'Create' : 'Edit'}"></span> <span class="align-middle" th:text="${create ? 'Create' : 'Edit'}"></span>
@ -28,8 +28,8 @@
<div class="col"> <div class="col">
<div class="box"> <div class="box">
<h3 class="fw-bold mb-4" th:text="${create ? schema.getJavaClass().getSimpleName() : object.getDisplayName()}"></h3> <h3 class="fw-bold mb-4" th:text="${create ? schema.getJavaClass().getSimpleName() : object.getDisplayName()}"></h3>
<form class="form" enctype="multipart/form-data" method="post" th:action="|/${dbadmin_baseUrl}/model/${className}/create|"> <form class="form" enctype="multipart/form-data" method="post" th:action="|/${snapadmin_baseUrl}/model/${className}/create|">
<input type="hidden" name="__dbadmin_create" th:value="${create}"> <input type="hidden" name="__snapadmin_create" th:value="${create}">
<div th:each="field : ${schema.getSortedFields(false)}" class="mt-2" <div th:each="field : ${schema.getSortedFields(false)}" class="mt-2"
th:if="${!field.isGeneratedValue() || !create}" th:if="${!field.isGeneratedValue() || !create}"
th:classAppend="|${validationErrors != null && validationErrors.hasErrors(field.getJavaName()) ? 'invalid' : ''}|"> th:classAppend="|${validationErrors != null && validationErrors.hasErrors(field.getJavaName()) ? 'invalid' : ''}|">
@ -75,7 +75,7 @@
<div class="d-flex mt-4 justify-content-between"> <div class="d-flex mt-4 justify-content-between">
<a th:href="|/${dbadmin_baseUrl}/model/${schema.getClassName()}|" class="ui-btn btn btn-secondary">Cancel</a> <a th:href="|/${snapadmin_baseUrl}/model/${schema.getClassName()}|" class="ui-btn btn btn-secondary">Cancel</a>
<input type="submit" class="ui-btn btn btn-primary" th:value="${object != null ? 'Save' : 'Create'}"> <input type="submit" class="ui-btn btn btn-primary" th:value="${object != null ? 'Save' : 'Create'}">
</div> </div>
</form> </form>

View File

@ -5,7 +5,7 @@
<body> <body>
<!-- Modal --> <!-- Modal -->
<div class="modal modal-lg fade" id="csvExportModal" tabindex="-1" aria-labelledby="csvExportModalLabel" aria-hidden="true"> <div class="modal modal-lg fade" id="csvExportModal" tabindex="-1" aria-labelledby="csvExportModalLabel" aria-hidden="true">
<form th:action="|/${dbadmin_baseUrl}/export/${schema.getClassName()}|" method="GET"> <form th:action="|/${snapadmin_baseUrl}/export/${schema.getClassName()}|" method="GET">
<input type="hidden" name="query" th:value="${query}"> <input type="hidden" name="query" th:value="${query}">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
@ -102,19 +102,19 @@
<div class="main-content bg-lighter"> <div class="main-content bg-lighter">
<th:block th:replace="~{fragments/resources :: alerts}"></th:block> <th:block th:replace="~{fragments/resources :: alerts}"></th:block>
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-database"></i> <h1 class="fw-bold mb-4"><i class="align-middle bi bi-database"></i>
<span class="align-middle"><a th:href="|/${dbadmin_baseUrl}|">Entities</a></span> <span class="align-middle"><a th:href="|/${snapadmin_baseUrl}|">Entities</a></span>
<i class="align-middle bi bi-chevron-double-right"></i> <i class="align-middle bi bi-chevron-double-right"></i>
<span class="align-middle"> [[ ${schema.getJavaClass().getSimpleName()} ]] </span> <span class="align-middle"> [[ ${schema.getJavaClass().getSimpleName()} ]] </span>
</h1> </h1>
<div class="row mt-4"> <div class="row mt-4">
<div th:class="${schema.getFilterableFields().isEmpty() ? 'col' : 'col-9'}"> <div th:class="${schema.getFilterableFields().isEmpty() ? 'col' : 'col-9'}">
<div class="w-100 d-flex inner-navigation"> <div class="w-100 d-flex inner-navigation">
<a th:href="|/${dbadmin_baseUrl}/model/${className}|" class="active"> <a th:href="|/${snapadmin_baseUrl}/model/${className}|" class="active">
<div class="ui-tab ps-5 pe-5 p-3"> <div class="ui-tab ps-5 pe-5 p-3">
<i class="bi bi-database pe-2"></i> DATA <i class="bi bi-database pe-2"></i> DATA
</div> </div>
</a> </a>
<a th:href="|/${dbadmin_baseUrl}/model/${className}/schema|"> <a th:href="|/${snapadmin_baseUrl}/model/${className}/schema|">
<div class="ui-tab ps-5 pe-5 p-3"> <div class="ui-tab ps-5 pe-5 p-3">
<i class="bi bi-table pe-2"></i> SCHEMA <i class="bi bi-table pe-2"></i> SCHEMA
</div> </div>
@ -123,7 +123,7 @@
</div> </div>
</div> </div>
<div class="box with-navigation"> <div class="box with-navigation">
<form th:action="|/${dbadmin_baseUrl}/model/${className}|" method="GET" class="mb-3"> <form th:action="|/${snapadmin_baseUrl}/model/${className}|" method="GET" class="mb-3">
<div class="input-group"> <div class="input-group">
<span class="input-group-text"><i class="bi bi-search"></i></span> <span class="input-group-text"><i class="bi bi-search"></i></span>
<input type="text" th:value="${query}" <input type="text" th:value="${query}"
@ -131,8 +131,8 @@
class="ui-text-input form-control" name="query" autofocus> class="ui-text-input form-control" name="query" autofocus>
<button class="ui-btn btn btn-primary">Search</button> <button class="ui-btn btn btn-primary">Search</button>
</div> </div>
<th:block th:each="queryParam : ${dbadmin_queryParams.keySet()}"> <th:block th:each="queryParam : ${snapadmin_queryParams.keySet()}">
<input th:each="paramValue : ${dbadmin_queryParams.get(queryParam)}" <input th:each="paramValue : ${snapadmin_queryParams.get(queryParam)}"
th:if="${queryParam.startsWith('filter_')}" th:if="${queryParam.startsWith('filter_')}"
th:name="${queryParam}" th:value="${paramValue}" type="hidden"> th:name="${queryParam}" th:value="${paramValue}" type="hidden">
</th:block> </th:block>
@ -160,7 +160,7 @@
<h3 class="create-button"> <h3 class="create-button">
<a th:title="|${!schema.isCreateEnabled() ? 'CREATE disabled for this type' : 'Create new item'}|" <a th:title="|${!schema.isCreateEnabled() ? 'CREATE disabled for this type' : 'Create new item'}|"
th:class="|${!schema.isCreateEnabled() ? 'disable' : ''}|" th:class="|${!schema.isCreateEnabled() ? 'disable' : ''}|"
th:href="|/${dbadmin_baseUrl}/model/${schema.getClassName()}/create|"><i class="bi bi-plus-square"></i></a> th:href="|/${snapadmin_baseUrl}/model/${schema.getClassName()}/create|"><i class="bi bi-plus-square"></i></a>
</h3> </h3>
</div> </div>
@ -184,8 +184,8 @@
[[ ${filter}]] <i class="bi bi-x-circle"></i> [[ ${filter}]] <i class="bi bi-x-circle"></i>
</span> </span>
<form action="" th:id="${filter.toString()}" method="GET"> <form action="" th:id="${filter.toString()}" method="GET">
<th:block th:each="p : ${dbadmin_queryParams.keySet()}"> <th:block th:each="p : ${snapadmin_queryParams.keySet()}">
<input th:each="v : ${dbadmin_queryParams.get(p)}" th:name="${p}" th:value="${v}" type="hidden"> <input th:each="v : ${snapadmin_queryParams.get(p)}" th:name="${p}" th:value="${v}" type="hidden">
</th:block> </th:block>
<input type="hidden" name="remove_field" th:value="${filter.getField().getJavaName()}"> <input type="hidden" name="remove_field" th:value="${filter.getField().getJavaName()}">
<input type="hidden" name="remove_op" th:value="${filter.getOp()}"> <input type="hidden" name="remove_op" th:value="${filter.getOp()}">

View File

@ -10,20 +10,20 @@
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div> <div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter"> <div class="main-content bg-lighter">
<h1 class="fw-bold mb-4"><i class="bi bi-database"></i> <h1 class="fw-bold mb-4"><i class="bi bi-database"></i>
<a class="align-middle" th:href="|/${dbadmin_baseUrl}|">Entities</a> <a class="align-middle" th:href="|/${snapadmin_baseUrl}|">Entities</a>
<i class="align-middle bi bi-chevron-double-right"></i> <i class="align-middle bi bi-chevron-double-right"></i>
<a class="align-middle" th:href="|/${dbadmin_baseUrl}/model/${schema.getJavaClass().getName()}|"> [[ ${schema.getJavaClass().getSimpleName()} ]]</a> <a class="align-middle" th:href="|/${snapadmin_baseUrl}/model/${schema.getJavaClass().getName()}|"> [[ ${schema.getJavaClass().getSimpleName()} ]]</a>
<i class="align-middle bi bi-chevron-double-right"></i><span class="align-middle"> Schema</span> <i class="align-middle bi bi-chevron-double-right"></i><span class="align-middle"> Schema</span>
</h1> </h1>
<div class="row mt-4"> <div class="row mt-4">
<div class="col"> <div class="col">
<div class="w-100 d-flex inner-navigation"> <div class="w-100 d-flex inner-navigation">
<a th:href="|/${dbadmin_baseUrl}/model/${schema.getJavaClass().getName()}|"> <a th:href="|/${snapadmin_baseUrl}/model/${schema.getJavaClass().getName()}|">
<div class="ui-tab ps-5 pe-5 p-3"> <div class="ui-tab ps-5 pe-5 p-3">
<i class="bi bi-database pe-2"></i> DATA <i class="bi bi-database pe-2"></i> DATA
</div> </div>
</a> </a>
<a th:href="|/${dbadmin_baseUrl}/model/${schema.getJavaClass().getName()}/schema|" class="active"> <a th:href="|/${snapadmin_baseUrl}/model/${schema.getJavaClass().getName()}/schema|" class="active">
<div class="ui-tab ps-5 pe-5 p-3"> <div class="ui-tab ps-5 pe-5 p-3">
<i class="bi bi-table pe-2"></i> SCHEMA <i class="bi bi-table pe-2"></i> SCHEMA
</div> </div>
@ -40,7 +40,7 @@
</span> </span>
</h3> </h3>
<h3 class="create-button"><a th:title="|${!schema.isCreateEnabled() ? 'CREATE disabled for this type' : 'Create new item'}|" <h3 class="create-button"><a th:title="|${!schema.isCreateEnabled() ? 'CREATE disabled for this type' : 'Create new item'}|"
th:href="|/${dbadmin_baseUrl}/model/${schema.getClassName()}/create|" th:href="|/${snapadmin_baseUrl}/model/${schema.getClassName()}/create|"
th:class="|${!schema.isCreateEnabled() ? 'disable' : ''}|"><i class="bi bi-plus-square"></i></a></h3> th:class="|${!schema.isCreateEnabled() ? 'disable' : ''}|"><i class="bi bi-plus-square"></i></a></h3>
</div> </div>
<div class="mb-4 operations-badges"> <div class="mb-4 operations-badges">

View File

@ -10,9 +10,9 @@
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div> <div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter"> <div class="main-content bg-lighter">
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-database"></i> <h1 class="fw-bold mb-4"><i class="align-middle bi bi-database"></i>
<a class="align-middle" th:href="|/${dbadmin_baseUrl}|">Entities</a> <a class="align-middle" th:href="|/${snapadmin_baseUrl}|">Entities</a>
<i class="align-middle bi bi-chevron-double-right"></i> <i class="align-middle bi bi-chevron-double-right"></i>
<a class="align-middle" th:href="|/${dbadmin_baseUrl}/model/${schema.getJavaClass().getName()}|"> <a class="align-middle" th:href="|/${snapadmin_baseUrl}/model/${schema.getJavaClass().getName()}|">
[[ ${schema.getJavaClass().getSimpleName()} ]]</a> [[ ${schema.getJavaClass().getSimpleName()} ]]</a>
<i class="align-middle bi bi-chevron-double-right"></i> <i class="align-middle bi bi-chevron-double-right"></i>
<span class="align-middle"> [[ ${object.getDisplayName()} ]]</span> <span class="align-middle"> [[ ${object.getDisplayName()} ]]</span>
@ -24,17 +24,17 @@
<h3 class="mb-3 fw-bold" th:text="${object.getDisplayName()}"></h3> <h3 class="mb-3 fw-bold" th:text="${object.getDisplayName()}"></h3>
<h3><a <h3><a
th:class="|${!schema.isEditEnabled() ? 'disable' : ''} me-2|" th:class="|${!schema.isEditEnabled() ? 'disable' : ''} me-2|"
th:href="|/${dbadmin_baseUrl}/model/${schema.getClassName()}/edit/${object.getPrimaryKeyValue()}|"> th:href="|/${snapadmin_baseUrl}/model/${schema.getClassName()}/edit/${object.getPrimaryKeyValue()}|">
<i class="bi bi-pencil"></i></a> <i class="bi bi-pencil"></i></a>
<form class="delete-form me-2" method="POST" <form class="delete-form me-2" method="POST"
th:action="|/${dbadmin_baseUrl}/model/${schema.getJavaClass().getName()}/delete/${object.getPrimaryKeyValue()}|"> th:action="|/${snapadmin_baseUrl}/model/${schema.getJavaClass().getName()}/delete/${object.getPrimaryKeyValue()}|">
<button th:class="|${!schema.isDeleteEnabled() ? 'disable' : ''}|"><i class="bi bi-trash"></i></button> <button th:class="|${!schema.isDeleteEnabled() ? 'disable' : ''}|"><i class="bi bi-trash"></i></button>
</form> </form>
<a th:title="|${!schema.isCreateEnabled() ? 'CREATE disabled for this type' : 'Create new item'}|" <a th:title="|${!schema.isCreateEnabled() ? 'CREATE disabled for this type' : 'Create new item'}|"
th:class="|${!schema.isCreateEnabled() ? 'disable' : ''}|" th:class="|${!schema.isCreateEnabled() ? 'disable' : ''}|"
th:href="|/${dbadmin_baseUrl}/model/${schema.getClassName()}/create|"><i class="bi bi-plus-square"></i></a> th:href="|/${snapadmin_baseUrl}/model/${schema.getClassName()}/create|"><i class="bi bi-plus-square"></i></a>
</h3> </h3>
</div> </div>

View File

@ -10,17 +10,17 @@
<div class="main-content bg-lighter"> <div class="main-content bg-lighter">
<th:block th:replace="~{fragments/resources :: alerts}"></th:block> <th:block th:replace="~{fragments/resources :: alerts}"></th:block>
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-gear"></i> <h1 class="fw-bold mb-4"><i class="align-middle bi bi-gear"></i>
<span class="align-middle"><a th:href="|/${dbadmin_baseUrl}|">Settings</a></span> <span class="align-middle"><a th:href="|/${snapadmin_baseUrl}|">Settings</a></span>
</h1> </h1>
<div class="row mt-4"> <div class="row mt-4">
<div class="col"> <div class="col">
<div class="w-100 d-flex inner-navigation"> <div class="w-100 d-flex inner-navigation">
<a th:href="|/${dbadmin_baseUrl}/settings|"> <a th:href="|/${snapadmin_baseUrl}/settings|">
<div class="ui-tab ps-5 pe-5 p-3"> <div class="ui-tab ps-5 pe-5 p-3">
<i class="bi bi-database pe-2"></i> GENERAL <i class="bi bi-database pe-2"></i> GENERAL
</div> </div>
</a> </a>
<a th:href="|/${dbadmin_baseUrl}/settings/appearance|" class="active"> <a th:href="|/${snapadmin_baseUrl}/settings/appearance|" class="active">
<div class="ui-tab ps-5 pe-5 p-3"> <div class="ui-tab ps-5 pe-5 p-3">
<i class="bi bi-table pe-2"></i> APPEARANCE <i class="bi bi-table pe-2"></i> APPEARANCE
</div> </div>
@ -30,13 +30,13 @@
</div> </div>
<div class="box with-navigation"> <div class="box with-navigation">
<h3 class="fw-bold">Appearance</h3> <h3 class="fw-bold">Appearance</h3>
<form th:action="|/${dbadmin_baseUrl}/settings|" method="POST"> <form th:action="|/${snapadmin_baseUrl}/settings|" method="POST">
<input type="hidden" name="next" value="settings/appearance"> <input type="hidden" name="next" value="settings/appearance">
<label for="additionalCss">Additional CSS</label> <label for="additionalCss">Additional CSS</label>
<span class="m-0 p-0 text-muted">Additional CSS code that is added automatically to all pages</span> <span class="m-0 p-0 text-muted">Additional CSS code that is added automatically to all pages</span>
<textarea class="form-control mt-2" <textarea class="form-control mt-2"
id="additionalCss" name="additionalCss" rows="8" id="additionalCss" name="additionalCss" rows="8"
th:text="${dbadmin_userConf.get('additionalCss')}"></textarea> th:text="${snapadmin_userConf.get('additionalCss')}"></textarea>
<button class="ui-btn btn btn-primary mt-3">Save</button> <button class="ui-btn btn btn-primary mt-3">Save</button>
</form> </form>
</div> </div>

View File

@ -10,17 +10,17 @@
<div class="main-content bg-lighter"> <div class="main-content bg-lighter">
<th:block th:replace="~{fragments/resources :: alerts}"></th:block> <th:block th:replace="~{fragments/resources :: alerts}"></th:block>
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-gear"></i> <h1 class="fw-bold mb-4"><i class="align-middle bi bi-gear"></i>
<span class="align-middle"><a th:href="|/${dbadmin_baseUrl}|">Settings</a></span> <span class="align-middle"><a th:href="|/${snapadmin_baseUrl}|">Settings</a></span>
</h1> </h1>
<div class="row mt-4"> <div class="row mt-4">
<div class="col"> <div class="col">
<div class="w-100 d-flex inner-navigation"> <div class="w-100 d-flex inner-navigation">
<a th:href="|/${dbadmin_baseUrl}/settings|" class="active"> <a th:href="|/${snapadmin_baseUrl}/settings|" class="active">
<div class="ui-tab ps-5 pe-5 p-3"> <div class="ui-tab ps-5 pe-5 p-3">
<i class="bi bi-database pe-2"></i> GENERAL <i class="bi bi-database pe-2"></i> GENERAL
</div> </div>
</a> </a>
<a th:href="|/${dbadmin_baseUrl}/settings/appearance|"> <a th:href="|/${snapadmin_baseUrl}/settings/appearance|">
<div class="ui-tab ps-5 pe-5 p-3"> <div class="ui-tab ps-5 pe-5 p-3">
<i class="bi bi-table pe-2"></i> APPEARANCE <i class="bi bi-table pe-2"></i> APPEARANCE
</div> </div>
@ -30,12 +30,12 @@
</div> </div>
<div class="box with-navigation"> <div class="box with-navigation">
<h3 class="fw-bold">General</h3> <h3 class="fw-bold">General</h3>
<form th:action="|/${dbadmin_baseUrl}/settings|" method="POST"> <form th:action="|/${snapadmin_baseUrl}/settings|" method="POST">
<label for="brandName">Brand name</label> <label for="brandName">Brand name</label>
<span class="m-0 p-0 text-muted">What appears in the top bar</span> <span class="m-0 p-0 text-muted">What appears in the top bar</span>
<input class="form-control mt-2" type="text" <input class="form-control mt-2" type="text"
id="brandName" name="brandName" id="brandName" name="brandName"
th:value="${dbadmin_userConf.get('brandName')}"> th:value="${snapadmin_userConf.get('brandName')}">
<button class="ui-btn btn btn-primary mt-3">Save</button> <button class="ui-btn btn btn-primary mt-3">Save</button>
</form> </form>
</div> </div>

View File

@ -17,7 +17,7 @@
*/ */
package tech.ailef.dbadmin; package tech.ailef.snapadmin;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;