UI - introduced multiple config parameters (like reverse proxy) in frontend
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
{% set template_data = {"javascript": ""} %}
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en" class="h-100">
|
||||
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
<script src="js/bootstrap.bundle.min.js"></script>
|
||||
<script src="js/custom.js"></script>
|
||||
<script>
|
||||
{{ template_data.javascript|safe }}
|
||||
</script>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-danger" onClick="deleteInstance('{{ id_server_name }}');">Delete</button>
|
||||
<button type="button" class="btn btn-danger" onClick="deleteService('{{ id_server_name }}');">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,15 @@
|
||||
{% for k, v in config["CONFIG"].items() %}
|
||||
<div class="tab-pane fade {{ check.class }}" id="edit-{{ v["id"] }}-{{ id_server_name }}" role="tabpanel" aria-labelledby="edit-{{ v["id"] }}-{{ id_server_name }}-tab">
|
||||
{% for param in v["params"] %}
|
||||
{{ form_service_gen("edit", id_server_name, param["id"], param["label"], param["type"], service[param["env"]], param["env"])|safe }}
|
||||
<div class="row mb-3" id="form-edit-{{ id_server_name }}-{{ param["id"] }}">
|
||||
{% if param["type"] != "multiple" %}
|
||||
{{ form_service_gen("form-edit-" + id_server_name + "-" + param["id"], param["label"], param["type"], service[param["env"]], param["env"])|safe }}
|
||||
{% else %}
|
||||
{{ form_service_gen_multiple("form-edit-" + id_server_name + "-" + param["id"], param["label"], param["params"])|safe }}
|
||||
{% if template_data.update({"javascript": template_data.javascript + form_service_gen_multiple_values("form-edit-" + id_server_name + "-" + param["id"], param["params"], service)}) %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if check.update({"class": ""}) %}
|
||||
@@ -34,7 +42,7 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" onClick="editInstance('{{ id_server_name }}');">Save</button>
|
||||
<button type="button" class="btn btn-primary" onClick="editService('{{ id_server_name }}');">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,13 @@
|
||||
{% for k, v in config["CONFIG"].items() %}
|
||||
<div class="tab-pane fade {{ check.class }}" id="new-{{ v["id"] }}" role="tabpanel" aria-labelledby="new-{{ v["id"] }}-tab">
|
||||
{% for param in v["params"] %}
|
||||
{{ form_service_gen("new", "", param["id"], param["label"], param["type"], param["default"], param["env"])|safe }}
|
||||
<div class="row mb-3" id="form-new-{{ param["id"] }}">
|
||||
{% if param["type"] != "multiple" %}
|
||||
{{ form_service_gen("form-new-" + param["id"], param["label"], param["type"], param["default"], param["env"])|safe }}
|
||||
{% else %}
|
||||
{{ form_service_gen_multiple("form-new-" + param["id"], param["label"], param["params"])|safe }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if check.update({"class": ""}) %}
|
||||
@@ -33,7 +39,7 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" onClick="newInstance();">Save</button>
|
||||
<button type="button" class="btn btn-primary" onClick="newService();">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user