set default pagesize on all views to 999
[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-999" 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                                                 <a href="${link('detailview', hostname=act.hostname)}">${act.hostname}</a>
51                                         </td>
52                                         <td py:if="act.hostname is None" nowrap="true">
53                                                 <a class="ext-link" href="${link('detailview', loginbase=act.loginbase)}">
54                                                         ${act.loginbase}</a>
55                                         </td>
56                                         <!--td py : content="diff_time(mktime(node.date_checked.timetuple()))"></td-->
57                                         <td py:content="act.action_type"></td>
58                                         <td><a class="ext-link" href="${plc_mail_uri(act.message_id)}">
59                                                         <span py:if="act.message_id != 0" class="icon">${act.message_id}</span></a></td>
60                                         <td py:if="'bootmanager' in act.action_type or 'unknown' in act.action_type">
61                                                 <a href="/monitorlog/bm.${act.hostname}.log">bm log before action</a>
62                                         </td>
63                                         <td py:if="'bootmanager' not in act.action_type">
64                                                 <pre py:content="act.error_string"></pre></td>
65                                 </tr>
66                         </tbody>
67                 </table>
68
69                 </td>
70                 </tr>
71                 </tbody>
72         </table>
73   </div>
74
75 </html>