669f02f8b618ef02e710fa14caa36a75912c2407
[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 List"
4 from monitor.util import diff_time
5 from time import mktime
6 from links import *
7 ?>
8 <html py:layout="'sitemenu.kid'"
9       xmlns:py="http://purl.org/kid/ns#"
10           xmlns:mochi="http://www.mochi.org">
11
12   <div py:match="item.tag == 'content'">
13         <table width="100%">
14                 <thead>
15                         <tr>
16                                 <th><a href="${link('node', filter='BOOT')}">Production(${fc['BOOT']})</a></th>
17                                 <th><a href="${link('node', filter='DEBUG')}">Debug(${fc['DEBUG']})</a></th>
18                                 <th><a href="${link('node', filter='DOWN')}">Down(${fc['DOWN']})</a></th>
19                                 <th><a href="${link('node', filter='neverboot')}">Never Booted(${fc['neverboot']})</a></th>
20                                 <th><a href="${link('node', filter='pending')}">Pending Reply(${fc['pending']})</a></th>
21                                 <th><a href="${link('node', filter='all')}">All</a></th>
22                         </tr>
23                 </thead>
24                 <tbody>
25                 <tr>
26                 <td colspan="5">
27                 <table id="sortable_table" class="datagrid" border="1" width="100%">
28                         <thead>
29                                 <tr>
30                                         <th mochi:format="int"></th>
31                                         <th mochi:format="str">Site</th>
32                                         <th>Hostname</th>
33                                         <th>ping</th>
34                                         <!--th>ssh</th-->
35                                         <th>pcu</th>
36                                         <th>status</th>
37                                         <th>kernel</th>
38                                         <th>last_contact</th>
39                                 </tr>
40                         </thead>
41                         <tbody>
42                                 <tr py:for="i,node in enumerate(query)" class="${i%2 and 'odd' or 'even'}" >
43                                         <td></td>
44                                         <td><a href="${link('siteview', loginbase=node.loginbase)}">${node.loginbase}</a></td>
45                                         <td nowrap="true"><a target="_top" href="${link('nodeview', hostname=node.hostname)}" py:content="node.hostname"></a></td>
46                                         <td py:content="node.ping_status"></td>
47                                         <td id="status-${node.pcu_short_status}" py:content="node.pcu_short_status"></td>
48                                         <td py:content="node.observed_status"></td>
49                                         <td nowrap="true" py:content="node.kernel"></td>
50                                         <td py:content="diff_time(node.plc_node_stats['last_contact'])"></td>
51                                 </tr>
52                         </tbody>
53                 </table>
54                 </td>
55                 </tr>
56                 </tbody>
57         </table>
58   </div>
59
60 </html>