Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 932463e

Browse files
Add AJAX call to get random problem data matrix
1 parent 1276c34 commit 932463e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

‎static/js/main.js‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,23 @@ $(document).ready(function() {
4040
}
4141
});
4242
});
43+
$("#gen_random").on("click", function() {
44+
$.ajax({
45+
url: '/random',
46+
dataType: 'text',
47+
type: 'post',
48+
contentType: 'application/json',
49+
data: JSON.stringify({
50+
nb_machines: $("#nb_machines").val(),
51+
nb_jobs: $("#nb_jobs").val()
52+
}),
53+
processData: false,
54+
success: function(data, textStatus, jQxhr) {
55+
$("#data").text(data);
56+
},
57+
error: function(jQxhr, textStatus, errorThrow) {
58+
alert("AJAX ERROR");
59+
}
60+
});
61+
});
4362
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /