Update Templates
This commit is contained in:
43
templates/stats.html
Normal file
43
templates/stats.html
Normal file
@ -0,0 +1,43 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>TwitFix Stats</title>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
||||
<script type="text/javascript">
|
||||
google.charts.load('current', {'packages':['bar']});
|
||||
google.charts.setOnLoadCallback(drawStuff);
|
||||
|
||||
function drawStuff() {
|
||||
var data = new google.visualization.arrayToDataTable([
|
||||
['Move', 'requests'],
|
||||
["Cached Links Loaded", {{ embeds }}],
|
||||
["New Unique Links Cached", {{ linksCached }}],
|
||||
["API Calls", {{ api }}],
|
||||
["Direct Videos Downloaded", {{ downloadss }}]
|
||||
]);
|
||||
|
||||
var options = {
|
||||
width: 800,
|
||||
legend: { position: 'none' },
|
||||
axes: {
|
||||
x: {
|
||||
0: { side: 'top', label: 'Data Gathered for {{ date }}'} // Top x-axis.
|
||||
}
|
||||
},
|
||||
bar: { groupWidth: "90%" }
|
||||
};
|
||||
|
||||
var chart = new google.charts.Bar(document.getElementById('top_x_div'));
|
||||
// Convert the Classic options to Material options.
|
||||
chart.draw(data, google.charts.Bar.convertOptions(options));
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="center">
|
||||
<div id="top_x_div" style="width: 800px; height: 600px; display: block; margin: 0 auto;"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user