diff --git a/flaskserver.py b/flaskserver.py
index 7f74c37..6c85e8e 100755
--- a/flaskserver.py
+++ b/flaskserver.py
@@ -7,12 +7,18 @@ import threading
app = Flask(__name__)
-webpage = sys.argv[1]
+class Args:
+ def __init__(self, webpage='dil5', port='80'):
+ self.webpage = webpage
+ self.port = int(port)
+ print(self.webpage, self.port)
+
+args = Args(*sys.argv[1:])
+
@app.route('/')
def index():
- return render_template(f'{webpage}.html')
-
+ return render_template(f'{args.webpage}.html', svg_ui=f'{args.webpage}.svg')
if __name__ == '__main__':
- app.run(host="0.0.0.0", port=80, debug=True)
+ app.run(host="0.0.0.0", port=args.port, debug=True)
diff --git a/templates/dil5.html b/templates/dil5.html
index 8d27e9d..c330c46 100644
--- a/templates/dil5.html
+++ b/templates/dil5.html
@@ -80,7 +80,6 @@
border-radius: 12px;
}
-
.content-container {
display: flex;
flex-direction: row;
@@ -90,68 +89,127 @@
-
-
-
-
-
DIL5 Control
-
States
-
-
-
-
-
-
-
-
Status messages
-
-
+
+
+ {% include svg_ui %}
+
+
DIL5 Control
+
States
+
+
+
+
+
+
+
Status messages
+
+
+
diff --git a/static/UI5.svg b/templates/dil5.svg
similarity index 98%
rename from static/UI5.svg
rename to templates/dil5.svg
index e054b98..a655782 100644
--- a/static/UI5.svg
+++ b/templates/dil5.svg
@@ -194,13 +194,13 @@
tank
+ x="1.5"
+ y="12"
+ style="font-size:4.93889px;stroke-width:0.264583">dump
V1
C
F
x mbar
+ style="font-size:2.82223px;fill:#d5d5d5;fill-opacity:1;stroke-width:0.264583">* mbar
x mbar
+ style="font-size:2.82223px;fill:#d5d5d5;fill-opacity:1;stroke-width:0.264583">* mbar
x mbar
+ style="font-size:2.82222px;fill:#d5d5d5;fill-opacity:1;stroke-width:0.264583">* mbar
x mbar
+ style="font-size:2.82222px;fill:#d5d5d5;fill-opacity:1;stroke-width:0.264583">* mbar
x mbar
+ style="font-size:2.82223px;fill:#d5d5d5;fill-opacity:1;stroke-width:0.264583">* mbar
speed:
+ style="font-size:2.82223px;fill:#d5d5d5;fill-opacity:1;stroke-width:0.264583">speed: * Hz
current:
+ style="font-size:2.82223px;fill:#d5d5d5;fill-opacity:1;stroke-width:0.264583">current: * %
+
+
+ reset
+
@@ -1331,25 +1349,5 @@
x="94.167931"
y="139.35733"
style="font-size:2.82223px;fill:#d5d5d5;fill-opacity:1;stroke-width:0.264583">air
- x Hz
- x %