61 lines
1.8 KiB
HTML
61 lines
1.8 KiB
HTML
{% extends "layout.html" %}
|
|
|
|
{% block content %}
|
|
<main>
|
|
<script>
|
|
|
|
$("#Div0").hide();
|
|
var intTime=300;
|
|
|
|
var timeout = setTimeout(dataRefresh, intTime);
|
|
|
|
function dataRefresh() {
|
|
// scarico i dati aggioranti
|
|
$.ajax({url: "/api/v1/channels/all", success: function(result){
|
|
$("#ServerTime").html(result.timeSrv);
|
|
// if(result.RealDateStatus == "0")
|
|
// {
|
|
// $("#Div0").show();
|
|
// }
|
|
}});
|
|
timeout = setTimeout(dataRefresh, intTime);
|
|
};
|
|
|
|
//funzione powerOff: chiede conferma per spegnimento.
|
|
function powerOff(){
|
|
var R = confirm("Spegnere il sistema?");
|
|
if (R == true){
|
|
$.ajax({
|
|
type: 'PUT'
|
|
,url: "/api/v1/setup/poweroff"
|
|
,data: ""
|
|
})};
|
|
};
|
|
|
|
</script>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<a href="logger" class="btn btn-block btn-primary text-uppercase mt-4">Logger</a>
|
|
</div>
|
|
</div>
|
|
<br>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<a href="settings" class="btn btn-block btn-primary text-uppercase">Impostazioni</a>
|
|
</div>
|
|
</div>
|
|
<br>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<a href="about" class="btn btn-block btn-primary text-uppercase">Info</a>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-4"></div>
|
|
<button type="button" class="btn btn-danger col-4 my-4" onclick="powerOff()">
|
|
<img src="../static/img/power.svg" height="36" width="36"> <br> SHUT DOWN </button>
|
|
</div>
|
|
<div class="col-4"></div>
|
|
</div>
|
|
</main>
|
|
{% endblock %} |