Pavel Loginov 2021-07-07 13:30:09 +06:00
parent 31c4d6975f
commit e22808deb8
6 changed files with 23 additions and 23 deletions

View File

@ -1352,11 +1352,9 @@ if form.getvalue('backup') or form.getvalue('deljob') or form.getvalue('backupup
print('error: ' + error)
else:
for l in output:
if "msg" in l or "FAILED" in l:
if "Traceback" in l or "FAILED" in l:
try:
l = l.split(':')[1]
l = l.split('"')[1]
print('error: ' + l + "<br>")
print('error: ' + l)
break
except Exception:
print('error: ' + output)
@ -1371,18 +1369,18 @@ if form.getvalue('backup') or form.getvalue('deljob') or form.getvalue('backupup
template = template.render(backups=sql.select_backups(server=serv, rserver=rserver),
sshs=sql.select_ssh())
print(template)
print('success: Backup job has created')
funct.logging('backup ', ' has created a new backup job for server ' + serv, haproxywi=1, login=1)
print('success: Backup job has been created')
funct.logging('backup ', ' a new backup job for server ' + serv + ' has been created', haproxywi=1, login=1)
else:
print('error: Cannot add job into DB')
elif deljob:
sql.delete_backups(deljob)
print('Ok')
funct.logging('backup ', ' has deleted a backup job for server ' + serv, haproxywi=1, login=1)
funct.logging('backup ', ' a backup job for server ' + serv + ' has been deleted', haproxywi=1, login=1)
elif update:
sql.update_backup(serv, rserver, rpath, type, time, cred, description, update)
print('Ok')
funct.logging('backup ', ' has updated a backup job for server ' + serv, haproxywi=1, login=1)
funct.logging('backup ', ' a backup job for server ' + serv + ' has been updated', haproxywi=1, login=1)
if form.getvalue('install_nginx'):
funct.install_nginx(form.getvalue('install_nginx'))

View File

@ -73,8 +73,8 @@
{{ input('ip', placeholder="Any", size='15') }}<b>:</b>
{{ input('listen-port', name='port', type="number", title="Port for bind listen", placeholder="8080", size='5', required='required') }}
<div class="tooltip tooltipTop">
IP for bind listener, <b>if empty will be assigned on all IPs</b>.
Start typing IP, or press the "down" button.<br>If you are using <b>VRRP, leave the IP field blank</b>. If you assign an IP, the slave server will not start
The IP address for the bind listener, <b>if empty, will be assigned to all IP addresses</b>. <br />
Start typing IP or press down button. If you are using <b>VRRP, leave the IP field blank</b>. If you assign a VRRP IP, the slave server will not start
</div>
</td>
</tr>
@ -322,8 +322,8 @@
<input type="text" name="ip" id="ip1" size="15" placeholder="Any" class="form-control"><b>:</b>
<input type="number" name="port" required title="Port for bind frontend" placeholder="8080" class="form-control">
<div class="tooltip tooltipTop">
IP for bind listener, <b>if empty will be assigned on all IPs</b>.
Start typing IP, or press the "down" button.<br>If you are using <b>VRRP, leave the IP field blank</b>. If you assign an IP, the slave server will not start
The IP address for the bind listener, <b>if empty, will be assigned to all IP addresses</b>. <br />
Start typing IP or press down button. If you are using <b>VRRP, leave the IP field blank</b>. If you assign a VRRP IP, the slave server will not start
</div>
</td>
</tr>
@ -434,9 +434,10 @@
<tr>
<td class="addName">Default backend</td>
<td class="addOption">
<div style="font-size: 12px; padding-bottom: 10px;">Start typing backend, or press the "down" button</div>
{{ input('backends', name='backends', placeholder="some_backend", size='30') }}
<p style="font-size: 12px"><b>Note:</b> If you want to use a default backend, you must <span title="Create backend" id="redirectBackend" class="link">create a new backend</span> first.</p>
<div class="tooltip tooltipTop">
<b>Note</b>. If you want to use the default backend, <span title="Create backend" class="redirectBackend link">backend must exist</span>.
</div>
</td>
</tr>
<tr class="advance-show">

View File

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% block content %}
{% from 'include/input_macros.html' import input, select %}
{% from 'include/input_macros.html' import input, select, copy_to_clipboard %}
<script src="/inc/users.js"></script>
<script src="/inc/fontawesome.min.js"></script>
{% include 'include/del_confirm.html' %}

View File

@ -53,9 +53,9 @@
<span>
{% endif %}
<span title="Enabled checks:
Port check{% if s.9 %}
Port check{% if s.9 %},
HTTP status check: {{s.9.split(':')[0]}}://{{s.0}}:{{s.1}}{{s.9.split(':')[1]}}
{% if s.11 and s.11 != 'None' %}Body response check: {{s.11}}{% endif %}
{% if s.11 and s.11 != 'None' %}, Body response check: {{s.11}}{% endif %}
{% endif %}"> {{s.0}}:{{s.1}}
</span>
</span>

View File

@ -7,7 +7,7 @@
<td class="padding10">Period time</td>
<td class="padding10">Credentials</td>
<td class="padding10">Description</td>
<td></td>
<td style="margin-left: 5px;"></td>
<td></td>
</tr>
{% for b in backups %}
@ -15,7 +15,8 @@
{% if b.1 in s.2 %}
<tr id="backup-table-{{b.0}}">
<td class="padding10 first-collumn">
<span id="backup-server-{{b.0}}">{{ b.1 }}</span>
{% set id = 'backup-server-' + b.0|string() %}
{{ copy_to_clipboard(id=id, value=b.1) }}
</td>
<td>
{{ input('backup-rserver-'+b.0|string(), value=b.2, size='14') }}
@ -63,7 +64,7 @@
{% endfor %}
{% endfor %}
</table>
<br /><span class="add-button" title="Add a new backup job" id="add-backup-button">+ Add a new backup job</span>
<br /><span class="add-button" title="Add a new backup job" id="add-backup-button">+ Add backup</span>
<br /><br />
<div id="ajax-backup"></div>
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">

View File

@ -88,11 +88,11 @@
<tr class="overviewHead">
<td class="padding10 first-collumn-wi" colspan=4>
{% if role <= 1 %}
<a href="/app/users.py#services" title="View tools status" class="logs_link">
Tools status
<a href="/app/users.py#services" title="View services status" class="logs_link">
Services status
</a>
{% else %}
Tools status
Services status
{% endif %}
</td>
</tr>