Skip to content

Commit

Permalink
Micro: Added Spot Pages for Experimental Results & Experimental Set UP
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicagood committed Aug 14, 2018
1 parent 7e0fcc9 commit b1e1a02
Show file tree
Hide file tree
Showing 25 changed files with 373 additions and 3 deletions.
2 changes: 2 additions & 0 deletions www/app/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
var spotTabStates = [
{'state': '_3dstructures', 'template': '3d-structures/3dstructures-tab', 'controller': '_3DStructures'},
{'state': 'data', 'template': 'data/data-tab', 'controller': 'Data'},
{'state': 'experimental-results', 'template': 'micro/experimental-results/experimental-results-tab', 'controller': 'ExperimentalResults'},
{'state': 'experimental-set-up', 'template': 'micro/experimental-set-up/experimental-set-up-tab', 'controller': 'ExperimentalSetUp'},
{'state': 'images', 'template': 'images/images-tab', 'controller': 'Images'},
{'state': 'minerals', 'template': 'minerals/minerals-tab', 'controller': 'Minerals'},
{'state': 'nesting', 'template': 'nesting/nesting-tab', 'controller': 'Nesting'},
Expand Down
2 changes: 2 additions & 0 deletions www/app/app.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
// Declare Spot Tab Childview States
var spotTabStates = [
{'state': '_3dstructures', 'template': '3d-structures/3dstructures-tab', 'controller': '_3DStructures'},
{'state': 'experimental-results', 'template': 'micro/experimental-results/experimental-results-tab', 'controller': 'ExperimentalResults'},
{'state': 'experimental-set-up', 'template': 'micro/experimental-set-up/experimental-set-up-tab', 'controller': 'ExperimentalSetUp'},
{'state': 'data', 'template': 'data/data-tab', 'controller': 'Data'},
{'state': 'images', 'template': 'images/images-tab', 'controller': 'Images'},
{'state': 'minerals', 'template': 'minerals/minerals-tab', 'controller': 'Minerals'},
Expand Down
12 changes: 12 additions & 0 deletions www/app/data-models/data-models.factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@
'choices_file': 'app/data-models/image_properties-choices.csv'
},
'micro': {
'experimental_results': {
'survey': {},
'survey_file': 'app/data-models/micro/experimental-results-survey.csv',
'choices': {},
'choices_file': 'app/data-models/micro/experimental-results-choices.csv'
},
'experimental_set_up': {
'survey': {},
'survey_file': 'app/data-models/micro/experimental-set-up-survey.csv',
'choices': {},
'choices_file': 'app/data-models/micro/experimental-set-up-choices.csv'
},
'thin_section': {
'survey': {},
'survey_file': 'app/data-models/micro/thin-section-survey.csv',
Expand Down
23 changes: 23 additions & 0 deletions www/app/data-models/micro/experimental-results-choices.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
list_name,name,label
db35g43,psi,Psi
db35g43,bar,bar
db35g43,kbar,Kbar
db35g43,mpa,MPa
cz56k16,cm,cm
cz56k16,mm,mm
cz56k16,in,in
zl4gw87,cubeblok,Cube/block
zl4gw87,core,Core
zl4gw87,other,Other
ik38x60,cm,cm
ik38x60,mm,mm
ik38x60,in,in
hz7ux28,cm,cm
hz7ux28,mm,mm
hz7ux28,in,in
vi6ad98,cm,cm
vi6ad98,mm,mm
vi6ad98,in,in
hy2bf71,cm,cm
hy2bf71,mm,mm
hy2bf71,in,in
25 changes: 25 additions & 0 deletions www/app/data-models/micro/experimental-results-survey.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
type,name,label,required,appearance,relevant,calculation
start,start,,,,,
end,end,,,,,
decimal,Peak_Differential_Stress,Peak Differential Stress,false,,,
decimal,Peak_Differential_Force,Peak Differential Force,false,,,
select_one db35g43,Force_Units,Force Units,false,compact,,
decimal,Coefficient_of_Friction,Coefficient of Friction,false,,,
decimal,Shear_Displacement,Shear Displacement,false,,,
select_one cz56k16,Shear_Displacement_Units,Shear Displacement Units,false,compact,,
begin_group,group_pn2ld79,Final Sample Dimensions,,,,
select_one zl4gw87,Sample_Geometry,Sample Geometry,false,,,
decimal,Maximum_Final_Diameter,Maximum Final Diameter,false,,${Sample_Geometry} = 'core',
decimal,Minimum_Final_Diameter,Minimum Final Diameter,false,,${Sample_Geometry} = 'core',
select_one ik38x60,Diameter_Units,Diameter Units,false,compact,${Sample_Geometry} = 'core',
decimal,Final_Length,Final Length,false,,${Sample_Geometry} = 'core',
select_one hz7ux28,Length_Units,Length Units,false,compact,${Sample_Geometry} = 'core',
decimal,Displacement,Displacement,false,,${Sample_Geometry} = 'core',
select_one vi6ad98,Displacement_Units,Displacement Units,false,compact,${Sample_Geometry} = 'core',
decimal,Length,Length,false,,${Sample_Geometry} = 'cubeblok',
decimal,Width,Width,false,,${Sample_Geometry} = 'cubeblok',
decimal,Height,Height,false,,${Sample_Geometry} = 'cubeblok',
select_one hy2bf71,Units,Units,false,,${Sample_Geometry} = 'cubeblok',
text,Other_Final_Sample_Geometry,Other Final Sample Geometry,false,,${Sample_Geometry} = 'other',
end_group,,,,,,
calculate,__version__,,,,,'vWf5Rw3cV4LbCePCoiFRpQ'
51 changes: 51 additions & 0 deletions www/app/data-models/micro/experimental-set-up-choices.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
list_name,name,label,order
qn6uc31,gas,Gas,
qn6uc31,solid,Solid,
qn6uc31,liquid,Liquid,
qn6uc31,other,Other,
wj1rj37,strain_gauge,Strain Gauge,
wj1rj37,distortion,Piezoelectric,1
wj1rj37,displacement,LVDT,2
wj1rj37,dcdt,DCDT,3
wj1rj37,temperature,Temperature,4
wj1rj37,force_gauge,Force Gauge,5
wj1rj37,pressure,Pressure,6
wj1rj37,other,Other,
qm35l04,single,Single,
qm35l04,double,Double,1
qm35l04,none,None,2
qm35l04,other,Other,3
uj2sg83,gold,Gold,
uj2sg83,silver,Silver,
uj2sg83,copper,Copper,
uj2sg83,lead,Lead,
uj2sg83,teflon,Teflon,
uj2sg83,polyolefin,Polyolefin,
uj2sg83,other,Other,
zg3fl49,constant_stress_test,Constant Stress Test,
zg3fl49,constant_strain_rate_test,Constant Strain Rate Test,
zg3fl49,load_relaxation,Load Relaxation,
zg3fl49,stepping_tests,Stepping Tests,
zg3fl49,other,Other,
gi5pp37,c,C,
gi5pp37,mpa_1,bar,
gi5pp37,mpa,MPa,1
gi5pp37,kbar_1,kbar,1
gi5pp37,k,K,2
gi5pp37,torr,torr,2
gi5pp37,mpa_2,MPa,2
gi5pp37,kbar,kbar,
gi5pp37,torr_1,torr,
gi5pp37,psi,Psi,
gi5pp37,kbar_2,kbar,1
gi5pp37,mpa_3,MPa,2
or1gv41,uniaxial,Uniaxial,
or1gv41,biaxial,Biaxial,
or1gv41,conventional_triaxial,Conventional Triaxial,
or1gv41,full_triaxial,Full Triaxial,
or1gv41,rotary,Rotary,
or1gv41,direct_shear,Direct shear,
or1gv41,precut_shear__30_or_45_degrees,Precut shear (30 or 45 degrees),
or1gv41,general_shear,General Shear,
or1gv41,double_direct_shear,Double-direct shear,
or1gv41,other,Other,
58 changes: 58 additions & 0 deletions www/app/data-models/micro/experimental-set-up-survey.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
type,name,label,required,relevant,default,appearance,calculation
begin_group,group_lq9wr93,Experimental,,,,,
text,Attach_Apparatus_Tag,Attach Apparatus Tag,false,,,,
begin_group,group_gm3pu13,Apparatus Information,,${Attach_Apparatus_Tag} = '',,,
select_one qn6uc31,Apparatus,Apparatus,false,,,,
text,If_Other_Describe_005,"If Other, Describe",false,${Apparatus} = 'other',,,
text,Gas_Specify,Gas-Specify,false,${Apparatus} = 'gas',,,
text,Liquid_Specify,Liquid-Specify,false,${Apparatus} = 'liquid',,,
text,Solid_Specify,Solid-Specify,false,${Apparatus} = 'solid',,,
text,Apparatus_Stiffness,Apparatus Stiffness,false,,,,
select_multiple wj1rj37,Types_of_Devices_Transducers,Types of Devices/Transducers,false,,,,
text,If_Other_Describe_006,"If Other, Describe",false,"selected(${Types_of_Devices_Transducers}, 'other')",,,
text,Type_of_Temperature_Device,Type of Temperature Device,false,"selected(${Types_of_Devices_Transducers}, 'temperature')",,,
text,Type_of_Force_Gauge,Type of Force Gauge,false,"selected(${Types_of_Devices_Transducers}, 'force_gauge')",,,
text,Type_of_Pressure_Transducer,Type of Pressure Transducer,false,"selected(${Types_of_Devices_Transducers}, 'pressure')",,,
text,Strain_Gauge_Calibration,Strain Gauge Calibration,false,"selected(${Types_of_Devices_Transducers}, 'strain_gauge')",,,
text,Piezoelectric_Calibration,Piezoelectric Calibration,false,"selected(${Types_of_Devices_Transducers}, 'distortion')",,,
text,LVDT_Calibration,LVDT Calibration,false,"selected(${Types_of_Devices_Transducers}, 'displacement')",,,
text,DCDT,DCDT Calibration,false,"selected(${Types_of_Devices_Transducers}, 'dcdt')",,,
text,Temp_Calibration,Temperature Calibration,false,"selected(${Types_of_Devices_Transducers}, 'temperature')",,,
text,Force_Gauge_Calibration,Force Gauge Calibration,false,"selected(${Types_of_Devices_Transducers}, 'force_gauge')",,,
text,Pressure_Transducer_Calibration,Pressure Transducer Calibration,false,"selected(${Types_of_Devices_Transducers}, 'pressure')",,,
end_group,,,,,,,
select_one qm35l04,Jacket_Type,Jacket Type,false,,,,
text,If_Other_Describe_007,"If Other, Describe",false,${Jacket_Type} = 'other',,,
select_one uj2sg83,Jacket_Material,Jacket Material,false,${Jacket_Type} != 'none',,,
text,If_Other_Describe_008,"If Other, Describe",false,${Jacket_Material} = 'other',,,
text,Experimental_Setup_Description,Experimental Setup Description,false,,,,
select_one zg3fl49,Type_of_experiment,Type of Experiment,false,,,,
text,If_Other_Describe_009,"If Other, Describe",false,${Type_of_experiment} = 'other',,,
note,Experimental_Conditions,Experimental Conditions,false,,,,
note,Experimental_Pressure,Experimental Pressure,false,,,,
decimal,Pressure,Pressure,false,,,,
select_one gi5pp37,Pressure_Units,Pressure Units,false,,MPa,minimal,
note,Pore_Pressure,Pore Pressure,false,,,,
decimal,Pore_Pressure_001,Pore Pressure,false,,,,
select_one gi5pp37,Pore_Pressure_Units,Pore Pressure Units,true,,MPa,minimal,
decimal,Effective_Pressure,Effective Pressure,false,,,,
select_one gi5pp37,Effective_Pressure_Units,Effective Pressure Units,false,,MPa,minimal,
text,If_Other_Describe_012,"If Other, Describe",false,,,,
text,Effective_Pressure_001,Effective Pressure,false,,,,
integer,Temperature,Temperature,false,,,,
select_one gi5pp37,Temperature_Units,Temperature Units,false,,C,minimal,
text,Temperature_001,Temperature,false,,,,
decimal,Strain_Rate,Strain Rate,false,,,,
text,Strain_rate_001,Strain rate,false,,,,
decimal,Differential_Stress,Differential Stress,false,,,,
select_one gi5pp37,Differential_Stress_Units,Differential Stress Units,false,,Psi,minimal,
text,Differential_stress_001,Differential stress,false,,,,
text,Other_Conditions,Other Conditions,false,,,,
select_one or1gv41,Experimental_Geometry,Experimental Geometry,false,,,,
text,If_other_describe_013,"If other, describe",false,${Experimental_Geometry} = 'other',,,
note,Sample_orientation_r_o_experimental_setup,Sample orientation relative to experimental setup,false,,,,
text,Before_Experiment,Before Experiment,false,,,,
text,After_Experiment,After Experiment,false,,,,
text,Experimental_Set_Up_Description,Experimental Set Up Description,false,,,,
end_group,,,,,,,
calculate,__version__,,,,,,'vGdwoo3u27CHtu6xA3oZDP'
6 changes: 5 additions & 1 deletion www/app/data-models/project_preferences-survey.csv
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ acknowledge,sed_lithologies,Lithologies (Testing Only),,false,,,
acknowledge,sed_structures,Structures (Testing Only),,false,,,
acknowledge,sed_interpretations,Interpretations (Testing Only),,false,,,
end_group,,,,,,,
begin_group,group_experimental_tab_control,Experimental Spot Page Control,,,,,
acknowledge,experimental_set_up,Experimental Set Up (Testing Only),,false,,,
acknowledge,experimental_results,Experimental Results (Testing Only),,false,,,
end_group,,,,,,,
begin_group,group_other_modes,Modes,,,,,
acknowledge,strat_mode,Strat Mode (Testing Only),,false,,,
end_group,,,,,,,
Expand All @@ -30,4 +34,4 @@ end_group,,,,,,,
begin_group,group_vw6ff56,Privacy Control,,,,,
acknowledge,public,Public?,,false,,,
end_group,,,,,,,
calculate,__version__,,,,,,'vqs7DhZi4r3YQwNPSjF7dj'
calculate,__version__,,,,,,'vC26SFy3JNwcV3bM6E9T3r'
3 changes: 2 additions & 1 deletion www/app/form/form.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
if (!project.is_testing_mode) {
if (field.name === 'group_sed_tab_control' || field.name === 'sed_lithologies' ||
field.name === 'sed_structures' || field.name === 'sed_interpretations' ||
field.name === 'group_other_modes' || field.name === 'strat_mode' || field.name === 'minerals') {
field.name === 'group_other_modes' || field.name === 'strat_mode' || field.name === 'minerals' ||
field.name === 'experimental_results' || field.name === 'experimental_set_up') {
show = false;
}
}
Expand Down
6 changes: 6 additions & 0 deletions www/app/maps/side-panel/side-panel.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
<div ng-show='sidePanel.isActiveTab("sed-interpretations")' ng-controller='SedInterpretationsTabController as vmChild'>
<strabo-sed-interpretations-tab-directive></strabo-sed-interpretations-tab-directive>
</div>
<div ng-show='sidePanel.isActiveTab("experimental-set-up")' ng-controller='ExperimentalSetUpTabController as vmChild'>
<strabo-experimental-set-up-tab-directive></strabo-experimental-set-up-tab-directive>
</div>
<div ng-show='sidePanel.isActiveTab("experimental-results")' ng-controller='ExperimentalResultsTabController as vmChild'>
<strabo-experimental-results-tab-directive></strabo-experimental-results-tab-directive>
</div>
</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions www/app/misc/misc.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@
preferences.sed_interpretations = false;
preferences.strat_mode = false;
preferences.minerals = false;
preferences.experimental_results = false;
preferences.experimental_set_up = false;
ProjectFactory.saveProjectItem('preferences', preferences);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
(function () {
'use strict';

angular
.module('app')
.controller('ExperimentalResultsTabController', ExperimentalResultsTabController);

ExperimentalResultsTabController.$inject = ['$log', '$scope', '$state', 'FormFactory'];

function ExperimentalResultsTabController($log, $scope, $state, FormFactory) {
var vm = this;
var vmParent = $scope.vm;

var thisTabName = 'experimental-results';

activate();

/**
* Private Functions
*/

function activate() {
$log.log('In ExperimentalResultsTabController');

// Loading tab from Spots list
if ($state.current.name === 'app.spotTab.' + thisTabName) loadTab($state);
// Loading tab in Map side panel
$scope.$on('load-tab', function (event, args) {
if (args.tabName === thisTabName) {
vmParent.saveSpot().finally(function () {
vmParent.spotChanged = false;
loadTab({
'current': {'name': 'app.spotTab.' + thisTabName},
'params': {'spotId': args.spotId}
});
});
}
});
}

function loadTab(state) {
vmParent.loadTab(state); // Need to load current state into parent
FormFactory.setForm('micro', 'experimental_results');
if (vmParent.spot.properties.micro && vmParent.spot.properties.micro.experimental_results) {
$log.log('Experimental Results:', vmParent.spot.properties.micro.experimental_results);
vmParent.data = vmParent.spot.properties.micro.experimental_results;
}
else vmParent.data = {};
}

/**
* Public Functions
*/

}
}());
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class='strabo-form'>
<form name='straboForm' novalidate=''>
<auto-fields/>
</form>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(function () {
'use strict';

angular
.module('app')
.directive('straboExperimentalResultsTabDirective', straboExperimentalResultsTabDirective);

function straboExperimentalResultsTabDirective() {
return {
'restrict': 'AE',
'replace': true,
'templateUrl': 'app/spot/micro/experimental-results/experimental-results-tab.directive.html'
};
}
}());
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ion-view>
<ion-content>
<strabo-experimental-results-tab-directive></strabo-experimental-results-tab-directive>
</ion-content>
</ion-view>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<strabo-experimental-results-tab-directive></strabo-experimental-results-tab-directive>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
(function () {
'use strict';

angular
.module('app')
.controller('ExperimentalSetUpTabController', ExperimentalSetUpTabController);

ExperimentalSetUpTabController.$inject = ['$log', '$scope', '$state', 'FormFactory'];

function ExperimentalSetUpTabController($log, $scope, $state, FormFactory) {
var vm = this;
var vmParent = $scope.vm;

var thisTabName = 'experimental-set-up';

activate();

/**
* Private Functions
*/

function activate() {
$log.log('In ExperimentalSetUpTabController');

// Loading tab from Spots list
if ($state.current.name === 'app.spotTab.' + thisTabName) loadTab($state);
// Loading tab in Map side panel
$scope.$on('load-tab', function (event, args) {
if (args.tabName === thisTabName) {
vmParent.saveSpot().finally(function () {
vmParent.spotChanged = false;
loadTab({
'current': {'name': 'app.spotTab.' + thisTabName},
'params': {'spotId': args.spotId}
});
});
}
});
}

function loadTab(state) {
vmParent.loadTab(state); // Need to load current state into parent
FormFactory.setForm('micro', 'experimental_set_up');
if (vmParent.spot.properties.micro && vmParent.spot.properties.micro.experimental_set_up) {
$log.log('Experimental Set Up:', vmParent.spot.properties.micro.experimental_set_up);
vmParent.data = vmParent.spot.properties.micro.experimental_set_up;
}
else vmParent.data = {};
}

/**
* Public Functions
*/

}
}());
Loading

0 comments on commit b1e1a02

Please sign in to comment.