4946fc92902684212aeff0e78db5efab5b02e65c
[monitor.git] / web / MonitorWeb / monitorweb / templates / pcuview.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 Site View"
4 from monitor.util import diff_time
5 from monitor import config
6 from pcucontrol.reboot import pcu_name, model_to_object
7 def plc_site_link(pcu):
8         return "https://" + config.PLC_WEB_HOSTNAME + "/db/sites/index.php?id=" + str(pcu['site_id'])
9 def pcu_link(pcu):
10         return "https://" + config.PLC_WEB_HOSTNAME + "/db/sites/pcu.php?id=" + str(pcu['pcu_id'])
11 ?>
12 <html py:layout="'sitemenu.kid'"
13       xmlns:py="http://purl.org/kid/ns#"
14           xmlns:mochi="http://www.mochi.org">
15
16   <div py:match="item.tag == 'content'">
17     <h3>PCU Status</h3>
18                 <table id="sortable_table" class="datagrid" border="1" width="100%">
19                         <thead>
20                                 <tr>
21                                         <th mochi:format="int"></th>
22                                         <th mochi:format="str">Site</th>
23                                         <th>PCU Name</th>
24                                         <th>Missing Fields</th>
25                                         <th>DNS Status</th>
26                                         <th>Port Status</th>
27                                         <th width="80%">Test Results</th>
28                                         <th>Model</th>
29                                         <th>Nodes</th>
30                                 </tr>
31                         </thead>
32                         <tbody>
33                                 <tr py:for="i,node in enumerate(pcuquery)" class="${i%2 and 'odd' or 'even'}" >
34                                         <td></td>
35                                         <td><a class="ext-link" href="${plc_site_link(node.plc_pcu_stats)}">
36                                                         <span class="icon">${node.loginbase}</span>
37                                                 </a>
38                                         </td>
39                                         <td nowrap="true" >
40                                                 <a class="ext-link" href="${pcu_link(node.plc_pcu_stats)}">
41                                                         <span class="icon">${pcu_name(node.plc_pcu_stats)}</span>
42                                                 </a>
43                                         </td>
44                                         <td py:content="node.entry_complete"></td>
45                                         <td id="dns-${node.dns_status}" py:content="node.dns_status"></td>
46                                         <td>
47                                                 <span py:for="port,state in node.ports" 
48                                                 id="port${state}" py:content="'%s, ' % port">80</span>
49                                         </td>
50                                         <td width="40" id="status-${node.status}" py:content="node.reboot_trial_status"></td>
51                                         <td py:content="node.plc_pcu_stats['model']"></td>
52                                         <td py:content="len(node.plc_pcu_stats['node_ids'])"></td>
53                                 </tr>
54                         </tbody>
55                 </table>
56         <h3>Controls</h3>
57                 ... node list ...
58                 <br/>
59                 form for reboot
60
61         <h3>Legend</h3>
62
63         <table border="1" align="center" width="80%">
64                 <tr><th colspan="2">Legend for 'DNS Status'</th></tr>
65
66                 <tr><td id="dns-DNS-OK">DNS-OK</td>
67                         <td>This indicates that the DNS name and registered IP address match.</td>
68                 </tr>
69                 <tr><td id="dns-DNS-MISMATCH">DNS-MISMATCH</td>
70                         <td>Sometimes, the registered IP and DNS IP address do not match.  
71                                 In these cases it is not clear which is correct, 
72                                 so an error is flagged.</td>
73                 </tr>
74                 <tr><td id="dns-DNS-NOENTRY">DNS-NOENTRY</td>
75                         <td>While a hostname is provided in the registration, the hostname is not actually registered in DNS.</td>
76                 </tr>
77                 <tr><td id="dns-NOHOSTNAME">NOHOSTNAME</td>
78                         <td>While we prefer that a hostname be registered, it is not
79                         strictly required, since simply the IP address, if it is static, is enough to access the PCU.</td>
80                 </tr>
81                 <tr><td>&nbsp;</td></tr>
82         <!--/table>
83         <table border=1-->
84                 <tr><th colspan="2">Legend for 'Port Status'</th></tr>
85
86                 <tr><td id="portopen">Open</td>
87                         <td>Green port numbers are believed to be open.</td>
88                 </tr>
89                 <tr><td id="portfiltered">Filtered</td>
90                         <td>Gold port numbers are believed to be filtered or simply offline.</td>
91                 </tr>
92                 <tr><td id="portclosed">Closed</td>
93                         <td>Finally, red ports appear to be closed.</td>
94                 </tr>
95                 <tr><td>&nbsp;</td></tr>
96         <!--/table>
97         <table border=1-->
98                 <tr><th colspan="2">Legend for 'Test Results'</th></tr>
99
100                 <tr><td id="status-0">OK</td>
101                         <td>The PCU is accessible, and short of actually rebooting the node, everything appears to work.</td>
102                 </tr>
103                 <tr><td id="status-NetDown">NetDown</td>
104                         <td>The PCU is inaccessible from the PlanetLab address block 128.112.139.0/25, or it is simply offline.</td>
105                 </tr>
106                 <tr><td id="status-Not_Run">Not_Run</td>
107                         <td>Previous errors, such as DNS or an incomplete configuration prevented the actual test from begin performed.</td>
108                 </tr>
109                 <tr><td id="status-error">Other Errors</td>
110                         <td>Other errors are reported by the test that are more specific to the block encountered by the script.</td>
111                 </tr>
112         </table>
113
114   </div>
115
116 </html>