summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaise Thompson <blaise@untzag.com>2019-11-09 19:41:30 -0600
committerBlaise Thompson <blaise@untzag.com>2019-11-09 19:41:30 -0600
commit735f16fe70f6f1d182d42d1f5161fe2aebe6aa6d (patch)
treeca1ee47f01fa0e56cb470d628e8b7cdcfe1df5fc
initial commit
-rw-r--r--app/__init__.py42
-rw-r--r--app/__pycache__/__init__.cpython-37.pycbin0 -> 1290 bytes
-rw-r--r--app/jobs.csv56
-rw-r--r--app/static/css/main.css64
-rw-r--r--app/templates/inventory.html16
-rw-r--r--app/templates/jobs.html19
-rw-r--r--app/templates/layout.html15
-rw-r--r--app/templates/main.css76
-rw-r--r--entry.py1
9 files changed, 289 insertions, 0 deletions
diff --git a/app/__init__.py b/app/__init__.py
new file mode 100644
index 0000000..5e397e4
--- /dev/null
+++ b/app/__init__.py
@@ -0,0 +1,42 @@
+import pathlib
+from flask import Flask, render_template
+import flask
+from flask_sqlalchemy import SQLAlchemy
+import pandas
+
+
+__here__ = pathlib.Path(__file__).parent
+
+
+
+df = pandas.read_csv(__here__ / "jobs.csv")
+
+
+
+
+app = Flask(__name__)
+app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
+db = SQLAlchemy(app)
+
+
+class User(db.Model):
+ id = db.Column(db.Integer, primary_key=True)
+ username = db.Column(db.String(80), unique=True)
+ email = db.Column(db.String(120), unique=True)
+
+ def __repr__(self):
+ return '<User %r>' % self.username
+
+@app.route('/')
+@app.route('/jobs')
+def jobs():
+ #return df.to_html()
+ return render_template("jobs.html", df=df.to_html())
+
+@app.route('/inventory')
+def inventory():
+ #return df.to_html()
+ return render_template("inventory.html")
+
+
+app.run(debug=True, port=8000)
diff --git a/app/__pycache__/__init__.cpython-37.pyc b/app/__pycache__/__init__.cpython-37.pyc
new file mode 100644
index 0000000..70173aa
--- /dev/null
+++ b/app/__pycache__/__init__.cpython-37.pyc
Binary files differ
diff --git a/app/jobs.csv b/app/jobs.csv
new file mode 100644
index 0000000..a64c7fd
--- /dev/null
+++ b/app/jobs.csv
@@ -0,0 +1,56 @@
+Description,Category,Priority,Hours,Status,Submit Date,Start Date,End Date,Current Owner,Customer,Notes
+Master Heat Gun HG-751B,Repair,1,,Not Started,2018-04-01,,,,Amirah Mat Lani,
+stark modulator driver,Construct,1,,Not Started,2018-07-27,,,,Mark Wendt,
+computer controlled silicon array detector,Construct,2,10,Deferred,2018-08-03,2018-12-03,,Blaise Thompson,Dan Kohler,
+gas uptake reactor,Construct,3,,Waiting,2018-08-22,2019-03-06,,Blaise Thompson,Chase Salazar,waiting for machine shop
+Peristaltic Pump Controller,Construct,3,,Not Started,2018-09-13,,,,Wenjie Li,waiting for access to pump
+current supply for electron impact filament,Construct,2,,Not Started,2018-09-26,,,,Rob McClain,
+matrix isolation cart power distribution,Construct,2,,Waiting,2018-10-30,2018-11-21,,Blaise Thompson,Samuel Kougias,waiting for customer feedback
+Thermo NESLAB chiller refactor,Repair,2,,Not Started,2018-11-15,,,,Andrew Maza,
+fluorimeter,Repair,1,,Not Started,2019-01-18,,,,Alan Bettermann,
+Corning 420D SN 153516329327,Repair,2,,Not Started,2019-03-19,,,,Daniel Enny,will not turn on at all
+small national instruments DAQ,Repair,1,,Not Started,2019-04-24,,,,Christopher Jernigan,
+shredder auto sensor,Repair,1,,Not Started,2019-05-08,,,,Bruce Goldade,
+WiQK reactor,Construct,2,,In Progress,2019-05-09,2019-05-09,,Blaise Thompson,Tanner McDaniel,
+Cimarec stir/hotplate SN 1768100259062,Repair,1,,Not Started,2019-05-29,,,,Michelle Fitzgerald,sheared-off knob
+Hot Plate #1,Repair,2,,Not Started,2019-06-03,,,,Daniel Enny,"Stirring is ok. Won't stop heating when plugged in, even if dial is turned to 0"
+Hot Plate #2,Repair,2,,Not Started,2019-06-03,,,,Michael Gilbert,Does not stir properly (low RPM)
+Hot Plate #3,Repair,2,,Not Started,2019-06-03,,,,Daniel Enny,Doesn't stir well/properly
+Glovebox Refrigerator Electrical Fault,Repair,1,,Not Started,2019-06-19,,,,Daniel Santalucia,turns off after running for a while: bad breaker-switch?
+peltier-based sample temperature controller,Construct,2,,Waiting,2019-06-24,2019-06-27,,,Sidney Dicke,waiting for parts
+Corning PC-120 Stirplate SN 070196232528,Repair,1,,Not Started,2019-06-27,,,,Austin Henke,
+single RF supply,Construct,2,,Not Started,2019-07-15,,,,Tim Bertram,"~50 V, 2 MHz, with controller"
+Boekl 107800 oven SN 1326-52981,Repair,2,,Deferred,2019-07-22,2019-07-29,,,Michael Roy,
+potentiostat troubleshooting,Repair,2,,Not Started,2019-07-29,,,,Diana Wang,
+KNF UN811KVP filtration pump SN 1.10596256,Repair,1,,Not Started,2019-07-31,,,,Dominic Colosi,
+KNF UN811KVP filtration pump SN 1.10596257,Repair,1,,Not Started,2019-07-31,,,,Dominic Colosi,broken switch?
+Fisher hotplate SN 70901031,Repair,1,,Not Started,2019-07-31,,,,Dominic Colosi,broken heating coil?
+Corning PC-400 hotplate SN 05063046,Repair,1,,Not Started,2019-07-31,,,,Dominic Colosi,pot broken
+Corning PC-400 hotplate SN 05064830,Repair,1,,Not Started,2019-07-31,,,,Dominic Colosi,no heat
+Corning PC-400 hotplate SN 06076605,Repair,1,,Not Started,2019-07-31,,,,Dominic Colosi,pot broken
+Corning PC-400 hotplate SN 01051425,Repair,1,,Not Started,2019-07-31,,,,Dominic Colosi,pot broken
+Corning PC-400 hotplate SN 05064853,Repair,1,,Not Started,2019-07-31,,,,Dominic Colosi,pot broken
+Corning PC-400 hotplate SN 04051548,Repair,1,,Not Started,2019-07-31,,,,Dominic Colosi,no heat
+Corning PC-400 hotplate SN 04051681,Repair,1,,Not Started,2019-07-31,,,,Dominic Colosi,no heat
+XY laser actuator,Construct,2,,Waiting,2019-08-12,2019-09-03,,Blaise Thompson,Chang-Uk Lee,waiting for steve
+Corning PC-420D hotstir SN 033508176052,Repair,1,,Not Started,2019-08-12,,,,Grace Lutovsky,
+Isotemp 11-600-49SH hotstir SN 502N0457,Repair,1,,Not Started,2019-08-12,,,,Grace Lutovsky,"""makes loud noise when turned on"""
+PMT computer control,Construct,3,,Waiting,2019-08-14,2019-08-14,,Blaise Thompson,Emily Kaufman,waiting for printer
+Fisher FS110 sonicator SN RVB060387077,Repair,2,,Waiting,2019-08-22,2019-08-29,,,Lydia Perkins,waiting for parts
+TTL control box for diploar,Construct,3,,Waiting,2019-08-26,2019-09-03,,Blaise Thompson,Casey Howdieshell,waiting for customer feedback
+next generation galvanostat,Construct,2,,Not Started,2019-08-27,,,,Zach Wickens,most important: fault detection
+timed galvanostats,Construct,2,,Not Started,2019-09-10,,,,Victoria Longley,
+Eppendorf miniSpin plus SN 5453-13037,Repair,2,,Not Started,2019-09-12,,,,Paige Kinsley,broken door latch
+IKA RCT basic,Repair,2,,Not Started,2019-09-16,,,,Son Dong,runaway heat
+rotovap,Repair,2,,Not Started,2019-09-16,,,,Andrew Maza,
+Cimarec stir/hotplate SN 1768100365926,Repair,1,,Not Started,2019-09-26,,,,Michelle Fitzgerald,releasing smoke
+glass shop pump level alert,Construct,1,,Not Started,2019-10-02,,,,Tracy Drier,
+Cimarec stir/hotplate SN C1768140520528,Repair,1,,Not Started,2019-10-02,,,,Michelle Fitzgerald,
+laser frequency stabilizer refactor,Consultation,3,,In Progress,2019-10-09,,,,Feng Pan,
+NADP troubleshoot,Consultation,1,,In Progress,2019-10-11,,,,M. Olson,
+cylinder heater,Construct,2,,Waiting,2019-10-11,2019-10-11,,Blaise Thompson,Tanner McDaniel,waiting for parts
+Digital Instruments F0-50 Lamp SN 01170214,Repair,2,,In Progress,2019-10-11,2019-11-08,,Blaise Thompson,Yuhui Li,
+Cimarec stir/hotplate SN 1768100260774,Repair,1,,Not Started,2019-10-15,,,Helena Pliszka,Kurtis Casperson,motor not working (burnt out)
+switchable TTL box,Construct,2,,Not Started,2019-10-23,,,Blaise Thompson,Feng Pan,
+DC amplifer,Construct,2,,In Progress,2019-10-31,2019-10-31,,Blaise Thompson,Brandon Mehlenbacher,
+XyloScope UV enhancement,Construct,3,,In Progress,2019-11-01,2019-11-01,,Blaise Thompson,Alex C. Wiedenhoeft, \ No newline at end of file
diff --git a/app/static/css/main.css b/app/static/css/main.css
new file mode 100644
index 0000000..8fd53f8
--- /dev/null
+++ b/app/static/css/main.css
@@ -0,0 +1,64 @@
+* {box-sizing: border-box;}
+
+body {
+ margin: 0;
+ font-family: sans-serif;
+ color: #c5c8c6;
+ background-color: #1d1f21;
+}
+
+p {
+ margin: 20px;
+}
+
+h1 {
+ margin: 20px;
+}
+
+.header {
+ overflow: hidden;
+ background-color: #373b41;
+ padding: 20px 10px;
+}
+
+.header a {
+ float: left;
+ color: #c5c8c6;
+ text-align: center;
+ padding: 12px;
+ text-decoration: none;
+ font-size: 18px;
+ line-height: 25px;
+ border-radius: 4px;
+}
+
+.header a.logo {
+ font-size: 25px;
+ font-weight: bold;
+}
+
+.header a:hover {
+ background-color: #c5c8c6;
+ color: #373b41;
+}
+
+.header a.active {
+ background-color: #cc6666;
+ color: #c5c8c6;
+}
+
+.header-right {
+ float: right;
+}
+
+@media screen and (max-width: 500px) {
+ .header a {
+ float: none;
+ display: block;
+ text-align: left;
+ }
+
+ .header-right {
+ float: none;
+ }
+}
diff --git a/app/templates/inventory.html b/app/templates/inventory.html
new file mode 100644
index 0000000..d995835
--- /dev/null
+++ b/app/templates/inventory.html
@@ -0,0 +1,16 @@
+{% extends "layout.html" %}
+{% block content %}
+
+<div class="header">
+ <a class="logo">shopdb</a>
+ <div class="header-right">
+ <a href="jobs">jobs</a>
+ <a class="active" href="inventory">inventory</a>
+ </div>
+</div>
+
+<h1>inventory</h1>
+
+<p>This website was built with Python via the Flask framework.</p>
+
+{% endblock %}
diff --git a/app/templates/jobs.html b/app/templates/jobs.html
new file mode 100644
index 0000000..59d4ba8
--- /dev/null
+++ b/app/templates/jobs.html
@@ -0,0 +1,19 @@
+{% extends "layout.html" %}
+{% block content %}
+
+<div class="header">
+ <a class="logo">shopdb</a>
+ <div class="header-right">
+ <a class="active" href="jobs">jobs</a>
+ <a href="inventory">inventory</a>
+ </div>
+</div>
+
+
+<h1>jobs</h1>
+<p>This website was built with Python via the Flask framework.</p>
+
+{{ df|safe }}
+
+
+{% endblock %}
diff --git a/app/templates/layout.html b/app/templates/layout.html
new file mode 100644
index 0000000..e63f746
--- /dev/null
+++ b/app/templates/layout.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
+</head>
+<body>
+
+<div class="container">
+ {% block content %}
+ {% endblock %}
+</div>
+
+</body>
+</html>
diff --git a/app/templates/main.css b/app/templates/main.css
new file mode 100644
index 0000000..8ad1c3e
--- /dev/null
+++ b/app/templates/main.css
@@ -0,0 +1,76 @@
+body {
+ margin: 0;
+ padding: 0;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ color: #444;
+}
+/*
+ * Formatting the header area
+ */
+header {
+ background-color: #DFB887;
+ height: 35px;
+ width: 100%;
+ opacity: .9;
+ margin-bottom: 10px;
+}
+header h1.logo {
+ margin: 0;
+ font-size: 1.7em;
+ color: #fff;
+ text-transform: uppercase;
+ float: left;
+}
+header h1.logo:hover {
+ color: #fff;
+ text-decoration: none;
+}
+/*
+ * Centering the body content
+ */
+.container {
+ width: 1200px;
+ margin: 0 auto;
+}
+div.home {
+ padding: 10px 0 30px 0;
+ background-color: #E6E6FA;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+}
+div.about {
+ padding: 10px 0 30px 0;
+ background-color: #E6E6FA;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+}
+h2 {
+ font-size: 3em;
+ margin-top: 40px;
+ text-align: center;
+ letter-spacing: -2px;
+}
+h3 {
+ font-size: 1.7em;
+ font-weight: 100;
+ margin-top: 30px;
+ text-align: center;
+ letter-spacing: -1px;
+ color: #999;
+}
+.menu {
+ float: right;
+ margin-top: 8px;
+}
+.menu li {
+ display: inline;
+}
+.menu li + li {
+ margin-left: 35px;
+}
+.menu li a {
+ color: #444;
+ text-decoration: none;
+}
diff --git a/entry.py b/entry.py
new file mode 100644
index 0000000..e13c02e
--- /dev/null
+++ b/entry.py
@@ -0,0 +1 @@
+from app import app as application