665 lines
32 KiB
HTML
665 lines
32 KiB
HTML
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
|
||
<link rel="stylesheet" href="../files/bootstrap.min.css">
|
||
<link rel="stylesheet" href="../files/layout.css">
|
||
<script src="../files/jquery-3.3.1.min.js"></script>
|
||
<script src="../files/popper.min.js"></script>
|
||
<script src="../files/bootstrap.min.js"></script>
|
||
<script src="./base.js"></script>
|
||
<title id="pt_v">iForte</title>
|
||
</head>
|
||
<body>
|
||
<!-- NAV WILL BE ADDED HERE BY JS gens() FUNCTION IN BASE -->
|
||
<div class="fixed-top text-center device-label" id="pth">iForte</div>
|
||
<div class="container-fluid in">
|
||
<h1>Device logs</h1>
|
||
<div class="row" id="boxes">
|
||
<div class="col-12 box-c">
|
||
<h2 id="sta_err">
|
||
<button class="btn btn-primary btn-pm" type="button" data-toggle="collapse" data-target="#lfb">
|
||
<i class="blue"></i>
|
||
</button> Logs filter <a class="cfg" onclick="cfgm();">
|
||
<img src="../files/settings.svg">
|
||
</a>
|
||
</h2>
|
||
<div class="box collapse clearfix" id="lfb">
|
||
<h3>
|
||
<button class="btn btn-primary btn-pm" type="button" data-toggle="collapse" data-target="#f_me">
|
||
<i></i>
|
||
</button> Mechanical errors <div class="fall">
|
||
<input type="checkbox" id="f_me_p"> all must pass
|
||
</div>
|
||
</h3>
|
||
<div class="collapse" id="f_me">
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_0" value="0">
|
||
<label class="form-check-label" for="fe_0">Pan error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_1" value="1">
|
||
<label class="form-check-label" for="fe_1">Tilt error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_2" value="2">
|
||
<label class="form-check-label" for="fe_2">Gobo Carousel 1 error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_3" value="3">
|
||
<label class="form-check-label" for="fe_3">Gobo Rotation 1 error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_4" value="4">
|
||
<label class="form-check-label" for="fe_4">Gobo Carousel 2 error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_5" value="5">
|
||
<label class="form-check-label" for="fe_5">Gobo Rotation 2 error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_6" value="6">
|
||
<label class="form-check-label" for="fe_6">Frost/Prism error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_7" value="7">
|
||
<label class="form-check-label" for="fe_7">Focus error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_8" value="8">
|
||
<label class="form-check-label" for="fe_8">Zoom error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_9" value="9">
|
||
<label class="form-check-label" for="fe_9">Iris error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_10" value="10">
|
||
<label class="form-check-label" for="fe_10">Fr. Shutters Rot. error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_11" value="11">
|
||
<label class="form-check-label" for="fe_11">Fr. Shutter 1 error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_12" value="12">
|
||
<label class="form-check-label" for="fe_12">Fr. Shutter 2 error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_13" value="13">
|
||
<label class="form-check-label" for="fe_13">Fr. Shutter 3 error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_14" value="14">
|
||
<label class="form-check-label" for="fe_14">Fr. Shutter 4 error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_15" value="15">
|
||
<label class="form-check-label" for="fe_15">Effect Wheel error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_16" value="16">
|
||
<label class="form-check-label" for="fe_16">Color 1 error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_17" value="17">
|
||
<label class="form-check-label" for="fe_17">Color 2 error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_18" value="18">
|
||
<label class="form-check-label" for="fe_18">Prism Rot. error</label>
|
||
</div>
|
||
</div>
|
||
<h3>
|
||
<button class="btn btn-primary btn-pm" type="button" data-toggle="collapse" data-target="#f_se">
|
||
<i></i>
|
||
</button> System errors <div class="fall">
|
||
<input type="checkbox" id="f_se_p"> all must pass
|
||
</div>
|
||
</h3>
|
||
<div class="collapse" id="f_se">
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_19" value="0">
|
||
<label class="form-check-label" for="fe_19">Fans failure</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_20" value="1">
|
||
<label class="form-check-label" for="fe_20">Too much humidity in device</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_21" value="2">
|
||
<label class="form-check-label" for="fe_21">Vcc 5v failure</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_22" value="3">
|
||
<label class="form-check-label" for="fe_22">Overheated</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_23" value="6">
|
||
<label class="form-check-label" for="fe_23">Temperature sensor error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_24" value="7">
|
||
<label class="form-check-label" for="fe_24">Vcc 48v failure</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_25" value="8">
|
||
<label class="form-check-label" for="fe_25">Eeprom error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_26" value="9">
|
||
<label class="form-check-label" for="fe_26">Recharge the battery</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_27" value="10">
|
||
<label class="form-check-label" for="fe_27">Battery faulty. replace it</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_28" value="11">
|
||
<label class="form-check-label" for="fe_28">Pan/tilt EMS cal. error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_29" value="12">
|
||
<label class="form-check-label" for="fe_29">Pan/tilt EMS error</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_30" value="13">
|
||
<label class="form-check-label" for="fe_30">Internal error 1</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_31" value="14">
|
||
<label class="form-check-label" for="fe_31">Internal error 2</label>
|
||
</div>
|
||
</div>
|
||
<h3>
|
||
<button class="btn btn-primary btn-pm" type="button" data-toggle="collapse" data-target="#f_sst">
|
||
<i></i>
|
||
</button> Statuses <div class="fall">
|
||
<input type="checkbox" id="f_sst_p"> all must pass
|
||
</div>
|
||
</h3>
|
||
<div class="collapse" id="f_sst">
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_32" value="0">
|
||
<label class="form-check-label" for="fe_32">Power on</label>
|
||
</div>
|
||
<div class="form-check form-check-inline">
|
||
<input type="checkbox" class="form-check-input" id="fe_33" value="3">
|
||
<label class="form-check-label" for="fe_33">Power off</label>
|
||
</div>
|
||
</div>
|
||
<h3>
|
||
<button class="btn btn-primary btn-pm" type="button" data-toggle="collapse" data-target="#f_te">
|
||
<i></i>
|
||
</button> Temperatures <div class="fall">
|
||
<input type="checkbox" id="f_te_p"> all must pass
|
||
</div>
|
||
</h3>
|
||
<div class="collapse" id="f_te">
|
||
<div class="form-row">
|
||
<div class="form-group col-auto">
|
||
<label class="col-form-label" id="tl3" for="fts3">PSU</label>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<select class="form-control" id="fts3">
|
||
<option value="0">-</option>
|
||
<option value="1"><=</option>
|
||
<option value="2">>=</option>
|
||
</select>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<input type="text" class="form-control" size="5" id="ftv3">
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<label class="col-form-label" for="ftv3">° <span class="tu">C</span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<div class="form-group col-auto">
|
||
<label class="col-form-label" id="tl0" for="fts0">LEDs</label>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<select class="form-control" id="fts0">
|
||
<option value="0">-</option>
|
||
<option value="1"><=</option>
|
||
<option value="2">>=</option>
|
||
</select>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<input type="text" class="form-control" size="5" id="ftv0">
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<label class="col-form-label" for="ftv0">° <span class="tu">C</span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<div class="form-group col-auto">
|
||
<label class="col-form-label" id="tl1" for="fts1">Driver</label>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<select class="form-control" id="fts1">
|
||
<option value="0">-</option>
|
||
<option value="1"><=</option>
|
||
<option value="2">>=</option>
|
||
</select>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<input type="text" class="form-control" size="5" id="ftv1">
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<label class="col-form-label" for="ftv1">° <span class="tu">C</span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<div class="form-group col-auto">
|
||
<label class="col-form-label" id="tl2" for="fts2">Base</label>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<select class="form-control" id="fts2">
|
||
<option value="0">-</option>
|
||
<option value="1"><=</option>
|
||
<option value="2">>=</option>
|
||
</select>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<input type="text" class="form-control" size="5" id="ftv2">
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<label class="col-form-label" for="ftv2">° <span class="tu">C</span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<h3>
|
||
<button class="btn btn-primary btn-pm" type="button" data-toggle="collapse" data-target="#f_dt">
|
||
<i></i>
|
||
</button> Start date/time
|
||
</h3>
|
||
<div class="collapse" id="f_dt">
|
||
<div class="form-row">
|
||
<div class="form-group col-auto">
|
||
<label for="fsd" class="col-form-label">Date</label>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<input type="date" class="form-control" id="fsd" step="1">
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<label for="fst" class="col-form-label">Time</label>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<input type="time" class="form-control" id="fst" step="1">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<h3>
|
||
<button class="btn btn-primary btn-pm" type="button" data-toggle="collapse" data-target="#f_cfg">
|
||
<i></i>
|
||
</button> Sorting,filter pass
|
||
</h3>
|
||
<div class="collapse" id="f_cfg">
|
||
<div class="form-row">
|
||
<div class="form-group col-auto">
|
||
<label class="col-form-label" for="fso">Sorting</label>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<select class="form-control" id="fso">
|
||
<option value="0">descending</option>
|
||
<option value="1">ascending</option>
|
||
</select>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<label class="col-form-label" for="fpas">Filter pass</label>
|
||
</div>
|
||
<div class="form-group col-auto">
|
||
<select class="form-control" id="fpas">
|
||
<option value="0">single groups</option>
|
||
<option value="1">all groups</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="ferr"></div>
|
||
<div class="float-right">
|
||
<button type="button" class="btn btn-primary mr06" id="fap">Apply filter</button>
|
||
<button type="button" class="btn btn-primary" id="fcl">Clear filter</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="row" id="logs">
|
||
<div class="col-md-6 box-c log">
|
||
<h2>Log 2.3.2023 15:57:55</h2>
|
||
<div class="box">
|
||
<div class="lse">
|
||
<h3>Statuses</h3>Power On
|
||
</div>
|
||
<div>
|
||
<h3>Temperatures</h3>
|
||
<ul class="group">
|
||
<li class="dn">LEDs</li>
|
||
<li class="dn">Driver</li>
|
||
<li>Base</li>
|
||
<li class="dn">PSU</li>
|
||
</ul>
|
||
<ul class="group vals">
|
||
<li class="dn">-32°C</li>
|
||
<li class="dn">-32°C</li>
|
||
<li class="">37°C</li>
|
||
<li class="dn">-32°C</li>
|
||
</ul>
|
||
<h3>Display orientation</h3>Side Botom
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6 box-c log">
|
||
<h2>Log 2.3.2023 15:37:22</h2>
|
||
<div class="box">
|
||
<div class="lse">
|
||
<h3>Statuses</h3>Power Off
|
||
</div>
|
||
<div>
|
||
<h3>Temperatures</h3>
|
||
<ul class="group">
|
||
<li>LEDs</li>
|
||
<li>Driver</li>
|
||
<li>Base</li>
|
||
<li>PSU</li>
|
||
</ul>
|
||
<ul class="group vals">
|
||
<li class="">23°C</li>
|
||
<li class="">35°C</li>
|
||
<li class="">34°C</li>
|
||
<li class="">33°C</li>
|
||
</ul>
|
||
<h3>Display orientation</h3>Side Botom
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6 box-c log">
|
||
<h2>Log 2.3.2023 13:04:27</h2>
|
||
<div class="box">
|
||
<div>
|
||
<h3>Temperatures</h3>
|
||
<ul class="group">
|
||
<li class="dn">LEDs</li>
|
||
<li class="dn">Driver</li>
|
||
<li>Base</li>
|
||
<li class="dn">PSU</li>
|
||
</ul>
|
||
<ul class="group vals">
|
||
<li class="dn">-32°C</li>
|
||
<li class="dn">-32°C</li>
|
||
<li class="">21°C</li>
|
||
<li class="dn">-32°C</li>
|
||
</ul>
|
||
<h3>Display orientation</h3>Side Botom
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6 box-c log">
|
||
<h2>Log 2.3.2023 13:04:25</h2>
|
||
<div class="box">
|
||
<div class="lse">
|
||
<h3>Statuses</h3>Power On
|
||
</div>
|
||
<div>
|
||
<h3>Temperatures</h3>
|
||
<ul class="group">
|
||
<li class="dn">LEDs</li>
|
||
<li class="dn">Driver</li>
|
||
<li>Base</li>
|
||
<li class="dn">PSU</li>
|
||
</ul>
|
||
<ul class="group vals">
|
||
<li class="dn">-32°C</li>
|
||
<li class="dn">-32°C</li>
|
||
<li class="">21°C</li>
|
||
<li class="dn">-32°C</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="text-center" id="nxtl">
|
||
<button class="btn btn-primary nlb">
|
||
<strong>+</strong>
|
||
</button>
|
||
</div>
|
||
</div>
|
||
<div id="cfg-modal" class="modal fade" tabindex="-1" role="dialog">
|
||
<div class="modal-dialog" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<img src="../files/settings.svg">
|
||
<h5 class="modal-title" id="m-t"></h5>
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
<span aria-hidden="true">×</span>
|
||
</button>
|
||
</div>
|
||
<div class="modal-body" id="m-b"></div>
|
||
<div class="modal-footer" id="m-f">
|
||
<button type="button" class="btn btn-primary sb">Save</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script>
|
||
var lfn = 'data';
|
||
|
||
function cfgm() {
|
||
$('#m-t').html('Logs tools');
|
||
$('#m-f').empty();
|
||
$('.sb').unbind();
|
||
var tl = c_btn('Download log file', 0, ' dlog');
|
||
tl += c_btn('Start DMX sniff', 0, ' ddmx');
|
||
$('#m-b').html(tl);
|
||
$('#cfg-modal').modal();
|
||
$('.dlog').bind('click', function() {
|
||
location = 'file-' + lfn + '.log';
|
||
close_modal()
|
||
});
|
||
$('.ddmx').bind('click', function() {
|
||
do_ajax('/serr', {}, function(json) {
|
||
if (json) {
|
||
if (json['dmxsnf'] == 1) alert('DMX sniffer is already running on device!');
|
||
else {
|
||
location = 'dmx_sniffer.log';
|
||
close_modal()
|
||
}
|
||
}
|
||
})
|
||
})
|
||
}
|
||
$(document).ready(function() {
|
||
$('h1').html('Device logs');
|
||
$('#boxes').after(' < div class = "row"
|
||
id = "logs" > < /div> < div class = "text-center"
|
||
id = "nxtl" > < button class = "btn btn-primary nlb" > < strong > + < /strong> < /button> < /div>');var boxes='';boxes+=' < div class = "col-12 box-c" > ';boxes+=' < h2 id = "sta_err" > < button class = "btn btn-primary btn-pm"
|
||
type = "button"
|
||
data - toggle = "collapse"
|
||
data - target = "#lfb" > < i class = "blue" > < /i> < /button>';boxes+=' Logs filter';boxes+=' < a class = "cfg"
|
||
onclick = "cfgm();" > < img src = "../files/settings.svg" > < /a>';boxes+=' < /h2>';boxes+=' < div class = "box collapse clearfix"
|
||
id = "lfb" > ';boxes+=c_tit('
|
||
f_me ','
|
||
Mechanical errors ',true,'
|
||
',1);boxes+=c_tit('
|
||
f_se ','
|
||
System errors ',true,'
|
||
',1);boxes+=c_tit('
|
||
f_sst ','
|
||
Statuses ',true,'
|
||
',1);boxes+=c_tit('
|
||
f_te ','
|
||
Temperatures ',false,'
|
||
',1);boxes+=c_ftmp(3,'
|
||
PSU ');boxes+=c_ftmp(0,'
|
||
LEDs ');boxes+=c_ftmp(1,'
|
||
Driver ');boxes+=c_ftmp(2,'
|
||
Base ');boxes+=' < /div>';boxes+=c_tit('f_dt','Start date/time
|
||
',false,'
|
||
',0);boxes+=' < div class = "form-row" > ';boxes+=c_dt('
|
||
fsd ','
|
||
Date ','
|
||
','
|
||
col - auto ','
|
||
date ');boxes+=c_dt('
|
||
fst ','
|
||
Time ','
|
||
','
|
||
col - auto ','
|
||
time ');boxes+=' < /div>';boxes+=' < /div>';boxes+=c_tit('f_cfg','Sorting,filter pass',false,'',0);boxes+=' < div class = "form-row" > ';boxes+=c_sil('
|
||
fso ','
|
||
Sorting ',['
|
||
descending ','
|
||
ascending ']);boxes+=c_sil('
|
||
fpas ','
|
||
Filter pass ',['
|
||
single groups ','
|
||
all groups ']);boxes+=' < /div>';boxes+=' < /div>';boxes+=' < div id = "ferr" > < /div>';boxes+=' < div class = "float-right" > < button type = "button"
|
||
class = "btn btn-primary mr06"
|
||
id = "fap" > Apply filter < /button> < button type = "button"
|
||
class = "btn btn-primary"
|
||
id = "fcl" > Clear filter < /button> < /div>';boxes+=' < /div>';boxes+=' < /div>';$('#boxes').html(boxes);var me_lb=[];var se_lb=[];var sst_lb=[];do_ajax('/status_i
|
||
',{},function (json){if(json){fill_values(json,['
|
||
dmxa ','
|
||
dmxp ','
|
||
dmxf ','
|
||
dmxi ','
|
||
pt ','
|
||
ip ','
|
||
mac ','
|
||
rdmu ','
|
||
rdmn ']);ptit(json['
|
||
pt ']);$('.tu ').html(json['
|
||
tu ']);lfn=json['
|
||
lfn ']}});do_ajax(' / logst ',{},function (json){if(json){for (i=0;i < json['titles'].length; i++) {
|
||
var t = json['titles'][i].trim().split(':');
|
||
var ai = [parseInt(t[0]), t[1], parseInt(t[2])];
|
||
switch (ai[0]) {
|
||
case 0:
|
||
$('#f_me').append(c_chb('fe_' + i, ai[1] + ' error', ai[2], ''));
|
||
me_lb[ai[2]] = ai[1] + ' error';
|
||
break;
|
||
case 1:
|
||
$('#f_se').append(c_chb('fe_' + i, lfix(ai[1]), ai[2], ''));
|
||
se_lb[ai[2]] = ai[1];
|
||
break;
|
||
case 2:
|
||
$('#f_sst').append(c_chb('fe_' + i, lfix(ai[1]), ai[2], ''));
|
||
sst_lb[ai[2]] = ai[1];
|
||
break
|
||
}
|
||
}
|
||
}
|
||
});
|
||
$('#fap').bind('click', function() {
|
||
var merf = 0;
|
||
var sef = 0;
|
||
var stf = 0;
|
||
var fps = 0;
|
||
$('#f_me input').each(function() {
|
||
if ($(this).prop('checked')) merf |= (1 << $(this).val())
|
||
});
|
||
$('#f_se input').each(function() {
|
||
if ($(this).prop('checked')) sef |= (1 << $(this).val())
|
||
});
|
||
$('#f_sst input').each(function() {
|
||
if ($(this).prop('checked')) stf |= (1 << $(this).val())
|
||
});
|
||
var p = 'merf=' + merf + '&sef=' + sef + '&stf=' + stf;
|
||
for (i = 0; i < 3; i++) {
|
||
p += '&fts' + i + '=' + ($('#fts' + i).val() != undefined ? $('#fts' + i).val() : 0);
|
||
p += '&ftv' + i + '=' + ($('#ftv' + i).val() != undefined ? $('#ftv' + i).val() : '')
|
||
}
|
||
var di = $('#fsd').val();
|
||
var ti = $('#fst').val();
|
||
var d = new Date(di + ' ' + ti);
|
||
if (!!d.valueOf()) {
|
||
p += '&dty=' + d.getFullYear();
|
||
p += '&dtmo=' + (d.getMonth() + 1);
|
||
p += '&dtd=' + d.getDate();
|
||
p += '&dth=' + d.getHours();
|
||
p += '&dtmi=' + d.getMinutes();
|
||
p += '&dts=' + d.getSeconds()
|
||
}
|
||
p += '&fso=' + $('#fso').val();
|
||
var fps_ids = ['f_me', 'f_se', 'f_st', 'f_te'];
|
||
for (i = 0; i < fps_ids.length; i++) {
|
||
if ($('#' + fps_ids[i] + '_p').prop('checked')) fps |= (1 < < i)
|
||
}
|
||
fps |= $('#fpas').val() == 1 ? (1 < < 7) : 0;
|
||
p += '&fps=' + fps;
|
||
do_ajax('/logsf', p, function(json) {
|
||
if (json) {
|
||
if (json['err']) {
|
||
$('#ferr').html(' < div class = "alert alert-danger"
|
||
role = "alert" > There are some wrong input values in logs filter! < /div>')} else {$('#ferr').html('');$('#logs').html('');llogs()}}})});$('#fap').click();$('#fcl').bind('click',function(){$('#lfb input[type=checkbox]').prop('checked',false);$('#lfb select').val('0');$('#lfb input[type=text]').val('');$('#fap').click()});$('.btn-pm').bind('click',function(){if($(this).attr('aria-expanded')=='true') $(this).removeClass('op');else $(this).addClass('op')});$('#nxtl').bind('click',function(){llogs()});function llogs(){for (i=0;i < 4; i++) {
|
||
do_ajax('/log', '', function(json) {
|
||
if (json && json['time']) {
|
||
var html = ' < div class = "col-md-6 box-c log" > ';html+=' < h2 > Log '+json['
|
||
time ']+' < /h2> < div class = "box" > ';var c='
|
||
';var fi=true;for (i=0;i < 24;
|
||
i++) {
|
||
if (!(json['me'] & (1 < < i))) {
|
||
c += (fi ? '' : ',') + me_lb[i];
|
||
fi = false
|
||
}
|
||
}
|
||
if (!fi) html += ' < div class = "lme" > < h3 > Mechanical errors < /h3>'+c+' < /div>';c='';fi=true;for (i=0;i < 16;
|
||
i++) {
|
||
if (!(json['se'] & (1 < < i))) {
|
||
c += (fi ? '' : ',') + se_lb[i];
|
||
fi = false
|
||
}
|
||
}
|
||
if (!fi) html += ' < div class = "lse" > < h3 > System errors < /h3>'+c+' < /div>';c='';fi=true;for (i=0;i < 8; i++) {
|
||
if (!(json['st'] & (1 < < i))) {
|
||
c += (fi ? '' : ',') + sst_lb[i];
|
||
fi = false
|
||
}
|
||
}
|
||
if (!fi) html += ' < div class = "lse" > < h3 > Statuses < /h3>'+c+' < /div>';if(json['st'] & (1< < 7)) {
|
||
html += ' < div > < h3 > Temperatures < /h3> < ul class = "group" > ';var tc=4;var t=json['
|
||
tmp '];for (j=0;j < tc;
|
||
j++) {
|
||
if ($('#tl' + j).length == 0) continue;
|
||
html += ' < li '+(t[j+1]==' - 32 ' ? '
|
||
class = "dn"
|
||
':'
|
||
')+' > '+$('
|
||
#tl '+j).html()+' < /li>'}html+=' < /ul> < ul class = "group vals" > ';var c;for (j=0;j < tc;
|
||
j++) {
|
||
if ($('#tl' + j).length == 0) continue;
|
||
c = '';
|
||
if (t[0] & (1 < < j)) c += ' err';
|
||
if (t[j + 1] == '-32') c += ' dn';
|
||
html += ' < li class = "'+c.trim()+'" > ';html+=t[j+1]+' & deg;
|
||
'+json['
|
||
tu ']+' < /li>'}html+=' < /ul>';if(json['dor']!='Undefined') html+=' < h3 > Display orientation < /h3>'+json['dor'];html+=' < /div>'}html+=' < /div> < /div>';$('#logs').append(html);$('#nxtl').show()} else $('#nxtl').hide()})}}});function lfix(l){return l.charAt(0).toUpperCase()+l.slice(1).toLowerCase().replace('ems','EMS')}function c_chb(id,t,v,ch){var html=' < div class = "form-check form-check-inline" > < input type = "checkbox"
|
||
class = "form-check-input"
|
||
id = "'+id+'"
|
||
value = "'+v+'"
|
||
'+ch+' > ';html+=' < label class = "form-check-label"
|
||
for = "'+id+'" > '+t+' < /label> < /div>';return html}function c_tit(id,t,e,c,p){var html=' < h3 > < button class = "btn btn-primary btn-pm"
|
||
type = "button"
|
||
data - toggle = "collapse"
|
||
data - target = "#'+id+'" > < i > < /i> < /button>';html+=' '+t;if(p) html+=' < div class = "fall" > < input type = "checkbox"
|
||
id = "'+id+'_p" > all must pass < /div>';html+=' < /h3>';html+=' < div class = "collapse'+c+'"
|
||
id = "'+id+'" > ';if(e) html+=' < /div>';return html}function c_ftmp(i,t){var html='';html+=' < div class = "form-row" > ';html+=' < div class = "form-group col-auto" > < label class = "col-form-label"
|
||
id = "tl'+i+'"
|
||
for = "fts'+i+'" > '+t+' < /label> < /div>';html+=' < div class = "form-group col-auto" > < select class = "form-control"
|
||
id = "fts'+i+'" > ';html+=' < option value = "0" > - < /option> < option value = "1" > & lt; = < /option> < option value = "2" > & gt; = < /option>';html+=' < /select> < /div>';html+=' < div class = "form-group col-auto" > < input type = "text"
|
||
class = "form-control"
|
||
size = "5"
|
||
id = "ftv'+i+'" > < /div>';html+=' < div class = "form-group col-auto" > < label class = "col-form-label"
|
||
for = "ftv'+i+'" > & deg; < span class = "tu" > < /span> < /label> < /div>';html+=' < /div>';return html}function c_sil(id,t,o){var html=' < div class = "form-group col-auto" > < label class = "col-form-label"
|
||
for = "'+id+'" > '+t+' < /label> < /div>';html+=' < div class = "form-group col-auto" > < select class = "form-control"
|
||
id = "'+id+'" > ';for (i=0;i < o.length;
|
||
i++) {
|
||
html += ' < option value = "'+i+'" > '+o[i]+' < /option>'}html+=' < /select> < /div>';return html}
|
||
</script>
|
||
</body>
|
||
</html> |