1 <script type=
"text/javascript">//<![CDATA[
2 XHR.poll(-
1, '<%=url('admin/network/ahcpd/status')%
>', null,
5 var tb = document.getElementById('ahcpd_status_table');
6 var tx = document.getElementById('ahcpd_status_text');
10 while (tb.firstElementChild !== tb.lastElementChild)
11 tb.removeChild(tb.lastElementChild);
13 for (var i =
0; i < st.leases.length; i++)
15 tb.appendChild(E('
<div class=
"tr cbi-section-table-row cbi-rowstyle-%d">'.format((i %
2) +
1), [
16 E('
<div class=
"td">', st.leases[i].addr),
17 E('
<div class=
"td">', '%t'.format(st.leases[i].age))
21 if (tb.firstElementChild === tb.lastElementChild)
22 tb.appendChild(E('
<div class=
"tr cbi-section-table-row"><div class=
"td"><em><br /><%:There are no active leases.%
></em></div></div>'));
24 if (st.uid == '
00:
00:
00:
00:
00:
00:
00:
00')
25 tx.innerHTML = '<%:The AHCP Service is not running.%
>';
27 tx.innerHTML = String.format('<%:The AHCP Service is running with ID %s.%
>', st.uid);
33 <fieldset class=
"cbi-section">
34 <legend><%:Active AHCP Leases%
></legend>
35 <p id=
"ahcpd_status_text"></p>
36 <div class=
"table cbi-section-table" id=
"ahcpd_status_table">
37 <div class=
"tr cbi-section-table-titles">
38 <div class=
"th cbi-section-table-cell"><%:Address%
></div>
39 <div class=
"th cbi-section-table-cell"><%:Age%
></div>
41 <div class=
"tr cbi-section-table-row">
42 <div class=
"td" colspan=
"5"><em><br /><%:Collecting data...%
></em></div>