return abort(404, 'Page not found')
return {'config': CONFIG, 'req_page': name, 'svg': svg}
-@app.route('/api/values.json')
+@app.route('/api/current_state')
@json_replace_nan()
def api_values():
return CONFIG
-@app.route('/api/history/<name>.json')
+@app.route('/api/history/<name>')
@json_replace_nan()
def api_history(name):
try:
function updateStatus() {
- $.getJSON("/api/values.json")
+ $.getJSON("/api/current_state")
.fail(function( jqxhr, textStatus, error ) {
var err = textStatus + ", " + error;
console.log( "Request Failed: " + err );
.width(155)
.height(50)
.gradientColors(['green', 'orange', 'red']) // OK, WARNING, ALARM
- .dataSource('/api/history/' + pvName + '.json')
+ .dataSource('/api/history/' + pvName)
.dataSourceType('JSON')
.selector('#'+el.id);
sparklineChart(); // render the chart