[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r14966 - in gauger: . css
From: |
gnunet |
Subject: |
[GNUnet-SVN] r14966 - in gauger: . css |
Date: |
Tue, 12 Apr 2011 17:05:19 +0200 |
Author: bartpolot
Date: 2011-04-12 17:05:19 +0200 (Tue, 12 Apr 2011)
New Revision: 14966
Modified:
gauger/css/style.css
gauger/template.php
gauger/template_graph.php
Log:
Added selector of hosts plotted in metric view
Modified: gauger/css/style.css
===================================================================
--- gauger/css/style.css 2011-04-12 14:02:01 UTC (rev 14965)
+++ gauger/css/style.css 2011-04-12 15:05:19 UTC (rev 14966)
@@ -333,6 +333,16 @@
top: 2px;
}
+.host_selector {
+ text-align: left;
+}
+
+.host_selector ul {
+ padding-left: 6px;
+ margin: 0px;
+ list-style-type: none;
+}
+
.footer-shadow {
height: 50px;
background-image: url("images/f.png");
Modified: gauger/template.php
===================================================================
--- gauger/template.php 2011-04-12 14:02:01 UTC (rev 14965)
+++ gauger/template.php 2011-04-12 15:05:19 UTC (rev 14966)
@@ -361,6 +361,28 @@
$(this).parents(".metric").find("img").attr("src",
"images/expand.png");
}
});
+ $(".plot-all-hosts").click(function(){
+ $(this).parents("td").find(".plot-host").attr('checked',
true);
+ $(this).parents("tr").find(".plot").each(function() {
+ this.src = this.src.replace(/&h=[^&]+/g, '');
+ });
+ });
+ $(".plot-no-hosts").click(function(){
+ $(this).parents("td").find(".plot-host").attr('checked',
false);
+ });
+ $(".plot-host").click(function(){
+ var hosts = "";
+ var sep = "";
+ var links =
$(".plot-host:checked").parents("li").find("a").get();
+ for(i in links) {
+ host = "" + links[i];
+ hosts += sep + host.replace(/.*host=([^&]+).*/g, "$1");
+ sep = ",";
+ }
+ $(this).parents("tr").find(".plot").each(function() {
+ this.src = this.src.replace(/&h=[^&]+/g,
'')+"&h="+hosts;
+ });
+ });
});
function get_command(element) {
Modified: gauger/template_graph.php
===================================================================
--- gauger/template_graph.php 2011-04-12 14:02:01 UTC (rev 14965)
+++ gauger/template_graph.php 2011-04-12 15:05:19 UTC (rev 14966)
@@ -24,6 +24,7 @@
<tr>
<th class="control-column">Controls</th>
<th>Graph</th>
+ <th>Hosts</th>
</tr>
<tr>
<th class="control-column">
@@ -43,18 +44,29 @@
<input class="auto_max" type="checkbox" <?php
if(get_session('x_max_a')) echo 'checked="checked"'?>/>
</div>
</div>
- <br/>
- <?php foreach ($hosts as $host => $counters): ?>
- <?php if(array_search($currentg, $counters) !== FALSE): ?>
- <a href="?host=<?php echo $host ?>">See <?php echo $host ?></a><br
/>
- <?php endif; ?>
- <?php endforeach; ?>
<br/><br/>
<span>Normalize<input type="checkbox" id="norm"/></span>
<br/><br/>
<a href="#" onclick="get_command(this); return false;" >Get
Source</a>
</th>
<td height="<?php echo get_session('png_y_size')+2 ?>" width="<?php
echo get_session('png_x_size')+2 ?>"><img class="plot" src="plot.php?g=<?php
echo $currentg ?>" alt="loading..."/></td>
+ <td class="host_selector">
+ <ul>
+ <?php foreach ($hosts as $host => $counters): ?>
+ <?php if(array_search($currentg, $counters) !== FALSE): ?>
+ <li>
+ <input type="checkbox" class="plot-host" checked="true"/>
+ <a href="?host=<?php echo $host ?>"><?php echo $host ?></a>
+ <br />
+ </li>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ <li>
+ <input type="button" class="plot-all-hosts" value="All"/>
+ <input type="button" class="plot-no-hosts" value="None"/>
+ </li>
+ </ul>
+ </td>
</tr>
</table>
<?php else: ?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r14966 - in gauger: . css,
gnunet <=