service_retrieve_data
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.9.1"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.2.0"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
|
||||
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
|
||||
|
||||
<script src="/js/dashboard/filter.js"></script>
|
||||
<script src="/js/dashboard/charts.js"></script>
|
||||
|
||||
@@ -130,6 +130,10 @@
|
||||
</a>
|
||||
@endforeach
|
||||
|
||||
<button type="button" onclick="reloadDataSource()" class="btn btn-sm btn-warning" style="height: 27px; position: absolute; right: 40px; top: 70px;">
|
||||
Refresh Data
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Main Wrapper -->
|
||||
@@ -143,6 +147,17 @@
|
||||
</div>
|
||||
|
||||
@yield('scripts')
|
||||
|
||||
<script>
|
||||
function reloadDataSource() {
|
||||
fetch(`/api/dashboard/reload`)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
location.reload()
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user