1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 layout_params['page_title'] = "Monitor Node View"
4 from monitor.util import diff_time
5 from time import mktime
6 from pcucontrol.reboot import pcu_name, model_to_object
9 <html py:layout="'sitemenu.kid'"
10 xmlns:py="http://purl.org/kid/ns#"
11 xmlns:mochi="http://www.mochi.org">
13 <div py:match="item.tag == 'content'">
15 <table id="sortable_table" class="datagrid" border="1" width="100%">
18 <th mochi:format="int"></th>
19 <th mochi:format="str">Site</th>
29 <tr py:for="i,node in enumerate(nodequery)" class="${i%2 and 'odd' or 'even'}" >
31 <td><a class="ext-link" href="${plc_site_uri_id(node.plc_node_stats['site_id'])}">
32 <span class="icon">${node.loginbase}</span></a>
34 <td id="node-${node.observed_status}" nowrap="true" >
35 <a class="ext-link" href="${plc_node_uri(node.hostname)}">
36 <span class="icon">${node.hostname}</span></a>
38 <td py:content="node.ping_status"></td>
39 <td nowrap="true" py:content="node.kernel"></td>
40 <td py:content="diff_time(mktime(node.history.last_changed.timetuple()))"></td>
41 <td py:content="diff_time(node.plc_node_stats['last_contact'])"></td>
45 <h3 py:if="node.pcu is not None">Controlling PCU</h3>
46 <table py:if="node.pcu is not None" id="sortable_table" class="datagrid" border="1" width="100%">
49 <th mochi:format="int"></th>
52 <th width="80%">Test Results</th>
56 <?python pcu = node.pcu ?>
60 <a class="ext-link" href="${plc_pcu_uri_id(pcu.plc_pcu_stats['pcu_id'])}">
61 <span class="icon">${pcu_name(pcu.plc_pcu_stats)}</span>
64 <td py:content="pcu.plc_pcu_stats['model']"></td>
65 <td width="20%" nowrap='true' align='center' id="status-${node.pcu_short_status}">
67 <a class="info" py:if="'error' in node.pcu_short_status"
68 href="${link('pcuview', pcuid=node.plc_pcuid)}">
69 Error<span><pre>${node.pcu.reboot_trial_status}</pre></span></a>
70 <a py:if="'error' not in node.pcu_short_status and 'none' not in node.pcu_short_status"
71 href="${link('pcuview', pcuid=node.plc_pcuid)}"
72 py:content="node.pcu_short_status">Reboot Status</a>
73 <span py:if="'none' in node.pcu_short_status"
74 py:content="node.pcu_short_status">Reboot Status</span>
80 <h3>Actions Taken</h3>