Completes POCONSOLE-45 and POCONSOLE-46, Events and Well Tests

This commit is contained in:
Patrick McDonagh
2016-06-28 15:36:00 -05:00
parent 579cc03cef
commit 5c1d4304c3
13 changed files with 373 additions and 311 deletions

View File

@@ -137,11 +137,18 @@ module.exports = {
},
gaugeOffTags: function(req, res){
var query = "SELECT v.id as id, t.id as tagid, t.name as name, DATE(v.createdAt) as date, v.val as val FROM tag_vals v JOIN tags t ON v.tagID = t.id WHERE t.tag_class = 3";
var query = "SELECT v.id as id, t.id as tagid, t.name as name, CONVERT(DATE_FORMAT(v.createdAt,'%Y-%m-%d-%H:%i:00'),DATETIME) as date, v.val as val FROM tag_vals v JOIN tags t ON v.tagID = t.id WHERE t.tag_class = 3";
Tag_val.query(query, function(err, results){
if (err) return res.serverError(err);
return res.ok(results);
});
},
}
wellTestTags: function(req, res){
var query = "SELECT v.id as id, t.id as tagid, t.name as name, CONVERT(DATE_FORMAT(v.createdAt,'%Y-%m-%d-%H:%i:00'),DATETIME) as date, v.val as val FROM tag_vals v JOIN tags t ON v.tagID = t.id WHERE t.tag_class = 4";
Tag_val.query(query, function(err, results){
if (err) return res.serverError(err);
return res.ok(results);
});
},
};

View File

