basic display of nodes, pcus, and sites.
[monitor.git] / web / MonitorWeb / monitorweb / templates / nodelist.kid
index dc3bf92..5e5dec1 100644 (file)
@@ -1,6 +1,8 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <?python
 layout_params['page_title'] = "Monitor Node View"
+from monitor.util import diff_time
+from time import mktime
 ?>
 <html py:layout="'sitemenu.kid'"
       xmlns:py="http://purl.org/kid/ns#">
@@ -20,12 +22,12 @@ layout_params['page_title'] = "Monitor Node View"
                <tbody>
                <tr>
                <td colspan="5">
-               <table border="1">
+               <table id="sub-table" border="1" width="100%">
                        <thead>
                                <tr>
                                        <th>Hostname</th>
                                        <th>ping</th>
-                                       <th>ssh</th>
+                                       <!--th>ssh</th-->
                                        <th>pcu</th>
                                        <th>status</th>
                                        <th>kernel</th>
@@ -36,11 +38,11 @@ layout_params['page_title'] = "Monitor Node View"
                                <tr py:for="i,node in enumerate(query)" class="${i%2 and 'odd' or 'even'}" >
                                  <td nowrap="true" py:content="node.hostname"></td>
                                  <td py:content="node.ping_status"></td>
-                                 <td py:content="node.ssh_status"></td>
-                                 <td py:content="node.pcu_status"></td>
+                                 <!--td py:content="node.ssh_status"></td-->
+                                 <td id="status-${node.pcu_short_status}" py:content="node.pcu_short_status"></td>
                                  <td py:content="node.observed_status"></td>
                                  <td nowrap="true" py:content="node.kernel"></td>
-                                 <td py:content="node.plc_node_stats['last_contact']"></td>
+                                 <td py:content="diff_time(node.plc_node_stats['last_contact'])"></td>
                                </tr>
                        </tbody>
                </table>