Compare commits

..

No commits in common. "c89fba95947532f709b36f2c2f83307fc3c48564" and "37c8e13167bda158baa2039c5fd8eed1fedcd45a" have entirely different histories.

4 changed files with 43 additions and 15 deletions

View file

@ -13,7 +13,7 @@ from flask_cors import CORS
sio = socketio.Server()
app = Flask(__name__)
CORS(app)
cors = 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,9 +38,6 @@ 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"]:
@ -53,9 +50,6 @@ 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)
@ -78,9 +72,6 @@ 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:

3
watcher/static/hello.js Normal file
View file

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

View file

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

View file

@ -32,23 +32,58 @@
<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>