add a view for pcu history.
[monitor.git] / web / MonitorWeb / monitorweb / templates / nodehistory.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         <h3>Node History : ${hostname}</h3>
14         <table width="100%">
15                 <tbody>
16                 <tr>
17                 <td>
18                 <table id="sortable_table" class="datagrid" border="1" width="100%">
19                         <thead>
20                                 <tr>
21                                         <th mochi:format="int"></th>
22                                         <!--th>Site</th>
23                                         <th>pcu</th-->
24                                         <th>date</th>
25                                         <th>hostname</th>
26                                         <th>last_contact</th>
27                                 </tr>
28                         </thead>
29                         <tbody>
30                                 <tr py:for="i,node in enumerate(query)" class="${i%2 and 'odd' or 'even'}" >
31                                         <td></td>
32                                         <!--td id="site-${node.site.status}">
33                                                 <a href="${link('pcuview', loginbase=node.loginbase)}">${node.loginbase}</a>
34                                         </td>
35                                         <td width="20%" nowrap='true' align='center' id="status-${node.pcu_short_status}">
36                                                 <div id="links">
37                                                         <a class="info" py:if="'error' in node.pcu_short_status" 
38                                                                 href="${link('pcuview', pcuid=node.plc_pcuid)}">
39                                                         Error<span><pre>${node.pcu.reboot_trial_status}</pre></span></a>
40                                                         <a py:if="'error' not in node.pcu_short_status and 'none' not in node.pcu_short_status" 
41                                                                 href="${link('pcuview', pcuid=node.plc_pcuid)}"
42                                                                 py:content="node.pcu_short_status">Reboot Status</a>
43                                                         <span py:if="'none' in node.pcu_short_status" 
44                                                                 py:content="node.pcu_short_status">Reboot Status</span>
45                                                 </div>
46                                         </td-->
47                                         <!--td id="node-${node.observed_status}" nowrap="true">
48                                                 <a target="_top" href="${link('pcuview', hostname=node.hostname)}" py:content="node.hostname">your.host.org</a></td-->
49                                         <!--td nowrap="true" py:content="node.kernel"></td-->
50                                         <!--td py:content="node.date_checked"></td-->
51                                         <td py:content="node.last_checked"></td>
52                                         <td nowrap="true">
53                                                 <a target="_top" href="${link('pcuview', hostname=node.hostname)}" py:content="node.hostname">your.host.org</a></td>
54                                         <td id="node-${node.status}" py:content="node.status"></td>
55                                 </tr>
56                         </tbody>
57                 </table>
58                 </td>
59                 </tr>
60                 </tbody>
61         </table>
62   </div>
63
64 </html>