<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?python
-layout_params['page_title'] = "Monitor PCU View"
+layout_params['page_title'] = "Monitor PCU List"
from pcucontrol.reboot import pcu_name, model_to_object
from monitor import config
-
-def plc_site_link(pcu):
- return "https://" + config.PLC_WEB_HOSTNAME + "/db/sites/index.php?id=" + str(pcu['site_id'])
-
-def pcu_link(pcu):
- return "https://" + config.PLC_WEB_HOSTNAME + "/db/sites/pcu.php?id=" + str(pcu['pcu_id'])
-
+from links import *
?>
<html py:layout="'sitemenu.kid'"
xmlns:py="http://purl.org/kid/ns#"
<tbody>
<tr py:for="i,node in enumerate(query)" class="${i%2 and 'odd' or 'even'}" >
<td></td>
- <td><a href="${plc_site_link(node.plc_pcu_stats)}">${node.loginbase}</a></td>
+ <td><a href="${plc_site_link_id(node.plc_pcu_stats['site_id'])}">${node.loginbase}</a></td>
<td nowrap="true" >
- <a href="${pcu_link(node.plc_pcu_stats)}">${pcu_name(node.plc_pcu_stats)}</a></td>
+ <a href="${plc_pcu_link_id(node.plc_pcu_stats['pcu_id'])}">${pcu_name(node.plc_pcu_stats)}</a></td>
<td py:content="node.entry_complete"></td>
<td id="dns-${node.dns_status}" py:content="node.dns_status"></td>
<td>