make hiding raw messages more efficient, some tweaks
This commit is contained in:
parent
5412039f8e
commit
ee463b624b
3 changed files with 11 additions and 9 deletions
|
@ -64,7 +64,8 @@ class Message:
|
|||
return f"STRIKE {self.payload[1]}"
|
||||
elif message_type == 2:
|
||||
return f"SOLVED"
|
||||
finally:
|
||||
except:
|
||||
print("Unexpected error: ", sys.exc_info()[0])
|
||||
return "PARSE ERROR"
|
||||
|
||||
def serialize(self):
|
||||
|
@ -106,4 +107,4 @@ def api():
|
|||
if __name__ == '__main__':
|
||||
thread = Thread(target=serial_reader, args=(shared_message_log, ))
|
||||
thread.start()
|
||||
app.run(debug=True, host='0.0.0.0')
|
||||
app.run(debug=False, host='0.0.0.0')
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.parsed {
|
||||
background: lightgreen;
|
||||
}
|
||||
|
@ -24,6 +20,7 @@
|
|||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
|
||||
th, td {
|
||||
|
@ -49,6 +46,10 @@
|
|||
animation: fadein 0.5s;
|
||||
}
|
||||
|
||||
table.hide_raw .raw {
|
||||
display:none;
|
||||
}
|
||||
|
||||
tr:hover {
|
||||
background-color: #aaa;
|
||||
}
|
||||
|
|
|
@ -10,9 +10,7 @@ let color_classes = {
|
|||
}
|
||||
|
||||
function updateShow() {
|
||||
for (let item of document.getElementsByClassName("raw")) {
|
||||
item.classList.toggle("hide", !document.getElementById('show_raw').checked);
|
||||
}
|
||||
document.getElementById("message_table").classList.toggle("hide_raw", !document.getElementById('show_raw').checked);
|
||||
}
|
||||
|
||||
function updateMessages() {
|
||||
|
@ -84,3 +82,5 @@ function toggle_logging() {
|
|||
clearInterval(updaterID);
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = toggle_logging;
|
||||
|
|
Loading…
Reference in a new issue