Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a traffic chart to the page element info
- Loading branch information
Doug Youch
committed
Sep 9, 2010
1 parent
05d6003
commit 6ac3072
Showing
5 changed files
with
52 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<% | ||
groups = node.traffic Time.now.at_midnight, 1.day, 1 | ||
group = groups[0] | ||
stats = group.target_stats | ||
if stats.size > 0 | ||
-%> | ||
<div class='tree_detail_secondary_section'> | ||
<div id="real_time_charts"></div> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
function requestRealTimeCharts() { | ||
RealTimeStatsViewer.requestRealTimeCharts(undefined, <%= node.id %>); | ||
} | ||
|
||
if( RealTimeStatsViewer && google ) { | ||
RealTimeStatsViewer.chart.intervals = 6; | ||
RealTimeStatsViewer.chart.range = 60; | ||
google.load("visualization", "1", {packages:["corechart"], callback: requestRealTimeCharts}); | ||
} | ||
</script> | ||
<% end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters