move nodelist.kid headers into node_template.kid to remove redundancy.
authorStephen Soltesz <soltesz@cs.princeton.edu>
Fri, 18 Dec 2009 21:13:30 +0000 (21:13 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Fri, 18 Dec 2009 21:13:30 +0000 (21:13 +0000)
comment-out the boot/down summary at the top of the nodelist.kid page;  ...

web/MonitorWeb/monitorweb/templates/node_template.kid
web/MonitorWeb/monitorweb/templates/nodelist.kid

index 9ccb471..9e65198 100644 (file)
@@ -6,18 +6,18 @@ from links import *
 ?>
 <span xmlns:py="http://purl.org/kid/ns#">
        <span py:if="header is not None">
-                <th>ID</th>
-               <th>Hostname</th>
-               <th>Site</th>
-                <th>Ping</th>
-                <th>SSH</th>
-                <th>Boot Status</th>
-               <th>pcu</th>
-               <th>kernel</th>
-                <th>BootCD</th>
-                <th>Boot Server</th>
-                <th>Installation Date</th>
-               <th>last_contact</th>
+      <th class="sortable plekit_table">ID</th>
+      <th class="sortable plekit_table">Hostname</th>
+      <th class="sortable plekit_table">Site</th>
+      <th class="sortable plekit_table">Ping</th>
+      <th class="sortable plekit_table">SSH</th>
+      <th class="sortable plekit_table">Stat</th>
+      <th class="sortable plekit_table">pcu</th>
+      <th class="sortable plekit_table">kernel</th>
+      <th class="sortable plekit_table">BootCD</th>
+      <th class="sortable plekit_table">Boot Server</th>
+      <th class="sortable plekit_table">Installation Date</th>
+      <th class="sortable-sortLastContact plekit_table">Last_contact</th>
        </span>
        <span py:if="node is not None">
         <td py:content="node.node.plc_node_stats['node_id']">node_id</td>
index 771d6b4..e5f2043 100644 (file)
@@ -17,8 +17,9 @@ from links import *
   </script>
 
   <center>
-  <b py:content="'UP: %d' % len([agg for agg in query if agg.node.status in ('online', 'good')])"></b> | 
-  <b py:content="'DOWN: %d' % len([agg for agg in query if agg.node.status not in ('online', 'good')])"></b><br/>
+  <!-- NOTE: agg.node is a FindbadNodeRecord not a HistoryNodeRecord, so there is not 'status' attribute -->
+  <!--b py:content="'UP: %d' % len([agg for agg in query if agg.node.status in ('online', 'good')])"></b> | 
+  <b py:content="'DOWN: %d' % len([agg for agg in query if agg.node.status not in ('online', 'good')])"></b><br/-->
   </center>
 
 <table id="nodelist" cellpadding="0" border="0" class="plekit_table sortable-onload-2 colstyle-alt no-arrow paginationcallback-nodelist_paginator max-pages-10 paginate-25">
@@ -49,17 +50,7 @@ from links import *
     </fieldset></div></td></tr>
     
     <tr>
-      <th class="sortable plekit_table">ID</th>
-      <th class="sortable plekit_table">Hostname</th>
-      <th class="sortable plekit_table">Site</th>
-      <th class="sortable plekit_table">Ping</th>
-      <th class="sortable plekit_table">SSH</th>
-      <th class="sortable plekit_table">Stat</th>
-      <th class="sortable plekit_table">pcu</th>
-      <th class="sortable plekit_table">kernel</th>
-      <th class="sortable plekit_table">BootCD</th>
-      <th class="sortable plekit_table">Boot Server</th>
-      <th class="sortable-sortLastContact plekit_table">Last_contact</th>
+      ${nodewidget.display(node=None, header=True)}
   </tr>
   </thead>
   <tbody>