2016-06-23 17:31:39 +02:00
|
|
|
function routeAliases(){
|
2016-06-24 03:17:12 +02:00
|
|
|
fill = '<table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp nodes-table">'
|
2016-06-23 17:31:39 +02:00
|
|
|
+ '<thead>'
|
|
|
|
+ '<tr>'
|
|
|
|
+ '<th class="mdl-data-table__cell--non-numeric">Hostname</th>'
|
2016-06-24 03:17:12 +02:00
|
|
|
+ '<th>Freq</th>'
|
|
|
|
+ '<th>Channel</th>'
|
|
|
|
+ '<th>Power</th>'
|
2016-06-23 17:31:39 +02:00
|
|
|
+ '<th class="mdl-data-table__cell--non-numeric">Location</th>'
|
2016-06-24 03:17:12 +02:00
|
|
|
+ '<th class="mdl-data-table__cell--non-numeric">SSH</th>'
|
2016-06-23 17:31:39 +02:00
|
|
|
+ '</tr>'
|
|
|
|
+ '</thead>'
|
|
|
|
+ '<tbody>'
|
|
|
|
Object.keys(internal.aliases).map(function(key){
|
|
|
|
fill += '<tr>'
|
2016-06-24 03:17:12 +02:00
|
|
|
+ '<td class="mdl-data-table__cell--non-numeric" rowspan="2">'
|
2016-06-23 17:31:39 +02:00
|
|
|
+ internal.aliases[key].hostname
|
|
|
|
+ '<br/>'
|
|
|
|
+ '<small>'+key+'</small>'
|
|
|
|
+ '</td>'
|
2016-06-24 03:17:12 +02:00
|
|
|
+ '<td>2.4 Ghz</td>'
|
|
|
|
+ '<td>'+((internal.aliases[key].freq24 !== undefined)?internal.aliases[key].freq24.channel:'-')+ '</td>'
|
|
|
|
+ '<td>'+((internal.aliases[key].freq24 !== undefined)?internal.aliases[key].freq24.txpower:'-')+ '</td>'
|
|
|
|
+ '<td class="mdl-data-table__cell--non-numeric" rowspan="2">'+((internal.aliases[key].location)?'<i class="material-icons">place</i>':'')+'</td>'
|
|
|
|
+ '<td class="mdl-data-table__cell--non-numeric" rowspan="2">'+sshUrl(key)+'</td>'
|
|
|
|
+ '</tr>'
|
|
|
|
+ '<tr>'
|
|
|
|
+ '<td class="mdl-data-table__cell--non-numeric" style="padding-left:18px;">5Ghz</td>'
|
|
|
|
+ '<td>'+((internal.aliases[key].freq5 !== undefined)?internal.aliases[key].freq5.channel:'-')+ '</td>'
|
|
|
|
+ '<td style="padding-right:18px;">'+((internal.aliases[key].freq5 !== undefined)?internal.aliases[key].freq5.txpower:'-')+ '</td>'
|
2016-06-23 17:31:39 +02:00
|
|
|
+ '</tr>'
|
|
|
|
})
|
|
|
|
fill += '</tbody></table>'
|
|
|
|
container.innerHTML = fill
|
|
|
|
}
|