Added analysis button and scripting

This commit is contained in:
2023-03-05 00:28:54 +00:00
parent ea86fd9ae6
commit a1289da09c
6 changed files with 89 additions and 3 deletions

View File

@ -110,6 +110,27 @@ function parse_data(data) {
}
}
// Analyse Button
$('.dataset-analyse').click(function(event) {
let id = $(this).data('id')
$.ajax({
url: `/admin/analysis/`,
type: 'POST',
data: JSON.stringify({'id': id, 'class': 'dataset'}),
contentType: 'application/json',
success: function(response) {
window.location.href = response
},
error: function(response){
error_response(response)
},
})
event.preventDefault()
})
// Fetch data once page finishes loading
$(window).on('load', function() {
$.ajax({