mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Execute djlint formatter on ui templates
This commit is contained in:
parent
e9d3848c3b
commit
31d27fb686
7 changed files with 411 additions and 414 deletions
17
src/ui/templates/account.html
vendored
17
src/ui/templates/account.html
vendored
|
|
@ -3,18 +3,15 @@
|
|||
{% set pro_setting = {} %}
|
||||
{% for plugin in plugins %}
|
||||
{% if plugin.get('name')|lower == 'pro' %}
|
||||
{% if pro_setting.update({'method' : plugin.get('method', 'ui')}) %}{% endif %}
|
||||
|
||||
{% for setting, value in plugin.get('settings').items() %}
|
||||
{% if setting == "PRO_LICENSE_KEY" %}
|
||||
{% if pro_setting.update({'value' : value.get('value', '')}) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if pro_setting.update({'method' : plugin.get('method', 'ui')}) %}{% endif %}
|
||||
{% for setting, value in plugin.get('settings').items() %}
|
||||
{% if setting == "PRO_LICENSE_KEY" %}
|
||||
{% if pro_setting.update({'value' : value.get('value', '')}) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% set attribute_name = "account" %}
|
||||
|
||||
<div data-service-content
|
||||
class="md:max-w-[700px] min-h-[200px] first-letter:w-full overflow-hidden overflow-y-auto overflow-x-auto col-span-12 p-4 relative break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border">
|
||||
<h5 class="my-2 font-bold dark:text-white/90 mx-2">SETTINGS</h5>
|
||||
|
|
@ -161,7 +158,7 @@
|
|||
name="license"
|
||||
class="col-span-12 regular-input"
|
||||
placeholder="enter new license key"
|
||||
value="{{pro_setting.get('value', '')}}"
|
||||
value="{{ pro_setting.get('value', '') }}"
|
||||
pattern="^.*$"
|
||||
required />
|
||||
<div data-setting-password-container
|
||||
|
|
|
|||
2
src/ui/templates/card_filter.html
vendored
2
src/ui/templates/card_filter.html
vendored
|
|
@ -5,7 +5,7 @@
|
|||
else 'col-span-12 md:col-span-6 2xl:col-span-4' if attribute_name == 'plugins'
|
||||
else 'col-span-12 md:col-span-8 2xl:col-span-6 3xl:col-span-5' if attribute_name == 'reports'
|
||||
else 'col-span-12 md:col-span-8 2xl:col-span-6 3xl:col-span-4' if attribute_name == 'services'
|
||||
else 'col-span-12 md:col-span-8 2xl:col-span-6 3xl:col-span-4' %}
|
||||
else 'col-span-12 md:col-span-8 2xl:col-span-6 3xl:col-span-4' %}
|
||||
<div data-{{ attribute_name }}-filter class="{% if is_filter_hidden %} hidden {% endif %} h-fit {{ grid_cols }} p-4 relative flex flex-col min-w-0 break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border">
|
||||
<h5 class="mb-2 font-bold dark:text-white/90">FILTER</h5>
|
||||
<div class="mx-2 grid grid-cols-12 gap-4">
|
||||
|
|
|
|||
6
src/ui/templates/configs.html
vendored
6
src/ui/templates/configs.html
vendored
|
|
@ -38,7 +38,7 @@
|
|||
]
|
||||
}
|
||||
] %}
|
||||
{% include "card_filter.html" %}
|
||||
<!-- end filter -->
|
||||
{% include "file_manager.html" %}
|
||||
{% include "card_filter.html" %}
|
||||
<!-- end filter -->
|
||||
{% include "file_manager.html" %}
|
||||
{% endblock content %}
|
||||
|
|
|
|||
316
src/ui/templates/jobs.html
vendored
316
src/ui/templates/jobs.html
vendored
|
|
@ -12,167 +12,167 @@
|
|||
{"name" : "JOBS TOTAL", "data" : jobs|length|string},
|
||||
{"name" : "JOBS ERRORS", "data" : jobs_errors|string},
|
||||
] %}
|
||||
{% include "card_info.html" %}
|
||||
<!-- filter -->
|
||||
{% set filters = [
|
||||
{
|
||||
"type": "input",
|
||||
"name": "Search",
|
||||
"label": "search",
|
||||
"id": "keyword",
|
||||
"placeholder": "keyword",
|
||||
"pattern": "(.*?)"
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "Success state",
|
||||
"id": "success",
|
||||
"value": "all",
|
||||
"values": [
|
||||
"all",
|
||||
"false",
|
||||
"true"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "Reload state",
|
||||
"id": "reload",
|
||||
"value": "all",
|
||||
"values": [
|
||||
"all",
|
||||
"false",
|
||||
"true"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "Run time",
|
||||
"id": "every",
|
||||
"value": "all",
|
||||
"values": run_times
|
||||
}
|
||||
] %}
|
||||
{% include "card_filter.html" %}
|
||||
{% include "filter_nomatch.html" %}
|
||||
<div data-{{ attribute_name }}-list-container class="overflow-auto w-full col-span-12 p-4 relative break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border">
|
||||
<div class="col-span-12">
|
||||
<h5 class="mx-2 font-bold dark:text-white/90 mx-2">JOBS LIST</h5>
|
||||
</div>
|
||||
<div class="relative min-w-[900px] w-full overflow-auto grid grid-cols-12 max-h-100 sm:max-h-125">
|
||||
{% include "card_info.html" %}
|
||||
<!-- filter -->
|
||||
{% set filters = [
|
||||
{
|
||||
"type": "input",
|
||||
"name": "Search",
|
||||
"label": "search",
|
||||
"id": "keyword",
|
||||
"placeholder": "keyword",
|
||||
"pattern": "(.*?)"
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "Success state",
|
||||
"id": "success",
|
||||
"value": "all",
|
||||
"values": [
|
||||
"all",
|
||||
"false",
|
||||
"true"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "Reload state",
|
||||
"id": "reload",
|
||||
"value": "all",
|
||||
"values": [
|
||||
"all",
|
||||
"false",
|
||||
"true"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "Run time",
|
||||
"id": "every",
|
||||
"value": "all",
|
||||
"values": run_times
|
||||
}
|
||||
] %}
|
||||
{% include "card_filter.html" %}
|
||||
{% include "filter_nomatch.html" %}
|
||||
<div data-{{ attribute_name }}-list-container class="overflow-auto w-full col-span-12 p-4 relative break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border">
|
||||
<div class="col-span-12">
|
||||
<!-- list container-->
|
||||
{% set job_headers = [
|
||||
{
|
||||
"name": "Name",
|
||||
"custom_class": "col-span-3"
|
||||
},
|
||||
{
|
||||
"name": "Last run",
|
||||
"custom_class": "col-span-3"
|
||||
},
|
||||
{
|
||||
"name": "Every",
|
||||
"custom_class": "col-span-1"
|
||||
},
|
||||
{
|
||||
"name": "Reload",
|
||||
"custom_class": "flex justify-center col-span-1"
|
||||
},
|
||||
{
|
||||
"name": "Success",
|
||||
"custom_class": "flex justify-center col-span-1"
|
||||
},
|
||||
{
|
||||
"name": "Files",
|
||||
"custom_class": "col-span-3"
|
||||
}
|
||||
] %}
|
||||
<div class="w-full grid grid-cols-12 rounded p-2">
|
||||
<!-- header-->
|
||||
{% for header in job_headers %}
|
||||
<p class="{{ header['custom_class'] }} dark:text-gray-100 h-8 text-sm font-bold m-0 pb-2 border-b border-gray-400">
|
||||
{{ header['name'] }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
<!-- end header-->
|
||||
<!-- list -->
|
||||
<ul class="col-span-12 w-full" data-{{ attribute_name }}-list>
|
||||
{% for job_name, value in jobs.items() %}
|
||||
<!-- job item-->
|
||||
{% set jobs_data = [
|
||||
{"type" : "text", "filter_name" : "name", "value" : job_name, "custom_class" : "col-span-3"},
|
||||
{"type" : "text", "filter_name" : "last_run", "value" : value['last_run'], "custom_class" : "col-span-3"},
|
||||
{"type" : "text", "filter_name" : "every", "value" : value['every'], "custom_class" : "col-span-1"},
|
||||
{"type" : "check", "filter_name" : "reload", "value" : value['reload'], "custom_class" : "col-span-1"},
|
||||
{"type" : "check", "filter_name" : "success", "value" : value['success'], "custom_class" : "col-span-1"},
|
||||
{"type" : "select", "filter_name" : "success", "value" : value['success'], "custom_class" : "col-span-3"},
|
||||
] %}
|
||||
<li data-{{ attribute_name }}-item {% for data in jobs_data %}data-{{ attribute_name }}-{{ data['filter_name'] }}="{{ data['value'] }}"{% endfor %} class="items-center grid grid-cols-12 border-b border-gray-300 py-2.5 break-all">
|
||||
{% for data in jobs_data %}
|
||||
{% if data['type'] == "text" %}
|
||||
<p class="{{ data['custom_class'] }} dark:text-gray-400 text-sm m-0 my-1 mr-1">{{ data['value'] }}</p>
|
||||
{% endif %}
|
||||
{% if data['type'] == "check" and data['value'] %}
|
||||
<p class="{{ data['custom_class'] }} flex justify-center dark:text-gray-400 text-sm m-0 my-1 mr-1">
|
||||
<svg class="fill-green-500 h-5 w-5"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path d="M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z" />
|
||||
</svg>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if data['type'] == "check" and not data['value'] %}
|
||||
<p class="{{ data['custom_class'] }} flex justify-center dark:text-gray-400 text-sm m-0 my-1 mr-1">
|
||||
<svg class="fill-red-500 h-5 w-5"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path d="M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z" />
|
||||
</svg>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if data['type'] == "select" %}
|
||||
<div class="{{ data['custom_class'] }} relative dark:text-gray-400 text-sm m-0 my-1 mr-1" data-{{ attribute_name }}-files>
|
||||
{% if value['cache'] %}
|
||||
<button data-{{ attribute_name }}-setting-select="{{ job_name }}" class="py-1 text-sm disabled:opacity-75 dark:disabled:text-gray-300 disabled:text-gray-700 disabled:bg-gray-400 disabled:border-gray-400 dark:disabled:bg-gray-800 dark:disabled:border-gray-800 duration-300 ease-in-out dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 focus:border-green-500 flex justify-between align-middle items-center text-left leading-6 ease w-full rounded-lg border border-solid border-gray-300 bg-white bg-clip-padding px-1.5 md:px-3 font-normal text-gray-700 transition-all placeholder:text-gray-500">
|
||||
<span id="jobs-{{ job_name }}" data-name="jobs-{{ job_name }}" data-{{ attribute_name }}-setting-select-text="{{ job_name }}">files</span>
|
||||
<!-- chevron -->
|
||||
<svg data-{{ attribute_name }}-setting-select="{{ job_name }}" class="transition-transform h-4 w-4 fill-gray-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||
<path d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z" />
|
||||
</svg>
|
||||
</button>
|
||||
<!-- end chevron -->
|
||||
<!-- dropdown-->
|
||||
<div data-{{ attribute_name }}-setting-select-dropdown="{{ job_name }}" class="hidden z-100 absolute h-full flex-col w-full translate-y-0.5">
|
||||
{% for file in value['cache'] %}
|
||||
<button data-{{ attribute_name }}-plugin="{{ value['plugin_id'] }}" data-{{ attribute_name }}-download="{{ job_name }}" data-{{ attribute_name }}-file="{{ file['file_name'] }}" data-{{ attribute_name }}-setting-select-dropdown-btn="{{ job_name }}" value="files" class="{% if loop.index == loop.length %}rounded-b-lg {% endif %}{% if loop.first %}rounded-t-lg{% endif %} border-b border-l border-r border-gray-300 dark:hover:brightness-90 hover:brightness-90 my-0 relative py-2 px-3 text-left align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:text-gray-300 bg-white dark:bg-slate-700 text-gray-700">
|
||||
<span class="flex justify-start items-center">
|
||||
<svg class="min-w-fit h-5.5 w-5.5 stroke-sky-500"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75l3 3m0 0l3-3m-3 3v-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<span class="overflow-hidden break-word transition duration-300 ease-in-out text-gray-700 dark:text-gray-300 ml-2">{{ file['file_name'] }}</span>
|
||||
</span>
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<!-- end dropdown-->
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</li>
|
||||
<!-- end job item-->
|
||||
<h5 class="mx-2 font-bold dark:text-white/90 mx-2">JOBS LIST</h5>
|
||||
</div>
|
||||
<div class="relative min-w-[900px] w-full overflow-auto grid grid-cols-12 max-h-100 sm:max-h-125">
|
||||
<div class="col-span-12">
|
||||
<!-- list container-->
|
||||
{% set job_headers = [
|
||||
{
|
||||
"name": "Name",
|
||||
"custom_class": "col-span-3"
|
||||
},
|
||||
{
|
||||
"name": "Last run",
|
||||
"custom_class": "col-span-3"
|
||||
},
|
||||
{
|
||||
"name": "Every",
|
||||
"custom_class": "col-span-1"
|
||||
},
|
||||
{
|
||||
"name": "Reload",
|
||||
"custom_class": "flex justify-center col-span-1"
|
||||
},
|
||||
{
|
||||
"name": "Success",
|
||||
"custom_class": "flex justify-center col-span-1"
|
||||
},
|
||||
{
|
||||
"name": "Files",
|
||||
"custom_class": "col-span-3"
|
||||
}
|
||||
] %}
|
||||
<div class="w-full grid grid-cols-12 rounded p-2">
|
||||
<!-- header-->
|
||||
{% for header in job_headers %}
|
||||
<p class="{{ header['custom_class'] }} dark:text-gray-100 h-8 text-sm font-bold m-0 pb-2 border-b border-gray-400">
|
||||
{{ header['name'] }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<!-- end list-->
|
||||
<!-- end header-->
|
||||
<!-- list -->
|
||||
<ul class="col-span-12 w-full" data-{{ attribute_name }}-list>
|
||||
{% for job_name, value in jobs.items() %}
|
||||
<!-- job item-->
|
||||
{% set jobs_data = [
|
||||
{"type" : "text", "filter_name" : "name", "value" : job_name, "custom_class" : "col-span-3"},
|
||||
{"type" : "text", "filter_name" : "last_run", "value" : value['last_run'], "custom_class" : "col-span-3"},
|
||||
{"type" : "text", "filter_name" : "every", "value" : value['every'], "custom_class" : "col-span-1"},
|
||||
{"type" : "check", "filter_name" : "reload", "value" : value['reload'], "custom_class" : "col-span-1"},
|
||||
{"type" : "check", "filter_name" : "success", "value" : value['success'], "custom_class" : "col-span-1"},
|
||||
{"type" : "select", "filter_name" : "success", "value" : value['success'], "custom_class" : "col-span-3"},
|
||||
] %}
|
||||
<li data-{{ attribute_name }}-item {% for data in jobs_data %}data-{{ attribute_name }}-{{ data['filter_name'] }}="{{ data['value'] }}"{% endfor %} class="items-center grid grid-cols-12 border-b border-gray-300 py-2.5 break-all">
|
||||
{% for data in jobs_data %}
|
||||
{% if data['type'] == "text" %}
|
||||
<p class="{{ data['custom_class'] }} dark:text-gray-400 text-sm m-0 my-1 mr-1">{{ data['value'] }}</p>
|
||||
{% endif %}
|
||||
{% if data['type'] == "check" and data['value'] %}
|
||||
<p class="{{ data['custom_class'] }} flex justify-center dark:text-gray-400 text-sm m-0 my-1 mr-1">
|
||||
<svg class="fill-green-500 h-5 w-5"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path d="M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z" />
|
||||
</svg>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if data['type'] == "check" and not data['value'] %}
|
||||
<p class="{{ data['custom_class'] }} flex justify-center dark:text-gray-400 text-sm m-0 my-1 mr-1">
|
||||
<svg class="fill-red-500 h-5 w-5"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path d="M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z" />
|
||||
</svg>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if data['type'] == "select" %}
|
||||
<div class="{{ data['custom_class'] }} relative dark:text-gray-400 text-sm m-0 my-1 mr-1" data-{{ attribute_name }}-files>
|
||||
{% if value['cache'] %}
|
||||
<button data-{{ attribute_name }}-setting-select="{{ job_name }}" class="py-1 text-sm disabled:opacity-75 dark:disabled:text-gray-300 disabled:text-gray-700 disabled:bg-gray-400 disabled:border-gray-400 dark:disabled:bg-gray-800 dark:disabled:border-gray-800 duration-300 ease-in-out dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 focus:border-green-500 flex justify-between align-middle items-center text-left leading-6 ease w-full rounded-lg border border-solid border-gray-300 bg-white bg-clip-padding px-1.5 md:px-3 font-normal text-gray-700 transition-all placeholder:text-gray-500">
|
||||
<span id="jobs-{{ job_name }}" data-name="jobs-{{ job_name }}" data-{{ attribute_name }}-setting-select-text="{{ job_name }}">files</span>
|
||||
<!-- chevron -->
|
||||
<svg data-{{ attribute_name }}-setting-select="{{ job_name }}" class="transition-transform h-4 w-4 fill-gray-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||
<path d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z" />
|
||||
</svg>
|
||||
</button>
|
||||
<!-- end chevron -->
|
||||
<!-- dropdown-->
|
||||
<div data-{{ attribute_name }}-setting-select-dropdown="{{ job_name }}" class="hidden z-100 absolute h-full flex-col w-full translate-y-0.5">
|
||||
{% for file in value['cache'] %}
|
||||
<button data-{{ attribute_name }}-plugin="{{ value['plugin_id'] }}" data-{{ attribute_name }}-download="{{ job_name }}" data-{{ attribute_name }}-file="{{ file['file_name'] }}" data-{{ attribute_name }}-setting-select-dropdown-btn="{{ job_name }}" value="files" class="{% if loop.index == loop.length %}rounded-b-lg {% endif %}{% if loop.first %}rounded-t-lg{% endif %} border-b border-l border-r border-gray-300 dark:hover:brightness-90 hover:brightness-90 my-0 relative py-2 px-3 text-left align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:text-gray-300 bg-white dark:bg-slate-700 text-gray-700">
|
||||
<span class="flex justify-start items-center">
|
||||
<svg class="min-w-fit h-5.5 w-5.5 stroke-sky-500"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75l3 3m0 0l3-3m-3 3v-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<span class="overflow-hidden break-word transition duration-300 ease-in-out text-gray-700 dark:text-gray-300 ml-2">{{ file['file_name'] }}</span>
|
||||
</span>
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<!-- end dropdown-->
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</li>
|
||||
<!-- end job item-->
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<!-- end list-->
|
||||
</div>
|
||||
<!-- end list container-->
|
||||
</div>
|
||||
<!-- end list container-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
|||
470
src/ui/templates/services.html
vendored
470
src/ui/templates/services.html
vendored
|
|
@ -51,251 +51,251 @@
|
|||
{"name" : "TOTAL DRAFT", "data" : draft_services|length|string},
|
||||
{"name" : "TOTAL ONLINE", "data" : online_services|length|string},
|
||||
] %}
|
||||
{% include "card_info.html" %}
|
||||
<!-- filter -->
|
||||
{% set filters = [
|
||||
{
|
||||
"type": "input",
|
||||
"name": "Search",
|
||||
"label": "search",
|
||||
"id": "service-name-keyword",
|
||||
"placeholder": "service name",
|
||||
"pattern": "(.*?)"
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "Method",
|
||||
"id": "method",
|
||||
"value": "all",
|
||||
"values": methods
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "State",
|
||||
"id": "state",
|
||||
"value": "all",
|
||||
"values": states
|
||||
}
|
||||
] %}
|
||||
{% include "card_filter.html" %}
|
||||
{% include "filter_nomatch.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- end service info and actions -->
|
||||
<!-- services container-->
|
||||
<div class="p-0 sm:mx-2 md:mx-4 md:px-1 grid grid-cols-12 col-span-12 md:gap-x-4 gap-y-4 relative min-w-0 break-words rounded-2xl bg-clip-border">
|
||||
{% if services|length == 0 %}
|
||||
<div class="col-span-12 sm:col-span-4 sm:col-start-5">
|
||||
<div class="transition duration-300 ease-in-out dark:opacity-90 text-center relative w-full p-4 text-white bg-blue-500 rounded-lg">
|
||||
No service to show
|
||||
</div>
|
||||
{% include "card_info.html" %}
|
||||
<!-- filter -->
|
||||
{% set filters = [
|
||||
{
|
||||
"type": "input",
|
||||
"name": "Search",
|
||||
"label": "search",
|
||||
"id": "service-name-keyword",
|
||||
"placeholder": "service name",
|
||||
"pattern": "(.*?)"
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "Method",
|
||||
"id": "method",
|
||||
"value": "all",
|
||||
"values": methods
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "State",
|
||||
"id": "state",
|
||||
"value": "all",
|
||||
"values": states
|
||||
}
|
||||
] %}
|
||||
{% include "card_filter.html" %}
|
||||
{% include "filter_nomatch.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if services|length > 0 %}
|
||||
<!-- end filter -->
|
||||
{% for service in services %}
|
||||
{% set id_server_name = service["SERVER_NAME"]['value'].replace(".", "-") %}
|
||||
<div data-{{ attribute_name }}-card data-{{ attribute_name }}-name="{{ service["SERVER_NAME"]['value'] }}" data-{{ attribute_name }}-method="{{ service["SERVER_NAME"]['method'] }}" data-{{ attribute_name }}-state="{{ "draft" if service.get('IS_DRAFT', 'no') == "yes" else "online" }}" data-settings="{{ service['settings'] }}" data-{{ attribute_name }}-service="{{ service['SERVER_NAME']['value'] }}" class="flex flex-col justify-between dark:brightness-110 overflow-hidden hover:scale-102 transition col-span-12 lg:col-span-6 3xl:col-span-4 p-4 w-full shadow-md break-words bg-white dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border">
|
||||
<div data-old-name
|
||||
class="hidden"
|
||||
data-value="{{ service['SERVER_NAME']['full_value'] }}"></div>
|
||||
<div data-is-draft
|
||||
class="hidden"
|
||||
data-value="{% if service.get('IS_DRAFT', 'no') == 'yes' %}yes{% else %}no{% endif %}"></div>
|
||||
<div data-service-method
|
||||
class="hidden"
|
||||
data-value="{{ service['SERVER_NAME']['method'] }}"></div>
|
||||
<div class="flex justify-between items-start">
|
||||
<div class="flex flex-col">
|
||||
<h5 class="break-all transition duration-300 ease-in-out text-center sm:text-left mb-1 mr-2 font-bold dark:text-white/90">
|
||||
{{ service["SERVER_NAME"]['value'] }}
|
||||
</h5>
|
||||
<h6 class="text-left sm:mb-2 font-semibold text-gray-600 dark:text-white/80">
|
||||
{{ service["SERVER_NAME"]['method'] }}
|
||||
</h6>
|
||||
</div>
|
||||
{% if service.get('IS_DRAFT', "no") == "yes" and service["SERVER_NAME"]['method'] in ["ui", "default"] %}
|
||||
<button class="group relative">
|
||||
<p data-{{ attribute_name }}-state="draft" class="dark:text-gray-300 -z-10 opacity-0 group-hover:z-10 group-hover:opacity-100 transition fixed bg-white dark:bg-slate-800 rounded right-12 px-1 py-0.5">
|
||||
Draft
|
||||
</p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
fill="currentColor"
|
||||
class="w-6 h-6 fill-gray-700 dark:fill-gray-300 cursor-pointer-none">
|
||||
<path fill-rule="evenodd" d="M10.5 3.798v5.02a3 3 0 0 1-.879 2.121l-2.377 2.377a9.845 9.845 0 0 1 5.091 1.013 8.315 8.315 0 0 0 5.713.636l.285-.071-3.954-3.955a3 3 0 0 1-.879-2.121v-5.02a23.614 23.614 0 0 0-3 0Zm4.5.138a.75.75 0 0 0 .093-1.495A24.837 24.837 0 0 0 12 2.25a25.048 25.048 0 0 0-3.093.191A.75.75 0 0 0 9 3.936v4.882a1.5 1.5 0 0 1-.44 1.06l-6.293 6.294c-1.62 1.621-.903 4.475 1.471 4.88 2.686.46 5.447.698 8.262.698 2.816 0 5.576-.239 8.262-.697 2.373-.406 3.092-3.26 1.47-4.881L15.44 9.879A1.5 1.5 0 0 1 15 8.818V3.936Z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</button>
|
||||
{% else %}
|
||||
<button class="group relative">
|
||||
<p data-{{ attribute_name }}-state="online" class="dark:text-gray-300 -z-10 opacity-0 group-hover:z-10 group-hover:opacity-100 transition fixed bg-white dark:bg-slate-800 rounded right-12 px-1 py-0.5">
|
||||
Online
|
||||
</p>
|
||||
<svg data-toggle-draft="false"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
fill="currentColor"
|
||||
class="w-6 h-6 fill-gray-700 dark:fill-gray-300 cursor-pointer-none">
|
||||
<path d="M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z" />
|
||||
</svg>
|
||||
</button>
|
||||
{% endif %}
|
||||
<!-- end service info and actions -->
|
||||
<!-- services container-->
|
||||
<div class="p-0 sm:mx-2 md:mx-4 md:px-1 grid grid-cols-12 col-span-12 md:gap-x-4 gap-y-4 relative min-w-0 break-words rounded-2xl bg-clip-border">
|
||||
{% if services|length == 0 %}
|
||||
<div class="col-span-12 sm:col-span-4 sm:col-start-5">
|
||||
<div class="transition duration-300 ease-in-out dark:opacity-90 text-center relative w-full p-4 text-white bg-blue-500 rounded-lg">
|
||||
No service to show
|
||||
</div>
|
||||
{% set details = [
|
||||
{
|
||||
"name": "Reverse proxy",
|
||||
"settings": [
|
||||
"USE_REVERSE_PROXY"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Serve files",
|
||||
"settings": [
|
||||
"SERVE_FILES"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Remote PHP",
|
||||
"settings": [
|
||||
"REMOTE_PHP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "HTTPS",
|
||||
"settings": [
|
||||
"AUTO_LETS_ENCRYPT",
|
||||
"USE_CUSTOM_SSL",
|
||||
"GENERATE_SELF_SIGNED_SSL"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ModSecurity",
|
||||
"settings": [
|
||||
"USE_MODSECURITY"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Bad behavior",
|
||||
"settings": [
|
||||
"USE_BAD_BEHAVIOR"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Limit req",
|
||||
"settings": [
|
||||
"USE_LIMIT_REQ"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DNSBL",
|
||||
"settings": [
|
||||
"USE_DNSBL"
|
||||
]
|
||||
}
|
||||
] %}
|
||||
<!-- detail list -->
|
||||
<div role="grid"
|
||||
class="w-full grid grid-cols-12 justify-items-center sm:justify-items-start gap-2 mt-4 mb-6 ml-3 sm:ml-1">
|
||||
{% for detail in details %}
|
||||
{% set use = [] %}
|
||||
{% for setting in detail['settings'] %}
|
||||
{% if service[setting]['value'] == 'yes' %}
|
||||
{% if use.append(1) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<!-- detail -->
|
||||
<div role="row" class="flex items-center col-span-12 sm:col-span-6">
|
||||
<p role="gridcell"
|
||||
class="transition duration-300 ease-in-out font-bold mb-0 font-sans text-sm leading-normal uppercase dark:text-gray-500 ">
|
||||
{{ detail['name'] }}
|
||||
</p>
|
||||
<p role="gridcell"
|
||||
class="transition duration-300 ease-in-out dark:opacity-90 pl-2 mb-0 font-sans text-sm font-semibold leading-normal uppercase dark:text-gray-500 ">
|
||||
{% if use %}
|
||||
<span class="sr-only">yes</span>
|
||||
<svg class="h-4 w-4 fill-green-500"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path d="M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" />
|
||||
</svg>
|
||||
{% else %}
|
||||
<span class="sr-only">no</span>
|
||||
<svg class="h-4 w-4 fill-red-500"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 320 512">
|
||||
<path d="M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" />
|
||||
</svg>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if services|length > 0 %}
|
||||
<!-- end filter -->
|
||||
{% for service in services %}
|
||||
{% set id_server_name = service["SERVER_NAME"]['value'].replace(".", "-") %}
|
||||
<div data-{{ attribute_name }}-card data-{{ attribute_name }}-name="{{ service["SERVER_NAME"]['value'] }}" data-{{ attribute_name }}-method="{{ service["SERVER_NAME"]['method'] }}" data-{{ attribute_name }}-state="{{ "draft" if service.get('IS_DRAFT', 'no') == "yes" else "online" }}" data-settings="{{ service['settings'] }}" data-{{ attribute_name }}-service="{{ service['SERVER_NAME']['value'] }}" class="flex flex-col justify-between dark:brightness-110 overflow-hidden hover:scale-102 transition col-span-12 lg:col-span-6 3xl:col-span-4 p-4 w-full shadow-md break-words bg-white dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border">
|
||||
<div data-old-name
|
||||
class="hidden"
|
||||
data-value="{{ service['SERVER_NAME']['full_value'] }}"></div>
|
||||
<div data-is-draft
|
||||
class="hidden"
|
||||
data-value="{% if service.get('IS_DRAFT', 'no') == 'yes' %}yes{% else %}no{% endif %}"></div>
|
||||
<div data-service-method
|
||||
class="hidden"
|
||||
data-value="{{ service['SERVER_NAME']['method'] }}"></div>
|
||||
<div class="flex justify-between items-start">
|
||||
<div class="flex flex-col">
|
||||
<h5 class="break-all transition duration-300 ease-in-out text-center sm:text-left mb-1 mr-2 font-bold dark:text-white/90">
|
||||
{{ service["SERVER_NAME"]['value'] }}
|
||||
</h5>
|
||||
<h6 class="text-left sm:mb-2 font-semibold text-gray-600 dark:text-white/80">
|
||||
{{ service["SERVER_NAME"]['method'] }}
|
||||
</h6>
|
||||
</div>
|
||||
<!-- end detail -->
|
||||
{% endfor %}
|
||||
</div>
|
||||
<!-- end detail list-->
|
||||
<!-- button list-->
|
||||
<div class="relative w-full flex justify-center sm:justify-end">
|
||||
<a aria-label="access service url"
|
||||
href="http://{{ service['SERVER_NAME']['value'] }}"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
class="dark:brightness-90 z-20 mx-1 bg-sky-500 hover:bg-sky-500/80 focus:bg-sky-500/80 inline-block p-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer leading-normal text-xs ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 active:opacity-85 hover:shadow-md">
|
||||
<svg class="h-6 w-6 fill-white"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 448 512">
|
||||
<path d="M288 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h50.7L169.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L384 141.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H288zM80 64C35.8 64 0 99.8 0 144V400c0 44.2 35.8 80 80 80H336c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v80c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V144c0-8.8 7.2-16 16-16h80c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z" />
|
||||
</svg>
|
||||
</a>
|
||||
{% set action_buttons = [
|
||||
{
|
||||
"name": "clone",
|
||||
"label": "clone service settings",
|
||||
"color": "emerald-500"
|
||||
},
|
||||
{
|
||||
"name": "edit",
|
||||
"label": "edit service settings",
|
||||
"color": "yellow-500"
|
||||
}
|
||||
] %}
|
||||
{% if service["SERVER_NAME"]['method'] == "ui" %}
|
||||
{% if action_buttons.append({"name" : "delete", "label" : "delete service settings", "color" : "red-500"}) %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% for button in action_buttons %}
|
||||
<button {% if button['name'] == "clone" and is_readonly or button['name'] == "delete" and is_readonly %}disabled{% endif %} {% if button['name'] == "clone" or button['name'] == "edit" %}data-settings="{{ service['settings'] }}"{% endif %} {% if button['name'] == "new" %}data-settings="{}"{% endif %} data-{{ attribute_name }}-action="{{ button['name'] }}" aria-label="{{ button['label'] }}" data-{{ attribute_name }}-name="{{ service['SERVER_NAME']['value'] }}" class="disabled:cursor-not-allowed dark:disabled:text-gray-300 disabled:text-gray-700 disabled:bg-gray-400 disabled:border-gray-400/0 dark:disabled:bg-gray-700 dark:disabled:border-gray-700/0 disabled:hover:translate-y-0 disabled:hover:bg-gray-400 disabled:hover:border-gray-400/0 dark:disabled:hover:translate-y-0 dark:disabled:hover:bg-gray-700 dark:disabled:hover:border-gray-700/0 dark:brightness-90 z-20 mx-1 bg-{{ button['color'] }} hover:bg-{{ button['color'] }}/80 focus:bg-{{ button['color'] }}/80 inline-block p-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer leading-normal text-xs ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 active:opacity-85 hover:shadow-md">
|
||||
{% if button['name'] == "clone" %}
|
||||
{% if service.get('IS_DRAFT', "no") == "yes" and service["SERVER_NAME"]['method'] in ["ui", "default"] %}
|
||||
<button class="group relative">
|
||||
<p data-{{ attribute_name }}-state="draft" class="dark:text-gray-300 -z-10 opacity-0 group-hover:z-10 group-hover:opacity-100 transition fixed bg-white dark:bg-slate-800 rounded right-12 px-1 py-0.5">
|
||||
Draft
|
||||
</p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
fill="currentColor"
|
||||
class="w-6 h-6 fill-white">
|
||||
<path fill-rule="evenodd" d="M17.663 3.118c.225.015.45.032.673.05C19.876 3.298 21 4.604 21 6.109v9.642a3 3 0 0 1-3 3V16.5c0-5.922-4.576-10.775-10.384-11.217.324-1.132 1.3-2.01 2.548-2.114.224-.019.448-.036.673-.051A3 3 0 0 1 13.5 1.5H15a3 3 0 0 1 2.663 1.618ZM12 4.5A1.5 1.5 0 0 1 13.5 3H15a1.5 1.5 0 0 1 1.5 1.5H12Z" clip-rule="evenodd" />
|
||||
<path d="M3 8.625c0-1.036.84-1.875 1.875-1.875h.375A3.75 3.75 0 0 1 9 10.5v1.875c0 1.036.84 1.875 1.875 1.875h1.875A3.75 3.75 0 0 1 16.5 18v2.625c0 1.035-.84 1.875-1.875 1.875h-9.75A1.875 1.875 0 0 1 3 20.625v-12Z" />
|
||||
<path d="M10.5 10.5a5.23 5.23 0 0 0-1.279-3.434 9.768 9.768 0 0 1 6.963 6.963 5.23 5.23 0 0 0-3.434-1.279h-1.875a.375.375 0 0 1-.375-.375V10.5Z" />
|
||||
class="w-6 h-6 fill-gray-700 dark:fill-gray-300 cursor-pointer-none">
|
||||
<path fill-rule="evenodd" d="M10.5 3.798v5.02a3 3 0 0 1-.879 2.121l-2.377 2.377a9.845 9.845 0 0 1 5.091 1.013 8.315 8.315 0 0 0 5.713.636l.285-.071-3.954-3.955a3 3 0 0 1-.879-2.121v-5.02a23.614 23.614 0 0 0-3 0Zm4.5.138a.75.75 0 0 0 .093-1.495A24.837 24.837 0 0 0 12 2.25a25.048 25.048 0 0 0-3.093.191A.75.75 0 0 0 9 3.936v4.882a1.5 1.5 0 0 1-.44 1.06l-6.293 6.294c-1.62 1.621-.903 4.475 1.471 4.88 2.686.46 5.447.698 8.262.698 2.816 0 5.576-.239 8.262-.697 2.373-.406 3.092-3.26 1.47-4.881L15.44 9.879A1.5 1.5 0 0 1 15 8.818V3.936Z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
{% endif %}
|
||||
{% if button['name'] == "edit" %}
|
||||
<svg class="h-6 w-6 fill-white"
|
||||
</button>
|
||||
{% else %}
|
||||
<button class="group relative">
|
||||
<p data-{{ attribute_name }}-state="online" class="dark:text-gray-300 -z-10 opacity-0 group-hover:z-10 group-hover:opacity-100 transition fixed bg-white dark:bg-slate-800 rounded right-12 px-1 py-0.5">
|
||||
Online
|
||||
</p>
|
||||
<svg data-toggle-draft="false"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path d="M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336c44.2 0 80-35.8 80-80s-35.8-80-80-80s-80 35.8-80 80s35.8 80 80 80z" />
|
||||
viewBox="0 0 24 24"
|
||||
fill="currentColor"
|
||||
class="w-6 h-6 fill-gray-700 dark:fill-gray-300 cursor-pointer-none">
|
||||
<path d="M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z" />
|
||||
</svg>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% set details = [
|
||||
{
|
||||
"name": "Reverse proxy",
|
||||
"settings": [
|
||||
"USE_REVERSE_PROXY"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Serve files",
|
||||
"settings": [
|
||||
"SERVE_FILES"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Remote PHP",
|
||||
"settings": [
|
||||
"REMOTE_PHP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "HTTPS",
|
||||
"settings": [
|
||||
"AUTO_LETS_ENCRYPT",
|
||||
"USE_CUSTOM_SSL",
|
||||
"GENERATE_SELF_SIGNED_SSL"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ModSecurity",
|
||||
"settings": [
|
||||
"USE_MODSECURITY"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Bad behavior",
|
||||
"settings": [
|
||||
"USE_BAD_BEHAVIOR"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Limit req",
|
||||
"settings": [
|
||||
"USE_LIMIT_REQ"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DNSBL",
|
||||
"settings": [
|
||||
"USE_DNSBL"
|
||||
]
|
||||
}
|
||||
] %}
|
||||
<!-- detail list -->
|
||||
<div role="grid"
|
||||
class="w-full grid grid-cols-12 justify-items-center sm:justify-items-start gap-2 mt-4 mb-6 ml-3 sm:ml-1">
|
||||
{% for detail in details %}
|
||||
{% set use = [] %}
|
||||
{% for setting in detail['settings'] %}
|
||||
{% if service[setting]['value'] == 'yes' %}
|
||||
{% if use.append(1) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<!-- detail -->
|
||||
<div role="row" class="flex items-center col-span-12 sm:col-span-6">
|
||||
<p role="gridcell"
|
||||
class="transition duration-300 ease-in-out font-bold mb-0 font-sans text-sm leading-normal uppercase dark:text-gray-500 ">
|
||||
{{ detail['name'] }}
|
||||
</p>
|
||||
<p role="gridcell"
|
||||
class="transition duration-300 ease-in-out dark:opacity-90 pl-2 mb-0 font-sans text-sm font-semibold leading-normal uppercase dark:text-gray-500 ">
|
||||
{% if use %}
|
||||
<span class="sr-only">yes</span>
|
||||
<svg class="h-4 w-4 fill-green-500"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path d="M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" />
|
||||
</svg>
|
||||
{% else %}
|
||||
<span class="sr-only">no</span>
|
||||
<svg class="h-4 w-4 fill-red-500"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 320 512">
|
||||
<path d="M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" />
|
||||
</svg>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
<!-- end detail -->
|
||||
{% endfor %}
|
||||
</div>
|
||||
<!-- end detail list-->
|
||||
<!-- button list-->
|
||||
<div class="relative w-full flex justify-center sm:justify-end">
|
||||
<a aria-label="access service url"
|
||||
href="http://{{ service['SERVER_NAME']['value'] }}"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
class="dark:brightness-90 z-20 mx-1 bg-sky-500 hover:bg-sky-500/80 focus:bg-sky-500/80 inline-block p-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer leading-normal text-xs ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 active:opacity-85 hover:shadow-md">
|
||||
<svg class="h-6 w-6 fill-white"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 448 512">
|
||||
<path d="M288 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h50.7L169.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L384 141.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H288zM80 64C35.8 64 0 99.8 0 144V400c0 44.2 35.8 80 80 80H336c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v80c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V144c0-8.8 7.2-16 16-16h80c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z" />
|
||||
</svg>
|
||||
</a>
|
||||
{% set action_buttons = [
|
||||
{
|
||||
"name": "clone",
|
||||
"label": "clone service settings",
|
||||
"color": "emerald-500"
|
||||
},
|
||||
{
|
||||
"name": "edit",
|
||||
"label": "edit service settings",
|
||||
"color": "yellow-500"
|
||||
}
|
||||
] %}
|
||||
{% if service["SERVER_NAME"]['method'] == "ui" %}
|
||||
{% if action_buttons.append({"name" : "delete", "label" : "delete service settings", "color" : "red-500"}) %}
|
||||
{% endif %}
|
||||
{% if button['name'] == "delete" %}
|
||||
<svg class="h-6 w-6 fill-white"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 448 512">
|
||||
<path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z" />
|
||||
</svg>
|
||||
{% endif %}
|
||||
</button>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% for button in action_buttons %}
|
||||
<button {% if button['name'] == "clone" and is_readonly or button['name'] == "delete" and is_readonly %}disabled{% endif %} {% if button['name'] == "clone" or button['name'] == "edit" %}data-settings="{{ service['settings'] }}"{% endif %} {% if button['name'] == "new" %}data-settings="{}"{% endif %} data-{{ attribute_name }}-action="{{ button['name'] }}" aria-label="{{ button['label'] }}" data-{{ attribute_name }}-name="{{ service['SERVER_NAME']['value'] }}" class="disabled:cursor-not-allowed dark:disabled:text-gray-300 disabled:text-gray-700 disabled:bg-gray-400 disabled:border-gray-400/0 dark:disabled:bg-gray-700 dark:disabled:border-gray-700/0 disabled:hover:translate-y-0 disabled:hover:bg-gray-400 disabled:hover:border-gray-400/0 dark:disabled:hover:translate-y-0 dark:disabled:hover:bg-gray-700 dark:disabled:hover:border-gray-700/0 dark:brightness-90 z-20 mx-1 bg-{{ button['color'] }} hover:bg-{{ button['color'] }}/80 focus:bg-{{ button['color'] }}/80 inline-block p-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer leading-normal text-xs ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 active:opacity-85 hover:shadow-md">
|
||||
{% if button['name'] == "clone" %}
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
fill="currentColor"
|
||||
class="w-6 h-6 fill-white">
|
||||
<path fill-rule="evenodd" d="M17.663 3.118c.225.015.45.032.673.05C19.876 3.298 21 4.604 21 6.109v9.642a3 3 0 0 1-3 3V16.5c0-5.922-4.576-10.775-10.384-11.217.324-1.132 1.3-2.01 2.548-2.114.224-.019.448-.036.673-.051A3 3 0 0 1 13.5 1.5H15a3 3 0 0 1 2.663 1.618ZM12 4.5A1.5 1.5 0 0 1 13.5 3H15a1.5 1.5 0 0 1 1.5 1.5H12Z" clip-rule="evenodd" />
|
||||
<path d="M3 8.625c0-1.036.84-1.875 1.875-1.875h.375A3.75 3.75 0 0 1 9 10.5v1.875c0 1.036.84 1.875 1.875 1.875h1.875A3.75 3.75 0 0 1 16.5 18v2.625c0 1.035-.84 1.875-1.875 1.875h-9.75A1.875 1.875 0 0 1 3 20.625v-12Z" />
|
||||
<path d="M10.5 10.5a5.23 5.23 0 0 0-1.279-3.434 9.768 9.768 0 0 1 6.963 6.963 5.23 5.23 0 0 0-3.434-1.279h-1.875a.375.375 0 0 1-.375-.375V10.5Z" />
|
||||
</svg>
|
||||
{% endif %}
|
||||
{% if button['name'] == "edit" %}
|
||||
<svg class="h-6 w-6 fill-white"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path d="M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336c44.2 0 80-35.8 80-80s-35.8-80-80-80s-80 35.8-80 80s35.8 80 80 80z" />
|
||||
</svg>
|
||||
{% endif %}
|
||||
{% if button['name'] == "delete" %}
|
||||
<svg class="h-6 w-6 fill-white"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 448 512">
|
||||
<path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z" />
|
||||
</svg>
|
||||
{% endif %}
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<!-- end button list-->
|
||||
</div>
|
||||
<!-- end button list-->
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- end services container-->
|
||||
<!-- modal -->
|
||||
{% include "services_modal.html" %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- end services container-->
|
||||
<!-- modal -->
|
||||
{% include "services_modal.html" %}
|
||||
{% endblock content %}
|
||||
|
|
|
|||
2
src/ui/templates/setting_select.html
vendored
2
src/ui/templates/setting_select.html
vendored
|
|
@ -36,7 +36,7 @@
|
|||
{% if global_config_method != 'ui' and global_config_method != 'default' or is_read_only %}disabled{% endif %}
|
||||
data-setting-select="{{ inp_id }}"
|
||||
data-default-value="{{ global_config_value }}"
|
||||
data-default="{{ inp_default }}"
|
||||
data-default="{{ inp_default }}"
|
||||
data-default-method="{{ global_config_method }}"
|
||||
aria-controls="{{ inp_id }}-dropdown"
|
||||
type="button"
|
||||
|
|
|
|||
12
src/ui/templates/setup_loading.html
vendored
12
src/ui/templates/setup_loading.html
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue