mirror of https://github.com/Aidaho12/haproxy-wi
v7.3.0.0: Update CSS styles, HTML templates, and Ansible tasks
The code adjustments primarily focus on improving layout management and enhancing backend functionality. Specifically, the CSS styles have been modified to adjust the alignment and width of certain elements. Additionally, new HTML templates have been created to refine the display of server details and a new link has been added. In the ansible tasks, logic has been added to handle the installation of packages and modification of NGINX version retrieval. In the logs module, an exception has been added to handle cases where the syslog server IP is not defined.pull/387/head
parent
f049daeb3c
commit
ce1995bbb9
|
@ -87,6 +87,8 @@ def show_roxy_log(
|
|||
|
||||
commands = "sudo cat /var/log/%s/syslog.log | sed '/ %s:00/,/ %s:00/! d' |tail -%s %s %s %s" % (serv, date, date1, rows, grep_act, grep, exgrep_act)
|
||||
syslog_server = sql.get_setting('syslog_server')
|
||||
if syslog_server is None or syslog_server == '':
|
||||
raise Exception('error: Syslog server is enabled, but there is no IP for syslog server')
|
||||
|
||||
if waf == "1":
|
||||
local_path_logs = '/var/log/waf.log'
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
msg="info NGINX WAF has already installed"
|
||||
when: stat_result.stat.exists
|
||||
|
||||
- name: Gather Installed Packages Facts
|
||||
package_facts:
|
||||
manager: "auto"
|
||||
|
||||
- name: install the common RPMS for NGINX
|
||||
yum:
|
||||
name:
|
||||
|
@ -81,9 +85,8 @@
|
|||
dest: /usr/local/
|
||||
remote_src: true
|
||||
|
||||
- name: Get NGINX version
|
||||
shell: /usr/sbin/nginx -v
|
||||
register: nginx_version
|
||||
- set_fact:
|
||||
nginx_version: "{{ ansible_facts.packages['nginx'][0].version.split('-')[0] }}"
|
||||
|
||||
- name: Get NGINX parameters
|
||||
shell: /usr/sbin/nginx -V 2>&1 |grep configu |awk -F":" '{print $2}'
|
||||
|
@ -94,7 +97,7 @@
|
|||
|
||||
- name: Download NGINX
|
||||
ansible.builtin.get_url:
|
||||
url: "http://nginx.org/download/nginx-{{ nginx_version.stderr.split('/')[1] }}.tar.gz"
|
||||
url: "http://nginx.org/download/nginx-{{ nginx_version }}.tar.gz"
|
||||
dest: /tmp/nginx_src.tar.gz
|
||||
|
||||
- name: Create nginx_src directory
|
||||
|
@ -112,23 +115,23 @@
|
|||
|
||||
- name: Configure NGINX
|
||||
become: true
|
||||
command: "chdir=/tmp/nginx_src/nginx-{{ nginx_version.stderr.split('/')[1] }} ./configure {{ nginx_params.stdout }} --add-dynamic-module=../../nginx-connector"
|
||||
command: "chdir=/tmp/nginx_src/nginx-{{ nginx_version }} ./configure {{ nginx_params.stdout }} --add-dynamic-module=../../nginx-connector"
|
||||
environment:
|
||||
CFLAGS: -Wno-error
|
||||
|
||||
- name: Make NGINX modules
|
||||
become: true
|
||||
command: "chdir=/tmp/nginx_src/nginx-{{ nginx_version.stderr.split('/')[1] }} make modules"
|
||||
command: "chdir=/tmp/nginx_src/nginx-{{ nginx_version }} make modules"
|
||||
|
||||
- name: Copy module for CentOS
|
||||
become: true
|
||||
command: "chdir=/tmp/nginx_src/nginx-{{ nginx_version.stderr.split('/')[1] }} cp objs/ngx_http_modsecurity_module.so /usr/lib64/nginx/modules/"
|
||||
command: "chdir=/tmp/nginx_src/nginx-{{ nginx_version }} cp objs/ngx_http_modsecurity_module.so /usr/lib64/nginx/modules/"
|
||||
when:
|
||||
- ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS'
|
||||
|
||||
- name: Copy module for Ubuntu
|
||||
become: true
|
||||
command: "chdir=/tmp/nginx_src/nginx-{{ nginx_version.stderr.split('/')[1] }} cp objs/ngx_http_modsecurity_module.so /usr/lib/nginx/modules/"
|
||||
command: "chdir=/tmp/nginx_src/nginx-{{ nginx_version }} cp objs/ngx_http_modsecurity_module.so /usr/lib/nginx/modules/"
|
||||
when: ansible_facts['os_family'] == 'Debian' or ansible_facts['os_family'] == 'Ubuntu'
|
||||
|
||||
- name: Create modules directory
|
||||
|
|
|
@ -162,7 +162,7 @@ pre {
|
|||
}
|
||||
#logo_footer {
|
||||
float: left;
|
||||
margin-left: 41%;
|
||||
margin-left: 43%;
|
||||
}
|
||||
#logo_footer_img {
|
||||
width: 35px;
|
||||
|
@ -173,9 +173,9 @@ pre {
|
|||
padding-top: 11px;
|
||||
text-align: right;
|
||||
margin-right: 20px;
|
||||
width: 368px;
|
||||
width: 380px;
|
||||
float: left;
|
||||
margin-left: 26%;
|
||||
margin-left: 16%;
|
||||
}
|
||||
.footer-link, .footer-copyright {
|
||||
color: var(--blue-color);
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
<div class="footer-div">
|
||||
<div id="useful-links">
|
||||
<a href="https://roxy-wi.org" class="footer-link" target="_blank" title="{{lang.words.about|title()}} Roxy-WI">{{lang.words.about|title()}}</a>
|
||||
<a href="https://rmon.io" class="footer-link" target="_blank" title="Remote Monitoring">RMON</a>
|
||||
<a href="https://github.com/roxy-wi/roxy-wi/issues" class="footer-link" target="_blank" title="Community help">{{lang.words.help|title()}}</a>
|
||||
<a href="https://sd.roxy-wi.org" class="footer-link" target="_blank" title="Service Desk">SD</a>
|
||||
<a href="https://roxy-wi.org/contacts" class="footer-link" target="_blank">{{lang.words.contacts|title()}}</a>
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
<tr class="overviewHead">
|
||||
<th class="padding10 first-collumn" id="server-name-th">{{lang.words.name|title()}}</th>
|
||||
<th class="ip-field" style="width: 10% " id="server-ip-th">IP</th>
|
||||
<th style="width: 5%" class="help_cursor"><span title="SSH port">{{lang.words.port|title()}}</span></th>
|
||||
<th style="min-width: 50px" class="help_cursor"><span title="SSH port">{{lang.words.port|title()}}</span></th>
|
||||
{% if g.user_params['role'] == 1 %}
|
||||
<th style="width: 10%">{{lang.words.group|title()}}</th>
|
||||
{% endif %}
|
||||
<th class="checkbox-head" style="min-width: 70px;">{{lang.words.enabled|title()}}</th>
|
||||
<th style="min-width: 60px; padding-left: 17px;" class="help_cursor">
|
||||
<th class="checkbox-head" style="min-width: 50px;">{{lang.words.enabled|title()}}</th>
|
||||
<th style="min-width: 40px; padding-left: 17px;" class="help_cursor">
|
||||
<span title="{{lang.words.virtual|title()}} IP, something like VRRP">{{lang.words.virt|title()}}</span>
|
||||
</th>
|
||||
<th class="checkbox-head" style="min-width: 75px" id="server-haproxy-th">{{lang.words.services|title()}}</th>
|
||||
<th style="min-width: 120px;" class="help_cursor" id="server-firewalld-th">
|
||||
<th class="checkbox-head" style="min-width: 60px" id="server-haproxy-th">{{lang.words.services|title()}}</th>
|
||||
<th style="min-width: 105px;" class="help_cursor" id="server-firewalld-th">
|
||||
<span title="If the server has a firewall enabled, enable this option">Firewalld</span>
|
||||
</th>
|
||||
<th class="checkbox-head help_cursor" style="min-width: 120px;" class="help_cursor" id="server-protected-th">
|
||||
<th class="checkbox-head help_cursor" style="min-width: 70px;" class="help_cursor" id="server-protected-th">
|
||||
<span title="{{lang.phrases.protected_title}}">{{lang.words.protected|title()}}</span>
|
||||
</th>
|
||||
<th style="width: 10%" class="help_cursor" id="server-slave-th">
|
||||
|
@ -46,7 +46,7 @@
|
|||
</td>
|
||||
<td>
|
||||
{% set id = 'port-' + server.0|string() %}
|
||||
{{ input(id, value=server.10, type='number', style='width: 50px;') }}
|
||||
{{ input(id, value=server.10, type='number', style='width: 40px;') }}
|
||||
</td>
|
||||
{% if g.user_params['role'] == 1 %}
|
||||
<td>
|
||||
|
|
Loading…
Reference in New Issue