From b1fd1b3137a7f41e1e70546fa79c2a8ec13ae707 Mon Sep 17 00:00:00 2001 From: Louis Bailleul Date: Fri, 20 Nov 2015 12:47:56 +0000 Subject: [PATCH] Only update resolution if session variables don't exist Tune print-graphrow.inc.php to avoid last graph going to a new line in certain cases --- html/includes/print-graphrow.inc.php | 2 +- html/index.php | 4 ++++ html/js/librenms.js | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/html/includes/print-graphrow.inc.php b/html/includes/print-graphrow.inc.php index 0e4c7d9d0..362e2a543 100644 --- a/html/includes/print-graphrow.inc.php +++ b/html/includes/print-graphrow.inc.php @@ -39,7 +39,7 @@ else { if($_SESSION['screen_width']) { if($_SESSION['screen_width'] >= 800) { - $graph_array['width'] = ($_SESSION['screen_width'] - 400 )/count($periods)+1; + $graph_array['width'] = ($_SESSION['screen_width'] - 420 )/count($periods)+1; }else { $graph_array['width'] = $_SESSION['screen_width'] - 155; } diff --git a/html/index.php b/html/index.php index 6499e2c27..aee20f1d7 100644 --- a/html/index.php +++ b/html/index.php @@ -184,6 +184,10 @@ else { updateResolution();"; +} + if ((isset($vars['bare']) && $vars['bare'] != "yes") || !isset($vars['bare'])) { if ($_SESSION['authenticated']) { require 'includes/print-menubar.php'; diff --git a/html/js/librenms.js b/html/js/librenms.js index 3918c14a9..2c4cee311 100644 --- a/html/js/librenms.js +++ b/html/js/librenms.js @@ -123,7 +123,6 @@ $(document).ready(function() { }); }); - updateResolution(); }); function submitCustomRange(frmdata) {