diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d0c0962..f3a7bd0 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,14 +2,10 @@ - - - - - - - - + + + + @@ -94,7 +90,7 @@ - + @@ -105,33 +101,19 @@ - + - + - - + + - - - - - - - - - - - - - - @@ -140,7 +122,7 @@ - + @@ -161,7 +143,7 @@ - + @@ -170,7 +152,7 @@ - + @@ -180,8 +162,8 @@ - - + + @@ -200,11 +182,11 @@ - + - - + + @@ -660,10 +642,10 @@ - @@ -1011,7 +993,7 @@ - + @@ -1022,8 +1004,8 @@ - + @@ -1034,8 +1016,8 @@ - + @@ -1104,20 +1086,6 @@ - - - - - - - - - - - - - - @@ -1173,20 +1141,6 @@ - - - - - - - - - - - - - - @@ -1205,9 +1159,6 @@ - - - @@ -1322,20 +1273,8 @@ - - - - - - - - - - - - - - + + @@ -1347,9 +1286,6 @@ - - - @@ -1365,9 +1301,6 @@ - - - @@ -1397,7 +1330,6 @@ - @@ -1405,13 +1337,12 @@ - - + @@ -1430,38 +1361,20 @@ - - + + - - - - - - - - - - - + - - - - - - - - @@ -1473,7 +1386,7 @@ - + @@ -1481,31 +1394,35 @@ - + - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - diff --git a/www/pocwww/pocwww/__init__.py b/www/pocwww/pocwww/__init__.py index 640eb3d..a4d05ef 100644 --- a/www/pocwww/pocwww/__init__.py +++ b/www/pocwww/pocwww/__init__.py @@ -70,6 +70,7 @@ def pagination_adapter(obj, request): } return p + def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ @@ -130,6 +131,12 @@ def main(global_config, **settings): config.add_route('gaugeoff_all', '/gaugeoff') config.add_route('json_gaugeoff_all', '/json/gaugeoff') + config.add_route('fluidshots_all', '/fluidshots') + config.add_route('json_fluidshots_all', '/json/fluidshots') + + config.add_route('welltests_all', '/welltests') + config.add_route('json_welltests_all', '/json/welltests') + # JSON-ONLY ROUTES config.add_route('json_lastcard', "/json/lastcard") diff --git a/www/pocwww/pocwww/templates/fluidshots.jinja2 b/www/pocwww/pocwww/templates/fluidshots.jinja2 new file mode 100644 index 0000000..141ba0d --- /dev/null +++ b/www/pocwww/pocwww/templates/fluidshots.jinja2 @@ -0,0 +1,37 @@ +{% extends "layout.jinja2" %} + +{% block content %} +
+
+
+

Fluid Shots

+ {% if data|length > 0 %} +
+ + + + + + + + + + + {% for d in data %} + + + + + + + {% endfor %} + +
TimestampFluid LevelPump Intake PressureFriction Estimate
{{d.timestamp | datetime('medium')}}{{d.fluidLevel | round(3)}}{{d.pumpIntakePressure | round(3)}}{{d.frictionEstimate | round(3)}}
+
+ {% else %} +

No fluid shots yet...

+ {% endif %} +
+
+
+{% endblock content %} diff --git a/www/pocwww/pocwww/templates/gaugeoff_all.jinja2 b/www/pocwww/pocwww/templates/gaugeoff_all.jinja2 index c961e34..0723fbe 100644 --- a/www/pocwww/pocwww/templates/gaugeoff_all.jinja2 +++ b/www/pocwww/pocwww/templates/gaugeoff_all.jinja2 @@ -40,5 +40,4 @@ - {% endblock content %} diff --git a/www/pocwww/pocwww/templates/layout.jinja2 b/www/pocwww/pocwww/templates/layout.jinja2 index 1ea2406..ccc498a 100644 --- a/www/pocwww/pocwww/templates/layout.jinja2 +++ b/www/pocwww/pocwww/templates/layout.jinja2 @@ -77,8 +77,8 @@
  • Gauge-Off
  • {% block card_dates %} diff --git a/www/pocwww/pocwww/templates/welltests.jinja2 b/www/pocwww/pocwww/templates/welltests.jinja2 new file mode 100644 index 0000000..c8daea5 --- /dev/null +++ b/www/pocwww/pocwww/templates/welltests.jinja2 @@ -0,0 +1,49 @@ +{% extends "layout.jinja2" %} + +{% block content %} +
    +
    +
    +

    Well Tests

    + {% if data|length > 0 %} +
    + + + + + + + + + + + + + + + + + {% for d in data %} + + + + + + + + + + + + + {% endfor %} + +
    Test StartTest HoursTotal BBLOil BBLWater BBLGas MCFkFactorOil RatioWater RatioGas Ratio
    {{d.testStartTime | datetime('medium')}}{{d.testHours}}{{d.testTotalBBL | round(3)}}{{d.testOilBBL | round(3)}}{{d.testWaterBBL | round(3)}}{{d.testGasMCF | round(3)}}{{d.kFactor | round(3)}}{{d.oilRatio | round(3)}}{{d.waterRatio | round(3)}}{{d.gasMCFRatio | round(3)}}
    +
    + {% else %} +

    No Well Tests yet...

    + {% endif %} +
    +
    +
    +{% endblock content %} diff --git a/www/pocwww/pocwww/views.py b/www/pocwww/pocwww/views.py index 334d53c..f011534 100644 --- a/www/pocwww/pocwww/views.py +++ b/www/pocwww/pocwww/views.py @@ -99,3 +99,17 @@ def gaugeoff_all(request): newGO['tags'][d['tags'][i]['name']] = newTagObj gaugeoff_list.append(newGO) return {'navgroup': 'gaugeoff', 'data': gaugeoff_list} + + +@view_config(route_name="fluidshots_all", renderer="templates/fluidshots.jinja2") +@view_config(route_name="json_fluidshots_all", renderer="prettyjson") +def fluidshots_all(request): + fluidshots = list(request.db['fluidShots'].find()) + return {'navgroup': 'fluidshots', 'data': fluidshots} + + +@view_config(route_name="welltests_all", renderer="templates/welltests.jinja2") +@view_config(route_name="json_welltests_all", renderer="prettyjson") +def welltests_all(request): + welltests = list(request.db['wellTests'].find()) + return {'navgroup': 'welltests', 'data': welltests}