@@ -52,7 +52,7 @@ module.exports = {
}
}, seedData: [
{
name: 'card_type',
name: 'Card Type',
tag_class: 1,
deviceID: 1,
tag: 'Card_Past[1].Card_Type',
@@ -62,7 +62,7 @@ module.exports = {
map_function: 'card_type_map'
},
{
name: 'card_id',
name: 'Card ID',
tag_class: 1,
deviceID: 1,
tag: 'Card_Past[1].ID',
@@ -71,7 +71,7 @@ module.exports = {
guarantee_sec: 3600
},
{
name: 'polished_rod_hp',
name: 'Polished Rod HP',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Polished_Rod_HP',
@@ -80,7 +80,7 @@ module.exports = {
guarantee_sec: 3600
},
{
name: 'downhole_max_load',
name: 'Downhole Max Load',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Downhole_Max_Load.Load',
@@ -89,7 +89,7 @@ module.exports = {
guarantee_sec: 3600
},
{
name: 'downhole_gross_stroke',
name: 'Downhole Gross Stroke',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Downhole_GrossStroke',
@@ -98,7 +98,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'spm',
name: 'SPM',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].SPM',
@@ -107,7 +107,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'fluid_gradient',
name: 'Fluid Gradient',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Params.Fluid_Gradient',
@@ -116,7 +116,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'tubing_head_pressure',
name: 'Tubing Head Pressure',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Params.Tubing_Head_Pressure',
@@ -125,7 +125,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'surface_min_load',
name: 'Surface Min Load',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Surface_Min.Load',
@@ -134,7 +134,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'downhole_fluid_load',
name: 'Downhole Fluid Load',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Downhole_FluidLoad',
@@ -143,7 +143,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'downhole_max_position',
name: 'Downhole Max Position',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Downhole_Max_Position.Position',
@@ -152,7 +152,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'downhole_net_stroke',
name: 'Downhole Net Stroke',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Downhole_NetStroke',
@@ -161,7 +161,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'fillage_percent',
name: 'Fill Percentage',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Fillage_Percent',
@@ -170,7 +170,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'pump_hp',
name: 'Pump HP',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Pump_HP',
@@ -179,7 +179,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'surface_min_position',
name: 'Surface Min Position',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Surface_Min.Position',
@@ -188,7 +188,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'pump_intake_pressure',
name: 'Pump Intake Pressure',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Pump_Intake_Pressure',
@@ -197,7 +197,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'surface_max_position',
name: 'Surface Max Position',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Surface_Max.Position',
@@ -206,7 +206,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'tubing_movement',
name: 'Tubing Movement',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Tubing_Movement',
@@ -215,7 +215,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'downhole_min_position',
name: 'Downhole Min Position',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Downhole_Min_Position.Position',
@@ -224,7 +224,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'surface_max_load',
name: 'Surface Max Load',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Surface_Max.Load',
@@ -233,7 +233,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'stuffing_box_friction',
name: 'Stuffing Box Friction',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Params.Stuffing_Box_Friction',
@@ -251,7 +251,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'downhole_min_load',
name: 'Downhole Min Load',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Downhole_Min_Load.Load',
@@ -260,7 +260,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'surface_stroke_length',
name: 'Surface Stroke Length',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Surface_StrokeLength',
@@ -269,7 +269,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'downhole_adjusted_gross_stroke',
name: 'Downhole Adjusted Gross Stroke',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Downhole_AdjustedGrossStroke',
@@ -278,7 +278,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'fluid_level',
name: 'Fluid Level',
tag_class: 2,
deviceID: 1,
tag: 'Card_Past[1].Fluid_Above_Pump',
@@ -287,7 +287,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'stroke_production',
name: 'Stroke Production',
tag_class: 2,
deviceID: 1,
tag: 'Stroke_Production',
@@ -296,7 +296,7 @@ module.exports = {
guarantee_sec: 3600,
},
{
name: 'go_electricity_cost',
name: 'Gauge Off: Electricity Cost',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_Electricity_Cost',
@@ -305,7 +305,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_percent_run',
name: 'Gauge Off: Percent Run',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_Percent_Run',
@@ -314,7 +314,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_average_spm',
name: 'Gauge Off: Average SPM',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_Average_SPM',
@@ -323,7 +323,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_kwh',
name: 'Gauge Off: kWh',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_kWh',
@@ -332,7 +332,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_lifting_cost',
name: 'Gauge Off: Lifting Cost',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_Lifting_Cost',
@@ -341,7 +341,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_polished_rod_hp',
name: 'Gauge Off: Polished Rod HP',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_Polished_Rod_HP',
@@ -350,7 +350,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_inflow_rate',
name: 'Gauge Off: Inflow Rate',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_Inflow_Rate',
@@ -359,7 +359,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_fluid_level',
name: 'Gauge Off: Fluid Level',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_Fluid_Above_Pump',
@@ -368,7 +368,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_full_card_production',
name: 'Gauge Off: Full Card Production',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_Full_Card_Production',
@@ -377,7 +377,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_kwh_regen',
name: 'Gauge Off: kWh Regen',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_kWh_regen',
@@ -386,7 +386,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_max_load',
name: 'Gauge Off: Max Load',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_Max_Load',
@@ -395,7 +395,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_pump_intake_pressure',
name: 'Gauge Off: Pump Intake Pressure',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_pump_intake_pressure',
@@ -404,7 +404,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_production_calculated',
name: 'Gauge Off: Calculated Production',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_Production_Calculated',
@@ -413,7 +413,7 @@ module.exports = {
guarantee_sec: 0,
},
{
name: 'go_min_load',
name: 'Gauge Off: Min Load',
tag_class: 3,
deviceID: 1,
tag: 'GAUGEOFF_Min_Load',
@@ -421,141 +421,86 @@ module.exports = {
change_threshold: 0,
guarantee_sec: 0,
},
// {
// name: 'v_gas',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.Volume_Gas',
// data_type: 1,
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'test_duration',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.Test_Duration',
// data_type: 1,
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'v_oil',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.Volume_Oil',
// data_type: 1,
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'k_factor',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.k_Factor',
// data_type: 1,
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'p_v_water',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.Projected_Volume_Water',
// data_type: 1,
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'month',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.DateTime_Complete.Month',
// data_type: 'INT',
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'sec',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.DateTime_Complete.Sec',
// data_type: 'INT',
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'v_water',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.Volume_Water',
// data_type: 1,
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'year',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.DateTime_Complete.Year',
// data_type: 'INT',
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'p_v_oil',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.Projected_Volume_Oil',
// data_type: 1,
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'day',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.DateTime_Complete.Day',
// data_type: 'INT',
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'sg_water',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.SG_Water',
// data_type: 1,
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'api_oil',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.API_Oil',
// data_type: 1,
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'hour',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.DateTime_Complete.Hour',
// data_type: 'INT',
// change_threshold: 0,
// guarantee_sec: 0,
// },
// {
// name: 'min',
// tag_class: 4,
// deviceID: 1,
// tag: 'Well_Test.DateTime_Complete.Min',
// data_type: 'INT',
// change_threshold: 0,
// guarantee_sec: 0,
// },
{
name: 'Well Test: Gas Volume',
tag_class: 4,
deviceID: 1,
tag: 'Well_Test.Volume_Gas',
data_type: 1,
change_threshold: 0,
guarantee_sec: 0,
},
{
name: 'Well Test: Test Duration',
tag_class: 4,
deviceID: 1,
tag: 'Well_Test.Test_Duration',
data_type: 1,
change_threshold: 0,
guarantee_sec: 0,
},
{
name: 'Well Test: Oil Volume',
tag_class: 4,
deviceID: 1,
tag: 'Well_Test.Volume_Oil',
data_type: 1,
change_threshold: 0,
guarantee_sec: 0,
},
{
name: 'Well Test: k-factor',
tag_class: 4,
deviceID: 1,
tag: 'Well_Test.k_Factor',
data_type: 1,
change_threshold: 0,
guarantee_sec: 0,
},
{
name: 'Well Test: Projected Volume Water',
tag_class: 4,
deviceID: 1,
tag: 'Well_Test.Projected_Volume_Water',
data_type: 1,
change_threshold: 0,
guarantee_sec: 0,
},
{
name: 'Well Test: Water Volume',
tag_class: 4,
deviceID: 1,
tag: 'Well_Test.Volume_Water',
data_type: 1,
change_threshold: 0,
guarantee_sec: 0,
},
{
name: 'Well Test: Projected Volume Oil',
tag_class: 4,
deviceID: 1,
tag: 'Well_Test.Projected_Volume_Oil',
data_type: 1,
change_threshold: 0,
guarantee_sec: 0,
},
{
name: 'Well Test: Specific Gravity - Water',
tag_class: 4,
deviceID: 1,
tag: 'Well_Test.SG_Water',
data_type: 1,
change_threshold: 0,
guarantee_sec: 0,
},
{
name: 'Well Test: API Gravity - Oil',
tag_class: 4,
deviceID: 1,
tag: 'Well_Test.API_Oil',
data_type: 1,
change_threshold: 0,
guarantee_sec: 0,
}
]
};

View File

@@ -3,6 +3,6 @@ poconsole.controller('eventsCtrl', function($scope, Page, json) {
Page.setPage('events');
var getEventsData = json.getEventsData();
getEventsData.then(function(data) {
$scope.eventsData = data.eventsData;
$scope.eventsData = data;
});
});

View File

@@ -1,6 +1,6 @@
poconsole.controller('wellTestCtrl', function($scope, json, Page, $log){
Page.setTitle('Well Test');
Page.setPage('well_Test');
Page.setPage('welltest');
var getWellTests = function(){
$scope.newTest = {
shot_datetime:null,
@@ -12,7 +12,17 @@ poconsole.controller('wellTestCtrl', function($scope, json, Page, $log){
var getWellTests = json.getWellTests();
getWellTests.then(function(data){
$scope.wellTests = data.well_tests;
var wtObj = {};
for (var v in data){
if (wtObj.hasOwnProperty(data[v].date)){
wtObj[data[v].date][data[v].name] = data[v].val;
} else {
wtObj[data[v].date] = {date: data[v].date};
wtObj[data[v].date][data[v].name] = data[v].val;
}
}
console.log(wtObj);
$scope.wellTests = wtObj;
});
};

View File

@@ -109,9 +109,15 @@ poconsole.factory('json',function($q, $http, $log){
var getEventsData = function() {
var deferred = $q.defer();
$http.get('/event').success(function(data) {
deferred.resolve({
eventsData: data.events
});
deferred.resolve(data);
});
return deferred.promise;
};
var getWellTests = function(){
var deferred = $q.defer();
$http.get('/tag_val/WellTestTags').success(function(data) {
deferred.resolve(data);
});
return deferred.promise;
};
@@ -319,15 +325,7 @@ poconsole.factory('json',function($q, $http, $log){
};
//Well Test Functions
var getWellTests = function(){
var deferred = $q.defer();
$http.get('/json/well_test/get').success(function(data) {
deferred.resolve({
well_tests: data.well_tests
});
});
return deferred.promise;
};
var pushWellTest = function(shot_datetime, pump_intake_pressure, fluid_gradient, friction, taken_by){
$http.post('/json/well_test/post', {

View File

@@ -35,33 +35,33 @@
<tbody>
<tr><td>Card ID</td><td>{{ card_id }}</td><td>{{stroke_time | date: 'medium'}}</td></tr>
<tr><td>Fillage Percent</td><td>{{ tagData.fillage_percent.val | number:3 }} %</td><td>{{tagData.fillage_percent.createdAt | date: 'medium'}}</td></tr>
<tr><td>Fillage Percent</td><td>{{ tagData['Fill Percentage'].val | number:3 }} %</td><td>{{tagData['Fill Percentage'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Card Type</td><td>{{ card_type }}</span></td><td>{{stroke_time | date: 'medium'}}</td></tr>
<tr><td>Fluid Gradient</td><td>{{ tagData.fluid_gradient.val | number:3 }} lbs/ft</td><td>{{tagData.fluid_gradient.createdAt | date: 'medium'}}</td></tr>
<tr><td>Stroke Speed</td><td>{{ tagData.spm.val | number:3}} lbs/ft</td><td>{{tagData.spm.createdAt | date: 'medium'}}</td></tr>
<tr><td>dt</td><td>{{ tagData.dt.val | number:3 }} sec</td><td>{{tagData.dt.createdAt | date: 'medium'}}</td></tr>
<tr><td>Tubing Head Pressure</td><td>{{ tagData.tubing_head_pressure.val | number:3 }} PSI</td><td>{{tagData.tubing_head_pressure.createdAt | date: 'medium'}}</td></tr>
<tr><td>Stuffing Box Friction</td><td>{{ tagData.stuffing_box_friction.val | number:3 }} lbs.</td><td>{{tagData.stuffing_box_friction.createdAt | date: 'medium'}}</td></tr>
<tr><td>Fluid Gradient</td><td>{{ tagData['Fluid Gradient'].val | number:3 }} lbs/ft</td><td>{{tagData['Fluid Gradient'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Stroke Speed</td><td>{{ tagData['SPM'].val | number:3}} lbs/ft</td><td>{{tagData['SPM'].createdAt | date: 'medium'}}</td></tr>
<tr><td>dt</td><td>{{ tagData['dt'].val | number:3 }} sec</td><td>{{tagData['dt'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Tubing Head Pressure</td><td>{{ tagData['Tubing Head Pressure'].val | number:3 }} PSI</td><td>{{tagData['Tubing Head Pressure'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Stuffing Box Friction</td><td>{{ tagData['Stuffing Box Friction'].val | number:3 }} lbs.</td><td>{{tagData['Stuffing Box Friction'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Surface Min. Position</td><td>{{ tagData.surface_min_position.val | number:3 }} in.</td><td>{{tagData.surface_min_position.createdAt | date: 'medium'}}</td></tr>
<tr><td>Surface Max. Position</td><td>{{ tagData.surface_max_position.val | number:3 }} in.</td><td>{{tagData.surface_max_position.createdAt | date: 'medium'}}</td></tr>
<tr><td>Surface Stroke Length</td><td>{{ tagData.surface_stroke_length.val | number:3 }} in.</td><td>{{tagData.surface_stroke_length.createdAt | date: 'medium'}}</td></tr>
<tr><td>Surface Min. Load</td><td>{{ tagData.surface_min_load.val | number:3 }} lbs.</td><td>{{tagData.surface_min_load.createdAt | date: 'medium'}}</td></tr>
<tr><td>Surface Max. Load</td><td>{{ tagData.surface_max_load.val | number:3 }} lbs.</td><td>{{tagData.surface_max_load.createdAt | date: 'medium'}}</td></tr>
<tr><td>Surface Min. Position</td><td>{{ tagData['Surface Min Position'].val | number:3 }} in.</td><td>{{tagData['Surface Min Position'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Surface Max. Position</td><td>{{ tagData['Surface Max Position'].val | number:3 }} in.</td><td>{{tagData['Surface Max Position'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Surface Stroke Length</td><td>{{ tagData['Surface Stroke Length'].val | number:3 }} in.</td><td>{{tagData['Surface Stroke Length'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Surface Min. Load</td><td>{{ tagData['Surface Min Load'].val | number:3 }} lbs.</td><td>{{tagData['Surface Min Load'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Surface Max. Load</td><td>{{ tagData['Surface Max Load'].val | number:3 }} lbs.</td><td>{{tagData['Surface Max Load'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Min. Position</td><td>{{ tagData.downhole_min_position.val | number:3 }} in.</td><td>{{tagData.downhole_min_position.createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Max Position</td><td>{{ tagData.downhole_max_position.val | number:3 }} in.</td><td>{{tagData.downhole_max_position.createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Gross Stroke</td><td>{{ tagData.downhole_gross_stroke.val | number:3 }} in.</td><td>{{tagData.downhole_gross_stroke.createdAt | date: 'medium'}}</td></tr>
<tr><td>Tubing Movement</td><td>{{ tagData.tubing_movement.val | number:3 }} in.</td><td>{{tagData.tubing_movement.createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Adjusted Gross Stroke</td><td>{{ tagData.downhole_adjusted_gross_stroke.val | number:3 }} in.</td><td>{{tagData.downhole_adjusted_gross_stroke.createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Net Stroke</td><td>{{ tagData.downhole_net_stroke.val | number:3 }} in.</td><td>{{tagData.downhole_net_stroke.createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Min. Load</td><td>{{ tagData.downhole_min_load.val | number:3 }} lbs.</td><td>{{tagData.downhole_min_load.createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Max. Load</td><td>{{ tagData.downhole_max_load.val | number:3 }} lbs.</td><td>{{tagData.downhole_max_load.createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Fluid Load</td><td>{{ tagData.downhole_fluid_load.val | number:3 }} lbs.</td><td>{{tagData.downhole_fluid_load.createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Min. Position</td><td>{{ tagData['Downhole Min Position'].val | number:3 }} in.</td><td>{{tagData['Downhole Min Position'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Max Position</td><td>{{ tagData['Downhole Max Position'].val | number:3 }} in.</td><td>{{tagData['Downhole Max Position'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Gross Stroke</td><td>{{ tagData['Downhole Gross Stroke'].val | number:3 }} in.</td><td>{{tagData['Downhole Gross Stroke'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Tubing Movement</td><td>{{ tagData['Tubing Movement'].val | number:3 }} in.</td><td>{{tagData['Tubing Movement'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Adjusted Gross Stroke</td><td>{{ tagData['Downhole Adjusted Gross Stroke'].val | number:3 }} in.</td><td>{{tagData['Downhole Adjusted Gross Stroke'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Net Stroke</td><td>{{ tagData['Downhole Net Stroke'].val | number:3 }} in.</td><td>{{tagData['Downhole Net Stroke'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Min. Load</td><td>{{ tagData['Downhole Min Load'].val | number:3 }} lbs.</td><td>{{tagData['Downhole Min Load'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Max. Load</td><td>{{ tagData['Downhole Max Load'].val | number:3 }} lbs.</td><td>{{tagData['Downhole Max Load'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Downhole Fluid Load</td><td>{{ tagData['Downhole Fluid Load'].val | number:3 }} lbs.</td><td>{{tagData['Downhole Fluid Load'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Polished Rod HP</td><td>{{ tagData.polished_rod_hp.val | number:3 }} HP</td><td>{{tagData.polished_rod_hp.createdAt | date: 'medium'}}</td></tr>
<tr><td>Pump HP</td><td>{{ tagData.pump_hp.val | number:3 }} HP</td><td>{{tagData.pump_hp.createdAt | date: 'medium'}}</td></tr>
<tr><td>Fluid Level</td><td>{{ tagData.fluid_level.val | number:3 }} ft.</td><td>{{tagData.fluid_level.createdAt | date: 'medium'}}</td></tr>
<tr><td>Polished Rod HP</td><td>{{ tagData['Polished Rod HP'].val | number:3 }} HP</td><td>{{tagData['Polished Rod HP'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Pump HP</td><td>{{ tagData['Pump HP'].val | number:3 }} HP</td><td>{{tagData['Pump HP'].createdAt | date: 'medium'}}</td></tr>
<tr><td>Fluid Level</td><td>{{ tagData['Fluid Level'].val | number:3 }} ft.</td><td>{{tagData['Fluid Level'].createdAt | date: 'medium'}}</td></tr>
</tbody>

View File

@@ -32,54 +32,49 @@
<div id="Status" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Status:</h4><h3>{{card_type}}</h3><h6>at {{stroke_time | date: "medium"}}</h6></div>
</div>
<div class="col-sm-4">
<div id="FillageGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Pump Fillage:</h4><h3>{{tagData.fillage_percent.val | number:3}} %</h3><h6>at {{tagData.fillage_percent.createdAt | date: "medium"}}</h6></div>
<div id="FillageGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Pump Fillage:</h4><h3>{{tagData['Fill Percentage'].val | number:3}} %</h3><h6>at {{tagData['Fill Percentage'].createdAt | date: "medium"}}</h6></div>
</div>
<div class="col-sm-4">
<div id="FAPGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Fluid Above Pump:</h4><h3>{{tagData.fluid_level.val | number:3}} ft.</h3><h6>at {{tagData.fluid_level.createdAt | date: "medium"}}</h6></div>
<div id="FAPGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Fluid Above Pump:</h4><h3>{{tagData['Fluid Level'].val | number:3}} ft.</h3><h6>at {{tagData['Fluid Level'].createdAt | date: "medium"}}</h6></div>
</div>
<div class="col-sm-4">
<div id="PRHPGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Polished Rod HP:</h4><h3>{{tagData.polished_rod_hp.val | number:3}} HP</h3><h6>at {{tagData.polished_rod_hp.createdAt | date: "medium"}}</h6></div>
<div id="PRHPGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Polished Rod HP:</h4><h3>{{tagData['Polished Rod HP'].val | number:3}} HP</h3><h6>at {{tagData['Polished Rod HP'].createdAt | date: "medium"}}</h6></div>
</div>
<div class="col-sm-4">
<div id="PMPHPGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Pump HP:</h4><h3>{{tagData.pump_hp.val | number:3}} HP</h3><h6>at {{tagData.pump_hp.createdAt | date: "medium"}}</h6></div>
<div id="PMPHPGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Pump HP:</h4><h3>{{tagData['Pump HP'].val | number:3}} HP</h3><h6>at {{tagData['Pump HP'].createdAt | date: "medium"}}</h6></div>
</div>
<div class="col-sm-4">
<div id="SpeedGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Speed:</h4><h3>{{tagData.spm.val | number:3}} SPM</h3><h6>at {{tagData.spm.createdAt | date: "medium"}}</h6></div>
<div id="SpeedGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Speed:</h4><h3>{{tagData['SPM'].val | number:3}} SPM</h3><h6>at {{tagData['SPM'].createdAt | date: "medium"}}</h6></div>
</div>
<div class="col-sm-4">
<div id="FluidLoadGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Fluid Load:</h4><h3>{{tagData.downhole_fluid_load.val | number:3}} lbs.</h3><h6>at {{tagData.downhole_fluid_load.createdAt | date: "medium"}}</h6></div>
<div id="FluidLoadGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Fluid Load:</h4><h3>{{tagData['Downhole Fluid Load'].val | number:3}} lbs.</h3><h6>at {{tagData['Downhole Fluid Load'].createdAt | date: "medium"}}</h6></div>
</div>
<div class="col-sm-4">
<div id="LastUpdated" class="gauge well" style="width:95%; text-align:center; margin:10px;"><h4>Current Stroke:</h4><h3>{{stroke_time | date: "medium"}}</h3></div>
</div>
<div class="col-sm-4">
<div id="cardButton" class="well" style="width:95%; text-align:center; margin:10px">
<a href="/#/files/{{folder}}" class="btn btn-primary active" style="width:40%;">View<br/>Cards</a>
<a href="/#/gaugeOff" class="btn btn-primary active" style="margin-left:10px; width:40%;">Gauge<br/>Off</a>
</div>
</div>
<div class="col-sm-12">
<div class="progress" style="margin:10px;">
<div class="progress-bar progress-bar-striped active" id="surface_stroke_length" role="progressbar" aria-valuenow="{{ tagData.surface_stroke_length.val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagData.surface_stroke_length.val }}%;">
Surface Stroke Length: {{ tagData.surface_stroke_length.val | number:3 }} in.
<div class="progress-bar progress-bar-striped active" id="surface_stroke_length" role="progressbar" aria-valuenow="{{ tagData['Surface Stroke Length'].val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagData['Surface Stroke Length'].val }}%;">
Surface Stroke Length: {{ tagData['Surface Stroke Length'].val | number:3 }} in.
</div>
</div>
<div class="progress" style="margin:10px;">
<div class="progress-bar progress-bar-striped active" id="downhole_gross_stroke" role="progressbar" aria-valuenow="{{ tagData.downhole_gross_stroke.val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagData.downhole_gross_stroke.val }}%;">
Downhole Gross Stroke: {{ tagData.downhole_gross_stroke.val | number:3 }} in.
<div class="progress-bar progress-bar-striped active" id="downhole_gross_stroke" role="progressbar" aria-valuenow="{{ tagData['Downhole Gross Stroke'].val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagData['Downhole Gross Stroke'].val }}%;">
Downhole Gross Stroke: {{ tagData['Downhole Gross Stroke'].val | number:3 }} in.
</div>
</div>
<div class="progress" style="margin:10px;">
<div class="progress-bar progress-bar-striped active" id="downhole_adjusted_gross_stroke" role="progressbar" aria-valuenow="{{ tagData.downhole_adjusted_gross_stroke.val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagData.downhole_adjusted_gross_stroke.val }}%;">
Downhole Adjusted Gross Stroke: {{ tagData.downhole_adjusted_gross_stroke.val | number:3 }} in.
<div class="progress-bar progress-bar-striped active" id="downhole_adjusted_gross_stroke" role="progressbar" aria-valuenow="{{ tagData['Downhole Adjusted Gross Stroke'].val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagData['Downhole Adjusted Gross Stroke'].val }}%;">
Downhole Adjusted Gross Stroke: {{ tagData['Downhole Adjusted Gross Stroke'].val | number:3 }} in.
</div>
</div>
<div class="progress" style="margin:10px;">
<div class="progress-bar progress-bar-striped active" id="downhole_net_stroke" role="progressbar" aria-valuenow="{{ tagData.downhole_net_stroke.val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagData.downhole_net_stroke.val }}%;">
Downhole Net Stroke: {{ tagData.downhole_net_stroke.val | number:3 }} in.
<div class="progress-bar progress-bar-striped active" id="downhole_net_stroke" role="progressbar" aria-valuenow="{{ tagData['Downhole Net Stroke'].val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagData['Downhole Net Stroke'].val }}%;">
Downhole Net Stroke: {{ tagData['Downhole Net Stroke'].val | number:3 }} in.
</div>
</div>
</div>

View File

@@ -32,15 +32,15 @@
<div class="col-sm-4">
<div id="FillageGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;">
<h4>Pump Fillage:</h4>
<h3>{{tagValues.fillage_percent.val | number:3}} %</h3>
<h6>Last Changed: {{tagValues.fillage_percent.dtime | date: "medium"}}</h6>
<h3>{{tagValues['Fill Percentage'].val | number:3}} %</h3>
<h6>Last Changed: {{tagValues['Fill Percentage'].dtime | date: "medium"}}</h6>
</div>
</div>
<div class="col-sm-4">
<div id="FAPGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;">
<h4>Fluid Above Pump:</h4>
<h3>{{tagValues.fluid_level.val | number:3}} ft.</h3>
<h6>Last Changed: {{tagValues.fluid_level.dtime | date: "medium"}}</h6>
<h3>{{tagValues['Fluid Level'].val | number:3}} ft.</h3>
<h6>Last Changed: {{tagValues['Fluid Level'].dtime | date: "medium"}}</h6>
</div>
</div>
</div>
@@ -48,22 +48,22 @@
<div class="col-sm-4">
<div id="PRHPGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;">
<h4>Polished Rod HP:</h4>
<h3>{{tagValues.polished_rod_hp.val | number:3}} HP</h3>
<h6>Last Changed: {{tagValues.polished_rod_hp.dtime | date: "medium"}}</h6>
<h3>{{tagValues['Polished Rod HP'].val | number:3}} HP</h3>
<h6>Last Changed: {{tagValues['Polished Rod HP'].dtime | date: "medium"}}</h6>
</div>
</div>
<div class="col-sm-4">
<div id="PMPHPGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;">
<h4>Pump HP:</h4>
<h3>{{tagValues.pump_hp.val | number:3}} HP</h3>
<h6>Last Changed: {{tagValues.pump_hp.dtime | date: "medium"}}</h6>
<h3>{{tagValues['Pump HP'].val | number:3}} HP</h3>
<h6>Last Changed: {{tagValues['Pump HP'].dtime | date: "medium"}}</h6>
</div>
</div>
<div class="col-sm-4">
<div id="SpeedGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;">
<h4>Speed:</h4>
<h3>{{tagValues.spm.val | number:3}} SPM</h3>
<h6>Last Changed: {{tagValues.spm.dtime | date: "medium"}}</h6>
<h3>{{tagValues['SPM'].val | number:3}} SPM</h3>
<h6>Last Changed: {{tagValues['SPM'].dtime | date: "medium"}}</h6>
</div>
</div>
</div>
@@ -71,47 +71,40 @@
<div class="col-sm-4">
<div id="FluidLoadGauge" class="gauge well" style="width:95%; text-align:center; margin:10px;">
<h4>Fluid Load:</h4>
<h3>{{tagValues.downhole_fluid_load.val | number:3}} lbs.</h3>
<h6>Last Changed: {{tagValues.spm.dtime | date: "medium"}}</h6>
<h3>{{tagValues['Downhole Fluid Load'].val | number:3}} lbs.</h3>
<h6>Last Changed: {{tagValues['Downhole Fluid Load'].dtime | date: "medium"}}</h6>
</div>
</div>
<div class="col-sm-4">
<div id="LastUpdated" class="gauge well" style="width:95%; text-align:center; margin:10px;">
<h4>Last Stroke:</h4>
<h5>{{last_stroke | date: "medium"}}</h5>
<!--<h3>{{cardData.time_month}}/{{cardData.time_day}}/{{cardData.time_year}} {{cardData.time_hour}}:{{cardData.time_minute}}:{{cardData.time_second}}</h3>-->
</div>
</div>
<div class="col-sm-4">
<div id="cardButton" class="well" style="width:95%; text-align:center; margin:10px">
<a href="/#/files/{{folder}}" class="btn btn-primary active" style="width:40%;">View<br/>Cards</a>
<a href="/#/gaugeOff" class="btn btn-primary active" style="margin-left:10px; width:40%;">Gauge<br/>Off</a>
</div>
</div>
</div>
<div class="row row-flex">
<div class="col-sm-12">
<div class="progress" style="margin:10px;">
<div class="progress-bar progress-bar-striped active" id="surface_stroke_length" role="progressbar" aria-valuenow="{{ tagValues.surface_stroke_length.val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagValues.surface_stroke_length.val }}%;">
Surface Stroke Length: {{ tagValues.surface_stroke_length.val }} in.
<div class="progress-bar progress-bar-striped active" id="surface_stroke_length" role="progressbar" aria-valuenow="{{ tagValues['Surface Stroke Length'].val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagValues['Surface Stroke Length'].val }}%;">
Surface Stroke Length: {{ tagValues['Surface Stroke Length'].val }} in.
</div>
</div>
<div class="progress" style="margin:10px;">
<div class="progress-bar progress-bar-striped active" id="downhole_gross_stroke" role="progressbar" aria-valuenow="{{ tagValues.donwhole_gross_stroke.val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagValues.downhole_gross_stroke.val }}%;">
Downhole Gross Stroke: {{ tagValues.downhole_gross_stroke.val }} in.
<div class="progress-bar progress-bar-striped active" id="downhole_gross_stroke" role="progressbar" aria-valuenow="{{ tagValues['Downhole Gross Stroke'].val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagValues['Downhole Gross Stroke'].val }}%;">
Downhole Gross Stroke: {{ tagValues['Downhole Gross Stroke'].val }} in.
</div>
</div>
<div class="progress" style="margin:10px;">
<div class="progress-bar progress-bar-striped active" id="downhole_adjusted_gross_stroke" role="progressbar" aria-valuenow="{{ tagValues.downhole_adjusted_gross_stroke.val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagValues.downhole_adjusted_gross_stroke.val }}%;">
Downhole Adjusted Gross Stroke: {{ tagValues.downhole_adjusted_gross_stroke.val }} in.
<div class="progress-bar progress-bar-striped active" id="downhole_adjusted_gross_stroke" role="progressbar" aria-valuenow="{{ tagValues['Downhole Adjusted Gross Stroke'].val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagValues['Downhole Adjusted Gross Stroke'].val }}%;">
Downhole Adjusted Gross Stroke: {{ tagValues['Downhole Adjusted Gross Stroke'].val }} in.
</div>
</div>
<div class="progress" style="margin:10px;">
<div class="progress-bar progress-bar-striped active" id="downhole_net_stroke" role="progressbar" aria-valuenow="{{ tagValues.downhole_net_stroke.val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagValues.downhole_net_stroke.val }}%;">
Downhole Net Stroke: {{ tagValues.downhole_net_stroke.val }} in.
<div class="progress-bar progress-bar-striped active" id="downhole_net_stroke" role="progressbar" aria-valuenow="{{ tagValues['Downhole Net Stroke'].val }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ tagValues['Downhole Net Stroke'].val }}%;">
Downhole Net Stroke: {{ tagValues['Downhole Net Stroke'].val }} in.
</div>
</div>
</div>

View File

@@ -30,13 +30,14 @@
</thead>
<tbody>
<tr ng-repeat="event in eventsData | filter: typeFilter">
<td nowrap>{{ event.datetime | date:'medium'}}</td>
<td nowrap>{{ event.device_name }}</td>
<td nowrap>{{ event.type }}</td>
<td nowrap>{{ event.cond }}</td>
<td nowrap>{{ event.value }}</td>
<td nowrap>{{ event.tag }}</td>
<td nowrap><a href="/#/files/id/{{ event.datetime | date: 'yyyyMMdd' }}/{{ event.stroke_number }}">{{ event.stroke_number }}</a></td>
<td nowrap>{{ event.createdAt | date:'medium'}}</td>
<td nowrap>{{ event.event_id.name }}</td>
<td nowrap>{{ event.event_type }}</td>
<td nowrap>{{ event.event_condition }}</td>
<td nowrap>{{ event.associated_val }}</td>
<td nowrap>{{ event.event_id.tag }}</td>
<!-- <td nowrap><a href="/#/files/id/{{ event.datetime | date: 'yyyyMMdd' }}/{{ event.stroke_number }}">{{ event.stroke_number }}</a></td> -->
<td nowrap>{{ event.stroke_number }}</td>
</tr>
</tbody>
</table>

View File

@@ -24,46 +24,48 @@
<div class='row'>
<div class='col-md-12'>
<table class="table table-striped">
<thead>
<tr>
<th>Date</th>
<th ng-if="show.PctRun">% Run</th>
<th ng-if="show.kWh">kWh</th>
<th ng-if="show.kWhRegen">kWh Regen</th>
<th ng-if="show.CostToOperate">Cost to Operate</th>
<th ng-if="show.LiftingCost">Lifting Cost</th>
<th ng-if="show.PeakLoad">Peak Load</th>
<th ng-if="show.MinLoad">Min. Load</th>
<th ng-if="show.AvgSPM">Average SPM</th>
<th ng-if="show.CalcProduction">Calc. Production</th>
<th ng-if="show.ProjProduction">Proj. Production</th>
<th ng-if="show.PolishedRodHP">Polished Rod HP</th>
<th ng-if="show.FluidLevel">Fluid Level</th>
<th ng-if="show.PumpIntakePressure">Pump Intake Pressure</th>
<th ng-if="show.InflowRate">Inflow Rate</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="entry in gaugeOffData">
<td nowrap>{{ entry.date | date}}</td>
<td nowrap ng-if="show.PctRun">{{ entry.go_percent_run | number: 1 }} %</td>
<td nowrap ng-if="show.kWh">{{ entry.go_kwh | number: 3 }} kWh</td>
<td nowrap ng-if="show.kWhRegen">{{ entry.go_kwh_regen | number: 3 }} kWh</td>
<td nowrap ng-if="show.CostToOperate">{{ entry.go_electricity_cost | number: 3 }}</td>
<td nowrap ng-if="show.LiftingCost">{{ entry.go_lifting_cost | number: 3 }}</td>
<td nowrap ng-if="show.PeakLoad">{{ entry.go_max_load | number: 3 }} lbs</td>
<td nowrap ng-if="show.MinLoad">{{ entry.go_min_load | number: 3 }} lbs</td>
<td nowrap ng-if="show.AvgSPM">{{ entry.go_average_spm | number: 3 }} SPM</td>
<td nowrap ng-if="show.CalcProduction">{{ entry.go_production_calculated | number: 3 }} BBL</td>
<td nowrap ng-if="show.ProjProduction">{{ entry.go_full_card_production | number: 3 }}BBL</td>
<td nowrap ng-if="show.PolishedRodHP">{{ entry.go_polished_rod_hp | number: 3 }} HP</td>
<td nowrap ng-if="show.FluidLevel">{{ entry.go_fluid_level | number: 3 }} ft.</td>
<td nowrap ng-if="show.PumpIntakePressure">{{ entry.go_pump_intake_pressure | number: 3 }} PSI</td>
<td nowrap ng-if="show.InflowRate">{{ entry.go_inflow_rate | number: 3 }} BBL/hr</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Date</th>
<th ng-if="show.PctRun">% Run</th>
<th ng-if="show.kWh">kWh</th>
<th ng-if="show.kWhRegen">kWh Regen</th>
<th ng-if="show.CostToOperate">Cost to Operate</th>
<th ng-if="show.LiftingCost">Lifting Cost</th>
<th ng-if="show.PeakLoad">Peak Load</th>
<th ng-if="show.MinLoad">Min. Load</th>
<th ng-if="show.AvgSPM">Average SPM</th>
<th ng-if="show.CalcProduction">Calc. Production</th>
<th ng-if="show.ProjProduction">Proj. Production</th>
<th ng-if="show.PolishedRodHP">Polished Rod HP</th>
<th ng-if="show.FluidLevel">Fluid Level</th>
<th ng-if="show.PumpIntakePressure">Pump Intake Pressure</th>
<th ng-if="show.InflowRate">Inflow Rate</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="entry in gaugeOffData">
<td nowrap>{{ entry.date | date: 'medium'}}</td>
<td nowrap ng-if="show.PctRun">{{ entry['Gauge Off: Percent Run'] | number: 1 }} %</td>
<td nowrap ng-if="show.kWh">{{ entry['Gauge Off: kWh'] | number: 3 }} kWh</td>
<td nowrap ng-if="show.kWhRegen">{{ entry['Gauge Off: kWh Regen'] | number: 3 }} kWh</td>
<td nowrap ng-if="show.CostToOperate">{{ entry['Gauge Off: Electricity Cost'] | number: 3 }}</td>
<td nowrap ng-if="show.LiftingCost">{{ entry['Gauge Off: Lifting Cost'] | number: 3 }}</td>
<td nowrap ng-if="show.PeakLoad">{{ entry['Gauge Off: Max Load'] | number: 3 }} lbs</td>
<td nowrap ng-if="show.MinLoad">{{ entry['Gauge Off: Min Load'] | number: 3 }} lbs</td>
<td nowrap ng-if="show.AvgSPM">{{ entry['Gauge Off: Average SPM'] | number: 3 }} SPM</td>
<td nowrap ng-if="show.CalcProduction">{{ entry['Gauge Off: Calculated Production'] | number: 3 }} BBL</td>
<td nowrap ng-if="show.ProjProduction">{{ entry['Gauge Off: Full Card Projection'] | number: 3 }}BBL</td>
<td nowrap ng-if="show.PolishedRodHP">{{ entry['Gauge Off: Polished Rod HP'] | number: 3 }} HP</td>
<td nowrap ng-if="show.FluidLevel">{{ entry['Gauge Off: Fluid Level'] | number: 3 }} ft.</td>
<td nowrap ng-if="show.PumpIntakePressure">{{ entry['Gauge Off: Pump Intake Pressure'] | number: 3 }} PSI</td>
<td nowrap ng-if="show.InflowRate">{{ entry['Gauge Off: Inflow Rate'] | number: 3 }} BBL/hr</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,67 @@
<div class="container">
<div class="row">
<div class="col-sm-2">
<div ng-if="dateListLoading" class="well" style="margin-top:20px; text-align:center;"><img src="/img/loading.gif" /></div>
<div ng-if="!dateListLoading">
<!-- <pagination total-items="totalFiles" ng-model="currentPage" max-size="maxSize" items-per-page="numPerPage" class="pagination-sm" boundary-links="false" rotate="false" num-pages="numPages"></pagination>
<ul class="list-group"> -->
<li class="list-group-item active animate">Dashboard</li>
<li class="list-group-item animate" ng-repeat="date in dates">
<a href="/#/files/{{date.unconv}}">{{date.conv}}</a>
</li>
</ul>
</div>
</div>
<div class="col-sm-10">
<ul class="nav nav-tabs" role="tablist">
<li><a href="/">Last Stroke</a></li>
<li class="active"><a href="/#/totals">Today's Totals</a></li>
</ul>
<div ng-if="totalsLoading" class="well"><img src="/img/loading.gif" style="text-align:center;"/></div>
<div ng-if="!totalsLoading">
<div style="text-align:center;margin-top:20px; margin-bottom:20px;"><button class="btn btn-primary active" id="refreshButton" ng-click="refresh()">Refresh Data</button></div>
<div class="row">
<div class="col-md-4" style="height:200px">
<just-gage id="pctRun" min=0 max=100 value="totals.Percent_Run" options="{label:'%',title:'Percent Run', decimals:2, refreshAnimationType:'bounce', startAnimationType:'bounce'}"></just-gage>
</div>
<div class="col-md-4" style="height:200px">
<just-gage id="avgSpeed" min=0 max=15 value="totals.Average_SPM" options="{label:'SPM',title:'Average Speed', decimals:3, refreshAnimationType:'bounce', startAnimationType:'bounce'}"></just-gage>
</div>
<div class="col-md-4" style="height:200px">
<just-gage id="calcProd" min=0 max=600 value="totals.Calculated_Production" options="{label:'BBL',title:'Calculated Production', decimals:2, refreshAnimationType:'bounce', startAnimationType:'bounce'}"></just-gage>
</div>
<hr />
<div class="col-md-4" style="height:200px">
<just-gage id="projProd" min=0 max=600 value="totals.Projected_Production" options="{label:'BBL',title:'Projected Production', decimals:2, refreshAnimationType:'bounce', startAnimationType:'bounce'}"></just-gage>
</div>
<div class="col-md-4" style="height:200px">
<just-gage id="pip" min=0 max=2000 value="totals.Pump_Intake_Presure" options="{label:'PSI',title:'Pump Intake Pressure', decimals:1, refreshAnimationType:'bounce', startAnimationType:'bounce'}"></just-gage>
</div>
<div class="col-md-4" style="height:200px">
<just-gage id="fluidLevel" min=0 max=10000 value="totals.Fluid_Level" options="{label:'ft.',title:'Fluid Level', decimals:1, refreshAnimationType:'bounce', startAnimationType:'bounce'}"></just-gage>
</div>
<hr />
<div class="col-md-4" style="height:200px">
<just-gage id="inflowRate" min=0 max=100 value="totals.Inflow_Rate" options="{label:'BBL/day',title:'Inflow Rate', decimals:2, refreshAnimationType:'bounce', startAnimationType:'bounce'}"></just-gage>
</div>
<div class="col-md-4" style="height:200px">
<just-gage id="kwh" min=0 max=100 value="totals.kWh" options="{label:'kWh',title:'Energy Consumed', decimals:3, refreshAnimationType:'bounce', startAnimationType:'bounce'}"></just-gage>
</div>
<div class="col-md-4" style="height:200px">
<just-gage id="kwhregen" min=0 max=100 value="totals.kWh_Regen" options="{label:'kWh',title:'Energy Regenerated', decimals:3, refreshAnimationType:'bounce', startAnimationType:'bounce'}"></just-gage>
</div>
<hr />
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,44 @@
<div class='container'>
<div class="row">
<div class="col-md-12">
<h1>Well Test Data</h1>
</div>
</div>
<div class='row'>
<div class='col-md-12'>
<table class="table table-striped">
<thead>
<tr>
<th>Date</th>
<th>Duration</th>
<th>Volume Oil</th>
<th>Volume Water</th>
<th>Volume Gas</th>
<th>k-Factor</th>
<th>Proj. Vol. Oil</th>
<th>Proj. Vol. Water</th>
<th>API Grav. Oil</th>
<th>Specific Grav. Water</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="test in wellTests">
<td nowrap>{{ test.date | date: 'medium' }}</td>
<td nowrap>{{ test['Well Test: Test Duration'] }} Hours</td>
<td nowrap>{{ test['Well Test: Oil Volume'] }} BBL</td>
<td nowrap>{{ test['Well Test: Water Volume'] }} BBL</td>
<td nowrap>{{ test['Well Test: Gas Volume'] }} mmcf</td>
<td nowrap>{{ test['Well Test: k-factor'] }}</td>
<td nowrap>{{ test['Well Test: Projected Volume Oil'] }} BBL</td>
<td nowrap>{{ test['Well Test: Projected Volume Water'] }} BBL</td>
<td nowrap>{{ test['Well Test: API Gravity - Oil'] }}</td>
<td nowrap>{{ test['Well Test: Specific Gravity - Water'] }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@@ -19,7 +19,7 @@
<li ng-class="{active: Page.page() == 'dashboard'}"><a href="/#/"><i class="fa fa-home"></i> Dashboard</a></li>
<li ng-class="{active: Page.page() == 'gaugeoff'}"><a href="/#/gaugeOff"><i class="fa fa-tachometer"></i> Gauge-Off</a></li>
<li ng-class="{active: Page.page() == 'event'}"><a href="/#/events"><i class="fa fa-calendar"></i> Events</a></li>
<li ng-class="{active: Page.page() == 'welltest'}"><a href="/#/"><i class="fa fa-bar-chart"></i> Well Test</a></li>
<li ng-class="{active: Page.page() == 'welltest'}"><a href="/#/wellTest"><i class="fa fa-bar-chart"></i> Well Test</a></li>
<li ng-class="{active: Page.page() == 'fluidshot'}"><a href="/#/"><i class="fa fa-area-chart"></i> Fluid Shot</a></li>
<li ng-class="{active: Page.page() == 'notes'}"><a href="/#/"><i class="fa fa-sticky-note-o"></i> Notes</a></li>
<li ng-class="{active: Page.page() == 'tags'}"><a href="/#/tags"><i class="fa fa-tags"></i> Tags</a></li>