7 var callgetData
= rpc
.declare({
8 object
: 'status.olsrd2',
12 function createTable(data
) {
14 data
.neighbors
.forEach(row
=> {
15 let hostname
= E('a',{ 'href': 'https://' + row
.hostname
+ '/cgi-bin-olsrd2-neigh.html'},row
.hostname
);
16 let orginator
= E('a',{ 'href': 'https://[' + row
.originator
+ ']/cgi-bin-olsrd2-neigh.html'},row
.originator
);
30 title
: _('OLSRD2 mesh neighbors'),
31 handleSaveApply
: null,
36 render: function(data
) {
38 var tr
= E('table', { 'class': 'table' });
39 tr
.appendChild(E('tr', { 'class': 'tr cbi-section-table-titles' }, [
40 E('th', { 'class': 'th left' }, [ 'Hostname' ]),
41 E('th', { 'class': 'th left' }, [ 'Orginator' ]),
42 E('th', { 'class': 'th left' }, [ 'MAC' ]),
43 E('th', { 'class': 'th left' }, [ 'Interface' ]),
44 E('th', { 'class': 'th left' }, [ 'Metric' ]),
45 E('th', { 'class': 'th left' }, [ 'raw' ])
50 ]).then((results
) => {
51 cbi_update_table(tr
, createTable(results
[0]));