mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix graphs without from or to, also my days only have 24 hours
git-svn-id: http://www.observium.org/svn/observer/trunk@2515 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -13,8 +13,8 @@ if($_SESSION['widescreen'])
|
||||
$thumb_width=113;
|
||||
}
|
||||
|
||||
if (is_numeric($vars['from'])) { $from = $vars['from']; } else { $from = $config['time']['day']; }
|
||||
if (is_numeric($vars['to'])) { $to = $vars['to']; } else { $to = $config['time']['now']; }
|
||||
if (!is_numeric($vars['from'])) { $vars['from'] = $config['time']['day']; }
|
||||
if (!is_numeric($vars['to'])) { $vars['to'] = $config['time']['now']; }
|
||||
|
||||
preg_match('/^(?P<type>[A-Za-z0-9]+)_(?P<subtype>.+)/', mres($vars['type']), $graphtype);
|
||||
|
||||
@@ -52,13 +52,12 @@ if (!$auth)
|
||||
|
||||
echo("<div style='margin: auto;'>");
|
||||
|
||||
$thumb_array = array('sixhour' => '6 Hours', 'day' => '25 Hours', 'twoday' => '48 Hours', 'week' => 'One Week', 'twoweek' => 'Two Weeks',
|
||||
$thumb_array = array('sixhour' => '6 Hours', 'day' => '24 Hours', 'twoday' => '48 Hours', 'week' => 'One Week', 'twoweek' => 'Two Weeks',
|
||||
'month' => 'One Month', 'twomonth' => 'Two Months','year' => 'One Year', 'twoyear' => 'Two Years');
|
||||
|
||||
|
||||
foreach ($thumb_array as $period => $text)
|
||||
{
|
||||
|
||||
$graph_array['from'] = $config['time'][$period];
|
||||
|
||||
$link_array = $vars;
|
||||
|
Reference in New Issue
Block a user