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 time import mktime
8 <html py:layout="'sitemenu.kid'"
9 xmlns:py="http://purl.org/kid/ns#"
10 xmlns:mochi="http://www.mochi.org">
12 <div py:match="item.tag == 'content'">
14 <table id="sub-table" border="1" width="100%">
26 <tr py:for="i,site in enumerate(sitequery)">
27 <td nowrap="true"><a class="ext-link" href="${plc_site_uri(site.loginbase)}">
28 <span class="icon">${site.loginbase}</span></a>
30 <td py:content="site.enabled"></td>
32 <td>${site.slices_used}/${site.slices_total}</td>
33 <td>${site.nodes_up} / ${site.nodes_total}</td>
34 <td id="site-${site.status}" py:content="diff_time(mktime(site.last_changed.timetuple()))"></td>
39 <p py:if="len(nodequery) == 0">
40 There are no registered nodes for this PCU.
42 <table py:if="len(nodequery) > 0" id="sortable_table" class="datagrid" border="1" width="100%">
45 <th mochi:format="int"></th>
55 <tr py:for="i,node in enumerate(nodequery)">
57 <td id="node-${node.observed_status}" nowrap="true">
58 <a href="${link('pcuview', hostname=node.hostname)}" py:content="node.hostname">your.host.org</a></td>
59 <td py:content="node.ping_status"></td>
60 <td py:if="node.pcu_short_status != 'none'" id="status-${node.pcu_short_status}">
61 <a href="${link('pcuview', pcuid=node.plc_node_stats['pcu_ids'])}">${node.pcu_short_status}</a></td>
62 <td py:if="node.pcu_short_status == 'none'" id="status-${node.pcu_short_status}">
63 ${node.pcu_short_status}</td>
64 <td nowrap="true" py:content="node.kernel"></td>
65 <td py:content="diff_time(node.plc_node_stats['last_contact'])"></td>