- no alternate colors for tables
[monitor.git] / web / MonitorWeb / monitorweb / templates / node_template.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 from monitor.util import diff_time
4 from time import mktime
5 from links import *
6 ?>
7 <span xmlns:py="http://purl.org/kid/ns#">
8         <span py:if="header is not None">
9                 <th>Site</th>
10                 <th>Ping</th>
11                 <th>SSH</th>
12                 <th>Boot Status</th>
13                 <th>pcu</th>
14                 <th>Hostname</th>
15                 <th>ID</th>
16                 <th>kernel</th>
17                 <th>last_contact</th>
18         </span>
19         <span py:if="node is not None">
20                 <td id="site-${node.site.status}">
21                         <a href="${link('pcuview', loginbase=node.loginbase)}">${node.loginbase}</a>
22                 </td>
23                 <td py:content="node.ping_status">ping</td>
24                 <td py:content="node.ssh_status">ssh</td>
25                 <td py:content="node.plc_node_stats['boot_state']">boot</td>
26                 <td width="20%" nowrap='true' align='center' id="status-${node.pcu_short_status}">
27                         <div id="links">
28                                 <a class="info" py:if="'error' in node.pcu_short_status" 
29                                         href="${link('pcuview', pcuid=node.plc_pcuid)}">
30                                         Error<span><pre>${node.pcu.reboot_trial_status}</pre></span></a>
31                                 <a py:if="'error' not in node.pcu_short_status and 'none' not in node.pcu_short_status" 
32                                         href="${link('pcuview', pcuid=node.plc_pcuid)}"
33                                         py:content="node.pcu_short_status">Reboot Status</a>
34                                 <span py:if="'none' in node.pcu_short_status" 
35                                         py:content="node.pcu_short_status">Reboot Status</span>
36                         </div>
37                 </td>
38                 <td id="node-${node.observed_status}" nowrap="true">
39                         <a target="_top" href="${link('pcuview', hostname=node.hostname)}" py:content="node.hostname">your.host.org</a></td>
40                 <td py:content="node.plc_node_stats['node_id']">node_id</td>
41                 <td nowrap="true" py:content="node.kernel"></td>
42                 <td py:content="diff_time(node.plc_node_stats['last_contact'])"></td>
43         </span>
44 </span>