diff --git a/SAS/TMSS/backend/bin/tmss.ini b/SAS/TMSS/backend/bin/tmss.ini index 4152e02ec86ac0eb2a758fcadf0ce9b5c58e4952..9496fdd1fef203210850ba8ed84ee08916b1d78d 100644 --- a/SAS/TMSS/backend/bin/tmss.ini +++ b/SAS/TMSS/backend/bin/tmss.ini @@ -1,5 +1,5 @@ [program:tmss] -command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp:/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys -v tmss_staticfiles:/opt/lofar/staticfiles --env-file /localhome/lofarsys/.lofar/.lofar_env_test -e HOME=/localhome/lofarsys -e USER=lofarsys --net "tmss-net" --net-alias "app" nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source $LOFARROOT/lofarinit.sh; exec gunicorn lofar.sas.tmss.tmss.wsgi --worker-class=gevent --workers=4 --timeout 120 --bind=0.0.0.0:8001' +command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp:/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys -v tmss_staticfiles:/opt/lofar/staticfiles --env-file /localhome/lofarsys/.lofar/.lofar_env -e HOME=/localhome/lofarsys -e USER=lofarsys --net "tmss-net" --net-alias "app" nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source $LOFARROOT/lofarinit.sh; exec gunicorn lofar.sas.tmss.tmss.wsgi --worker-class=gevent --workers=4 --timeout 120 --bind=0.0.0.0:8001' priority=100 user=lofarsys stopsignal=INT ; KeyboardInterrupt diff --git a/SAS/TMSS/backend/bin/tmss_migrate b/SAS/TMSS/backend/bin/tmss_migrate index 0d16b49cab0678c633679832cb316c5ed8cb5415..a5d8ebb4ed9d72513b36f3d21b34d976d75df7ad 100644 --- a/SAS/TMSS/backend/bin/tmss_migrate +++ b/SAS/TMSS/backend/bin/tmss_migrate @@ -1 +1 @@ -docker run -it --rm --env-file /localhome/lofarsys/.lofar/.lofar_env_test nexus.cep4.control.lofar:18080/tmss_django:latest bash -c "source lofarinit.sh; bin/tmss_manage_django migrate;" \ No newline at end of file +docker run -it --rm --env-file /localhome/lofarsys/.lofar/.lofar_env nexus.cep4.control.lofar:18080/tmss_django:latest bash -c "source lofarinit.sh; bin/tmss_manage_django migrate;" \ No newline at end of file diff --git a/SAS/TMSS/backend/services/feedback_handling/bin/tmss_feedback_handling_service.ini b/SAS/TMSS/backend/services/feedback_handling/bin/tmss_feedback_handling_service.ini index d81880fbf344e927b55e5145c61f58da25cf7df8..dbe0a1de1f4b26973e169f1a99411b95821e1569 100644 --- a/SAS/TMSS/backend/services/feedback_handling/bin/tmss_feedback_handling_service.ini +++ b/SAS/TMSS/backend/services/feedback_handling/bin/tmss_feedback_handling_service.ini @@ -1,5 +1,5 @@ [program:tmss_feedback_handling_service] -command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env_test -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_feedback_handling_service' +command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_feedback_handling_service' user=lofarsys stopsignal=INT ; KeyboardInterrupt stopasgroup=true ; bash does not propagate signals diff --git a/SAS/TMSS/backend/services/precalculations_service/bin/tmss_precalculations_service.ini b/SAS/TMSS/backend/services/precalculations_service/bin/tmss_precalculations_service.ini index ca72a7ce54b7c3458709a5e8f9f713513ec0f186..0ffabe1a5ae2f2ca989da461943069e300303d20 100644 --- a/SAS/TMSS/backend/services/precalculations_service/bin/tmss_precalculations_service.ini +++ b/SAS/TMSS/backend/services/precalculations_service/bin/tmss_precalculations_service.ini @@ -1,5 +1,5 @@ [program:tmss_precalculations_service] -command=docker run --rm --net=host -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env_test -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_precalculations_service' +command=docker run --rm --net=host -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_precalculations_service' user=lofarsys stopsignal=INT ; KeyboardInterrupt stopasgroup=true ; bash does not propagate signals diff --git a/SAS/TMSS/backend/services/scheduling/bin/tmss_scheduling_service.ini b/SAS/TMSS/backend/services/scheduling/bin/tmss_scheduling_service.ini index 28b117e6ba52eaf0352781f64f7f335ca8e6851e..a641377485c2fcc2558bb602e4a92ac46fcbe966 100644 --- a/SAS/TMSS/backend/services/scheduling/bin/tmss_scheduling_service.ini +++ b/SAS/TMSS/backend/services/scheduling/bin/tmss_scheduling_service.ini @@ -1,5 +1,5 @@ [program:tmss_scheduling_service] -command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env_test -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_scheduling_service' +command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_scheduling_service' user=lofarsys stopsignal=INT ; KeyboardInterrupt stopasgroup=true ; bash does not propagate signals diff --git a/SAS/TMSS/backend/services/slackwebhook/bin/tmss_slack_webhook_service.ini b/SAS/TMSS/backend/services/slackwebhook/bin/tmss_slack_webhook_service.ini index b8042adb041851a046cb062d19e5e2f241ec262b..caf1917f36eabaf46782065098832d07df7268d9 100644 --- a/SAS/TMSS/backend/services/slackwebhook/bin/tmss_slack_webhook_service.ini +++ b/SAS/TMSS/backend/services/slackwebhook/bin/tmss_slack_webhook_service.ini @@ -1,5 +1,5 @@ [program:tmss_slack_webhook_service] -command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env_test -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_slack_webhook_service' +command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_slack_webhook_service' user=lofarsys stopsignal=INT ; KeyboardInterrupt stopasgroup=true ; bash does not propagate signals diff --git a/SAS/TMSS/backend/services/tmss_lta_adapter/bin/tmss_lta_adapter.ini b/SAS/TMSS/backend/services/tmss_lta_adapter/bin/tmss_lta_adapter.ini index e37f8cdd03d875921cd10ff06ae034f8b5be40ef..3c8eb1413b4b1152136015fbf7a9a821bdbdaa1a 100644 --- a/SAS/TMSS/backend/services/tmss_lta_adapter/bin/tmss_lta_adapter.ini +++ b/SAS/TMSS/backend/services/tmss_lta_adapter/bin/tmss_lta_adapter.ini @@ -1,5 +1,5 @@ [program:tmss_lta_adapter] -command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env_test -e HOME=/localhome/lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source $LOFARROOT/lofarinit.sh;exec tmss_lta_adapter' +command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env -e HOME=/localhome/lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source $LOFARROOT/lofarinit.sh;exec tmss_lta_adapter' user=lofarsys stopsignal=INT ; KeyboardInterrupt stopasgroup=true ; bash does not propagate signals diff --git a/SAS/TMSS/backend/services/tmss_postgres_listener/bin/tmss_postgres_listener_service.ini b/SAS/TMSS/backend/services/tmss_postgres_listener/bin/tmss_postgres_listener_service.ini index fc4a773f83fe4e782fa45925b4ffff7b6201723f..f6b0be92448d4e27167cb3f904eaad8d7facff1f 100644 --- a/SAS/TMSS/backend/services/tmss_postgres_listener/bin/tmss_postgres_listener_service.ini +++ b/SAS/TMSS/backend/services/tmss_postgres_listener/bin/tmss_postgres_listener_service.ini @@ -1,5 +1,5 @@ [program:tmss_postgres_listener_service] -command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env_test -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source $LOFARROOT/lofarinit.sh;exec tmss_postgres_listener_service' +command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source $LOFARROOT/lofarinit.sh;exec tmss_postgres_listener_service' user=lofarsys stopsignal=INT ; KeyboardInterrupt stopasgroup=true ; bash does not propagate signals diff --git a/SAS/TMSS/backend/services/websocket/bin/tmss_websocket_service.ini b/SAS/TMSS/backend/services/websocket/bin/tmss_websocket_service.ini index 57a1f7db13ca7bb283cf34b22651058d582abf00..52276ff224284eece401cf5635d494c4654fc386 100644 --- a/SAS/TMSS/backend/services/websocket/bin/tmss_websocket_service.ini +++ b/SAS/TMSS/backend/services/websocket/bin/tmss_websocket_service.ini @@ -1,5 +1,5 @@ [program:tmss_websocket_service] -command=docker run --rm -p 5678:5678 -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env_test -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_websocket_service' +command=docker run --rm -p 5678:5678 -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_websocket_service' user=lofarsys stopsignal=INT ; KeyboardInterrupt stopasgroup=true ; bash does not propagate signals diff --git a/SAS/TMSS/backend/services/workflow_service/bin/tmss_workflow_service.ini b/SAS/TMSS/backend/services/workflow_service/bin/tmss_workflow_service.ini index 0054ad6d783dedf0b078ac348f2726730ed9d4aa..b733222400c4f9af7929de80787eaa221d949e68 100644 --- a/SAS/TMSS/backend/services/workflow_service/bin/tmss_workflow_service.ini +++ b/SAS/TMSS/backend/services/workflow_service/bin/tmss_workflow_service.ini @@ -1,5 +1,5 @@ [program:tmss_workflow_service] -command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env_test -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_workflow_service' +command=docker run --rm -u 7149:7149 -v /opt/lofar/var/log:/opt/lofar/var/log -v /tmp/tmp -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /localhome/lofarsys:/localhome/lofarsys --env-file /localhome/lofarsys/.lofar/.lofar_env -e HOME=/localhome/lofarsys -e USER=lofarsys nexus.cep4.control.lofar:18080/tmss_django:latest /bin/bash -c 'source ~/.lofar/.lofar_env;source $LOFARROOT/lofarinit.sh;exec tmss_workflow_service' user=lofarsys stopsignal=INT ; KeyboardInterrupt stopasgroup=true ; bash does not propagate signals diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py b/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py index 0b770d089c8a8c3c951f7476ed4357c0245281c9..587242213c70f2892c0284a7ce9f5c43be2348f8 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py @@ -868,7 +868,7 @@ class SchedulingUnitBlueprintPropertyFilter(property_filters.PropertyFilterSet): actual_process_start_time = filters.IsoDateTimeFromToRangeFilter(field_name='actual_process_start_time') actual_process_stop_time = filters.IsoDateTimeFromToRangeFilter(field_name='actual_process_stop_time') project = property_filters.PropertyCharFilter(field_name='project', lookup_expr='icontains') - status = filters.ModelMultipleChoiceFilter(field_name='status', queryset=models.SchedulingUnitStatus.objects.all()) + status = filters.MultipleChoiceFilter(field_name='status', choices=[(c.value, c.value) for c in models.SchedulingUnitStatus.Choices]) priority_rank = filters.RangeFilter(field_name='priority_rank') id = NumberInFilter(field_name='id', lookup_expr='in') id_min = filters.NumberFilter(field_name='id', lookup_expr='gte') @@ -1256,7 +1256,7 @@ class TaskBlueprintPropertyFilter(property_filters.PropertyFilterSet): actual_on_sky_stop_time = filters.IsoDateTimeFromToRangeFilter(field_name='actual_on_sky_stop_time') actual_process_start_time = filters.IsoDateTimeFromToRangeFilter(field_name='actual_process_start_time') actual_process_stop_time = filters.IsoDateTimeFromToRangeFilter(field_name='actual_process_stop_time') - status = filters.ModelMultipleChoiceFilter(field_name='status', queryset=models.TaskStatus.objects.all()) + status = filters.MultipleChoiceFilter(field_name='status', choices=[(c.value, c.value) for c in models.TaskStatus.Choices]) subtasks = filters.ModelMultipleChoiceFilter(field_name='subtasks', queryset=models.Subtask.objects.all()) subtasks_min = filters.NumberFilter(field_name='subtasks__id', lookup_expr='gte') subtasks_max = filters.NumberFilter(field_name='subtasks__id', lookup_expr='lte') 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 96e251e5e7bb235de5f842f975106294240b39b6..79f864c821c952b4e40feba4fd35f36906bf320b 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/ViewSchedulingUnit.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/ViewSchedulingUnit.js @@ -63,6 +63,7 @@ class ViewSchedulingUnit extends Component { "Control ID", "Name", "Description", + "Short Description", "Observation Start Time", "Observation End Time", "Process Start Time", @@ -99,6 +100,7 @@ class ViewSchedulingUnit extends Component { subTaskID: 'Control ID', name: "Name", description: "Description", + short_description: "Short Description", on_sky_start_time: { name: "Observation Start Time", filter:"flatpickrDateRange", @@ -303,7 +305,6 @@ class ViewSchedulingUnit extends Component { this.subtaskTemplates = await TaskService.getSubtaskTemplates(); this.getSchedulingUnitDetails(schedule_type, schedule_id); } - } cancelView(){ @@ -452,7 +453,8 @@ class ViewSchedulingUnit extends Component { taskPaths = taskPaths.slice((taskPaths.length===4?3:4), taskPaths.length); const task = tasks[taskName]; const suTask = this.state.schedulingUnitTasks.find(taskD => taskD.name === taskName); - if (suTask) { + if (suTask) { task.specifications_doc = suTask.specifications_doc; + task.short_description = suTask.short_description; //task.specifications_doc = suTask.specifications_doc; const taskKeys = Object.keys(task); for (const taskKey of taskKeys) { @@ -622,7 +624,7 @@ class ViewSchedulingUnit extends Component { async getFormattedTaskDrafts(schedulingUnit) { let scheduletasklist = []; // Common keys for Task and Blueprint - let commonkeys = ['id', 'created_at', 'description', 'name', 'tags', 'updated_at', 'url', 'do_cancel', 'relative_start_time', 'relative_stop_time', 'on_sky_start_time', 'on_sky_stop_time', 'process_start_time', 'process_stop_time', 'duration', 'status', 'obsolete']; + let commonkeys = ['id', 'created_at', 'description', 'short_description' , 'name', 'tags', 'updated_at', 'url', 'do_cancel', 'relative_start_time', 'relative_stop_time', 'on_sky_start_time', 'on_sky_stop_time', 'process_start_time', 'process_stop_time', 'duration', 'status', 'obsolete']; for (const task of schedulingUnit.task_drafts) { let scheduletask = {}; scheduletask['tasktype'] = 'Draft'; @@ -1874,11 +1876,8 @@ class ViewSchedulingUnit extends Component { optionalcolumns - These columns will not appear in the table by default, but user can toggle the columns using toggle menu showaction - {true/false} -> to show the action column keyaccessor - This is id column for Action item - paths - specify the path for navigation - Table will set "id" value for each row in action button - - */} - - + paths - specify the path for navigation - Table will set "id" value for each row in action button + */} <div className="delete-option"> <div > <span className="p-float-label"> @@ -1907,7 +1906,8 @@ class ViewSchedulingUnit extends Component { </a> <a href="#" style={{ pointerEvents: this.props.disabled ? 'none' : 'auto', marginLeft: '8px' }} onClick={this.confirmDeleteTasks} title={userPermissions.task.delete?"Delete selected Task(s)": `${this.access_denied_message} to delete Task(s)`} > - <i class={userPermissions.task.delete?"fa fa-trash":"fa fa-trash fa-disabled"} aria-hidden="true" ></i></a> + <i class={userPermissions.task.delete?"fa fa-trash":"fa fa-trash fa-disabled"} aria-hidden="true" ></i> + </a> </> } </> @@ -1960,7 +1960,8 @@ class ViewSchedulingUnit extends Component { <fieldset className="border-style"> <div className="p-col-12" > <SchedulingConstraint disable constraintTemplate={this.state.constraintTemplate} - initValue={this.state.scheduleunit.scheduling_constraints_doc} /> + initValue={this.state.scheduleunit.scheduling_constraints_doc} + /> </div> </fieldset> </div> 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 af7c7edb388609f90c6b4a94a66792b9c2a30a28..50a8e9a221bc9d26474641da02e644779a967f27 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/summary.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/summary.js @@ -222,18 +222,14 @@ export class SchedulingUnitSummary extends Component { <div className="col-12 task-summary"> <label>Tasks:</label> - <ViewTable - data={suTaskList} - defaultcolumns={[{ - id: "ID", name: "Name", typeValue: "Type", controlId: 'Control ID', start_time: { name: "Start Time", format: UIConstants.CALENDAR_DATETIME_FORMAT }, stop_time: { name: "End Time", format: UIConstants.CALENDAR_DATETIME_FORMAT }, status: "Status", - antenna_set: "Antenna Set", band: 'Band' - }]} - optionalcolumns={[{ actionpath: "actionpath" }]} - columnclassname={[{ - "ID": "filter-input-50", "Name": "filter-input-75", "Type": "filter-input-75", "Control ID": "filter-input-75", "Start Time": "filter-input-75", "End Time": "filter-input-75", - "Status": "filter-input-75", "Antenna Set": "filter-input-75", "Band": "filter-input-75" - }]} - defaultSortColumn={[{ id: "ID", desc: false }]} + <ViewTable + data={suTaskList} + defaultcolumns={[{id: "ID", name: "Name", short_description: "Short Description" , typeValue:"Type", controlId: 'Control ID', start_time:{name:"Start Time", format:UIConstants.CALENDAR_DATETIME_FORMAT}, stop_time:{name:"End Time", format:UIConstants.CALENDAR_DATETIME_FORMAT}, status: "Status", + antenna_set: "Antenna Set", band: 'Band'}]} + optionalcolumns={[{actionpath: "actionpath"}]} + columnclassname={[{"ID": "filter-input-50","Name":"filter-input-75","Type":"filter-input-75","Control ID":"filter-input-75", "Start Time": "filter-input-75", "End Time": "filter-input-75", + "Status": "filter-input-75", "Antenna Set": "filter-input-75", "Band": "filter-input-75"}]} + defaultSortColumn= {[{id: "ID", desc: false}]} showaction="false" tablename="timeline_su_taskslist" showTopTotal={false} @@ -241,7 +237,7 @@ export class SchedulingUnitSummary extends Component { showColumnFilter={false} allowColumnSelection={false} /> - </div> + </div> </div> } @@ -300,7 +296,7 @@ export class SchedulingUnitSummary extends Component { initValue={schedulingUnit.scheduling_constraints_doc} callback={this.setConstraintsEditorOutput} /> - </Dialog> + </Dialog> </div> {/* moder for Constraints End */} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/edit.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/edit.js index 6f1c14031cb4063627c9f0f005008b30a6eb645a..9c744ae4f74408c5f8908f740d909db836a70d85 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/edit.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/edit.js @@ -287,7 +287,7 @@ export class TaskEdit extends Component { <label className="col-lg-2 col-md-2 col-sm-12">Scheduling Unit</label> <Link className="col-lg-4 col-md-4 col-sm-12" to={ { pathname:'/schedulingunit/view', state: {id: this.state.schedulingUnit.id}}}>{this.state.schedulingUnit?this.state.schedulingUnit.name:''}</Link> </> - } + } </div> <div className="p-field p-grid"> <label htmlFor="tags" className="col-lg-2 col-md-2 col-sm-12">Template</label> @@ -298,7 +298,13 @@ export class TaskEdit extends Component { onChange={(e) => {this.changeTaskTemplate(e.value)}} placeholder="Select Task Template"/> </div> - </div> + <label htmlFor="short_description" className="col-lg-2 col-md-2 col-sm-12">Short Description</label> + <div className="col-lg-4 col-md-4 col-sm-12"> + <InputText className={this.state.errors.short_description ?'input-error':''} id="taskShortDescription" maxlength={32} type="text" value={this.state.task.short_description} + onChange={(e) => this.setTaskParams('short_description', e.target.value)}/> + <label className="info">Max 32 characters</label> + </div> + </div> </div> </div> } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/list.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/list.js index 32554a08f549988938144416d7e14376fd1fab71..80b6927866feacba0642e21962cc12308702cb82 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/list.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/list.js @@ -27,7 +27,7 @@ export class TaskList extends Component { ignoreSorting = ['status logs']; TASK_END_STATUSES = ['finished', 'error', 'cancelled']; TASK_DRAFT_EXPAND = 'task_blueprints,task_blueprints.subtasks,scheduling_unit_draft,scheduling_unit_draft.scheduling_set'; - TASK_BLUEPRINT_EXPAND = 'subtasks,subtasks.output_dataproducts,draft,scheduling_unit_blueprint,draft.scheduling_unit_draft,draft.scheduling_unit_draft.scheduling_set'; + TASK_BLUEPRINT_EXPAND = 'task_blueprints,subtasks,subtasks.output_dataproducts,draft,scheduling_unit_blueprint,draft.scheduling_unit_draft,draft.scheduling_unit_draft.scheduling_set'; COMMA_SEPARATE_TOOLTIP ='Enter Id and press ‘Enter’ key to search. For multiple values enter comma separated values. For range, provide input like 1..6'; constructor(props) { @@ -54,6 +54,7 @@ export class TaskList extends Component { "Control ID", "Name", "Description", + "Short Description", "Observation Start Time", "Observation End Time", "Process Start Time", @@ -114,6 +115,9 @@ export class TaskList extends Component { description: { name:"Description" }, + short_description: { + name:"Short Description" + }, on_sky_start_time: { name: "Observation Start Time", filter: "flatpickrDateRange", @@ -269,7 +273,7 @@ export class TaskList extends Component { taskBlueprint['actionpath'] = '/task/view/blueprint/' + taskBlueprint['id']; taskBlueprint['blueprint_draft'] = this.getLinksList([taskBlueprint['draft_id']],'draft'); taskBlueprint['relative_start_time'] = 0; - taskBlueprint['relative_stop_time'] = 0; + taskBlueprint['relative_stop_time'] = 0; taskBlueprint.duration = moment.utc((taskBlueprint.duration && taskBlueprint.duration>0?taskBlueprint.duration:0) * 1000).format(UIConstants.CALENDAR_TIME_FORMAT); taskBlueprint.template = taskBlueprint.specifications_template; taskBlueprint.schedulingUnitName = taskBlueprint.scheduling_unit_blueprint.name; @@ -290,18 +294,20 @@ export class TaskList extends Component { getFormattedTaskDrafts(tasks) { let scheduletasklist = []; // Common keys for Task and Blueprint - let commonkeys = ['id', 'created_at', 'description', 'name', 'tags', 'updated_at', 'url', 'do_cancel', 'relative_start_time', 'relative_stop_time', 'on_sky_start_time', 'on_sky_stop_time', 'process_start_time', 'process_stop_time', 'duration', 'status',"obsolete"]; + let commonkeys = ['id', 'created_at', 'description', 'short_description' , 'name', 'tags', 'updated_at', 'url', 'do_cancel', 'relative_start_time', 'relative_stop_time', 'on_sky_start_time', 'on_sky_stop_time', 'process_start_time', 'process_stop_time', 'duration', 'status',"obsolete"]; for (const task of tasks) { let scheduletask = {}; scheduletask['tasktype'] = 'Draft'; scheduletask['actionpath'] = '/task/view/draft/' + task['id']; scheduletask['blueprint_draft'] = this.getLinksList(task['task_blueprints_ids'], 'blueprint'); - scheduletask['status'] = task['status']; + scheduletask['status'] = task['status']; scheduletask['project'] = task.scheduling_unit_draft.scheduling_set.project_id; + //fetch task draft details for (const key of commonkeys) { scheduletask[key] = task[key]; } + scheduletask['specifications_doc'] = task['specifications_doc']; scheduletask.duration = moment.utc((scheduletask.duration&&scheduletask.duration>0?scheduletask.duration:0) * 1000).format(UIConstants.CALENDAR_TIME_FORMAT); scheduletask.relative_start_time = moment.utc(scheduletask.relative_start_time * 1000).format(UIConstants.CALENDAR_TIME_FORMAT); diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/view.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/view.js index 1e7f772c6a020c865b2ea012325600f4fc5580c5..bdeda35e1e7ea4901cdd1f1b42ef3fa8eeec3151 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/view.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/view.js @@ -818,20 +818,22 @@ export class TaskView extends Component { <span className="col-lg-4 col-md-4 col-sm-12">{this.state.task.process_start_time?moment(this.state.task.process_start_time,moment.ISO_8601).format(UIConstants.CALENDAR_DATETIME_FORMAT):""}</span> <label className="col-lg-2 col-md-2 col-sm-12">Process End Time</label> <span className="col-lg-4 col-md-4 col-sm-12">{this.state.task.process_stop_time?moment(this.state.task.process_stop_time,moment.ISO_8601).format(UIConstants.CALENDAR_DATETIME_FORMAT):""}</span> - </div>} - <div className="p-grid"> - {/* <label className="col-lg-2 col-md-2 col-sm-12">Tags</label> - <Chips className="col-lg-4 col-md-4 col-sm-12 chips-readonly" disabled value={this.state.task.tags}></Chips> */} - {this.state.taskType === 'blueprint' && - <> - <label className="col-lg-2 col-md-2 col-sm-12">Status</label> - <span className="col-lg-4 col-md-4 col-sm-12">{this.state.task.status}</span> - </>} + </div>} + <div className="p-grid"> {this.state.schedulingUnit && <> <label className="col-lg-2 col-md-2 col-sm-12">Scheduling Unit</label> <Link className="col-lg-4 col-md-4 col-sm-12" to={ { pathname:this.state.supath, state: {id: this.state.schedulingUnit.id}}}>{this.state.schedulingUnit?this.state.schedulingUnit.name:''}</Link> - </>} + </>} + <> + <label className="col-lg-2 col-md-2 col-sm-12">Short Description</label> + <span className="col-lg-4 col-md-4 col-sm-12">{this.state.task.short_description}</span> + </> + {this.state.taskType === 'blueprint' && + <> + <label className="col-lg-2 col-md-2 col-sm-12">Status</label> + <span className="col-lg-4 col-md-4 col-sm-12">{this.state.task.status}</span> + </>} </div> <div className="p-grid"> <label className="col-lg-2 col-md-2 col-sm-12">Predecessors</label> @@ -851,8 +853,7 @@ export class TaskView extends Component { {this.state.taskType === 'draft' && <TaskRelationList list={this.state.task.blueprints} /> } - {this.state.taskType === 'blueprint' && - // <Link className="col-lg-4 col-md-4 col-sm-12" to={ { pathname:'/task/view', state: {id: this.state.task.draft_id, type: 'draft'}}}>{this.state.task.draftObject.name}</Link> + {this.state.taskType === 'blueprint' && <Link to={ { pathname:`/task/view/draft/${this.state.task.draft_id}`}}>{this.state.task.draftObject.name}</Link> } </div> diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/week.view.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/week.view.js index 97086a7d3d8fd4aeead77aa0685e26b363025ed6..920e19e7d64d8e01aee8e3de05ac930d53765d5b 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/week.view.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/week.view.js @@ -419,7 +419,7 @@ export class WeekTimelineView extends Component { suBlueprint.tasks = suBlueprint.task_blueprints; suBlueprint.stationGroupCount = this.timelineCommonUtils.getSUStationGroupCount(suBlueprint).counts; // Add Subtask Id as control id for task if subtask is primary. Also add antenna_set & band prpoerties to the task object. - for (let task of suBlueprint.tasks) { + for (let task of suBlueprint.tasks) { const controlTask = _.find(task.subtasks, subtask => { return subtask.primary }); task.controlId = controlTask?controlTask.id:""; if (task.task_type.toLowerCase() === "observation") { @@ -545,7 +545,7 @@ export class WeekTimelineView extends Component { for (let task of taskList) { //Control Task ID const subTaskIds = (task.subTasks || []).filter(sTask => sTask.primary); - task.controlId = subTaskIds.length ? subTaskIds[0].id : ''; + task.controlId = subTaskIds.length ? subTaskIds[0].id : ''; if (task.template.type_value.toLowerCase() === "observation" && task.specifications_doc.antenna_set) { task.antenna_set = task.specifications_doc.antenna_set; @@ -557,15 +557,10 @@ export class WeekTimelineView extends Component { stationGroup: this.timelineCommonUtils.getSUStations(suBlueprint) }) }); + } } - // Get the scheduling constraint template of the selected SU block - // ScheduleService.getSchedulingConstraintTemplate(suBlueprint.suDraft.scheduling_constraints_template_id) - // .then(suConstraintTemplate => { - // this.setState({suConstraintTemplate: suConstraintTemplate, isSummaryLoading: false}); - // }); } } - } /** * To load and show Reservation summary diff --git a/SAS/TMSS/frontend/tmss_webapp/src/services/schedule.service.js b/SAS/TMSS/frontend/tmss_webapp/src/services/schedule.service.js index d987c500bb9d43b7e09d4b0969b4c96f9814c9e6..3ce590187511b4be758d782e018e9149ec4b5edd 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/services/schedule.service.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/services/schedule.service.js @@ -7,12 +7,13 @@ import DataProductService from './data.product.service'; const SU_EXPAND_FIELDS = [ "draft", "draft.observation_strategy_template", "draft.scheduling_constraints_doc", "draft.scheduling_set", "draft.scheduling_set.project", - "task_blueprints", "task_blueprints.specifications_template", "task_blueprints.subtasks", + "task_blueprints.short_description", "task_blueprints.specifications_template", "task_blueprints.subtasks", "task_blueprints.subtasks.output_dataproducts" ]; const SU_FETCH_FIELDS = [ "id", "name", "description", + "short_description", "status", "scheduling_constraints_doc", "scheduling_constraints_template_id", @@ -34,6 +35,7 @@ const SU_FETCH_FIELDS = [ "id", "task_blueprints.id", "task_blueprints.name", "task_blueprints.description", + "task_blueprints.short_description", "task_blueprints.status", "task_blueprints.start_time", "task_blueprints.stop_time", @@ -298,7 +300,7 @@ const ScheduleService = { taskblueprint['actionpath'] = '/task/view/blueprint/' + taskblueprint['id']; taskblueprint['blueprint_draft'] = taskblueprint['draft']; taskblueprint['relative_start_time'] = 0; - taskblueprint['relative_stop_time'] = 0; + taskblueprint['relative_stop_time'] = 0; taskblueprint.duration = moment.utc((taskblueprint.duration || 0) * 1000).format('HH:mm:ss'); taskblueprint['template_name'] = response.data.template.type_value; if (taskblueprint.template.name !== 'ingest') { @@ -338,7 +340,7 @@ const ScheduleService = { let scheduletasklist = []; // let taskblueprints = []; // Common keys for Task and Blueprint - let commonkeys = ['id', 'created_at', 'description', 'name', 'tags', 'updated_at', 'url', 'do_cancel', 'relative_start_time', 'relative_stop_time', 'start_time', 'stop_time', 'duration', 'status']; + let commonkeys = ['id', 'created_at', 'description', 'short_description' , 'name', 'tags', 'updated_at', 'url', 'do_cancel', 'relative_start_time', 'relative_stop_time', 'start_time', 'stop_time', 'duration', 'status']; // await this.getTaskBlueprints().then( blueprints =>{ // taskblueprints = blueprints.data.results;' // }); @@ -354,7 +356,7 @@ const ScheduleService = { //fetch task draft details for (const key of commonkeys) { scheduletask[key] = task[key]; - } + } scheduletask['created_at'] = moment(task['created_at'], moment.ISO_8601).format("YYYY-MM-DD HH:mm:ss"); scheduletask['updated_at'] = moment(task['updated_at'], moment.ISO_8601).format("YYYY-MM-DD HH:mm:ss"); scheduletask['specifications_doc'] = task['specifications_doc']; @@ -1084,32 +1086,7 @@ const ScheduleService = { console.error(error); } return response; - }, - setConstraintsEditorOutputService:async(req)=>{ - let response = {}; - try { - const url = `/api/scheduling_unit_blueprint/${req.id}/`; - response = (await axios.put(url, req)); - response['message'] = 'Success'; - } catch(error) { - const errorData = error.response.data; // To be utilized to create custom error message. - response['message'] = `Failed due to error - ${errorData.substring(0,errorData.indexOf('Request Method:'))}`; - } - return response; - }, - getConstraintsEditorOutputService:async(req)=>{ - let response = {}; - try { - const url = `/api/scheduling_unit_blueprint/${req}/`; - response = (await axios.get(url)); - console.log(response); - } catch(error) { - const errorData = error.response.data; // To be utilized to create custom error message. - response['message'] = `Failed due to error - ${errorData.substring(0,errorData.indexOf('Request Method:'))}`; - console.error(error); - } - return response.data; - }, + }, updateSchedulingUnit: async function (type, schedulingUnit) { try { let url = `/api/scheduling_unit_${type}/${schedulingUnit.id}/`; diff --git a/SAS/TMSS/frontend/tmss_webapp/src/shared/timeline.constants.js b/SAS/TMSS/frontend/tmss_webapp/src/shared/timeline.constants.js index 127e5a8d638031836f3754ebc69523ec8b84c0ba..aa266145b4292f00dd8ff81a81586e63cefef0a1 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/shared/timeline.constants.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/shared/timeline.constants.js @@ -153,6 +153,9 @@ const TimelineConstants = { name: { name: "Name" }, + short_description: { + name: "Short Description" + }, controlId: { name: "Control Id" }, @@ -207,6 +210,7 @@ const TimelineConstants = { "Scheduling Unit Id", "Scheduling Unit Name", "Description", + "Short Description", "#Dataproducts", "Data Size (TB)", "Data Size on Disk (TB)",