Skip to content

Commit

Permalink
March release #patch (#124)
Browse files Browse the repository at this point in the history
* [installer] Clearfog uses /dev/root, fix using mount

* Use a 24 hour lease time

* [ui] Dont spam console with web socket events

* [ui] Remove console.log spam

* [ui] Fix vertical spacing, key errors for FlashList

* [ui] Switch to FlatList for GroupListing

* [build] Update version.txt match

* [superd] Update version string to match ^v[0-9]+\.[0-9]+\.[0-9]+$

* Fix growpart

* [ui] Display empty tags with text

* [ui] Dont use keyEtractor, update meshIter

* [ui] Iterate AP interfaces for displaying all clients

* [api] Update some go dependencies for DoS fixes

* [packet_logs] [multicast_udp_proxy] Update dependencies for golang DoS issues

* Revert "[api] Update some go dependencies for DoS fixes"

This reverts commit de83e5a.

* [api] Update golang dependencies to fix DoS advisories

* [packet_logs] revert sprbus

* [packet_logs] Revert sprbus version

* [api] [packet_logs] Update sprbus to versioned module

* [build] Add version label
  • Loading branch information
lts-rad authored Mar 1, 2023
1 parent b917dd5 commit 41073d5
Show file tree
Hide file tree
Showing 27 changed files with 319 additions and 734 deletions.
24 changes: 12 additions & 12 deletions api/code/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.4.1
github.com/influxdata/influxdb-client-go/v2 v2.7.0
github.com/spr-networks/sprbus v0.0.0-20220811094515-092f7af34fb2
github.com/spr-networks/sprbus v0.0.1
)

