Report hotspot config
This commit is contained in:
parent
17d665e21a
commit
c443fce24f
8 changed files with 244 additions and 160 deletions
|
|
@ -12,6 +12,7 @@ import (
|
|||
"github.com/nemunaire/repeater/internal/api"
|
||||
"github.com/nemunaire/repeater/internal/config"
|
||||
"github.com/nemunaire/repeater/internal/device"
|
||||
"github.com/nemunaire/repeater/internal/hotspot"
|
||||
"github.com/nemunaire/repeater/internal/logging"
|
||||
"github.com/nemunaire/repeater/internal/models"
|
||||
"github.com/nemunaire/repeater/internal/wifi"
|
||||
|
|
@ -32,7 +33,7 @@ func New(assets embed.FS) *App {
|
|||
Status: models.SystemStatus{
|
||||
Connected: false,
|
||||
ConnectedSSID: "",
|
||||
HotspotEnabled: true,
|
||||
HotspotStatus: nil,
|
||||
ConnectedCount: 0,
|
||||
DataUsage: 0.0,
|
||||
Uptime: 0,
|
||||
|
|
@ -131,6 +132,9 @@ func (a *App) periodicStatusUpdate() {
|
|||
a.Status.ConnectedSSID = wifi.GetConnectedSSID()
|
||||
a.Status.Uptime = getSystemUptime()
|
||||
|
||||
// Get detailed hotspot status
|
||||
a.Status.HotspotStatus = hotspot.GetDetailedStatus()
|
||||
|
||||
// Get network data usage for WiFi interface
|
||||
if a.Config != nil {
|
||||
rxBytes, txBytes := getInterfaceBytes(a.Config.WifiInterface)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue