2018-08-03 19:17:03 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
|
|
<style>
|
|
|
|
iframe {
|
|
|
|
border: none;
|
2018-08-04 14:44:09 +00:00
|
|
|
padding: 10px;
|
2018-08-03 19:17:03 +00:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<div id="metrics_iframe"></div>
|
|
|
|
<script>
|
|
|
|
function callIframe(url, callback) {
|
|
|
|
$('#metrics_iframe').html('<iframe id="metrics" style="width:100%;height:100%;" />');
|
|
|
|
$('iframe#metrics').attr('src', url);
|
|
|
|
$('iframe#metrics').load(function() {
|
|
|
|
callback(this);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function loadMetrics() {
|
|
|
|
callIframe('templates/metrics_out.html', function(){
|
|
|
|
$.get( "options.py?metrics=1&token="+$('#token').val(), function( data ) {
|
|
|
|
$( ".result" ).html( data );
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
loadMetrics()
|
|
|
|
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|