mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Added support for https links in alerts procedure url (#4872)
This commit is contained in:
committed by
Daniel Preussker
parent
d5b20dbd1f
commit
4a854e02ce
@@ -230,7 +230,7 @@ var alerts_grid = $("#alerts_'.$unique_id.'").bootgrid({
|
||||
return "<button type=\'button\' class=\'btn btn-"+row.ack_col+" btn-sm command-ack-alert\' data-target=\'#ack-alert\' data-state=\'"+row.state+"\' data-alert_id=\'"+row.alert_id+"\' name=\'ack-alert\' id=\'ack-alert\' data-extra=\'"+row.extra+"\'><i class=\'fa fa-"+row.ack_ico+"\'aria-hidden=\'true\'></i></button>";
|
||||
},
|
||||
"proc": function(column,row) {
|
||||
return "<button type=\'button\' class=\'btn command-open-proc\' data-alert_id=\'"+row.alert_id+"\' name=\'open-proc\' id=\'open-proc\'>Open</button>";
|
||||
return "<button type=\'button\' class=\'btn btn-sm command-open-proc\' data-alert_id=\'"+row.alert_id+"\' name=\'open-proc\' id=\'open-proc\'>Open</button>";
|
||||
},
|
||||
"severity": function(column,row) {
|
||||
var eventColor = "info";
|
||||
|
@@ -21,7 +21,7 @@ if (!is_numeric($alert_id)) {
|
||||
$proc = dbFetchCell('SELECT proc FROM alerts,alert_rules WHERE alert_rules.id = alerts.rule_id AND alerts.id = ?', array($alert_id));
|
||||
if (($proc == "") || ($proc == "NULL")) {
|
||||
echo header("HTTP/1.0 404 Not Found");
|
||||
} elseif (! preg_match('/^http:\/\//', $proc)) {
|
||||
} elseif (! preg_match('/^http[s]*:\/\//', $proc)) {
|
||||
echo "ERROR";
|
||||
} else {
|
||||
echo $proc;
|
||||
|
Reference in New Issue
Block a user