summaryrefslogtreecommitdiff
path: root/shopdb
diff options
context:
space:
mode:
authorBlaise Thompson <blaise@untzag.com>2019-11-09 19:55:57 -0600
committerBlaise Thompson <blaise@untzag.com>2019-11-09 19:55:57 -0600
commitc99d2447b57d6e14a78013152a53bb4552a33bb7 (patch)
tree7abce49aa4a35e51ae43dd2cace880b611a5f93b /shopdb
parent735f16fe70f6f1d182d42d1f5161fe2aebe6aa6d (diff)
pre-commit
Diffstat (limited to 'shopdb')
-rw-r--r--shopdb/__init__.py0
-rw-r--r--shopdb/app/__init__.py42
-rw-r--r--shopdb/app/__pycache__/__init__.cpython-37.pycbin0 -> 1290 bytes
-rw-r--r--shopdb/app/__pycache__/__init__.cpython-38.pycbin0 -> 1314 bytes
-rw-r--r--shopdb/app/jobs.csv56
-rw-r--r--shopdb/app/static/css/main.css64
-rw-r--r--shopdb/app/templates/inventory.html16
-rw-r--r--shopdb/app/templates/jobs.html19
-rw-r--r--shopdb/app/templates/layout.html15
-rw-r--r--shopdb/app/templates/main.css76
-rw-r--r--shopdb/entry.py1
11 files changed, 289 insertions, 0 deletions
diff --git a/shopdb/__init__.py b/shopdb/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/shopdb/__init__.py
diff --git a/shopdb/app/__init__.py b/shopdb/app/__init__.py
new file mode 100644
index 0000000..5e397e4
--- /dev/null
+++ b/shopdb/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/shopdb/app/__pycache__/__init__.cpython-37.pyc b/shopdb/app/__pycache__/__init__.cpython-37.pyc
new file mode 100644
index 0000000..70173aa
--- /dev/null
+++ b/shopdb/app/__pycache__/__init__.cpython-37.pyc
Binary files differ
diff --git a/shopdb/app/__pycache__/__init__.cpython-38.pyc b/shopdb/app/__pycache__/__init__.cpython-38.pyc
new file mode 100644
index 0000000..e4b1910
--- /dev/null
+++ b/shopdb/app/__pycache__/__init__.cpython-38.pyc
Binary files differ
diff --git a/shopdb/app/jobs.csv b/shopdb/app/jobs.csv
new file mode 100644
index 0000000..a64c7fd
--- /dev/null
+++ b/shopdb/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/shopdb/app/static/css/main.css b/shopdb/app/static/css/main.css
new file mode 100644
index 0000000..8fd53f8
--- /dev/null
+++ b/shopdb/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/shopdb/app/templates/inventory.html b/shopdb/app/templates/inventory.html
new file mode 100644
index 0000000..d995835
--- /dev/null
+++ b/shopdb/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/shopdb/app/templates/jobs.html b/shopdb/app/templates/jobs.html
new file mode 100644
index 0000000..59d4ba8
--- /dev/null
+++ b/shopdb/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/shopdb/app/templates/layout.html b/shopdb/app/templates/layout.html
new file mode 100644
index 0000000..e63f746
--- /dev/null
+++ b/shopdb/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/shopdb/app/templates/main.css b/shopdb/app/templates/main.css
new file mode 100644
index 0000000..8ad1c3e
--- /dev/null
+++ b/shopdb/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/shopdb/entry.py b/shopdb/entry.py
new file mode 100644
index 0000000..e13c02e
--- /dev/null
+++ b/shopdb/entry.py
@@ -0,0 +1 @@
+from app import app as application