Exemplo n.º 1
0
def updategraph():
    import json
    rep = abhomeclass.abDB()
    bstats = abhomeclass.getTechStats()
    hometemps = rep.getGoogleTableDataHomeTemps(6)
    boilertemps = rep.getGoogleTableDataBoilerTemps(6)
    print json.dumps({'hometemps':hometemps, 'boilertemps':boilertemps})
    return json.dumps({'hometemps':hometemps, 'boilertemps':boilertemps})
Exemplo n.º 2
0
def userHome():
    timeParam = getPageParam('time')
    currentuser = session.get('username')
    rep = abhomeclass.abDB()
    stats = abhomeclass.MakeStatsHTMLBlock(rep, timeParam)
    bstats = abhomeclass.getTechStats()
    hometemps = rep.getGoogleTableDataHomeTemps(timeParam)
    boilertemps = rep.getGoogleTableDataBoilerTemps(timeParam)

    return render_template('userHome.html', user=currentuser,
                           chart1=hometemps, chart2=boilertemps,
                           stats=stats, bstats=bstats)
Exemplo n.º 3
0
def boilerSettings():
    # return render_template('error.html', error='page not impemented.', message='work in progress')
    timeParam = getPageParam('time')
    currentuser = session.get('username')
    rep = abhomeclass.abDB()
    stats = abhomeclass.MakeStatsHTMLBlock(rep, timeParam)
    bstats = abhomeclass.getTechStats()
    hometemps = rep.getGoogleTableDataHomeTemps(timeParam)
    boilertemps = rep.getGoogleTableDataBoilerTemps(timeParam)

    return render_template('boilerSettings.html', user=currentuser,
                           var=timeParam,
                           chart1=hometemps, chart2=boilertemps, stats=stats, bstats=bstats)
Exemplo n.º 4
0
def jsonstatus():
    import json
    bstats = abhomeclass.getTechStats()
    return json.dumps(bstats.getDict())