Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lgnd_xh parameter to aggregate graphs form #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions aggregate_graphs.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ function createAggregateGraph() {
$( "#glshow" ).checkboxradio( { icon: false } );
$( "#glhide" ).checkboxradio( { icon: false } );
$( "#graph_legend_menu" ).controlgroup();
$( "#glhostshow" ).checkboxradio( { icon: false } );
$( "#glhosthide" ).checkboxradio( { icon: false } );
$( "#graph_lgnd_xh_menu" ).controlgroup();

$("#hreg").change(function() {
$.cookie("ganglia-aggregate-graph-hreg" + window.name,
Expand Down Expand Up @@ -82,6 +85,11 @@ function createAggregateGraph() {
$.cookie("ganglia-aggregate-graph-glegend" + window.name, glegend);
});

$("#aggregate_graph_table_form input[name=lgnd_xh]").change(function() {
var lgnd_xh = $("#aggregate_graph_table_form input[name=lgnd_xh]:checked").val();
$.cookie("ganglia-aggregate-graph-lgnd_xh" + window.name, lgnd_xh);
});

function restoreAggregateGraph() {
var hreg = $.cookie("ganglia-aggregate-graph-hreg" + window.name);
if (hreg != null)
Expand All @@ -105,6 +113,14 @@ function restoreAggregateGraph() {
$("#glhide").click();
}

var lgnd_xh = $.cookie("ganglia-aggregate-graph-lgnd_xh" + window.name);
if (lgnd_xh != null) {
if (lgnd_xh == "false")
$("#glhostshow").click();
else
$("#glhosthide").click();
}

var mreg = $.cookie("ganglia-aggregate-graph-metric" + window.name);
if (mreg != null) {
var metric_chooser = $("#aggregate_graph_metric_chooser");
Expand Down Expand Up @@ -225,6 +241,8 @@ function restoreAggregateGraph() {
<td>Legend options:</td><td>
<div id="graph_legend_menu"><input type="radio" name="glegend" id="glshow" value="show" checked /><label for="glshow">Show legend</label>
<input type="radio" name="glegend" id="glhide" value="hide" /><label for="glhide">Hide legend</label></div>
<div id="graph_lgnd_xh_menu"><input type="radio" name="lgnd_xh" id="glhostshow" value="false" /><label for="glhostshow">Show hostnames</label>
<input type="radio" name="lgnd_xh" id="glhosthide" value="true" checked /><label for="glhosthide">Hide hostnames</label></div>
</td>
</tr>
<tr>
Expand Down