diff --git a/src/ui/templates/home.html b/src/ui/templates/home.html index 12b085d9c..827dabbaf 100644 --- a/src/ui/templates/home.html +++ b/src/ui/templates/home.html @@ -6,7 +6,7 @@ {'name' : 'Instances', 'title' : instances_number, 'link' : 'loading?next=' + url_for('instances') , 'subtitle' : instance_health_count|string + ' / ' + instances_number|string + ' is working' , 'subtitle_color' : "emerald-500", 'svg_color' : 'gray-500'}, {'name' : 'Services', 'title' : services_number, 'link' : 'loading?next=' + url_for('services') , 'subtitle' : services_ui_count|string + ' ui, ' + services_scheduler_count|string + ' scheduler, ' + services_autoconf_count|string + ' autoconf ' , 'subtitle_color' : "sky-500", 'svg_color' : 'orange-500'}, {'name' : 'Plugins', 'title' : config["CONFIG"].get_plugins()|length, 'link' : 'loading?next=' + url_for('plugins') , 'subtitle' : plugins_errors|string + ' errors' if plugins_errors > 0 else 'no error' , 'subtitle_color' : "red-500" if plugins_errors > 0 else 'green-500', 'svg_color' : 'yellow-400' } - ] + ] %}
@@ -26,7 +26,7 @@

{{card['title']}}
- +

{{card['subtitle']}} diff --git a/src/ui/templates/services.html b/src/ui/templates/services.html index 5bd854a53..16b58e506 100644 --- a/src/ui/templates/services.html +++ b/src/ui/templates/services.html @@ -63,278 +63,39 @@

{{ service["SERVER_NAME"]['method'] }}
+ {% 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"]}, + ] + %}
+ {% for detail in details %} + {% set use = [] %} + {% for setting in detail['settings'] %} + {% if service[setting]['value'] == 'yes'%} + {% if use.append(1)%}{%endif%} + {% endif %} + {% endfor %}

- Reverse proxy + {{ detail['name'] }}

- {% if service['USE_REVERSE_PROXY']['value'] == 'yes' %} - yes - - - - {% else %} - no - - - - - {% endif %} -

-
- - -
-

- Serve files -

-

- {% if service['SERVE_FILES']['value'] == 'yes' %} - yes - - - - - {% else %} - no - - - - - {% endif %} -

-
- - -
-

- Remote PHP -

-

- {% if service['REMOTE_PHP']['value'] != '' %} - yes - - - - {% else %} - no - - - - {% endif %} -

-
- - -
-

- HTTPS -

-

- {% if service['AUTO_LETS_ENCRYPT']['value'] == 'yes' or service['USE_CUSTOM_SSL']['value'] == 'yes' or service['GENERATE_SELF_SIGNED_SSL']['value'] == 'yes' %} - yes - - - - {% else %} - no - - - - {% endif %} -

-
- - -
-

- ModSecurity -

-

- {% if service['USE_MODSECURITY']['value'] == 'yes' %} - yes - - - - {% else %} - no - - - - {% endif %} -

-
- - -
-

- Bad Behavior -

-

- {% if service['USE_BAD_BEHAVIOR']['value'] == 'yes' %} - yes - - - - {% else %} - no - - - - {% endif %} -

-
- - -
-

- Limit req -

-

- {% if service['USE_LIMIT_REQ']['value'] == 'yes' %} - yes - - - - - {% else %} - no - - - - - {% endif %} -

-
- - -
-

- DNSBL -

-

- {% if service['USE_DNSBL']['value'] == 'yes' %} + {% if use %} yes

+ {% endfor %}
@@ -380,53 +142,49 @@ - - - - - + {% 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" %} - - {% endif %} + {% endif %} + + {% endfor %} +