blob: 06d6babf3cc47fc980b35e5b6d1652ec5058b017 [file] [log] [blame]
<html xmlns:th="https://www.thymeleaf.org">
<head th:include="fragment :: fragment_head">
</head>
<body>
<div th:replace="fragment :: fragment_nav"></div>
<div class="banner"></div>
<div class="container col-md-7">
<div class="row" style="margin-top: 100px">
<div class="col text-center">
<div class="content-heading">
<h1>Configure Available Services</h1>
</div>
</div>
</div>
<form action="#" th:action="@{/admin/save}" th:object="${dto}" method="POST">
<fieldset>
<div class="row" style="margin-top: 100px">
<div class="col text-center">
<table class="table table-sm">
<thead>
<tr>
<th>Service Key</th>
<th>Service Name</th>
<th>Service Base URL</th>
<th>Service Description</th>
<th>Service Configuration</th>
<th></th>
</tr>
</thead>
<tbody>
<tr th:each="service, stat : *{services}">
<td>
<input
th:field="*{services[__${stat.index}__].key}"
class="form-control fm-ctrl-left" />
</td>
<td>
<input
th:field="*{services[__${stat.index}__].name}"
class="form-control fm-ctrl-center" />
</td>
<td>
<input
th:field="*{services[__${stat.index}__].baseUrl}"
class="form-control fm-ctrl-center" />
</td>
<td>
<input
th:field="*{services[__${stat.index}__].description}"
class="form-control fm-ctrl-right" />
</td>
<td class="text-center">
<input
type="checkbox"
th:field="*{services[__${stat.index}__].configurationAvailable}"
class="form-check-input"
style="text-center" />
</td>
<td>
<a th:if="*{services[__${stat.index}__].name != null}"
th:attr="onclick=|removeService('*{services[__${stat.index}__].key}')|"
class="btn btn-secondary btn-sm btn-rmv">
<i class="fas fa-times"></i>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col text-right" style="padding-right: 2px">
<input
type="reset"
id="resetServicesButton"
name="reset"
th:value="Reset"
class="btn btn-secondary mt-2 fm-ctrl-left half-btn" />
</div>
<div class="col" style="padding-left: 2px">
<input
type="submit"
id="submitServicesButton"
th:value="Save"
class="btn btn-primary mt-2 fm-ctrl-right half-btn" />
</div>
</div>
</fieldset>
</form>
<div class="row mb-3 mt-5">
<div class="col text-center">
<div class="content-heading">
<h2>Configure Proxy</h2>
</div>
</div>
</div>
<form action="/admin/saveProxy" method="POST">
<fieldset>
<div class="form-row">
<div class="form-group col">
<label for="proxy_host">Host</label>
<input
type="text"
id="proxy_host"
name="proxy_host"
th:value="${proxy_host}"
class="form-control" />
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="proxy_port">Port</label>
<input
type="text"
id="proxy_port"
name="proxy_port"
th:value="${proxy_port}"
class="form-control" />
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="proxy_user">User</label>
<input
type="text"
id="proxy_user"
name="proxy_user"
th:value="${proxy_user}"
class="form-control" />
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="proxy_pwd">Password</label>
<input
type="password"
id="proxy_pwd"
name="proxy_pwd"
th:value="${proxy_pwd}"
class="form-control" />
</div>
</div>
<div class="row" style="margin-top: 20px; margin-bottom: 100px">
<div class="col text-right" style="padding-right: 2px">
<input
type="reset"
id="resetProxyButton"
name="reset"
th:value="Reset"
class="btn btn-secondary mt-2 fm-ctrl-left half-btn" />
</div>
<div class="col" style="padding-left: 2px">
<input
type="submit"
id="submitProxyButton"
th:value="Save"
class="btn btn-primary mt-2 fm-ctrl-right half-btn" />
</div>
</div>
</fieldset>
</form>
</div>
<script type="text/javascript" src="js/admin.js"></script>
</body>
</html>