Merge branch 'ent-7591-mensaje-error-timeout-snmp-en-browser' into 'develop'

Fix format on snmp browser error messages

See merge request artica/pandorafms!4276
This commit is contained in:
Daniel Rodriguez 2021-09-08 14:37:14 +00:00
commit 2e7dadb04e
1 changed files with 17 additions and 7 deletions

View File

@ -66,16 +66,26 @@ function snmpBrowse() {
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
$("#spinner").css("display", "none");
$("#snmp_browser").html(
"<p>Status: " +
var htmlError = "";
if (XMLHttpRequest.responseText) {
htmlError =
"<p><b>Status:</b> " +
textStatus +
"</p><p>" +
"Error: " +
errorThrown +
"</p><p>" +
XMLHttpRequest.responseText +
"</p>"
);
"</p>";
} else {
htmlError =
"<p><b>Status:</b> " +
textStatus +
"</p><p>" +
"<b>Error:</b> " +
errorThrown +
"</p>";
}
$("#snmp_browser").html(htmlError);
}
});
}