require (
Expand All @@ -18,7 +18,7 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bombsimon/wsl v1.2.8 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cloudflare/cfssl v1.4.1 // indirect
github.com/coreos/bbolt v1.3.3 // indirect
github.com/coreos/etcd v3.3.17+incompatible // indirect
Expand Down Expand Up @@ -47,7 +47,7 @@ require (
github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang-jwt/jwt/v4 v4.1.0 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/glog v1.0.0 // indirect
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect
github.com/golang/mock v1.3.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
Expand All @@ -70,7 +70,7 @@ require (
github.com/google/certificate-transparency-go v1.1.0 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/monologue v0.0.0-20191105172128-0324c8b45f6f // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/gorilla/sessions v1.2.0 // indirect
github.com/gostaticanalysis/analysisutil v0.0.3 // indirect
Expand All @@ -92,7 +92,7 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/moby/moby v23.0.0+incompatible // indirect
github.com/moby/moby v23.0.1+incompatible // indirect
github.com/moby/pubsub v1.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
Expand Down Expand Up @@ -136,14 +136,14 @@ require (
go.uber.org/zap v1.13.0 // indirect
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect
golang.org/x/text v0.3.5 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
google.golang.org/grpc v1.48.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/genproto v0.0.0-20230227214838-9b19f0bdc514 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
honnef.co/go/tools v0.0.1-2019.2.3 // indirect
Expand Down
20 changes: 20 additions & 0 deletions api/code/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf
github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM=
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY=
github.com/cloudflare/cfssl v0.0.0-20190726000631-633726f6bcb7/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA=
Expand Down Expand Up @@ -168,6 +169,7 @@ github.com/golang-jwt/jwt/v4 v4.1.0 h1:XUgk2Ex5veyVFVeLm0xhusUTQybEbexJXrvPNOKkS
github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 h1:uHTyIjqVhYRhLbJ8nIiOJHkEZZ+5YoOsAbD3sk82NiE=
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down Expand Up @@ -260,6 +262,7 @@ github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
Expand Down Expand Up @@ -388,6 +391,8 @@ github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQz
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/moby/moby v23.0.0+incompatible h1:gGcB6NVmKEEt+VcIiWBjKlpVWCPyv9TA3CKw6juj2z4=
github.com/moby/moby v23.0.0+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc=
github.com/moby/moby v23.0.1+incompatible h1:h9fbV+v0Ye04IenS/aQfJ2SM3J6NR4h+QoBlOuLOVHk=
github.com/moby/moby v23.0.1+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc=
github.com/moby/pubsub v1.0.0 h1:jkp/imWsmJz2f6LyFsk7EkVeN2HxR/HTTOY8kHrsxfA=
github.com/moby/pubsub v1.0.0/go.mod h1:bXSO+3h5MNXXCaEG+6/NlAIk7MMZbySZlnB+cUQhKKc=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
Expand Down Expand Up @@ -525,6 +530,8 @@ github.com/spf13/viper v1.5.0 h1:GpsTwfsQ27oS/Aha/6d1oD7tpKIqWnOA6tgOX9HHkt4=
github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4=
github.com/spr-networks/sprbus v0.0.0-20220811094515-092f7af34fb2 h1:c7RadfVpqqXxc/kxxbzY/oigEx6BvO/bMhkpf+5P5P4=
github.com/spr-networks/sprbus v0.0.0-20220811094515-092f7af34fb2/go.mod h1:fK1hepbMhmj80wjrM//6LDvaP30pu0dwVNAWGaJHkqU=
github.com/spr-networks/sprbus v0.0.1 h1:ExT1sREKrGgubSsaqgUrkErjt08Nm+Cpj4qPl8oXxPU=
github.com/spr-networks/sprbus v0.0.1/go.mod h1:PPHAPjoRbrs7oATHcMsS808khuvqJqICUEgiLTehu8E=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
Expand Down Expand Up @@ -651,6 +658,8 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew=
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -693,6 +702,8 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915090833-1cbadb444a80/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -702,6 +713,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -743,6 +756,7 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f h1:kDxGY2VmgABOe55qheT/TFq
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 h1:EBZoQjiKKPaLbPrbpssUfuHtwM6KV/vb4U85g/cigFY=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand All @@ -769,6 +783,8 @@ google.golang.org/genproto v0.0.0-20191115221424-83cc0476cb11/go.mod h1:n3cpQtvx
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20230227214838-9b19f0bdc514 h1:rtNKfB++wz5mtDY2t5C8TXlU5y52ojSu7tZo0z7u8eQ=
google.golang.org/genproto v0.0.0-20230227214838-9b19f0bdc514/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
Expand All @@ -783,6 +799,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
Expand All @@ -796,6 +814,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion base/template_configs/scripts/gen_coredhcp_yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ server4:
- dns: $DNSIP
- router: $LANIP
- netmask: $TINYNETMASK
- tiny_subnets: /state/dhcp/leases.txt $TINYNETSTART $TINYNETSTOP 730h0m0s
- tiny_subnets: /state/dhcp/leases.txt $TINYNETSTART $TINYNETSTOP 24h0m0s
- execute: /scripts/dhcp_helper.sh
END
Expand Down
4 changes: 1 addition & 3 deletions build_docker_compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ fi

# set version
# NOTE if we rebuild a single container could still be old version
git describe --tags > ./version.txt
#git tag |sort -g|tail -1 > ./version.txt
git describe --tags $(git rev-list --tags --max-count=1) > ./version.txt
git tag -l --sort=-creatordate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1 > ./version.txt

# make sure state directories and files exist
mkdir -p state/api/
Expand Down
1 change: 1 addition & 0 deletions docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: '3.4'
x-labels:
&default-labels
org.supernetworks.ci: ${CI:-false}
org.supernetworks.version: ${RELEASE_VERSION:-latest}${RELEASE_CHANNEL:-}

x-logging:
&default-logging
Expand Down
1 change: 1 addition & 0 deletions docker-compose-virt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: '3.4'
x-labels:
&default-labels
org.supernetworks.ci: ${CI:-false}
org.supernetworks.version: ${RELEASE_VERSION:-latest}${RELEASE_CHANNEL:-}

x-logging:
&default-logging
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: '3.4'
x-labels:
&default-labels
org.supernetworks.ci: ${CI:-false}
org.supernetworks.version: ${RELEASE_VERSION:-latest}${RELEASE_CHANNEL:-}

x-logging:
&default-logging
Expand Down
33 changes: 31 additions & 2 deletions frontend/src/components/Dashboard/WifiWidgets.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { Component, useEffect, useState } from 'react'
import { wifiAPI } from 'api/Wifi'
import { wifiAPI, meshAPI } from 'api'
import APIWifi from 'api/Wifi'
import StatsWidget from './StatsWidget'
import { faClock, faLaptop, faWifi } from '@fortawesome/free-solid-svg-icons'

Expand All @@ -12,9 +13,37 @@ export class WifiClientCount extends Component {
wifiAPI
.allStations(this.props.iface)
.then((stations) => {
this.setState({ numberOfWifiClients: Object.keys(stations).length })
let count = Object.keys(stations).length

this.setState({ numberOfWifiClients: count})
meshAPI.meshIter(() => new APIWifi()).then(r => {
let connectMACsList = []; // Declare an array to store the 'connectMACs' variables
r.forEach(remoteWifiApi => {
remoteWifiApi.interfacesConfiguration.call(remoteWifiApi).then((config) => {
config.forEach((iface) => {
if (iface.Type == "AP" && iface.Enabled == true) {
remoteWifiApi
.allStations.call(remoteWifiApi, iface.Name)
.then((stations) => {
let connectedMACs = Object.keys(stations)
connectMACsList.push(...connectedMACs); // Push the 'connectedMACs' variable to the 'connectMACsList' array
})
.catch((err) => {

})
}
})
})
})

this.setState({ numberOfWifiClients: (count + connectMACsList.length) })
});

})
.catch((err) => {})



}

render() {
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/components/Devices/DeviceListing.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const DeviceListing = (props) => {
if (dev.isConnected == false) {
dev.isConnected = connectedMACs.includes(dev.MAC)
if (dev.isConnected) {
alert(dev.MAC)

}
}
return dev
Expand All @@ -102,7 +102,7 @@ const DeviceListing = (props) => {
})
})

meshAPI.meshIter(new APIWifi()).then(r => r.forEach(remoteWifiApi => {
meshAPI.meshIter(() => new APIWifi()).then(r => r.forEach(remoteWifiApi => {
remoteWifiApi.interfacesConfiguration.call(remoteWifiApi).then((config) => {
config.forEach((iface) => {
if (iface.Type == "AP" && iface.Enabled == true) {
Expand All @@ -125,7 +125,6 @@ const DeviceListing = (props) => {
}
})
})

}))

}
Expand Down Expand Up @@ -247,7 +246,6 @@ const DeviceListing = (props) => {
<FlashList
data={devices}
renderItem={renderItem}
keyExtractor={(item, index) => item.Name + index}
estimatedItemSize={100}
/>

Expand Down
8 changes: 5 additions & 3 deletions frontend/src/components/Groups/GroupListing.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Badge,
Box,
Heading,
FlatList,
Stack,
HStack,
Text,
Expand All @@ -28,10 +29,12 @@ const GroupListing = ({ group, ...props }) => {
}

const list = []
let idx = 0;
if (group.Members && group.Members.length > 0) {
for (const dev of group.Members) {
//if the device was in the vmap, mark it as active
dev.ifname = ''
dev.key = idx++;

if (group.vmap) {
for (const entry of group.vmap) {
Expand Down Expand Up @@ -69,7 +72,7 @@ const GroupListing = ({ group, ...props }) => {
}

return (
<VStack space={2} h={'100%'}>
<VStack space={2}>
<HStack
space={1}
alignItems="center"
Expand All @@ -80,7 +83,7 @@ const GroupListing = ({ group, ...props }) => {
<Text color="muted.500">{groupDescriptions[group.Name] || ''}</Text>
</HStack>

<FlashList
<FlatList
data={list}
estimatedItemSize={100}
renderItem={({ item }) => (
Expand Down Expand Up @@ -122,7 +125,6 @@ const GroupListing = ({ group, ...props }) => {
</HStack>
</Box>
)}
keyExtractor={(item) => item.Name}
/>
</VStack>
)
Expand Down
Loading

0 comments on commit 41073d5

Please sign in to comment.