8dfb823ca19cbb0cccec5db1a058efa91594ce32
[monitor.git] / web / MonitorWeb / monitorweb / templates / sitehistory.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 Site History"
4 from monitor.util import diff_time
5 from time import mktime
6 from links import *
7 ?>
8 <html py:layout="'sitemenu.kid'"
9       xmlns:py="http://purl.org/kid/ns#"
10           xmlns:mochi="http://www.mochi.org">
11
12   <div py:match="item.tag == 'content'">
13         <h3>Site History : ${loginbase}</h3>
14         <table width="100%">
15                 <tbody>
16                 <tr>
17                 <td>
18                 <table id="sortable_table" class="datagrid" border="1" width="100%">
19                         <thead>
20                                 <tr>
21                                         <th mochi:format="int"></th>
22                                         <th>Site name</th>
23                                         <th>Enabled</th>
24                                         <th>Penalty</th>
25                                         <th mochi:format="int">Slices/Max</th>
26                                         <th mochi:format="int">Nodes/Total</th>
27                                         <th>Date Checked</th>
28                                 </tr>
29                         </thead>
30                         <tbody>
31                                 <tr py:for="i,site in enumerate(query)">
32                                         <td></td>
33                                         <td nowrap="true">
34                                                 <div class='oneline'>
35                                                 <a class='left' href="${link('pcuview', loginbase=site.loginbase)}">${site.loginbase}</a>
36                                                 <a class='right' href="${plc_site_uri_id(site.plc_siteid)}">
37                                                         <img style='display: inline' border='0' src="static/images/extlink.gif" align='right'/></a>
38                                                 </div>
39                                         </td>
40                                         <td py:content="site.enabled"></td>
41                                         <td id="site-${site.penalty_level}">${site.penalty_level}</td>
42                                         <td>${site.slices_used}/${site.slices_total}</td>
43                                         <td>${site.nodes_up} / ${site.nodes_total}</td>
44                                         <td id="site-${site.status}" py:content="diff_time(mktime(site.last_changed.timetuple()))"></td>
45                                         <td py:content="site.timestamp"></td>
46                                 </tr>
47                         </tbody>
48                 </table>
49                 </td>
50                 </tr>
51                 </tbody>
52         </table>
53   </div>
54
55 </html>