2018-05-05 12:40:41 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
|
|
<br />
|
2018-08-06 16:18:12 +00:00
|
|
|
<form style="padding-left: 5px;" action="viewsttats.py" method="get">
|
2018-05-05 12:40:41 +00:00
|
|
|
<select autofocus required name="serv" id="serv">
|
|
|
|
<option disabled>Choose server</option>
|
|
|
|
{% for select in selects %}
|
|
|
|
{% if select.2 == serv %}
|
|
|
|
<option value="{{ select.2 }}" selected>{{ select.1 }}</option>
|
|
|
|
{% else %}
|
|
|
|
<option value="{{ select.2 }}">{{ select.1 }}</option>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
<a class="ui-button ui-widget ui-corner-all" id="show" title="Show stats" onclick="{{ onclick }}">Show</a>
|
|
|
|
</form>
|
2018-07-23 07:08:43 +00:00
|
|
|
<br />
|
2018-08-06 16:18:12 +00:00
|
|
|
<div id="ajax" style="margin-left: 5px; margin-right: 5px;"></div>
|
2019-09-08 09:59:25 +00:00
|
|
|
<div id="notice" style="padding-left: 15px; font-size: 25px;">
|
|
|
|
Please choose a server
|
|
|
|
</div>
|
2018-05-13 18:07:33 +00:00
|
|
|
<script>
|
2019-09-08 09:59:25 +00:00
|
|
|
if (cur_url[1]) {
|
|
|
|
showStats();
|
|
|
|
}
|
|
|
|
|
2018-05-13 18:07:33 +00:00
|
|
|
function sleep(ms) {
|
|
|
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
|
|
}
|
|
|
|
async function wait() {
|
2018-05-16 04:16:07 +00:00
|
|
|
$('form').append('<input type="hidden" name="serv" value='+$("#serv").val()+'>');
|
2018-06-06 15:29:30 +00:00
|
|
|
$('form').append('<input type="hidden" name="token" value='+$('#token').val()+'>');
|
2018-05-16 04:16:07 +00:00
|
|
|
$( "input[type=submit], button" ).button();
|
2019-09-08 09:59:25 +00:00
|
|
|
$('#notice').hide();
|
2018-05-16 04:16:07 +00:00
|
|
|
$('li').css('margin-top', '0');
|
2019-09-08 09:59:25 +00:00
|
|
|
$('li').css('width', '207px ');
|
2018-08-06 16:18:12 +00:00
|
|
|
$('th').css('background-color', '#f5faf4');
|
2018-05-16 04:16:07 +00:00
|
|
|
$('table.tbl th.pxname').css('background-color', '#5d9ceb');
|
2018-08-06 16:18:12 +00:00
|
|
|
|
2018-08-04 14:44:09 +00:00
|
|
|
$('table.tbl th.pxname').css('width', '100%');
|
2018-05-16 04:16:07 +00:00
|
|
|
$('a.px:link').css('color', '#fff');
|
2018-08-06 16:18:12 +00:00
|
|
|
$('td').css('font-family', '"Helvetica Neue", Helvetica, Arial, sans-serif');
|
|
|
|
$('td').css('font-size', '11');
|
2018-07-23 07:08:43 +00:00
|
|
|
$('h1').css('display', 'none');
|
2018-08-06 16:18:12 +00:00
|
|
|
$('td').css('border-color', '#ddd');
|
2018-10-03 10:14:57 +00:00
|
|
|
$('td').css('padding', '3px');
|
2018-08-06 16:18:12 +00:00
|
|
|
$('th').css('padding-top', '4px');
|
|
|
|
$('th').css('padding-bottom', '4px');
|
|
|
|
$('th').css('border-color', '#ddd');
|
2018-05-16 04:16:07 +00:00
|
|
|
$('h1').next().css('display', 'none');
|
2018-07-23 07:08:43 +00:00
|
|
|
$('h1').next().next().css('display', 'none');
|
|
|
|
$('h1').next().next().next().css('display', 'none');
|
|
|
|
$('h1').next().next().next().next().css('display', 'none');
|
2018-05-16 04:16:07 +00:00
|
|
|
$( "select" ).selectmenu();
|
2018-10-21 06:51:43 +00:00
|
|
|
{% if role == 3 %}
|
|
|
|
$('input[type=checkbox]').remove()
|
|
|
|
{% endif %}
|
2018-05-16 04:16:07 +00:00
|
|
|
await sleep(2000);
|
2018-05-13 18:07:33 +00:00
|
|
|
|
|
|
|
$("form").submit(function() {
|
2018-05-17 08:13:54 +00:00
|
|
|
$.ajax({
|
|
|
|
type: "get",
|
|
|
|
url: "options.py",
|
|
|
|
dataType: "text",
|
|
|
|
data: $(this).serialize(),
|
|
|
|
success: function( data ) {
|
|
|
|
showStats();
|
|
|
|
}
|
2018-05-13 18:07:33 +00:00
|
|
|
});
|
2018-05-17 08:13:54 +00:00
|
|
|
return false;
|
2018-05-13 18:07:33 +00:00
|
|
|
});
|
2018-06-05 09:18:54 +00:00
|
|
|
}
|
|
|
|
$('#serv').on('selectmenuchange',function() {
|
2019-09-08 09:59:25 +00:00
|
|
|
showStats();
|
2018-06-05 09:18:54 +00:00
|
|
|
});
|
2018-10-21 06:51:43 +00:00
|
|
|
|
2018-05-13 18:07:33 +00:00
|
|
|
</script>
|
2018-05-05 12:40:41 +00:00
|
|
|
<link href="/inc/style.css" rel="stylesheet">
|
|
|
|
{% endblock %}
|