diff --git a/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js b/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js index 55107471c1e56261b08003d98a796efa184ea56f..c44c9d3bcb1d4c0141a35f368029b4b5df15594f 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js @@ -184,7 +184,7 @@ function Jeditor(props) { /** If any formatting is done at the parent/implementation component pass the resolved schema and get the formatted schema like adding validation type, field ordering, etc.,*/ if (props.defintionFormatter) { - props.defintionFormatter(schema); + // props.defintionFormatter(schema); } pointingProps = []; subBandProps = []; @@ -333,7 +333,7 @@ function Jeditor(props) { } } } - if (!value || isNaN(value) || value < 0 || value > 90) { + if (isNaN(value) || value < 0 || value > 90) { errors.push({ path: path, property: 'validationType', diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js index 06efeadb2f2260e7e1d91cbb318683c2bd1614bc..801463685b7cdecb72bf518c3ee4e0e2a58ee48e 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js @@ -17,7 +17,7 @@ export default (props) => { const configureProperties = (properties) => { for (const propertyKey in properties) { const propertyValue = properties[propertyKey]; - if (propertyValue instanceof Object) { + if (propertyValue instanceof Object && propertyKey!=="reference_pointing") { configureProperties(propertyValue) } if(propertyKey === 'scheduler'){ @@ -110,6 +110,7 @@ export default (props) => { validationType: 'datetime', type: schema.definitions.timestamp.type }; + } else if (definitionName === 'pointing') { } else if (definitionName !== 'timewindow' && definitionName !== 'timestamp') { schema.definitions[definitionName] = { type: schema.definitions[definitionName].type @@ -215,7 +216,7 @@ export default (props) => { formatOutput: props.formatOutput, parentFunction: parentFunction, defintionFormatter: configureDefinitions, - resolveExtRef:true, + resolveExtRef:false, systemTime: systemTime, showInGrid: false }); diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js index 3a552e3a40bb8fbe3f45b257f59cd90c697b6626..631efefaca4d62c2c3437302f07ea5db9de3299e 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js @@ -343,7 +343,7 @@ export class SchedulingUnitCreate extends Component { if(_.includes(['from', 'to'], key)) { propertyValue = (propertyValue<0?'-':'')+UnitConverter.getSecsToHHmmss(propertyValue); } - if(_.includes(['sun', 'moon', 'jupiter', 'target', 'calibrator'], key) && defaultValues) { + if(!_.includes(_.keys(parentProps), "angle1") && _.includes(['sun', 'moon', 'jupiter', 'target', 'calibrator'], key) && defaultValues) { propertyValue = ((propertyValue * Math.PI) / 180).toFixed(1); } if(_.includes(['between', 'not_between'], key)) { diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js index 7b03ecb30f528d693e72c2d0d09ff57df1a1a4aa..fe38fc7e9dd23f31a841bebc1c15c438c4420d8c 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js @@ -2529,7 +2529,7 @@ export class SchedulingSetCreate extends Component { constraint = schedulingUnit.scheduling_constraints_doc; } if ( constraint === null || constraint === 'undefined' || constraint === {}){ - constraint = this.state.schedulingConstraintsDoc; + // constraint = this.state.schedulingConstraintsDoc; } if(!constraint) { // let schedulingUnit = await ScheduleService.getSchedulingUnitDraftById(1); @@ -3601,6 +3601,10 @@ export class SchedulingSetCreate extends Component { * @param {Object} jsonOutput - default constraint values from the editor */ setConstraintsEditorOutput(jsonOutput) { + if (jsonOutput["sky"] && jsonOutput["sky"]["reference_pointing"]) { + jsonOutput["sky"]["reference_pointing"]["pointing"]["angle1"] = parseFloat(jsonOutput["sky"]["reference_pointing"]["pointing"]["angle1"]); + jsonOutput["sky"]["reference_pointing"]["pointing"]["angle2"] = parseFloat(jsonOutput["sky"]["reference_pointing"]["pointing"]["angle2"]); + } this.defaultConstraintDoc = jsonOutput; } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/utils/unit.converter.js b/SAS/TMSS/frontend/tmss_webapp/src/utils/unit.converter.js index 6954006bd2b8b04de462bc3b7db22002a1aba792..db936c9cab9b556c52e96f635b0ae96ad77d3a44 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/utils/unit.converter.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/utils/unit.converter.js @@ -108,7 +108,7 @@ const UnitConverter = { }, radiansToDegree: function (object) { for (let type in object) { - if (type === 'transit_offset') { + if (type === 'transit_offset' || type === 'reference_pointing') { continue; } else if (typeof object[type] === 'object') { this.radiansToDegree(object[type]); @@ -119,7 +119,7 @@ const UnitConverter = { }, degreeToRadians(object) { for (let type in object) { - if (type === 'transit_offset') { + if (type === 'transit_offset' || type === 'reference_pointing') { continue; } else if (typeof object[type] === 'object') { this.degreeToRadians(object[type]);