Pavel Loginov 3 years ago
parent 23fd8eb66d
commit c30dc1bfba

@ -670,7 +670,7 @@ def show_installation_output(error, output, service):
for l in output:
if "UNREACHABLE" in l:
print(l + '<br />')
if "Traceback" in l or "FAILED" in l or "error" in l:
if "Traceback" in l or "FAILED" in l or "error" in l or "ERROR" in l:
try:
print(l)
break

@ -66,11 +66,11 @@
state: present
- name: Add the Grafana user
user:
name: grafana
shell: /sbin/nologin
groups: grafana
append: yes
user:
name: grafana
shell: /sbin/nologin
groups: grafana
append: yes
- name: Create a directory if it does not exist
file:

@ -66,9 +66,12 @@ if serv is not None and form.getvalue('del') is not None:
pass
else:
os.remove(os.path.join(configs_dir, form.getvalue(get)))
file.add(form.getvalue(get) + "<br />")
funct.logging(serv, "Version of config has been deleted: %s" % form.getvalue(get), login=1,
keep_history=1, service=service)
try:
file.add(form.getvalue(get) + "<br />")
funct.logging(serv, "Version of config has been deleted: %s" % form.getvalue(get), login=1,
keep_history=1, service=service)
except Exception:
pass
except OSError as e:
stderr = "Error: %s - %s." % (e.filename,e.strerror)

@ -64,6 +64,13 @@ $( function() {
if (data.indexOf('error: ') != '-1' || data.indexOf('Fatal') != '-1' || data.indexOf('Error') != '-1' || data.indexOf('failed ') != '-1' || data.indexOf('emerg] ') != '-1') {
toastr.clear();
toastr.error(data);
} else if (data.indexOf('command not found') != '-1') {
try {
var service = findGetParameter('service');
toastr.error('Cannot save config. There is no ' + service);
} catch (err) {
console.log(err);
}
} else {
toastr.clear();
toastr.success(data);

@ -146,7 +146,7 @@ $( function() {
success: function( data ) {
data = data.replace(/\s+/g,' ');
$("#ajaxmon").html('');
if (data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1') {
if (data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1' || data.indexOf('ERROR') != '-1') {
toastr.clear();
toastr.error(data);;
} else if (data.indexOf('success') != '-1' ){

Loading…
Cancel
Save