added actionlist_template to display action list consistently on different pages
[monitor.git] / web / MonitorWeb / monitorweb / templates / actionlist_template.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 from monitor.util import diff_time
4 from time import mktime
5 from links import *
6 ?>
7 <span xmlns:py="http://purl.org/kid/ns#"
8           xmlns:mochi="http://www.mochi.org">
9         <h4>Actions Over the Last ${since} Days</h4>
10                 <p py:if="actions and len(actions) == 0">
11                         There are no recent actions taken for this site.
12                 </p>
13                 <table py:if="actions and len(actions) > 0" id="sortable_table" class="datagrid" border="1" width="100%">
14                         <thead>
15                                 <tr>
16                                         <th mochi:format="int"></th>
17                                         <th>At</th>
18                                         <th>MyOps acted on</th>
19                                         <th>Using</th>
20                                         <th>Message/Log</th>
21                                         <th>Errors</th>
22                                 </tr>
23                         </thead>
24                         <tbody>
25                                 <tr py:for="i,act in enumerate(actions)" class="${i%2 and 'odd' or 'even'}" >
26                                         <td></td>
27                                         <td py:content="act.date_created"></td>
28                                         <td py:if="act.hostname is not None" nowrap="true" >
29                                                 <a class="ext-link" href="${plc_node_uri(act.hostname)}">
30                                                         <span class="icon">${act.hostname}</span></a>
31                                         </td>
32                                         <td py:if="act.hostname is None" nowrap="true">
33                                                 <a class="ext-link" href="${plc_site_uri(act.loginbase)}">
34                                                         <span class="icon">${act.loginbase}</span></a>
35                                         </td>
36                                         <td py:content="act.action_type"></td>
37
38                                         <td>
39                                                 <span py:if="act.message_id != 0">
40                                                         <a class="ext-link" href="${plc_mail_uri(act.message_id)}">
41                                                         <span  class="icon">${act.message_id}</span></a>
42                                                 </span>
43                                                 <span py:if="act.message_id == 0 and act.log_path is not None">
44                                                         <a class="ext-link" href="/monitorlog/${act.log_path}">
45                                                         <span  class="icon">orig bm log</span></a>
46                                                 </span>
47                                         </td>
48                                         <!--td py:if="'bootmanager' in act.action_type or 'unknown' in act.action_type">
49                                                 <a href="/monitorlog/bm.${act.hostname}.log">latest bm log</a>
50                                         </td-->
51
52                                         <td py:if="act.error_string">
53                                                 <div id="links">
54                                                 <a class="info" href="#">Stack Trace<span>
55                                                         <pre>${act.error_string}</pre>
56                                                 </span>
57                                                 </a>
58                                                 </div>
59                                         </td>
60                                 </tr>
61                         </tbody>
62                 </table>
63 </span>