pure json status page
This commit is contained in:
parent
b1e20eae5c
commit
26a677be53
1 changed files with 12 additions and 1 deletions
13
server.py
13
server.py
|
@ -114,7 +114,7 @@ def ui_config():
|
|||
@app.route("/status")
|
||||
def ui_status():
|
||||
channel_states = []
|
||||
for i in range(3):
|
||||
for i in range(state.state["num_channels"]):
|
||||
channel_states.append(status(i))
|
||||
|
||||
data = {
|
||||
|
@ -124,6 +124,17 @@ def ui_status():
|
|||
}
|
||||
return render_template('status.html', data=data)
|
||||
|
||||
|
||||
@app.route("/status-json")
|
||||
def json_status():
|
||||
channel_states = []
|
||||
for i in range(state.state["num_channels"]):
|
||||
channel_states.append(status(i))
|
||||
return {
|
||||
"server": state.state,
|
||||
"channels": channel_states
|
||||
}
|
||||
|
||||
# Channel Audio Options
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue