Permalink
Browse files

Merge pull request #93 from pcpiela/master

Fix aggregate graph creation
  • Loading branch information...
2 parents 79c7662 + 0e54245 commit 45e425ba80fb0ff7def4b9b0e108db847aeee0e0 @vvuksan vvuksan committed Dec 13, 2011
Showing with 14 additions and 14 deletions.
  1. +14 −14 ganglia-web/aggregate_graphs.php
@@ -8,6 +8,20 @@
}
</style>
<script>
+ function createAggregateGraph() {
+ if ($('#hreg').val() == "" || $('#metric_chooser').val() == "") {
+ alert("Host regular expression and metric name can't be blank");
+ return false;
+ }
+ var params = $("#aggregate_graph_form").serialize() + "&aggregate=1";
+ $("#show_direct_link").html("<a href='graph_all_periods.php?" + params + "'>Direct Link to this aggregate graph</a>");
+ $("#aggregate_graph_display").html('<img src="img/spinner.gif">');
+ $.get('graph_all_periods.php', params + "&embed=1" , function(data) {
+ $("#aggregate_graph_display").html(data);
+ });
+ return false;
+ }
+
$(function() {
$( ".ag_buttons" ).button();
@@ -77,20 +91,6 @@ function restoreAggregateGraph() {
return false;
}
- function createAggregateGraph() {
- if ($('#hreg').val() == "" || $('#metric_chooser').val() == "") {
- alert("Host regular expression and metric name can't be blank");
- return false;
- }
- var params = $("#aggregate_graph_form").serialize() + "&aggregate=1";
- $("#show_direct_link").html("<a href='graph_all_periods.php?" + params + "'>Direct Link to this aggregate graph</a>");
- $("#aggregate_graph_display").html('<img src="img/spinner.gif">');
- $.get('graph_all_periods.php', params + "&embed=1" , function(data) {
- $("#aggregate_graph_display").html(data);
- });
- return false;
- }
-
$( "#metric_chooser" ).autocomplete({
source: availablemetrics,
change: function(event, ui) {

0 comments on commit 45e425b

Please sign in to comment.