diff --git a/docs/sample_interface/sample_schema.js b/docs/sample_interface/sample_schema.js index c3a97ca..b4b3667 100644 --- a/docs/sample_interface/sample_schema.js +++ b/docs/sample_interface/sample_schema.js @@ -982,6 +982,7 @@ var dataModel = { }, "sampleVolume": { + "description": "(Optional) - Relevant for gas, liquid and powder", "type": "object", "properties": { @@ -989,13 +990,42 @@ var dataModel = { "unit": {"type": "string"} } }, - "samplePressure": + "gasPressure": { + "description": "(Optional) - Only relevant for gas", "type": "object", "properties": { - "value": {"type": "number"}, - "unit": {"type": "string"} + "estimate": + { + "type": "string", + "enum": + [ + "quantitative", + "qualitative" + ] + }, + "quantitative": + { + "type": "object", + "properties": + { + "value": {"type": "number"}, + "unit": {"type": "string"} + } + }, + "qualitative": + { + "type": "string", + "enum": + [ + "non applicable", + "vacuum", + "high vacuum", + "ultra high vacuum" + ] + } + } }, "sampleSurfaceRoughness": @@ -1009,19 +1039,8 @@ var dataModel = { "type": "string", "enum": [ - "qualitative", - "quantitative" - ] - }, - "qualitative": - { - "type": "string", - "enum": - [ - "not applicable", - "rough", - "smooth", - "polished" + "quantitative", + "qualitative" ] }, "quantitative": @@ -1043,6 +1062,17 @@ var dataModel = { "value": {"type": "number"}, "unit": {"type": "string"} } + }, + "qualitative": + { + "type": "string", + "enum": + [ + "not applicable", + "rough", + "smooth", + "polished" + ] } } } diff --git a/docs/sample_interface/ui-schema.js b/docs/sample_interface/ui-schema.js index c8ed704..fb853ed 100644 --- a/docs/sample_interface/ui-schema.js +++ b/docs/sample_interface/ui-schema.js @@ -89,21 +89,35 @@ var uiSchema = { ] }, {"title": "Sample Mass", "key": "sampleDescription.sampleMass"}, - {"title": "Sample Volume", "key": "sampleDescription.sampleMass"}, - {"title": "Sample Pressure", "key": "sampleDescription.samplePressure"}, + {"title": "Sample Volume", "key": "sampleDescription.sampleVolume"}, + { + "title": "Gas Pressure", + "type": "selectfieldset", + "htmlClass": "myclass", + "titleMap": + { + "qualitative": "Quantitative", + "quantitative": "Qualitative" + }, + "items": + [ + {"title": "Quantitative", "key": "sampleDescription.gasPressure.quantitative"}, + {"title": "Qualitative", "key": "sampleDescription.gasPressure.qualitative"} + ] + }, { "title": "Sample Surface Roughness", "type": "selectfieldset", "htmlClass": "myclass", "titleMap": { - "qualitative": "Qualitative", - "quantitative": "Quantitative" + "qualitative": "Quantitative", + "quantitative": "Qualitative" }, "items": [ - {"title": "Qualitative", "key": "sampleDescription.sampleSurfaceRoughness.qualitative"}, {"title": "Quantitative", "key": "sampleDescription.sampleSurfaceRoughness.quantitative"}, + {"title": "Qualitative", "key": "sampleDescription.sampleSurfaceRoughness.qualitative"} ] } ]