253 lines
10 KiB
HTML
253 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
<meta name="description" content="">
|
|
<meta name="author" content="">
|
|
|
|
<title>Traffic Counter | Halaman Utama</title>
|
|
|
|
<!-- Main Styles -->
|
|
<link rel="stylesheet" href="assets/styles/style.min.css">
|
|
|
|
<!-- mCustomScrollbar -->
|
|
<link rel="stylesheet" href="assets/plugin/mCustomScrollbar/jquery.mCustomScrollbar.min.css">
|
|
|
|
<!-- Waves Effect -->
|
|
<link rel="stylesheet" href="assets/plugin/waves/waves.min.css">
|
|
|
|
<!-- Sweet Alert -->
|
|
<link rel="stylesheet" href="assets/plugin/sweet-alert/sweetalert.css">
|
|
|
|
<!-- Color Picker -->
|
|
<link rel="stylesheet" href="assets/color-switcher/color-switcher.min.css">
|
|
</head>
|
|
|
|
<body>
|
|
<div class="main-menu">
|
|
<header class="header">
|
|
<a href="#" class="logo">Traffic Counter</a>
|
|
<button type="button" class="button-close fa fa-times js__menu_close"></button>
|
|
<div class="user">
|
|
<a href="#" class="avatar"><img src="http://placehold.it/80x80" alt=""><span
|
|
class="status online"></span></a>
|
|
<h5 class="name"><a href="#">Admin</a></h5>
|
|
<h5 class="position">Administrator</h5>
|
|
<!-- /.name -->
|
|
<!-- <div class="control-wrap js__drop_down">
|
|
<i class="fa fa-caret-down js__drop_down_button"></i>
|
|
<div class="control-list">
|
|
<div class="control-item"><a href="profile.html"><i class="fa fa-user"></i> Profile</a></div>
|
|
<div class="control-item"><a href="#"><i class="fa fa-gear"></i> Settings</a></div>
|
|
<div class="control-item"><a href="#"><i class="fa fa-sign-out"></i> Log out</a></div>
|
|
</div>
|
|
|
|
</div> -->
|
|
<!-- /.control-wrap -->
|
|
</div>
|
|
<!-- /.user -->
|
|
</header>
|
|
<!-- /.header -->
|
|
<div class="content">
|
|
|
|
<div class="navigation">
|
|
<h5 class="title">Navigasi</h5>
|
|
<!-- /.title -->
|
|
<ul class="menu js__accordion">
|
|
<li class="current">
|
|
<a class="waves-effect" href="{{ url_for('index') }}"><i class="menu-icon fa fa-home"></i><span>Halaman
|
|
Utama</span></a>
|
|
</li>
|
|
<li>
|
|
<a class="waves-effect" href="{{ url_for('video_list') }}"><i class="menu-icon fa fa-home"></i><span>Video
|
|
Data</span></a>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
<!-- /.navigation -->
|
|
</div>
|
|
<!-- /.content -->
|
|
</div>
|
|
<!-- /.main-menu -->
|
|
|
|
<div class="fixed-navbar">
|
|
<div class="pull-left">
|
|
<button type="button"
|
|
class="menu-mobile-button glyphicon glyphicon-menu-hamburger js__menu_mobile"></button>
|
|
<h1 class="page-title">Halaman Utama</h1>
|
|
<!-- /.page-title -->
|
|
</div>
|
|
<!-- /.pull-left -->
|
|
|
|
</div>
|
|
<!-- /.fixed-navbar -->
|
|
|
|
|
|
<div id="wrapper">
|
|
<div class="main-content">
|
|
|
|
<div class="row small-spacing">
|
|
<div class="col-lg-2 col-md-1 col-xs-12"></div>
|
|
|
|
<div class="col-lg-8 col-md-10 col-xs-12">
|
|
<div class="box-content">
|
|
<h4 class="box-title">Form Analisa Video</h4>
|
|
<div class="card-content">
|
|
<div class="form-group">
|
|
<label for="video">Pilih Video:</label>
|
|
<select class="form-control" id="video" name="video">
|
|
<option value="-Pilih Video-" disabled selected>-Pilih Video-</option>
|
|
{% for video_var in video_list %}
|
|
<option value="{{ video_var }}" {% if video_var==video %}selected{% endif %}>{{
|
|
video_var }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<!-- <div class="form-group">
|
|
<label for="video">Threshold</label>
|
|
<input type="text" class="form-control" id="threshold" name="threshold"
|
|
value="{{ threshold }}">
|
|
</div> -->
|
|
<div class="form-group text-center">
|
|
<button type="button" class="btn btn-primary" onclick="olah_video()">Proses
|
|
Video</button>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-2 col-md-1 col-xs-12"></div>
|
|
</div>
|
|
|
|
|
|
<div class="row small-spacing">
|
|
<div class="col-lg-2 col-md-1 col-xs-12"></div>
|
|
<div class="col-lg-8 col-md-10 col-xs-12">
|
|
|
|
<div class="box-content">
|
|
<h4 class="box-title">Hasil Pengolahan Video</h4>
|
|
<div class="card-content">
|
|
<h4>Input</h4>
|
|
<img src="{{ url_for('video_feed', video=video, threshold=threshold, stat='original') }}"
|
|
alt="Warna">
|
|
<h4>Grayscale</h4>
|
|
<img src="{{ url_for('video_feed', video=video, threshold=threshold, stat='grayscale') }}"
|
|
alt="Warna">
|
|
<h4>Hitam Putih</h4>
|
|
<img src="{{ url_for('video_feed', video=video, threshold=threshold, stat='detectar') }}"
|
|
alt="Grayscale">
|
|
<h4>Output</h4>
|
|
<img src="{{ url_for('video_feed', video=video, threshold=threshold, stat='color') }}"
|
|
alt="Detectar">
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-2 col-md-1 col-xs-12"></div>
|
|
</div>
|
|
|
|
<div class="row small-spacing">
|
|
<div class="col-lg-4 col-md-4 col-xs-12">
|
|
<div class="box-content">
|
|
<div class="statistics-box with-icon">
|
|
<!-- <i class="ico fa fa-car text-info"></i> -->
|
|
<h2 class="counter text-info" id="kiri">...</h2>
|
|
<p class="text">Kenderaan Kiri</p>
|
|
</div>
|
|
</div>
|
|
<!-- /.box-content -->
|
|
</div>
|
|
<div class="col-lg-4 col-md-4 col-xs-12">
|
|
<div class="box-content">
|
|
<div class="statistics-box with-icon">
|
|
<!-- <i class="ico fa fa-car text-info"></i> -->
|
|
<h2 class="counter text-info" id="kanan">...</h2>
|
|
<p class="text">Kenedraan Kanan</p>
|
|
</div>
|
|
</div>
|
|
<!-- /.box-content -->
|
|
</div>
|
|
<div class="col-lg-4 col-md-4 col-xs-12">
|
|
<div class="box-content">
|
|
<div class="statistics-box with-icon">
|
|
<!-- <i class="ico fa fa-car text-info"></i> -->
|
|
<h2 class="counter text-info" id="total">...</h2>
|
|
<p class="text">Jumlah Kenderaan</p>
|
|
</div>
|
|
</div>
|
|
<!-- /.box-content -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<footer class="footer">
|
|
<ul class="list-inline">
|
|
<li>2024 © Traffic Counter.</li>
|
|
<!-- <li><a href="#">Privacy</a></li>
|
|
<li><a href="#">Terms</a></li>
|
|
<li><a href="#">Help</a></li> -->
|
|
</ul>
|
|
</footer>
|
|
</div>
|
|
<!-- /.main-content -->
|
|
</div><!--/#wrapper -->
|
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
|
<!--[if lt IE 9]>
|
|
<script src="assets/script/html5shiv.min.js"></script>
|
|
<script src="assets/script/respond.min.js"></script>
|
|
<![endif]-->
|
|
<!--
|
|
================================================== -->
|
|
<!-- Placed at the end of the document so the pages load faster -->
|
|
<script src="assets/scripts/jquery.min.js"></script>
|
|
<script src="assets/scripts/modernizr.min.js"></script>
|
|
<script src="assets/plugin/bootstrap/js/bootstrap.min.js"></script>
|
|
<script src="assets/plugin/mCustomScrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
|
|
<script src="assets/plugin/nprogress/nprogress.js"></script>
|
|
<script src="assets/plugin/sweet-alert/sweetalert.min.js"></script>
|
|
<script src="assets/plugin/waves/waves.min.js"></script>
|
|
<!-- Full Screen Plugin -->
|
|
<script src="assets/plugin/fullscreen/jquery.fullscreen-min.js"></script>
|
|
|
|
<script src="assets/scripts/main.min.js"></script>
|
|
<script src="assets/color-switcher/color-switcher.min.js"></script>
|
|
<script>
|
|
function olah_video() {
|
|
var video = document.getElementById('video').value;
|
|
// var threshold = document.getElementById('threshold').value;
|
|
var threshold = 450;
|
|
window.location.href = '/?video=' + video + '&threshold=' + threshold;
|
|
}
|
|
|
|
function check_jumlah_kenderaan() {
|
|
// create an ajax
|
|
$.ajax({
|
|
type: "GET",
|
|
url: "/check_jumlah_kenderaan",
|
|
success: function (data) {
|
|
// console.log(data)
|
|
|
|
document.getElementById('kiri').innerHTML = data.kenderaan_kiri
|
|
document.getElementById('kanan').innerHTML = data.kenderaan_kanan
|
|
document.getElementById('total').innerHTML = data.jumlah_kenderaan
|
|
}
|
|
});
|
|
}
|
|
|
|
// run check_jumlah_kenderaan every 1.5 seconds\
|
|
setInterval(check_jumlah_kenderaan, 1500);
|
|
// check_jumlah_kenderaan();
|
|
</script>
|
|
</body>
|
|
|
|
</html> |