show device metrics
This commit is contained in:
parent
a9c129cea0
commit
9294525929
1 changed files with 20 additions and 0 deletions
|
|
@ -510,6 +510,26 @@
|
||||||
`<br/>Short Name: ${node.short_name}` +
|
`<br/>Short Name: ${node.short_name}` +
|
||||||
`<br/>Hardware: ${node.hardware_model_name}`;
|
`<br/>Hardware: ${node.hardware_model_name}`;
|
||||||
|
|
||||||
|
if(node.battery_level){
|
||||||
|
if(node.battery_level > 100){
|
||||||
|
tooltip += `<br/>Battery: ${node.battery_level > 100 ? 'Plugged In' : node.battery_level}`;
|
||||||
|
} else {
|
||||||
|
tooltip += `<br/>Battery: ${node.battery_level}%`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(node.voltage){
|
||||||
|
tooltip += `<br/>Voltage: ${Number(node.voltage).toFixed(2)}V`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(node.channel_utilization){
|
||||||
|
tooltip += `<br/>Ch Util: ${Number(node.channel_utilization).toFixed(2)}%`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(node.air_util_tx){
|
||||||
|
tooltip += `<br/>Air Util: ${Number(node.air_util_tx).toFixed(2)}%`;
|
||||||
|
}
|
||||||
|
|
||||||
// create node marker
|
// create node marker
|
||||||
var marker = L.marker([node.latitude, node.longitude], {
|
var marker = L.marker([node.latitude, node.longitude], {
|
||||||
icon: icon,
|
icon: icon,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue