basic display of nodes, pcus, and sites.
[monitor.git] / web / MonitorWeb / monitorweb / templates / nodelist.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 Node View"
4 from monitor.util import diff_time
5 from time import mktime
6 ?>
7 <html py:layout="'sitemenu.kid'"
8       xmlns:py="http://purl.org/kid/ns#">
9
10   <div py:match="item.tag == 'content'">
11         <table width="100%">
12                 <thead>
13                         <tr>
14                                 <th><a href="${tg.url('node', filter='BOOT')}">Production(${fc['BOOT']})</a></th>
15                                 <th><a href="${tg.url('node', filter='DEBUG')}">Debug(${fc['DEBUG']})</a></th>
16                                 <th><a href="${tg.url('node', filter='DOWN')}">Down(${fc['DOWN']})</a></th>
17                                 <th><a href="${tg.url('node', filter='neverboot')}">Never Booted(${fc['neverboot']})</a></th>
18                                 <th><a href="${tg.url('node', filter='pending')}">Pending Reply(${fc['pending']})</a></th>
19                                 <th><a href="${tg.url('node', filter='all')}">All</a></th>
20                         </tr>
21                 </thead>
22                 <tbody>
23                 <tr>
24                 <td colspan="5">
25                 <table id="sub-table" border="1" width="100%">
26                         <thead>
27                                 <tr>
28                                         <th>Hostname</th>
29                                         <th>ping</th>
30                                         <!--th>ssh</th-->
31                                         <th>pcu</th>
32                                         <th>status</th>
33                                         <th>kernel</th>
34                                         <th>last_contact</th>
35                                 </tr>
36                         </thead>
37                         <tbody>
38                                 <tr py:for="i,node in enumerate(query)" class="${i%2 and 'odd' or 'even'}" >
39                                   <td nowrap="true" py:content="node.hostname"></td>
40                                   <td py:content="node.ping_status"></td>
41                                   <!--td py:content="node.ssh_status"></td-->
42                                   <td id="status-${node.pcu_short_status}" py:content="node.pcu_short_status"></td>
43                                   <td py:content="node.observed_status"></td>
44                                   <td nowrap="true" py:content="node.kernel"></td>
45                                   <td py:content="diff_time(node.plc_node_stats['last_contact'])"></td>
46                                 </tr>
47                         </tbody>
48                 </table>
49                 </td>
50                 </tr>
51                 </tbody>
52         </table>
53   </div>
54
55 </html>