mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
api: Limit get_graph_by_port_hostname() to one port and exclude deleted (#5936)
This commit is contained in:
committed by
Neil Lathwood
parent
1140be1a01
commit
debb945477
@ -71,7 +71,7 @@ function get_graph_by_port_hostname()
|
||||
$vars['width'] = $_GET['width'] ?: 1075;
|
||||
$vars['height'] = $_GET['height'] ?: 300;
|
||||
$auth = '1';
|
||||
$vars['id'] = dbFetchCell("SELECT `P`.`port_id` FROM `ports` AS `P` JOIN `devices` AS `D` ON `P`.`device_id` = `D`.`device_id` WHERE `D`.`hostname`=? AND `P`.`$port`=?", array($hostname, $vars['port']));
|
||||
$vars['id'] = dbFetchCell("SELECT `P`.`port_id` FROM `ports` AS `P` JOIN `devices` AS `D` ON `P`.`device_id` = `D`.`device_id` WHERE `D`.`hostname`=? AND `P`.`$port`=? AND `deleted` = 0 LIMIT 1", array($hostname, $vars['port']));
|
||||
$app->response->headers->set('Content-Type', 'image/png');
|
||||
rrdtool_initialize(false);
|
||||
include 'includes/graphs/graph.inc.php';
|
||||
|
Reference in New Issue
Block a user