Compare commits

...

4 Commits

4 changed files with 15 additions and 43 deletions

View File

@ -13,7 +13,7 @@ from flask_cors import CORS
sio = socketio.Server()
app = Flask(__name__)
cors = CORS(app)
CORS(app)
app.wsgi_app = socketio.WSGIApp(sio, app.wsgi_app)
# We request users to send the run number to prevent accidentially getting old requests from a previous run
@ -38,6 +38,9 @@ def index():
@app.route("/start_run/<run_index>")
def start_run(run_index):
if not run_index.isdigit():
return f'{run_index} is not a number'
db["current_run"] = run_index
starttime = time()
if run_index in db["run_data"]:
@ -50,6 +53,9 @@ def start_run(run_index):
@app.route("/link/start/<run>/<link_index>")
def link_start(run, link_index):
if not run.isdigit() or not link_index.isdigit():
return f'{run} and/or {link_index} is not a number'
start = time()
request_data = live_request(run, link_index)
sio.emit('live_request', request_data)
@ -72,6 +78,9 @@ def link_start(run, link_index):
@app.route("/link/handoff/<run>/<index>")
def link_handoff(run, index):
if not run.isdigit() or not index.isdigit():
return f'{run} and/or {index} is not a number'
if db["current_run"] != run:
return "Wrong run number, check that you updated you run", 404
else:

View File

@ -1,3 +0,0 @@
function sayHello() {
alert("Hello World");
}

View File

@ -46,7 +46,8 @@ h1 {
padding: 5px;
padding-left: 12px;
padding-right: 12;
height: 5%;
min-height: 5%;
max-height: 5%;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 6px;
background: #fff;

View File

@ -32,58 +32,23 @@
<i class="fas fa-question" style="color:grey"></i>
</div>
</div>
<div class="item">
<div>
1
</div>
<div>
Time: ...
</div>
<div>
<i class="fas fa-check" style="color:green"></i>
</div>
</div>
<div class="card__title">
Links
</div>
</div>
<div class="card">
<div class="item">
<div>
1
</div>
<div>
total time
</div>
<div>
max fase
</div>
</div>
<div class="card__title">
Runs
</div>
</div>
<div id="live_requests" class="card">
<div class="item">
<div>
Hostname
</div>
<div>
Time
</div>
</div>
<div class="card__title">
Live Requests
</div>
<div class="item">
<div>
Hostname
</div>
<div>
</div>
</div>
</div>
</div>
</body>