add pcu_name to pcufailed_notice
[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'] = "MyOps Action List"
4 from monitor.util import diff_time
5 from monitor import config
6 from time import mktime
7 from links import *
8
9 def zabbix_event_ack_link(eventid):
10         return "http://" + config.MONITOR_HOSTNAME + "/zabbix/acknow.php?eventid=" + str(eventid)
11
12 ?>
13 <html py:layout="'sitemenu.kid'"
14       xmlns:py="http://purl.org/kid/ns#"
15           xmlns:mochi="http://www.mochi.org">
16
17   <div py:match="item.tag == 'content'">
18         <table width="100%">
19                 <thead>
20                         <tr>
21                                 <th><a href="${link('actionlist', action_type=action_type, since=1)}">Last Day</a></th>
22                                 <th><a href="${link('actionlist', action_type=action_type, since=7)}">Last Week</a></th>
23                                 <th><a href="${link('actionlist', action_type=action_type, since=30)}">Last Month</a></th>
24                         </tr>
25                 </thead>
26                 <tbody>
27                 <tr>
28                 <td colspan="5">
29         <h4>Actions Over the Last ${since} Days</h4>
30                 <p py:if="actions and len(actions) == 0">
31                         There are no recent actions taken for this site.
32                 </p>
33                 <table id="actionlist" cellpadding="0" border="0" class="plekit_table sortable-onload-0 colstyle-alt no-arrow paginationcallback-actionlist_paginator max-pages-10 paginate-50" py:if="actions and len(actions) > 0">
34                 <!--table py:if="actions and len(actions) > 0" id="sortable_table" class="datagrid" border="1" width="100%"-->
35                         <thead>
36                                 <tr>
37                                         <th class="sortable plekit_table">Date</th>
38                                         <th class="sortable plekit_table">Action taken on</th>
39                                         <th class="sortable plekit_table">Action Type</th>
40                                         <th class="sortable plekit_table">Message ID</th>
41                                         <th class="sortable plekit_table">Errors</th>
42                                 </tr>
43                         </thead>
44                         <tbody>
45                                 <tr py:for="i,act in enumerate(actions)" class="${i%2 and 'odd' or 'even'}" >
46                                         <td py:content="act.date_created"></td>
47                                         <td py:if="act.hostname is not None" nowrap="true" >
48                                                 <a class="ext-link" href="${plc_node_uri(act.hostname)}">
49                                                         <span class="icon">${act.hostname}</span></a>
50                                         </td>
51                                         <td py:if="act.hostname is None" nowrap="true">
52                                                 <a class="ext-link" href="${plc_site_uri(act.loginbase)}">
53                                                         <span class="icon">${act.loginbase}</span></a>
54                                         </td>
55                                         <!--td py : content="diff_time(mktime(node.date_checked.timetuple()))"></td-->
56                                         <td py:content="act.action_type"></td>
57                                         <td><a class="ext-link" href="${plc_mail_uri(act.message_id)}">
58                                                         <span py:if="act.message_id != 0" class="icon">${act.message_id}</span></a></td>
59                                         <td py:if="'bootmanager' in act.action_type or 'unknown' in act.action_type">
60                                                 <a href="/monitorlog/bm.${act.hostname}.log">bm log before action</a>
61                                         </td>
62                                         <td py:if="'bootmanager' not in act.action_type">
63                                                 <pre py:content="act.error_string"></pre></td>
64                                 </tr>
65                         </tbody>
66                 </table>
67
68                 </td>
69                 </tr>
70                 </tbody>
71         </table>
72   </div>
73
74 </html>