mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
had to pull WxH out into vars to use in the image tag
This commit is contained in:
@@ -337,12 +337,23 @@ function print_graph_tag($args)
|
||||
function generate_graph_tag($args)
|
||||
{
|
||||
$urlargs = array();
|
||||
$w = 0;
|
||||
$h = 0;
|
||||
foreach ($args as $key => $arg)
|
||||
{
|
||||
if(strtolower($key) == 'width')
|
||||
$w = $arg;
|
||||
switch (strtolower($key)) {
|
||||
case 'width':
|
||||
$w = $arg;
|
||||
break;
|
||||
case 'height':
|
||||
$h = $arg;
|
||||
}
|
||||
$urlargs[] = $key."=".urlencode($arg);
|
||||
}
|
||||
|
||||
return '<img class="lazy" width="216" height="100" src="graph.php?' . implode('&',$urlargs).'" border="0" />';
|
||||
return '<img class="lazy" width="'.$w.'" height="'.$h.'" src="graph.php?' . implode('&',$urlargs).'" border="0" />';
|
||||
}
|
||||
|
||||
function generate_graph_js_state($args) {
|
||||
|
Reference in New Issue
Block a user