1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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'])
10 return "https://" + config.PLC_WEB_HOSTNAME + "/db/sites/pcu.php?id=" + str(pcu['pcu_id'])
12 <html py:layout="'sitemenu.kid'"
13 xmlns:py="http://purl.org/kid/ns#"
14 xmlns:mochi="http://www.mochi.org">
16 <div py:match="item.tag == 'content'">
18 <table id="sortable_table" class="datagrid" border="1" width="100%">
21 <th mochi:format="int"></th>
22 <th mochi:format="str">Site</th>
24 <th>Missing Fields</th>
27 <th width="80%">Test Results</th>
33 <tr py:for="i,node in enumerate(pcuquery)" class="${i%2 and 'odd' or 'even'}" >
35 <td><a href="${plc_site_link(node.plc_pcu_stats)}">${node.loginbase}</a></td>
37 <a href="${pcu_link(node.plc_pcu_stats)}">${pcu_name(node.plc_pcu_stats)}</a></td>
38 <td py:content="node.entry_complete"></td>
39 <td id="dns-${node.dns_status}" py:content="node.dns_status"></td>
41 <span py:for="port,state in node.ports"
42 id="port${state}" py:content="'%s, ' % port">80</span>
44 <td width="40" id="status-${node.status}" py:content="node.reboot_trial_status"></td>
45 <td py:content="node.plc_pcu_stats['model']"></td>
46 <td py:content="len(node.plc_pcu_stats['node_ids'])"></td>
52 <table border="1" align="center">
53 <tr><th colspan="2">Legend for 'DNS Status'</th></tr>
55 <tr><td id="dns-DNS-OK">DNS-OK</td>
56 <td>This indicates that the DNS name and registered IP address match.</td>
58 <tr><td id="dns-DNS-MISMATCH">DNS-MISMATCH</td>
59 <td>Sometimes, the registered IP and DNS IP address do not match.
60 In these cases it is not clear which is correct,
61 so an error is flagged.</td>
63 <tr><td id="dns-DNS-NOENTRY">DNS-NOENTRY</td>
64 <td>While a hostname is provided in the registration, the hostname is not actually registered in DNS.</td>
66 <tr><td id="dns-NOHOSTNAME">NOHOSTNAME</td>
67 <td>While we prefer that a hostname be registered, it is not
68 strictly required, since simply the IP address, if it is static, is enough to access the PCU.</td>
70 <tr><td> </td></tr>
73 <tr><th colspan="2">Legend for 'Port Status'</th></tr>
75 <tr><td id="portopen">Open</td>
76 <td>Green port numbers are believed to be open.</td>
78 <tr><td id="portfiltered">Filtered</td>
79 <td>Gold port numbers are believed to be filtered or simply offline.</td>
81 <tr><td id="portclosed">Closed</td>
82 <td>Finally, red ports appear to be closed.</td>
84 <tr><td> </td></tr>
87 <tr><th colspan="2">Legend for 'Test Results'</th></tr>
89 <tr><td id="status-0">OK</td>
90 <td>The PCU is accessible, and short of actually rebooting the node, everything appears to work.</td>
92 <tr><td id="status-NetDown">NetDown</td>
93 <td>The PCU is inaccessible from the PlanetLab address block 128.112.139.0/25, or it is simply offline.</td>
95 <tr><td id="status-Not_Run">Not_Run</td>
96 <td>Previous errors, such as DNS or an incomplete configuration prevented the actual test from begin performed.</td>
98 <tr><td id="status-error">Other Errors</td>
99 <td>Other errors are reported by the test that are more specific to the block encountered by the script.</td>