Skip to content

Commit

Permalink
Add wlan mapping to JSON API #382
Browse files Browse the repository at this point in the history
  • Loading branch information
svpcom committed Nov 23, 2024
1 parent b1ccf75 commit fbd9a61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion wfb_ng/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def connectionMade(self):
msg = json.dumps(dict(type='settings',
profile=self.factory.profile,
is_cluster=self.factory.is_cluster,
wlans=self.factory.wlans,
settings = deepcopy(settings)))

self.sendLine(msg.encode('utf-8'))
Expand Down Expand Up @@ -164,10 +165,11 @@ class JSONAPIFactory(Factory):
noisy = False
protocol = StatisticsJSONProtocol

def __init__(self, ui_sessions, is_cluster=False, profile=None):
def __init__(self, ui_sessions, is_cluster=False, profile=None, wlans=None):
self.ui_sessions = ui_sessions
self.is_cluster = is_cluster
self.profile = profile
self.wlans = wlans


class AntStatsAndSelector(object):
Expand Down
2 changes: 1 addition & 1 deletion wfb_ng/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def _cleanup(x):
sockets.append(reactor.listenTCP(profile_cfg.stats_port, p_f))

if profile_cfg.api_port:
p_f = JSONAPIFactory(ant_sel_f.ui_sessions, is_cluster, profile)
p_f = JSONAPIFactory(ant_sel_f.ui_sessions, is_cluster, profile, wlans)
sockets.append(reactor.listenTCP(profile_cfg.api_port, p_f))

for service_name, service_type, srv_cfg in service_list:
Expand Down

0 comments on commit fbd9a61

Please sign in to comment.