modified *list templates with abreviated information
[monitor.git] / web / MonitorWeb / monitorweb / templates / pculist.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'] = "Monitor PCU List"
4 from pcucontrol.reboot import pcu_name, model_to_object
5 from monitor import config
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         <table id="sub-table" width="100%">
14                 <thead>
15                         <tr>
16                                 <th><a href="${link('pcu', filter='ok')}">Ok(${fc['ok']})</a></th>
17                                 <th><a href="${link('pcu', filter='Not_Run')}">Misconfigured(${fc['Not_Run']})</a></th>
18                                 <th><a href="${link('pcu', filter='NetDown')}">Offline(${fc['NetDown']})</a></th>
19                                 <th><a href="${link('pcu', filter='pending')}">Runtime Error(${fc['pending']})</a></th>
20                                 <th><a href="${link('pcu', filter='all')}">All</a></th>
21                         </tr>
22                 </thead>
23                 <tbody>
24                 <tr>
25                 <td colspan="5">
26                 <table id="sortable_table" class="datagrid" border="1" width="100%">
27                         <thead>
28                                 <tr>
29                                         <th mochi:format="int"></th>
30                                         <th mochi:format="str">Site</th>
31                                         <th>PCU Name</th>
32                                         <th>Config</th>
33                                         <th nowrap='true' >Port Status</th>
34                                         <th nowrap='true' width="80%">Test Results</th>
35                                         <th>Model</th>
36                                         <th>Nodes</th>
37                                 </tr>
38                         </thead>
39                         <tbody>
40                                 <tr py:for="i,node in enumerate(query)" class="${i%2 and 'odd' or 'even'}" >
41                                         <td></td>
42                                         <td nowrap='true'>
43                                                 <div class='oneline'>
44                                                 <a class='left' href="${link('pcuview', loginbase=node.loginbase)}">${node.loginbase}</a>
45                                                 <a class='right' href="${plc_site_uri(node.loginbase)}">
46                                                         <img style='display: inline' border='0' src="static/images/extlink.gif" align='right'/></a>
47                                                 </div>
48                                         </td>
49                                         <td nowrap='true'>
50                                                 <div class='oneline'>
51                                                 <a class='left' href="${link('pcuview', pcuid=node.plc_pcuid)}">${pcu_name(node.plc_pcu_stats)}</a>
52                                                 <a class='right' href="${plc_pcu_uri_id(node.plc_pcu_stats['pcu_id'])}">
53                                                         <img style='display: inline' border='0' src="static/images/extlink.gif" align='right'/></a>
54                                                 </div>
55                                         </td>
56                                         <td py:content="node.entry_complete_str"></td>
57                                         <td nowrap='true'>
58                                                 <span py:for="port,state in node.ports" 
59                                                 id="port${state}" py:content="'%s, ' % port">80</span>
60                                         </td>
61                                         <td width="20%" nowrap='true' align='center' id="status-${node.status}">
62                                                 <div id="links">
63                                                 <a class="info" py:if="'error' in node.status" 
64                                                         href="${link('pcuview', pcuid=node.plc_pcuid)}">
65                                                         Error<span><pre>${node.reboot_trial_status}</pre></span></a>
66                                                 <a py:if="'error' not in node.status" 
67                                                         href="${link('pcuview', pcuid=node.plc_pcuid)}"
68                                                         py:content="node.status">Reboot Status</a>
69                                                 </div>
70                                         </td>
71                                         <td py:content="node.plc_pcu_stats['model']"></td>
72                                         <td py:content="len(node.plc_pcu_stats['node_ids'])"></td>
73                                 </tr>
74                         </tbody>
75                 </table>
76                 </td>
77                 </tr>
78                 </tbody>
79         </table>
80   </div>
81
82 </html>