diff --git a/Web_Dashboard/app.py b/Web_Dashboard/app.py index 3a9cdf1..8ae1ba0 100644 --- a/Web_Dashboard/app.py +++ b/Web_Dashboard/app.py @@ -14,33 +14,54 @@ def index(): laptop = [] with open(smartphone_file, 'r', newline='') as file: bad_smartphone = [] + bad_smartphone_2 = [] + bad_smartphone_3 = [] reader = csv.reader(file) for row in reader: smartphone.append(row) if row[2] == '1': - message = "The " + row[0] + " " + row[1] + " is a very unrepairable device with a Repairability Score of only 1/10." + message = row[0] + " " + row[1] bad_smartphone.append(message) - print(bad_smartphone) + if row[2] == '2': + message = row[0] + " " + row[1] + bad_smartphone_2.append(message) + if row[2] == '3': + message = row[0] + " " + row[1] + bad_smartphone_3.append(message) with open(tablet_file, 'r', newline='') as file: bad_tablet = [] + bad_tablet_2 = [] + bad_tablet_3 = [] reader = csv.reader(file) for row in reader: tablet.append(row) if row[2] == '1': - message = "The " + row[0] + " " + row[1] + " is a very unrepairable device with a Repairability Score of only 1/10." + message = row[0] + " " + row[1] bad_tablet.append(message) - print(bad_tablet) + if row[2] == '2': + message = row[0] + " " + row[1] + bad_tablet_2.append(message) + if row[2] == '3': + message = row[0] + " " + row[1] + bad_tablet_3.append(message) with open(laptop_file, 'r', newline='') as file: bad_laptop = [] + bad_laptop_2 = [] + bad_laptop_3 = [] reader = csv.reader(file) for row in reader: laptop.append(row) if row[2] == '1': - message = "The " + row[0] + " " + row[1] + " is a very unrepairable device with a Repairability Score of only 1/10." + message = row[0] + " " + row[1] bad_laptop.append(message) - print(bad_laptop) - - return render_template('index.html', smartphone=bad_smartphone, tablet=bad_tablet, laptop=bad_laptop) + if row[2] == '2': + message = row[0] + " " + row[1] + bad_laptop_2.append(message) + if row[2] == '3': + message = row[0] + " " + row[1] + bad_laptop_3.append(message) + return render_template('index.html', smartphone=bad_smartphone, tablet=bad_tablet, laptop=bad_laptop,smartphone_3=bad_smartphone_3, tablet_3=bad_tablet_3, laptop_3=bad_laptop_3, smartphone_2=bad_smartphone_2, tablet_2=bad_tablet_2, laptop_2=bad_laptop_2) +2 if __name__ == '__main__': - app.run(host='0.0.0.0', port=1235) #Run the webserver + app.run(host='0.0.0.0', port=1235) #Run the webserver2 diff --git a/Web_Dashboard/static/styles.css b/Web_Dashboard/static/styles.css index ae997ba..cb1fded 100644 --- a/Web_Dashboard/static/styles.css +++ b/Web_Dashboard/static/styles.css @@ -1,8 +1,23 @@ +body::-webkit-scrollbar { + width: 12px; /* width of the entire scrollbar */ +} + +body::-webkit-scrollbar-track { + background: #0d2f64; /* color of the tracking area */ +} + +body::-webkit-scrollbar-thumb { + background-color: blue; /* color of the scroll thumb */ + border-radius: 20px; /* roundness of the scroll thumb */ + border: 3px solid #040e1e; /* creates padding around scroll thumb */ +} + * {box-sizing: border-box;} body { margin: 0; background-color: #0d2f64; + scrollbar-width: thin; } .header { @@ -13,14 +28,21 @@ body { padding: 20px 10px; } -li { +.list { color: white; font-size: 22.5px; + text-align: center; } h2 { color: white; text-align: center; + font-size: 32.5px; +} + +h3 { + color: white; + text-align: center; } p { @@ -120,3 +142,17 @@ a.active { height: calc((100vh - 222px)*0.5) } } + +.column::-webkit-scrollbar { + width: 12px; /* width of the entire scrollbar */ +} + +.column::-webkit-scrollbar-track { + background: #0d2f64; /* color of the tracking area */ +} + +.column::-webkit-scrollbar-thumb { + background-color: blue; /* color of the scroll thumb */ + border-radius: 20px; /* roundness of the scroll thumb */ + border: 3px solid #040e1e; /* creates padding around scroll thumb */ +} diff --git a/Web_Dashboard/templates/index.html b/Web_Dashboard/templates/index.html index 0cf9fc2..ed0de3c 100644 --- a/Web_Dashboard/templates/index.html +++ b/Web_Dashboard/templates/index.html @@ -11,38 +11,89 @@
-
{% for each in smartphone %} -
{{ each }}
{% endfor %} - - + ++ {% for each in smartphone_2 %} +
{{ each }}
+ {% endfor %} + ++ {% for each in smartphone_3 %} +
{{ each }}
+ {% endfor %} + +-
{% for each in tablet %} -
{{ each }}
+ {% endfor %} + ++ {% for each in tablet_2 %} +
{{ each }}
{% endfor %} - - + ++ {% for each in tablet_3 %} +
{{ each }}
+ {% endfor %} + +-
{% for each in laptop %} -
{{ each }}
+ {% endfor %} + ++ {% for each in laptop_2 %} +
{{ each }}
+ {% endfor %} + ++ {% for each in laptop_3 %} +
{{ each }}
{% endfor %} - - + +