From: <vv...@us...> - 2010-12-06 21:30:00
|
Revision: 2395 http://ganglia.svn.sourceforge.net/ganglia/?rev=2395&view=rev Author: vvuksan Date: 2010-12-06 21:29:54 +0000 (Mon, 06 Dec 2010) Log Message: ----------- Avoid the blank page when someone taps on the currently selected time range Modified Paths: -------------- branches/monitor-web-2.0/mobile.php branches/monitor-web-2.0/mobile_helper.php Modified: branches/monitor-web-2.0/mobile.php =================================================================== --- branches/monitor-web-2.0/mobile.php 2010-12-06 19:37:21 UTC (rev 2394) +++ branches/monitor-web-2.0/mobile.php 2010-12-06 21:29:54 UTC (rev 2395) @@ -94,7 +94,7 @@ // List all hosts in the cluster asort($cluster_array[$clustername]); foreach ( $cluster_array[$clustername] as $index => $hostname ) { - print '<li><a href="mobile_helper.php?show_host_metrics=1&h=' . $hostname . '&c=' . $clustername . '&r=' . $default_time_range . '">' . strip_domainname($hostname) . '</a></li>'; + print '<li><a href="mobile_helper.php?show_host_metrics=1&h=' . $hostname . '&c=' . $clustername . '&r=' . $default_time_range . '&cs=&ce=">' . strip_domainname($hostname) . '</a></li>'; } ?> </ul> @@ -117,7 +117,7 @@ foreach ( $available_views as $view_id => $view ) { $v = $view['view_name']; $elements = get_view_graph_elements($view); - print '<li><a href="mobile_helper.php?view_name=' . $v . '&just_graphs=1&r=' . $default_time_range . '&cs=&ce=">' . $v . '</a><span class="ui-li-count">' . sizeof($elements) . '</span></li>'; + print '<li><a href="mobile_helper.php?view_name=' . $v . '&r=' . $default_time_range . '&cs=&ce=">' . $v . '</a><span class="ui-li-count">' . sizeof($elements) . '</span></li>'; } ?> </ul> Modified: branches/monitor-web-2.0/mobile_helper.php =================================================================== --- branches/monitor-web-2.0/mobile_helper.php 2010-12-06 19:37:21 UTC (rev 2394) +++ branches/monitor-web-2.0/mobile_helper.php 2010-12-06 21:29:54 UTC (rev 2395) @@ -42,12 +42,13 @@ foreach ($context_ranges as $v) { $url=rawurlencode($v); - if ($v == $range) - $checked = "class=\"ui-btn-active\""; - else - $checked = ""; + if ($v == $range) { + $checked = "class=\"ui-btn-active\""; + $range_menu .= "<li><a $checked href='#' onclick='return false;'>$v</a></li>"; + } else { + $range_menu .= "<li><a href='mobile_helper.php?view_name=" . $_GET['view_name'] . "&r=" . $v . "&cs=&ce='>$v</a></li>"; + } - $range_menu .= "<li><a href='mobile_helper.php?view_name=" . $_GET['view_name'] . "&r=" . $v . "&cs=&ce='>$v</a></li>"; } print $range_menu; ?> @@ -115,12 +116,12 @@ foreach ($context_ranges as $v) { $url=rawurlencode($v); - if ($v == $range) + if ($v == $range) { $checked = "class=\"ui-btn-active\""; - else - $checked = ""; - - $range_menu .= "<li><a href='mobile_helper.php?show_host_metrics=1&h=" . $hostname . "&c=" . $clustername . "&r=" . $v . "&cs=&ce='>$v</a></li>"; + $range_menu .= "<li><a $checked href='#'>$v</a></li>"; + } else { + $range_menu .= "<li><a href='mobile_helper.php?show_host_metrics=1&h=" . $hostname . "&c=" . $clustername . "&r=" . $v . "&cs=&ce='>$v</a></li>"; + } } print $range_menu; ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |