From 56c859c8069519ced7a74f55149388d7041d77e5 Mon Sep 17 00:00:00 2001 From: Atul Pratap Singh Date: Sat, 4 Aug 2012 17:04:26 +0530 Subject: [PATCH] Re-enable tab switching from live to static --- js/server_status.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/js/server_status.js b/js/server_status.js index 37607a0725..8d1d11b9c7 100644 --- a/js/server_status.js +++ b/js/server_status.js @@ -384,12 +384,13 @@ $(function() { var set_previous = getCurrentQueryStats(); //initiateChartData(chartId, settings); recursiveTimer($tab, settings); + setupLiveChart($tab, this, settings); + tabStatus[$tab.attr('id')] = 'livequeries'; } else { $(this).html(PMA_messages['strLiveQueryChart']); + setupLiveChart($tab, this, settings); } - setupLiveChart($tab, this, settings); - tabStatus[$tab.attr('id')] = 'livequeries'; return false; }); @@ -460,8 +461,13 @@ $(function() { $tab.find('.buttonlinks a.tabRefresh').hide(); $tab.find('.buttonlinks .refreshList').show(); } else { - clearTimeout(chart_activeTimeouts[$tab.attr('id') + "_chart_cnt"]); - chart_activeTimeouts[$tab.attr('id') + "_chart_cnt"] = null; + if(query_stats_jqplot_timer != null) { + clearTimeout(query_stats_jqplot_timer); + } + else { + clearTimeout(chart_activeTimeouts[$tab.attr('id') + "_chart_cnt"]); + chart_activeTimeouts[$tab.attr('id') + "_chart_cnt"] = null; + } $tab.find('.tabInnerContent').show(); $tab.find('div#' + $tab.attr('id') + '_chart_cnt').remove(); tabStatus[$tab.attr('id')] = 'static';