mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 02:48:37 +00:00
Add procedure management
This commit is contained in:
parent
47c22f6bb0
commit
d5e26a3438
26
html/includes/forms/open-proc.inc.php
Normal file
26
html/includes/forms/open-proc.inc.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* LibreNMS
|
||||
*
|
||||
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
# header('Content-type: text/plain');
|
||||
|
||||
$alert_id = $_POST['alert_id'];
|
||||
if (!is_numeric($alert_id)) {
|
||||
echo 'ERROR: No alert selected';
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
$proc = dbFetchCell('SELECT proc FROM alerts,alert_rules WHERE alert_rules.id = alerts.rule_id AND alerts.id = ?', array($alert_id));
|
||||
if (! file_exists ("procs/$proc")) { echo header("HTTP/1.0 404 Not Found"); }
|
||||
else { echo $proc; }
|
||||
exit;
|
||||
}
|
BIN
html/procs/noproc.pdf
Normal file
BIN
html/procs/noproc.pdf
Normal file
Binary file not shown.
2
sql-schema/116.sql
Normal file
2
sql-schema/116.sql
Normal file
@ -0,0 +1,2 @@
|
||||
ALTER TABLE alert_rules ADD COLUMN proc VARCHAR(30) AFTER name;
|
||||
UPDATE alert_rules SET proc="noproc.pdf";
|
Loading…
Reference in New Issue
Block a user