updated index2.html to display data
This commit is contained in:
parent
927d265bd3
commit
9273d712bb
2
app.py
2
app.py
|
@ -483,7 +483,7 @@ async def check_jumlah_kenderaan():
|
||||||
kenderaan_kiri = result[0][4]
|
kenderaan_kiri = result[0][4]
|
||||||
kenderaan_kanan = result[0][5]
|
kenderaan_kanan = result[0][5]
|
||||||
waktu_sekarang = result[0][3]
|
waktu_sekarang = result[0][3]
|
||||||
return jsonify({'jumlah_kenderaan': jumlah_kenderaan, 'kenderaan_kiri': kenderaan_kiri, 'kenderaan_kanan': kenderaan_kanan, 'waktu_sekarang':waktu_sekarang})
|
return jsonify({'jumlah_kenderaan': jumlah_kenderaan, 'kenderaan_kiri': kenderaan_kiri, 'kenderaan_kanan': kenderaan_kanan, 'waktu_sekarang':waktu_sekarang , selesainya: selesainya})
|
||||||
|
|
||||||
# return jsonify({'jumlah_kenderaan': jumlah_kenderaan, 'kenderaan_kiri': kenderaan_kiri, 'kenderaan_kanan': kenderaan_kanan})
|
# return jsonify({'jumlah_kenderaan': jumlah_kenderaan, 'kenderaan_kiri': kenderaan_kiri, 'kenderaan_kanan': kenderaan_kanan})
|
||||||
|
|
||||||
|
|
|
@ -133,13 +133,15 @@
|
||||||
<div class="col-lg-8 col-md-10 col-xs-12">
|
<div class="col-lg-8 col-md-10 col-xs-12">
|
||||||
|
|
||||||
<div class="box-content">
|
<div class="box-content">
|
||||||
<h4 class="box-title">Hasil Pengolahan Video {% if stat != "Belum Ada Data" %} <i>({{ stat[6] }}) </i>{% endif %}</h4>
|
<h4 class="box-title">Hasil Pengolahan Video {% if stat != "Belum Ada Data" %} <i>({{ stat[6]
|
||||||
|
}}) </i>{% endif %}</h4>
|
||||||
<div class="card-content" id="div-ini-data">
|
<div class="card-content" id="div-ini-data">
|
||||||
<div id="data-video" style="display: none;"></div>
|
<div id="data-video" style="display: none;"></div>
|
||||||
{% if stat == "Belum Ada Data" %}
|
{% if stat == "Belum Ada Data" %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<p id="p-ket">{{ stat }}</p>
|
<p id="p-ket">{{ stat }}</p>
|
||||||
<button type="button" class="btn btn-primary" onclick="proses_video('{{ video }}')" id="btn-proses">Proses</button>
|
<button type="button" class="btn btn-primary" onclick="proses_video('{{ video }}')"
|
||||||
|
id="btn-proses">Proses</button>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
|
@ -167,7 +169,8 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<button type="button" class="btn btn-primary" onclick="proses_video('{{ video }}')" id="btn-proses">Proses</button>
|
<button type="button" class="btn btn-primary" onclick="proses_video('{{ video }}')"
|
||||||
|
id="btn-proses">Proses</button>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -289,6 +292,17 @@
|
||||||
if (document.getElementById('p-ket')) {
|
if (document.getElementById('p-ket')) {
|
||||||
$("#p-ket").html("Window pengolahan video sedang berjalan....")
|
$("#p-ket").html("Window pengolahan video sedang berjalan....")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.getElementById('kiri').innerHTML = 0
|
||||||
|
document.getElementById('kanan').innerHTML = 0
|
||||||
|
document.getElementById('total').innerHTML = 0
|
||||||
|
|
||||||
|
if (document.getElementById('example')) {
|
||||||
|
$("#td-waktu-sekarang").text(0);
|
||||||
|
$("#td-jumlah").text(0);
|
||||||
|
$("#td-kiri").text(0);
|
||||||
|
$("#td-kanan").text(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// run check_jumlah_kenderaan every 1.5 seconds\
|
// run check_jumlah_kenderaan every 1.5 seconds\
|
||||||
|
|
Loading…
Reference in New Issue