()
| 3121 | '#fb7185', '#22d3ee', '#c084fc', '#4ade80', '#f59e0b']; |
| 3122 | function _wifiMeshNodeList() { |
| 3123 | const reg = (_wifiHm.data && _wifiHm.data.mesh_nodes) || {}; |
| 3124 | return Object.keys(reg).sort(); |
| 3125 | } |
| 3126 | function _wifiMeshColor(bssid) { |
| 3127 | const list = _wifiMeshNodeList(); |
| 3128 | const i = list.indexOf(bssid); |
| 3129 | return _WIFI_MESH_COLORS[(i < 0 ? 0 : i) % _WIFI_MESH_COLORS.length]; |
| 3130 | } |
| 3131 | |
| 3132 | // Building-material attenuation (dB), mirrors wifi_analyzer._WALL_MATERIALS. |
| 3133 | const _WIFI_WALL_DB = { drywall: 3, wood: 4, glass: 6, brick: 10, concrete: 15, metal: 20 }; |
| 3134 | // Colour-code construction materials so walls/columns read at a glance. |
| 3135 | const _WIFI_MAT_COLORS = { |
| 3136 | brick: '#dc2626', // red |
| 3137 | glass: '#f8fafc', // white |
| 3138 | concrete: '#9ca3af', // grey |
| 3139 | metal: '#3b82f6', // blue (steel) |
| 3140 | drywall: '#d8c39a', // beige |
| 3141 | wood: '#8b5a2b', // brown |
| 3142 | }; |
no test coverage detected