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 PCU View"
4 from pcucontrol.reboot import pcu_name, model_to_object
5 from monitor import config
7 def plc_site_link(pcu):
8 return "https://" + config.MONITOR_HOSTNAME + "/db/sites/index.php?id=" + str(pcu['site_id'])
11 return "https://" + config.MONITOR_HOSTNAME + "/db/sites/pcu.php?id=" + str(pcu['pcu_id'])
14 <html py:layout="'sitemenu.kid'"
15 xmlns:py="http://purl.org/kid/ns#">
17 <div py:match="item.tag == 'content'">
18 <table id="sub-table" width="100%">
21 <th><a href="${tg.url('pcu', filter='ok')}">Ok(${fc['ok']})</a></th>
22 <th><a href="${tg.url('pcu', filter='Not_Run')}">Misconfigured(${fc['Not_Run']})</a></th>
23 <th><a href="${tg.url('pcu', filter='NetDown')}">Offline(${fc['NetDown']})</a></th>
24 <th><a href="${tg.url('pcu', filter='pending')}">Runtime Error(${fc['pending']})</a></th>
25 <th><a href="${tg.url('pcu', filter='all')}">All</a></th>
31 <table border="1" width="100%">
36 <th>Missing Fields</th>
39 <th width="80%">Test Results</th>
45 <tr py:for="i,node in enumerate(query)" class="${i%2 and 'odd' or 'even'}" >
46 <td><a href="${plc_site_link(node.plc_pcu_stats)}">sitename</a></td>
48 <a href="${pcu_link(node.plc_pcu_stats)}">${pcu_name(node.plc_pcu_stats)}</a></td>
49 <td py:content="node.entry_complete"></td>
50 <td id="dns-${node.dns_status}" py:content="node.dns_status"></td>
52 <span py:for="port,state in node.ports"
53 id="port${state}" py:content="'%s, ' % port">80</span>
55 <td width="40" id="status-${node.status}" py:content="node.reboot_trial_status"></td>
56 <td py:content="node.plc_pcu_stats['model']"></td>
57 <td py:content="len(node.plc_pcu_stats['node_ids'])"></td>