added action list, for any current acknowledged problems, as well as un-acknowledged...
[monitor.git] / web / MonitorWeb / monitorweb / templates / actionlist.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 layout_params['page_title'] = "Monitor Node View"
4 from monitor.util import diff_time
5 from monitor import config
6 from time import mktime
7
8 def zabbix_event_ack_link(eventid):
9         return "http://" + config.MONITOR_HOSTNAME + "/zabbix/acknow.php?eventid=" + str(eventid)
10
11 ?>
12 <html py:layout="'sitemenu.kid'"
13       xmlns:py="http://purl.org/kid/ns#"
14           xmlns:mochi="http://www.mochi.org">
15
16   <div py:match="item.tag == 'content'">
17         <table width="100%">
18                 <thead>
19                         <tr>
20                                 <th></th>
21                                 <th><a href="${tg.url('action', filter='active')}">Not Acknowledged(${fc['active']})</a></th>
22                                 <th><a href="${tg.url('action', filter='acknowledged')}">Acknowledged(${fc['acknowledged']})</a></th>
23                                 <th><a href="${tg.url('action', filter='all')}">All(${fc['all']})</a></th>
24                         </tr>
25                 </thead>
26                 <tbody>
27                 <tr>
28                 <td colspan="5">
29                 <table id="sortable_table" class="datagrid" border="1" width="100%">
30                         <thead>
31                                 <tr>
32                                         <th mochi:format="int"></th>
33                                         <th mochi:format="str">Site</th>
34                                         <th>Hostname</th>
35                                         <th>Issue (severity)</th>
36                                         <th>Last change</th>
37                                         <th>Notes (acknowledged)</th>
38                                 </tr>
39                         </thead>
40                         <tbody>
41                                 <tr py:for="i,node in enumerate(query)" class="${i%2 and 'odd' or 'even'}" >
42                                         <td></td>
43                                         <td><a href="siteview?loginbase=${node[0]}">${node[0]}</a></td>
44                                         <td nowrap="true" py:content="node[1]"></td>
45                                         <td nowrap='true' id="severity-${node[3]}" py:content="node[2]"></td>
46                                         <td nowrap='true' py:content="diff_time(int(node[4]))"></td>
47                                         <?python
48                                                 try:
49                                                         int(node[5])
50                                                         val = True
51                                                 except:
52                                                         val = False
53                                         ?>
54                                         <!-- NOTE: only one of the next two columns will be displayed. -->
55                                         <td py:if="val"><a href="${zabbix_event_ack_link(node[5])}">Provide Ack</a></td>
56                                         <td py:if="not val" py:content="node[5]">Message from user</td>
57                                 </tr>
58                         </tbody>
59                 </table>
60                 </td>
61                 </tr>
62                 </tbody>
63         </table>
64   </div>
65
66 </html>