Skip to content

Commit

Permalink
Remove support for custom analysis sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
153957 committed Mar 31, 2024
1 parent d40b1a3 commit e82fe65
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 37 deletions.
1 change: 0 additions & 1 deletion index.html
Expand Up @@ -15,7 +15,6 @@ <h2>Web apps</h2>

<h3>Analysis sessions</h3>
<p>
<a href="https://data.hisparc.nl/analysis-session/request/">Session request form</a><br>
<a href="jsparc.html">Analysis software</a>
</p>

Expand Down
34 changes: 2 additions & 32 deletions jsparc.html
Expand Up @@ -152,33 +152,16 @@
// Use local test data
// url = 'examples/jsparc_data_n3.json';
// url = 'examples/jsparc_data_n6.json';
$.getJSON(url, get_coincidence)
$.getJSON(url, {'session_title': 'example'})
.done(loadData)
.fail(showError);
}

function getExample() {
$("#sessionTitle").val('example');
$("#sessionPin").val('1337');
$("#studentName").val('test');
get_coincidence.session_title = $("#sessionTitle").val();
get_coincidence.session_pin = $("#sessionPin").val();
get_coincidence.student_name = $("#studentName").val();
if (dataflag) {
retrieveData();}
}

function getData() {
if ($("#sessionTitle").val() === "" || $("#sessionPin").val() === "" || $("#studentName").val() === "") {
alert("Fill in each field");}
else {
get_coincidence.session_title = $("#sessionTitle").val();
get_coincidence.session_pin = $("#sessionPin").val();
get_coincidence.student_name = $("#studentName").val();
if (dataflag) {
retrieveData();}}
}

$(function() {
// Animate HiSPARC logo during ajax activity
$(document).ajaxStart(function() {$('#pageHeader').addClass('animated');})
Expand All @@ -187,11 +170,6 @@
$("#sessionHash").val(get_coincidence.session_hash);

$("#exampleButton").click(getExample);
$("#dataButton").click(getData);

$('body').keyup(function (event) {
if (event.which === 13) {
getData();}});
});
</script>
</head>
Expand Down Expand Up @@ -227,15 +205,7 @@
<a href="index.html">➔ jSparc</a>
</div>
<div id="session_form">
<form>
<table>
<tr><td>Title</td><td><input type="text" id="sessionTitle"></td></tr>
<tr><td>Pin</td><td><input type="text" id="sessionPin"></td></tr>
<tr><td>Name</td><td><input type="text" id="studentName"></td></tr>
</table>
</form>
<input type="button" id="dataButton" value="Get data">
<input type="button" id="exampleButton" value="Get example">
<input type="button" id="exampleButton" value="Get a coincidence">
</div>
<form id="info">
<table id="coinInfo">
Expand Down
5 changes: 1 addition & 4 deletions jsparc.js
Expand Up @@ -234,13 +234,10 @@ function makeShowerMap(data) {
function sendResult() {
/* Send the analysis result to the server
*/
result.session_title = get_coincidence.session_title;
result.session_pin = get_coincidence.session_pin;
result.student_name = get_coincidence.student_name;
result.session_title = 'example';
$.getJSON(BASE_URL + '/result/', result, function(data) {
$("#analyseTab").hide();
window.alert(data.msg + "\nYou are number " + data.rank + ".");
// FIXME: This 'reload' should be smarter and remember the Title and PIN (possible probably also the Student name)
window.location.reload();
});
}
Expand Down

0 comments on commit e82fe65

Please sign in to comment.