<div class="row mt-2 mb-4">
	<div class="col">
		<h3>Overview</h3>
		<!-- first row -->
		<div class="row mt-4 list-group list-group-horizontal">
			<div class="col-1"></div>
			<div class="col-2 list-group-item d-flex justify-content-between align-items-center">
				Run:
				<span id="query_overview_run_id">
					<span class="badge badge-secondary badge-pill">?</span>
				</span>
			</div>
			<div class="col-3 list-group-item d-flex justify-content-between align-items-center">
				Threshold:
				<span id="query_overview_threshold" class="badge badge-secondary badge-pill">?</span>
			</div>
			<div class="col-3 list-group-item d-flex justify-content-between align-items-center">
				Query created:
				<span id="query_overview_created" class="badge badge-secondary badge-pill">?</span>
			</div>
			<div class="col-2 list-group-item d-flex justify-content-between align-items-center">
				Total BGCs:
				<span id="query_overview_total_bgcs" class="badge badge-secondary badge-pill">?</span>
			</div>
			<div class="col-1"></div>
		</div>
	</div>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		// fetch and update tables
		$.get({
			url: "/api/reports/module/query/overview",
			data: {
				"report_id": $("#report_id").val(),
				"run_id": $("#run_id").val()
			},
			dataType: "json",
			success: function(response) {
				$("#query_overview_run_id").html("<a href='/run/" + response["run_id"] + "'><button type='button' class='btn btn-sm btn-info'>" + response["run_name"] + "</button></a>");
				$("#query_overview_threshold").text(response["threshold"]);
				$("#query_overview_created").text(response["created"]);
				$("#query_overview_total_bgcs").text(response["bgc_counts"]);
			}
		})
	});
</script>