blob: 7c24e785e8e9df1be7b9d48b9b3275c20d5667ea (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<!DOCTYPE html>
<html lang="en">
<head>
<!-- HTML headers -->
<%- include('../partials/head.ejs') %>
<title>Upload your code here!</title>
<script type="module" src="public/js/form.js" defer></script>
</head>
<body>
<!-- Get the navbar -->
<%- include('../partials/nav.ejs') %>
<div id="nojs">
<h1>Please enable JavaScript to use the inverted pendulum.</h1>
</div>
<div id="block" hidden="true">
<br />
<h1>Please upload a Python file (.py file extension) to run on the Inverted Pendulum.</h1>
<h3>A heavily documented example can be <a href="public/example.py">found here</a>.</h3>
<h2>
<br />
<span class="error" id="upload-err"></span>
<span class="error" id="actuate-err"></span>
<br>
<div id="upload-response"></div>
<div id="actuate-response"></div>
</h2>
<form id="upload" enctype="multipart/form-data">
<input type="hidden" name="_csrf" value="<%= csrfToken %>">
<input type="file" name="file" accept=".py" />
<br /> <br />
<label id="Start">Start pendulum: </label>
<input type="submit" id="actuate-but" value="Actuate!" />
</form>
<h3>
<span id="download-link"></span>
</h3>
</div>
</body>
</html>
|