bug fix in summary template
[monitor.git] / web / MonitorWeb / monitorweb / templates / summary.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 Summary"
4 from monitor.util import diff_time
5 from monitor import config
6 from time import mktime
7 from links import *
8 ?>
9 <html 
10       xmlns:py="http://purl.org/kid/ns#"
11           xmlns:mochi="http://www.mochi.org">
12
13   <?python orig=True ?>
14         <table>
15                 <tbody>
16                 <span py:for="primarykey in ['sites', 'nodes', 'pcus']">
17                         <tr>
18                         <td width="50" rowspan="2">${primarykey.capitalize()}</td>
19                                 <span py:for="i,key in enumerate(setorder + [s for s in set(sumdata[primarykey].keys())-set(setorder)]) ">
20                                         <th valign="top" py:if="orig and i&lt;4" py:content="key.capitalize()"></th>
21                                         <th valign="top" py:if="orig and i&gt;3" py:content="key.capitalize()"></th>
22                                         <th valign="top" py:if="not orig and i&gt;3" py:content="key.capitalize()"></th>
23                                         <th valign="top" py:if="not orig and i&lt;4" py:content=""></th>
24                                 </span>
25                         </tr>
26                         <?python orig=False ?>
27                         <tr>
28                                 <span py:for="key in setorder + [s for s in set(sumdata[primarykey].keys())-set(setorder)]">
29                                         <td bgcolor="lightgrey" valign="top" align="center">
30                                                 <a target="_blank" href="${link(plc_myops_uri() + '/monitor/node2', filter=key)}" py:if="primarykey == 'nodes'" py:content="sumdata[primarykey][key]"></a>
31                                                 <div py:if="primarykey != 'nodes' and key in sumdata[primarykey]" py:content="sumdata[primarykey][key]"></div>
32                                                 </td>
33                                 </span>
34                         </tr>
35                 </span>
36                 </tbody>
37         </table>
38 <div py:match="item.tag == 'content'">
39 </div>
40
41 </html>