pure json status page

This commit is contained in:
michael-grace 2020-11-09 00:17:48 +00:00
parent b1e20eae5c
commit 26a677be53

View file

@ -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