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 5347d7ee6b0669f9c883e90015eee27ed673b056..69a3df4163bcf27c0f61ef03261ebbad61fc083f 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 @@ -44,7 +44,7 @@ export default (props) => { if(propertyKey === 'sky'){ propertyValue.propertyOrder=7; } - if(propertyKey === 'min_calibrator_elevation' || propertyKey === 'min_target_elevation'){ + if(propertyKey === 'calibrator' || propertyKey === 'target'){ if(props.onUpdate==="scheduleConstraints"){ propertyValue.default = propertyValue.default; } else{ diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js index c2b8dd2267ed422f99696ed80b638e91562ee9e0..093aa654cc4894d3af488896a71070f94499f40b 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js @@ -347,7 +347,7 @@ class SchedulingUnitList extends Component{ } } else { if (parent !== undefined) { - if (parent === 'sky' || parent === 'min_distance') { + if (/*parent === 'sky' || */parent === 'min_distance' ) { Object.assign(derviedscheduleconstraints, { [parent + '_' + key]: [parseFloat((value * 180) / Math.PI).toFixed(2), ] }); @@ -363,7 +363,12 @@ class SchedulingUnitList extends Component{ }); defaultcolumns[parent + '_from'] = {name: ` ${this.capitalize(parent)} from`}; defaultcolumns[parent + '_to'] = {name: ` ${this.capitalize(parent)} to`}; - } else { + } else if (parent === 'min_elevation' ) { + Object.assign(derviedscheduleconstraints, { + [parent + '_' + key]: [parseFloat((value * 180) / Math.PI).toFixed(2), ] + }); + defaultcolumns[parent + '_' + key] = {name: ` ${this.capitalize(parent)} ${key} (Degrees)`}; + } else { Object.assign(derviedscheduleconstraints, { [parent + '_' + key]: value }); diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/ViewSchedulingUnit.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/ViewSchedulingUnit.js index 185d69bfec18aee658ee009272fb0a8a54eb887c..b68007bb6e3adb650ace118b4a8319fb8c2fcb31 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/ViewSchedulingUnit.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/ViewSchedulingUnit.js @@ -49,7 +49,7 @@ class ViewSchedulingUnit extends Component { 'task_blueprints.short_description','task_blueprints.on_sky_start_time','task_blueprints.on_sky_stop_time','task_blueprints.process_start_time', 'task_blueprints.process_stop_time','task_blueprints.duration','task_blueprints.relative_start_time','task_blueprints.relative_stop_time','task_blueprints.tags', 'task_blueprints.url', 'task_blueprints.do_cancel','task_blueprints.obsolete_since','task_blueprints.created_at','task_blueprints.updated_at','task_blueprints.specifications_template.id', 'task_blueprints.draft_id', - 'task_blueprints.specifications_template.type_value','draft.scheduling_constraints_template.schema','draft.scheduling_constraints_template.url','task_blueprints.produced_by_ids','task_blueprints.specifications_doc', + 'task_blueprints.specifications_template.type_value','task_blueprints.specifications_template.schema','draft.scheduling_constraints_template.schema','draft.scheduling_constraints_template.url','task_blueprints.produced_by_ids','task_blueprints.specifications_doc', 'draft.observation_strategy_template_id','draft.observation_strategy_template.id', ,'draft.observation_strategy_template.template'] SU_DRAFT_EXPAND= 'scheduling_constraints_template,scheduling_set,task_drafts.specifications_template,task_drafts,observation_strategy_template,scheduling_unit_blueprints' SU_DRAFT_FIELDS=['id','url','created_at','status','tags','output_pinned','duration','name','on_sky_start_time','on_sky_stop_time','priority_rank','priority_queue_value','description', @@ -57,7 +57,7 @@ class ViewSchedulingUnit extends Component { 'updated_at','scheduling_set.url','scheduling_set.name','scheduling_set.project_id','task_drafts.status','task_drafts.task_type','task_drafts.id','task_drafts.subtasks_ids', 'task_drafts.name','task_drafts.description','task_drafts.short_description','task_drafts.on_sky_start_time','task_drafts.on_sky_stop_time','task_drafts.process_start_time', 'task_drafts.process_stop_time','task_drafts.duration','task_drafts.relative_start_time','task_drafts.relative_stop_time','task_drafts.tags','task_drafts.do_cancel', - 'task_drafts.obsolete_since','task_drafts.created_at','task_drafts.updated_at','task_drafts.specifications_template.id','task_drafts.specifications_template.type_value', + 'task_drafts.obsolete_since','task_drafts.created_at','task_drafts.updated_at','task_drafts.specifications_template.id','task_drafts.specifications_template.type_value','task_drafts.specifications_template.schema', 'task_drafts.task_blueprints_ids','task_drafts.specifications_doc','task_drafts.produced_by_ids','scheduling_unit_blueprints_ids', 'observation_strategy_template.id','observation_strategy_template.template', 'scheduling_unit_blueprints.id','scheduling_unit_blueprints.name'] 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 89080987537460045b65532e57c77a40762f1656..1ff226a347c7ef49d59a0afd1d0e8bc3c61614ba 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 @@ -807,11 +807,11 @@ export class SchedulingSetCreate extends Component { observationProps['daily'] = this.fetchDailyFieldValue(constraint.daily); UnitConverter.radiansToDegree(constraint.sky); - observationProps['min_target_elevation'] = constraint.sky.min_target_elevation; - observationProps['min_calibrator_elevation'] = constraint.sky.min_calibrator_elevation; + observationProps['min_target_elevation'] = constraint.sky.min_elevation.target; + observationProps['min_calibrator_elevation'] = constraint.sky.min_elevation.calibrator; if ( constraint.sky.transit_offset ){ - observationProps['offset_from'] = constraint.sky.transit_offset.from?(constraint.sky.transit_offset.from<0?'-':'')+UnitConverter.getSecsToHHmmss(constraint.sky.transit_offset.from):0; - observationProps['offset_to'] = constraint.sky.transit_offset.to?(constraint.sky.transit_offset.to<0?'-':'')+UnitConverter.getSecsToHHmmss(constraint.sky.transit_offset.to):0; + observationProps['offset_from'] = constraint.sky.transit_offset.from?(constraint.sky.transit_offset.from<0?'-':'')+UnitConverter.getSecsToHHmmss(constraint.sky.transit_offset.from):"00:00:00"; + observationProps['offset_to'] = constraint.sky.transit_offset.to?(constraint.sky.transit_offset.to<0?'-':'')+UnitConverter.getSecsToHHmmss(constraint.sky.transit_offset.to):"00:00:00"; observationProps['offset_from_max'] = this.constraintSchema.schema.properties.sky.properties.transit_offset.properties.from.maximum; observationProps['offset_from_min'] = this.constraintSchema.schema.properties.sky.properties.transit_offset.properties.from.minimum; observationProps['offset_to_max'] = this.constraintSchema.schema.properties.sky.properties.transit_offset.properties.to.maximum; @@ -1345,10 +1345,10 @@ export class SchedulingSetCreate extends Component { // Column order to use clipboard copy this.colKeyOrder.push('scheduler'); this.agSUWithDefaultValue['scheduler'] = this.constraintSchema.schema.properties.scheduler.default; - this.agSUWithDefaultValue['min_target_elevation'] = ((this.constraintSchema.schema.properties.sky.properties.min_target_elevation.default * 180) / Math.PI).toFixed(2); - this.agSUWithDefaultValue['min_calibrator_elevation'] = ((this.constraintSchema.schema.properties.sky.properties.min_calibrator_elevation.default * 180) / Math.PI).toFixed(2); - this.agSUWithDefaultValue['offset_from'] = '00:00:00'; - this.agSUWithDefaultValue['offset_to'] = '00:00:00'; + this.agSUWithDefaultValue['min_target_elevation'] = ((this.constraintSchema.schema.properties.sky.properties.min_elevation.properties.target.default * 180) / Math.PI).toFixed(2); + this.agSUWithDefaultValue['min_calibrator_elevation'] = ((this.constraintSchema.schema.properties.sky.properties.min_elevation.properties.calibrator.default * 180) / Math.PI).toFixed(2); + this.agSUWithDefaultValue['offset_from'] = (this.constraintSchema.schema.properties.sky.properties.transit_offset.properties.from.default<0?'-':'')+UnitConverter.getSecsToHHmmss(this.constraintSchema.schema.properties.sky.properties.transit_offset.properties.from.default); + this.agSUWithDefaultValue['offset_to'] = (this.constraintSchema.schema.properties.sky.properties.transit_offset.properties.to.default<0?'-':'')+UnitConverter.getSecsToHHmmss(this.constraintSchema.schema.properties.sky.properties.transit_offset.properties.to.default); this.agSUWithDefaultValue['offset_from_max'] = this.constraintSchema.schema.properties.sky.properties.transit_offset.properties.from.maximum; this.agSUWithDefaultValue['offset_from_min'] = this.constraintSchema.schema.properties.sky.properties.transit_offset.properties.from.minimum; this.agSUWithDefaultValue['offset_to_max'] = this.constraintSchema.schema.properties.sky.properties.transit_offset.properties.to.maximum; @@ -1927,8 +1927,8 @@ export class SchedulingSetCreate extends Component { constraint.sky.transit_offset= transit_offset_res; } - constraint.sky.min_target_elevation = suRow.min_target_elevation; - constraint.sky.min_calibrator_elevation = suRow.min_calibrator_elevation; + constraint.sky.min_elevation.target = suRow.min_target_elevation; + constraint.sky.min_elevation.calibrator = suRow.min_calibrator_elevation; return constraint; } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/summary.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/summary.js index 087340e36268ebbdf5fc96479227a153ab48bb3b..f40f191b08bb71770f4f54238b53a9d6d6ecd838 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/summary.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/summary.js @@ -119,7 +119,7 @@ export class SchedulingUnitSummary extends Component { for (const objectKey of _.keys(constraint)) { let object = this.getFormattedConstraint(constraint[objectKey]); if (object) { - if (_.includes(['sun', 'moon','jupiter','min_target_elevation','min_calibrator_elevation'], objectKey)) { + if (_.includes(['sun', 'moon','jupiter','target','calibrator'], objectKey)) { newObject[(objectKey.replace(/_/g, ' '))+' (Degrees)'] = object; } else { newObject[objectKey.replace(/_/g, ' ')] = object;