@@ -1,5 +1,5 @@
|
||||
from flask import Flask, render_template, make_response, json, jsonify, request, send_file, Response
|
||||
from modules import app_gps, app_events, app_car, app_account, app_obd, app_sql, app_dash, app_upload, app_video, app_health, app_alerts, app_settings, app_network, app_device_config, app_device_sync, app_remote_config
|
||||
from modules import app_gps, app_events, app_car, app_account, app_obd, app_sql, app_dash, app_upload, app_video, app_health, app_alerts, app_settings, app_network, app_device_config, app_device_sync, app_remote_config, app_status
|
||||
import os, time
|
||||
from gevent.pywsgi import WSGIServer
|
||||
|
||||
@@ -44,6 +44,10 @@ def history():
|
||||
def settings():
|
||||
return render_template('settings.html', account=account, car=car)
|
||||
|
||||
@app.route('/status')
|
||||
def status_page():
|
||||
return render_template('status.html', account=account, car=car)
|
||||
|
||||
@app.route('/api/settings', methods=['GET', 'POST'])
|
||||
def api_settings():
|
||||
if request.method == 'GET':
|
||||
@@ -298,6 +302,10 @@ def upload_status():
|
||||
def health():
|
||||
return jsonify(app_health.collect_health())
|
||||
|
||||
@app.route('/api/status')
|
||||
def api_status():
|
||||
return jsonify(app_status.collect_status())
|
||||
|
||||
@app.route('/api/alerts/status')
|
||||
def alert_status():
|
||||
return jsonify(app_alerts.get_status())
|
||||
|
||||
Reference in New Issue
Block a user