IW4M-Admin/Master/master/views.py
RaidMax 5dfaa4ebd6 update projects to .NET Core 2.0.7
added instance and client count to api page
removed vestigial ConfigGenerator
2018-04-23 16:03:50 -05:00

22 lines
617 B
Python

"""
Routes and views for the flask application.
"""
from datetime import datetime
from flask import render_template
from master import app
from master.resources.history_graph import HistoryGraph
@app.route('/')
def home():
_history_graph = HistoryGraph().get(500)
return render_template(
'index.html',
title='API Overview',
history_graph = _history_graph[0]['message'],
data_points = _history_graph[0]['data_points'],
instance_count = _history_graph[0]['instance_count'],
client_count = _history_graph[0]['client_count'],
max_data_points = 1440
)