added a variety of updates to templates, to reference each other.
[monitor.git] / web / MonitorWeb / monitorweb / templates / siteview.kid
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <?python
3 layout_params['page_title'] = "Monitor Site View"
4 from monitor.util import diff_time
5 from links import *
6 ?>
7 <html py:layout="'sitemenu.kid'"
8       xmlns:py="http://purl.org/kid/ns#"
9           xmlns:mochi="http://www.mochi.org">
10
11   <div py:match="item.tag == 'content'">
12     <h3>Site Status</h3>
13                 <table id="sub-table" border="1" width="100%">
14                         <thead>
15                                 <tr>
16                                         <th>Site name</th>
17                                         <th>Status</th>
18                                         <th>Enabled</th>
19                                         <th>Slices (created / max)</th>
20                                         <th>Nodes (online / registered)</th>
21                                 </tr>
22                         </thead>
23                         <tbody>
24                                 <tr py:for="i,site in enumerate(sitequery)" class="${i%2 and 'odd' or 'even'}" >
25                                         <td nowrap="true"><a class="ext-link" href="${plc_site_link(site.loginbase)}">
26                                                         <span class="icon">${site.loginbase}</span></a>
27                                         </td>
28                                   <td id="site-${site.status}" py:content="site.last_changed"></td>
29                                   <td py:content="site.enabled"></td>
30                                   <td>${site.slices_used}/${site.slices_total}</td>
31                                   <td>${site.nodes_up} / ${site.nodes_total}</td>
32                                 </tr>
33                         </tbody>
34                 </table>
35     <h3>Node List</h3>
36                 <table id="sortable_table" class="datagrid" border="1" width="100%">
37                         <thead>
38                                 <tr>
39                                         <th mochi:format="int"></th>
40                                         <th>Hostname</th>
41                                         <th>ping</th>
42                                         <!--th>ssh</th-->
43                                         <th>pcu</th>
44                                         <th>kernel</th>
45                                         <th>last_contact</th>
46                                 </tr>
47                         </thead>
48                         <tbody>
49                                 <tr py:for="i,node in enumerate(nodequery)" class="${i%2 and 'odd' or 'even'}" >
50                                         <td></td>
51                                         <td id="node-${node.observed_status}" nowrap="true"><a href="nodeview?hostname=${node.hostname}" py:content="node.hostname">your.host.org</a></td>
52                                         <td py:content="node.ping_status"></td>
53                                         <td py:if="node.pcu_short_status != 'none'" id="status-${node.pcu_short_status}">
54                                                 <a href="pcuview?pcuid=${node.plc_node_stats['pcu_ids']}">${node.pcu_short_status}</a></td>
55                                         <td py:if="node.pcu_short_status == 'none'" id="status-${node.pcu_short_status}">
56                                                 ${node.pcu_short_status}</td>
57                                         <td nowrap="true" py:content="node.kernel"></td>
58                                         <td py:content="diff_time(node.plc_node_stats['last_contact'])"></td>
59                                 </tr>
60                         </tbody>
61                 </table>
62   </div>
63
64 </html>