TIF_E41202548/FlaskSentimen/templates/log_history.html

57 lines
1.9 KiB
HTML

<!-- Navigation -->
{% extends "base.html" %}
{% block title %}History{% endblock %}
<!-- Page Content -->
{% block content %}
<div class="container">
<div class="card card-body mt-5" style="margin-bottom: 10px;">
<h3 class="text-center">ANALISIS SENTIMEN TERHADAP BEA CUKAI PADA MEDIA SOSIAL TWITTER MENGGUNAKAN METODE NAÏVE BAYES</h3>
</div>
{% if msg != False %}
<div class="clear-history" style="margin-bottom: 10px;">
<form class="form-hapus" method="POST" action="{{ url_for('clear_loghistory') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<button class="btn btn-danger" name="clearallhistory" type="submit" value="Submit" onclick="spinner();">Clear History</button>
</form>
</div>
<div class="table caption-top table-bordered table-responsive-md" cellspacing="0" width="100%" style="height: 400px; overflow-y: auto; overflow-x: auto;">
<table class="history table" border="1">
<thead>
<tr style="text-align: right;">
<th>ID</th>
<th>Tanggal</th>
<th>Sentimen</th>
<th>Hasil Prediksi</th>
</tr>
</thead>
<tbody>
{% for x in datahistory %}
<tr>
<!-- <form class="form-inline" method="POST" action="/history/edit"> -->
<form class="form-edit" method="POST" action="{{ url_for('edit_history') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<input value = "{{ x.id }}" type="hidden" name="my_id">
<th>{{ x.id|safe }}</th>
<th>{{ x.datetime.strftime('%Y-%m-%d')|safe }}</th>
<th>{{ x.sentimen|safe }}</th>
<th>{{ x.hasil_sentimen|safe }}</th>
</form>
</tr>
{% endfor %}
</tbody>
</div>
{% else %}
<div class="alert alert-warning" role="alert">
Data History Kosong!!
</div>
{% endif %}
</div>
<!-- /.container -->
{% endblock %}