mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Tidy up formatting; proof-of-concept right side box
This commit is contained in:
@@ -79,17 +79,22 @@ function generate_url($vars, $new_vars = array())
|
||||
|
||||
}
|
||||
|
||||
function escape_quotes($text)
|
||||
{
|
||||
return str_replace('"', "\'", $text);
|
||||
}
|
||||
|
||||
function generate_overlib_content($graph_array, $text)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$overlib_content = '<div class=overlib><span class=overlib-text>'.$text."</span><br />";
|
||||
$overlib_content = '<div class=overlib><span class=overlib-text>'.$text.'</span><br />';
|
||||
foreach (array('day','week','month','year') as $period)
|
||||
{
|
||||
$graph_array['from'] = $config['time'][$period];
|
||||
$overlib_content .= str_replace('"', "\'", generate_graph_tag($graph_array));
|
||||
$overlib_content .= escape_quotes(generate_graph_tag($graph_array));
|
||||
}
|
||||
$overlib_content .= "</div>";
|
||||
$overlib_content .= '</div>';
|
||||
|
||||
return $overlib_content;
|
||||
|
||||
@@ -159,8 +164,8 @@ function generate_device_link($device, $text=NULL, $vars=array(), $start=0, $end
|
||||
$graphhead = $entry['text'];
|
||||
$contents .= '<div class=overlib-box>';
|
||||
$contents .= '<span class=overlib-title>'.$graphhead.'</span><br />';
|
||||
$contents .= generate_minigraph_image($device, $start, $end, $graph);
|
||||
$contents .= generate_minigraph_image($device, $config['time']['week'], $end, $graph);
|
||||
$contents .= escape_quotes(generate_minigraph_image($device, $start, $end, $graph));
|
||||
$contents .= escape_quotes(generate_minigraph_image($device, $config['time']['week'], $end, $graph));
|
||||
$contents .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user