webapp: Show complete generated hostname in network info view

This commit is contained in:
Thomas Basler 2022-09-06 18:45:32 +02:00
parent f5328100b6
commit 86f01e5cc4
3 changed files with 7 additions and 0 deletions

View File

@ -32,6 +32,7 @@ void WebApiNetworkClass::onNetworkStatus(AsyncWebServerRequest* request)
root[F("sta_status")] = ((WiFi.getMode() & WIFI_STA) != 0);
root[F("sta_ssid")] = WiFi.SSID();
root[F("sta_rssi")] = WiFi.RSSI();
root[F("network_hostname")] = NetworkSettings.getHostname();
root[F("network_ip")] = NetworkSettings.localIP().toString();
root[F("network_netmask")] = NetworkSettings.subnetMask().toString();
root[F("network_gateway")] = NetworkSettings.gatewayIP().toString();

View File

@ -49,6 +49,7 @@ export default defineComponent({
ap_ssid: "",
ap_stationnum: 0,
// InterfaceNetworkInfo
network_hostname: "",
network_ip: "",
network_netmask: "",
network_gateway: "",

View File

@ -7,6 +7,10 @@
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
<tr>
<th>Hostname</th>
<td>{{ network_hostname }}</td>
</tr>
<tr>
<th>IP Address</th>
<td>{{ network_ip }}</td>
@ -43,6 +47,7 @@ import { defineComponent } from 'vue';
export default defineComponent({
props: {
network_hostname: String,
network_ip: String,
network_netmask: String,
network_gateway: String,