diff --git a/interface/src/containers/WiFiStatus.js b/interface/src/containers/WiFiStatus.js index 5744e74..7ab68b7 100644 --- a/interface/src/containers/WiFiStatus.js +++ b/interface/src/containers/WiFiStatus.js @@ -15,12 +15,13 @@ import WifiIcon from '@material-ui/icons/Wifi'; import DNSIcon from '@material-ui/icons/Dns'; import SettingsInputComponentIcon from '@material-ui/icons/SettingsInputComponent'; import SettingsInputAntennaIcon from '@material-ui/icons/SettingsInputAntenna'; +import DeviceHubIcon from '@material-ui/icons/DeviceHub'; import SectionContent from '../components/SectionContent'; -import { WIFI_STATUS_ENDPOINT } from '../constants/Endpoints'; -import { isConnected, connectionStatus, connectionStatusHighlight } from '../constants/WiFiConnectionStatus'; +import { WIFI_STATUS_ENDPOINT } from '../constants/Endpoints'; +import { isConnected, connectionStatus, connectionStatusHighlight } from '../constants/WiFiConnectionStatus'; import * as Highlight from '../constants/Highlight'; -import { restComponent } from '../components/RestComponent'; +import { restComponent } from '../components/RestComponent'; const styles = theme => ({ ["wifiStatus_" + Highlight.IDLE]: { @@ -52,10 +53,10 @@ class WiFiStatus extends Component { } dnsServers(status) { - if (!status.dns_ip_1){ + if (!status.dns_ip_1) { return "none"; } - return status.dns_ip_1 + (status.dns_ip_2 ? ','+status.dns_ip_2 : ''); + return status.dns_ip_1 + (status.dns_ip_2 ? ',' + status.dns_ip_2 : ''); } createListItems(data, classes) { @@ -83,6 +84,13 @@ class WiFiStatus extends Component { + + + + + + + # @@ -109,44 +117,42 @@ class WiFiStatus extends Component { } renderWiFiStatus(data, classes) { - return ( + return (
- {this.createListItems(data, classes)} + {this.createListItems(data, classes)}
); - } render() { - const { data, fetched, errorMessage, classes } = this.props; - + const { data, fetched, errorMessage, classes } = this.props; return ( { - !fetched ? -
- - - Loading... + !fetched ? +
+ + + Loading... -
- : - data ? this.renderWiFiStatus(data, classes) - : -
- - {errorMessage} - -
+ : + data ? this.renderWiFiStatus(data, classes) + : +
+ + {errorMessage} + + -
- } +
+ }
) } diff --git a/src/WiFiStatus.cpp b/src/WiFiStatus.cpp index 0070fa5..5f27c38 100644 --- a/src/WiFiStatus.cpp +++ b/src/WiFiStatus.cpp @@ -55,6 +55,7 @@ void WiFiStatus::wifiStatus(AsyncWebServerRequest *request) { root["status"] = (uint8_t) status; if (status == WL_CONNECTED){ root["local_ip"] = WiFi.localIP().toString(); + root["mac_address"] = WiFi.macAddress(); root["rssi"] = WiFi.RSSI(); root["ssid"] = WiFi.SSID(); root["bssid"] = WiFi.BSSIDstr();