add plain-text versions of the query output and nodelist as a test
Stephen Soltesz [Fri, 28 Aug 2009 21:56:47 +0000 (21:56 +0000)]
removed inter-site link on actionlist
report all errors by moving bmlog link to 'message' column in detailview

web/MonitorWeb/monitorweb/templates/actionlist.kid
web/MonitorWeb/monitorweb/templates/detailview.kid
web/MonitorWeb/monitorweb/templates/nodelist_plain.tmpl [new file with mode: 0644]
web/MonitorWeb/monitorweb/templates/query_plain.tmpl [new file with mode: 0644]

index b1cd26b..caf993a 100644 (file)
@@ -45,8 +45,9 @@ def zabbix_event_ack_link(eventid):
                                <tr py:for="i,act in enumerate(actions)" class="${i%2 and 'odd' or 'even'}" >
                                        <td py:content="act.date_created"></td>
                                        <td py:if="act.hostname is not None" nowrap="true" >
-                                               <a class="ext-link" href="${plc_node_uri(act.hostname)}">
-                                                       <span class="icon">${act.hostname}</span></a>
+                                               <!--a class="ext-link" href="${plc_node_uri(act.hostname)}">
+                                                       <span class="icon">${act.hostname}</span></a-->
+                                               <a href="${link('detailview', hostname=act.hostname)}">${act.hostname}</a>
                                        </td>
                                        <td py:if="act.hostname is None" nowrap="true">
                                                <a class="ext-link" href="${plc_site_uri(act.loginbase)}">
index e86bbb1..ec7b131 100644 (file)
@@ -226,13 +226,15 @@ from links import *
                                        </td>
                                        <!--td py : content="diff_time(mktime(node.date_checked.timetuple()))"></td-->
                                        <td py:content="act.action_type"></td>
-                                       <td><a class="ext-link" href="${plc_mail_uri(act.message_id)}">
-                                                       <span py:if="act.message_id != 0" class="icon">${act.message_id}</span></a></td>
-                                       <td py:if="'bootmanager' in act.action_type or 'unknown' in act.action_type">
-                                               <a href="/monitorlog/bm.${act.hostname}.log">latest bm log</a>
+                                       <td>
+                                               <span py:if="act.message_id != 0">
+                                                       <a class="ext-link" href="${plc_mail_uri(act.message_id)}"><span class="icon">${act.message_id}</span></a>
+                                               </span>
+                                               <span py:if="act.message_id == 0">
+                                                       <a py:if="'bootmanager' in act.action_type or 'unknown' in act.action_type" href="/monitorlog/bm.${act.hostname}.log">latest bm log</a>
+                                               </span>
                                        </td>
-                                       <td py:if="'bootmanager' not in act.action_type">
-                                               <pre py:content="act.error_string"></pre></td>
+                                       <td><pre py:content="act.error_string"></pre></td>
                                </tr>
                        </tbody>
                </table>
diff --git a/web/MonitorWeb/monitorweb/templates/nodelist_plain.tmpl b/web/MonitorWeb/monitorweb/templates/nodelist_plain.tmpl
new file mode 100644 (file)
index 0000000..24bfad9
--- /dev/null
@@ -0,0 +1,3 @@
+#for node in $query
+$node.node.hostname,$node.node.loginbase,$node.node.observed_status,$node.kernel,$node.node.plc_node_stats['last_contact']
+#end for
diff --git a/web/MonitorWeb/monitorweb/templates/query_plain.tmpl b/web/MonitorWeb/monitorweb/templates/query_plain.tmpl
new file mode 100644 (file)
index 0000000..2a24918
--- /dev/null
@@ -0,0 +1,10 @@
+#for key in sorted($fields.keys())
+$key,#slurp
+#end for
+
+#for row in $query
+  #for key in sorted($fields.keys())
+$row[$key],#slurp
+  #end for
+
+#end for