diff --git a/RTCP/Cobalt/GPUProc/test/SubbandProcs/tSubbandProcPerformance.run b/RTCP/Cobalt/GPUProc/test/SubbandProcs/tSubbandProcPerformance.run old mode 100755 new mode 100644 diff --git a/RTCP/Cobalt/GPUProc/test/SubbandProcs/tSubbandProcPerformance.sh b/RTCP/Cobalt/GPUProc/test/SubbandProcs/tSubbandProcPerformance.sh old mode 100755 new mode 100644 diff --git a/RTCP/Cobalt/GPUProc/test/SubbandProcs/tSubbandProcPerformance_compare.py b/RTCP/Cobalt/GPUProc/test/SubbandProcs/tSubbandProcPerformance_compare.py old mode 100755 new mode 100644 diff --git a/SAS/TMSS/backend/services/precalculations_service/bin/tmss_precalculations_service b/SAS/TMSS/backend/services/precalculations_service/bin/tmss_precalculations_service old mode 100644 new mode 100755 diff --git a/SAS/TMSS/backend/services/slackwebhook/bin/tmss_slack_webhook_service b/SAS/TMSS/backend/services/slackwebhook/bin/tmss_slack_webhook_service old mode 100644 new mode 100755 diff --git a/SAS/TMSS/client/bin/tmss_cancel_subtask b/SAS/TMSS/client/bin/tmss_cancel_subtask old mode 100755 new mode 100644 diff --git a/SAS/TMSS/client/bin/tmss_unschedule_subtask b/SAS/TMSS/client/bin/tmss_unschedule_subtask old mode 100755 new mode 100644 diff --git a/SAS/TMSS/frontend/tmss_webapp/src/App.js b/SAS/TMSS/frontend/tmss_webapp/src/App.js index 22a596e3782194c80134151c6ffaccf8541c39f0..ca7fab811ebe467a571c35f7a475e4678d545c07 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/App.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/App.js @@ -62,7 +62,7 @@ class App extends Component { {label: 'Scheduling Units', icon: 'pi pi-fw pi-calendar', to:'/schedulingunit',section: 'schedulingunit'}, {label: 'Tasks', icon: 'pi pi-fw pi-check-square', to:'/task'}, {label: 'Timeline', icon: 'pi pi-fw pi-clock', to:'/su/timelineview',section: 'su/timelineview'}, - + {label: 'Workflow', icon: 'fa fa-sitemap', to:'/workflow',section: 'workflow'}, ]; } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/_overrides.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/_overrides.scss index b7f6cdef13e4deb496ae1ecaa1ef67da0b3b02b6..b417a3392a75736c5173c70da62a1e264d15075b 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/layout/_overrides.scss +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/_overrides.scss @@ -243,4 +243,20 @@ In Excel View the for Accordion background color override width: 100px; text-align: left; border-color: transparent !important; -} \ No newline at end of file +} + +/** + Override the Primereact MultiSelect Dropdown + Begin +*/ +.p-multiselect-close { + left: 110%; +} +.p-multiselect-panel { + min-width: 15em !important; +} +.pi-search { + right: -1.25em !important; +} +/** End */ + \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_topbar.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_topbar.scss index a7a0ff6d53998a391bc5b943bc20ba5f4b133170..399acb5da69e85e72fce538dffa30a56295929ce 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_topbar.scss +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_topbar.scss @@ -159,10 +159,10 @@ .find-object-search-btn { display: inline-block; - right: 27px; position: relative; top: 6px; color: darkblue; + left: -1.5em; } .find-object-type { 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 3d6dcf239e88ec9be22ec77ffc7e264d27aa4a40..b4450b421a3ddf0d1c468a14ab538c24a7f1dc85 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 @@ -813,7 +813,13 @@ export class WeekTimelineView extends Component { <ViewTable viewInNewWindow data={this.state.suBlueprintList} defaultcolumns={[{name: "Name", - start_time:"Start Time", stop_time:"End Time"}]} + start_time: { + name:"Start Time", + format:UIConstants.CALENDAR_DATETIME_FORMAT + }, stop_time: { + name:"End Time", + format:UIConstants.CALENDAR_DATETIME_FORMAT + },}]} optionalcolumns={[{project:"Project",description: "Description", duration:"Duration (HH:mm:ss)",actionpath: "actionpath"}]} columnclassname={[{"Name":"filter-input-100", "Start Time":"filter-input-50", "End Time":"filter-input-50", "Duration (HH:mm:ss)" : "filter-input-50",}]} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Workflow/workflow.list.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Workflow/workflow.list.js new file mode 100644 index 0000000000000000000000000000000000000000..77348c8570fd59492b1d20fdd91488694e1bca3a --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Workflow/workflow.list.js @@ -0,0 +1,261 @@ +import React, { Component } from 'react'; +import _ from 'lodash'; +import moment from 'moment'; +import { MultiSelect } from 'primereact/multiselect'; +import {TriStateCheckbox} from 'primereact/tristatecheckbox'; + +import PageHeader from '../../layout/components/PageHeader'; +import AppLoader from "../../layout/components/AppLoader"; +import ViewTable from '../../components/ViewTable'; + +import WorkflowService from '../../services/workflow.service'; +import ScheduleService from '../../services/schedule.service'; +import UIConstants from '../../utils/ui.constants'; + +class WorkflowList extends Component{ + constructor(props) { + super(props); + this.state={ + ftAssignstatus: '', + activeWorkflow: null, + showActiveStage: 'Show Active Workflow Process', + workflowProcessList: [], + filteredWorkflowProcessList: [], + defaultcolumns: [{ + suName:"Scheduling Unit Name", + su: { + name: "Scheduling Unit ID", + filter: "range", + format: UIConstants.CALENDAR_TIME_FORMAT + }, + assignedTo: "Assigned To", + lastTaskName:"Current Workflow Stage", + updated_at: { + name:"Updated At", + filter:"date", + format:UIConstants.CALENDAR_DATETIME_FORMAT + }, + actionpath: "actionpath" + }], + optionalcolumns: [{ + }], + columnclassname: [{ + "Scheduling Unit ID":"filter-input-50", + "Updated At":"filter-input-150",}], + defaultSortColumn: [{id: "Scheduling unit ID", desc: false}], + isLoading: true, + }; + this.schedulingUnitList = null; + this.workflowProcessList = null; + this.workflowTasksList = null; + this.redirectionMap = { + 'wait scheduled': 'Waiting To Be Scheduled', + 'wait processed': 'Scheduled', + 'qa reporting to': 'QA Reporting (TO)', + 'qa reporting sos': 'QA Reporting (SDCO)', + 'pi verification': 'PI Verification', + 'decide acceptance': 'Decide Acceptance', + 'ingesting': 'Ingesting', + 'unpin data': 'Unpin Data', + 'end': 'Done' + }; + this.filterslist=[{'name': 'Assigned to me', 'code': 'Assigned to me'},{'name': 'Unassigned', 'code':'Unassigned'},{'name': 'Participated', 'code':'Participated'}]; + this.notActiveStages = ['done', 'waiting to be scheduled', 'scheduled' ]; + this.close = this.close.bind(this); + } + + componentDidMount() { + const promises = [ WorkflowService.getWorkflowProcesses(), + WorkflowService.getWorkflowTasks(), + ScheduleService.getSchedulingUnitBlueprint(),]; + Promise.all(promises).then(async responses => { + this.workflowProcessList = responses[0]; + this.workflowTasksList = responses[1]; + this.schedulingUnitList = responses[2].data.results; + this.prepareWorkflowProcesslist(); + }); + } + + /** + * Prepare Workflow Process data + */ + async prepareWorkflowProcesslist() { + let workflowProcessList = []; + if (this.workflowProcessList) { + for(const wfSU of this.workflowProcessList) { + const schedulingUnit = _.find(this.schedulingUnitList, {'id': wfSU.su}); + if(schedulingUnit) { + wfSU['suName'] = schedulingUnit.name; + } + const workflowTasks = _.orderBy(this.workflowTasksList.filter(item => item.process === wfSU.id), ['id'], ['desc']); + const workflowTask = workflowTasks[0]; + // workflowTask :- latest task /current task + if(workflowTask) { + wfSU['updated_at'] = moment(workflowTask['assigned']?workflowTask['assigned']:workflowTask['created']).format(UIConstants.UTC_DATE_TIME_FORMAT); + wfSU['flow_task'] = workflowTask.flow_task; + wfSU['lastTaskName'] = this.redirectionMap[workflowTask.flow_task.toLowerCase()]; + //let currenttask = await WorkflowService.getCurrentTask(wfSU.id); + //wfSU['owner'] = (currenttask && currenttask.fields.owner)? currenttask.fields.owner : ''; + wfSU['owner'] = workflowTask.owner? workflowTask.owner : ''; + wfSU['assignedTo'] = workflowTask.owner? workflowTask.owner : '';; + } + + //TODO: this code commented and can be used to show only current task owner details when filter enabled + //Get assigned name list + /* let assignedTo = ''; + workflowLastTasks.forEach(task => { + if(task.owner) { + assignedTo += task.owner+', '; + } + }); + assignedTo = assignedTo.slice(0, -2); + wfSU['assignedTo'] = assignedTo; */ + wfSU['actionpath'] = `/schedulingunit/${wfSU.id}/workflow`; + workflowProcessList.push(wfSU); + } + } + this.setState({workflowProcessList: workflowProcessList, filteredWorkflowProcessList:workflowProcessList,isLoading: false}); + } + + /** + * Go back to previous page + */ + close() { + this.props.history.goBack(); + } + + /** + * Filter the table data with drop down selected + * @param {String} value - Drop Down filter value + */ + async assignStatusChangeEvent(value) { + await this.setState({'ftAssignstatus': value}); + //TODO: commented this code. It requires user details, waiting for API changes + //await this.filterTableData(); + } + + /** + * Filter the table data with checkbox value, it will fetch active workflow stagerows if the checkbox selected + * @param {Boolena} value + */ + async setWorkflowActiveState(value) { + let showActiveStage = ''; + if(value === null) { + showActiveStage = 'Show Active Workflow Process'; + } else if(value === true) { + showActiveStage = 'Show Inactive Workflow Process'; + } else { + showActiveStage = 'Show All Workflow Process'; + } + await this.setState({'activeWorkflow': value, showActiveStage: showActiveStage}); + await this.filterTableData(); + } + + /** + * Filter table data if any changes in filter Dropdown or Checkbox. + */ + async filterTableData() { + let workflowProcessList = []; + let activeWorkflow = this.state.activeWorkflow; + // Get current user details + let userDetails = localStorage.getItem('user'); + if (userDetails) { + userDetails = JSON.parse(userDetails); + } + //TODO: comment for lines 165-166 AND 170-187. Even these lines can be commented out and added when we have Filter options available + /*const currentuser = userDetails.name; + let ftAssignstatus = this.state.ftAssignstatus; */ + for( const workflow of this.state.workflowProcessList) { + var ftAssigned = true; + /*if(ftAssignstatus.length>0 && ftAssignstatus.length <3) { + let assignToMe = false; + if( (ftAssignstatus[0] === 'Assigned to me' || (ftAssignstatus.length === 2 && ftAssignstatus[1] === 'Assigned to me')) && workflow.owner === currentuser) { + assignToMe = true; + } + let unAssigned = false; + if( (ftAssignstatus[0] === 'Unassigned' || (ftAssignstatus.length === 2 && ftAssignstatus[1] === 'Unassigned')) && workflow.assignedTo === '') { + unAssigned = true; + } + let isParticipated = false; + if( (ftAssignstatus[0] === 'Participated' || (ftAssignstatus.length === 2 && ftAssignstatus[1] === 'Participated')) + && _.includes(workflow.assignedTo.split(','), currentuser)) { + isParticipated = true; + } + if(!assignToMe && !unAssigned && !isParticipated) { + ftAssigned = false; + } + } */ + let activestage = false; + if (activeWorkflow === null) { + activestage = true; + } else if(activeWorkflow === true) { + activestage = _.includes(this.notActiveStages, workflow.lastTaskName.toLowerCase())? false: true; + } else if(activeWorkflow === false) { + activestage = _.includes(this.notActiveStages, workflow.lastTaskName.toLowerCase())? true: false; + } + if(ftAssigned && activestage) { + workflowProcessList.push(workflow); + } + }; + this.setState({filteredWorkflowProcessList: workflowProcessList}); + } + + render() { + return ( + <React.Fragment> + <PageHeader location={this.props.location} title={'Workflow - List'} + actions={[{icon: 'fa-window-close', title:'Click to Close Workflow - List', + type: 'button', actOn: 'click', props:{ callback: this.close }}]}/> + <div> + {this.state.isLoading ? <AppLoader/> : (this.state.workflowProcessList.length>0 )? + <> + <div className="p-select " style={{position: 'relative', marginLeft: '27em', marginTop: '-2em'}}> + <div className="p-field p-grid"> + <div className="col-lg-4 col-md-3 col-sm-12 ms-height"> + <span className="p-float-label"> + <MultiSelect data-testid="workflowoverview" id="workflowoverview" optionLabel="name" optionValue="code" filter={true} + tooltip="Show workflows those are 'Assigned to me' / 'Unassigned'/ 'I Participated'" tooltipOptions={this.tooltipOptions} + value={this.state.ftAssignstatus} + options={this.filterslist} + onChange={(e) => {this.assignStatusChangeEvent(e.value)}} + className="ms-width" + style={{width: '14em'}} + /> + <label htmlFor="workflowoverview" >Show Workflow </label> + </span> + </div> + <div> + <label htmlFor="cb1" className="p-checkbox-label">Active</label> + <TriStateCheckbox + onChange={(e) => {this.setWorkflowActiveState(e.value)}} + value={this.state.activeWorkflow} + style={{marginLeft: '5px', marginTop: '5px'}} + tooltip={this.state.showActiveStage} tooltipOptions={this.tooltipOptions} + ></TriStateCheckbox> + </div> + </div> + + </div> + <ViewTable + data={this.state.filteredWorkflowProcessList} + defaultcolumns={this.state.defaultcolumns} + optionalcolumns={this.state.optionalcolumns} + columnclassname={this.state.columnclassname} + defaultSortColumn={this.state.defaultSortColumn} + showaction="true" + keyaccessor="su" + paths={this.state.paths} + tablename="workflow_process_list" + showTopTotal={true} + showGlobalFilter={true} + showColumnFilter={true} + /> + </> + :<div>No Workflow Process SU found</div> + } + </div> + </React.Fragment> + ); + }; +} +export default WorkflowList; \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/index.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/index.js index 6eab86c09d55bd7c7a33cfecc6d4fdfcfa30b6e2..aa2ce1fc7a253bf50bfc8f524aedbe3beffc5773 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/index.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/index.js @@ -21,6 +21,7 @@ import SchedulingSetCreate from './Scheduling/excelview.schedulingset'; import Workflow from './Workflow'; import { Growl } from 'primereact/components/growl/Growl'; import { setAppGrowl } from '../layout/components/AppGrowl'; +import WorkflowList from './Workflow/workflow.list' export const routes = [ { @@ -185,6 +186,12 @@ export const routes = [ component: FindObjectResult, name: 'Find Object', title: 'Find Object' + }, + { + path: "/workflow", + component: WorkflowList, + name: 'Workflow', + title: 'Workflow' } ]; diff --git a/SubSystems/Online_Cobalt/test/Beamformer/tCoherentStokesQuantized_3sec_2st_3sb-check-output.sh b/SubSystems/Online_Cobalt/test/Beamformer/tCoherentStokesQuantized_3sec_2st_3sb-check-output.sh old mode 100755 new mode 100644 diff --git a/SubSystems/Online_Cobalt/test/Beamformer/tCoherentStokesQuantized_3sec_2st_3sb.run b/SubSystems/Online_Cobalt/test/Beamformer/tCoherentStokesQuantized_3sec_2st_3sb.run old mode 100755 new mode 100644 diff --git a/SubSystems/Online_Cobalt/test/Beamformer/tCoherentStokesQuantized_3sec_2st_3sb.sh b/SubSystems/Online_Cobalt/test/Beamformer/tCoherentStokesQuantized_3sec_2st_3sb.sh old mode 100755 new mode 100644 diff --git a/SubSystems/Online_Cobalt/test/Commensal/tMultipleBeamFormers.run b/SubSystems/Online_Cobalt/test/Commensal/tMultipleBeamFormers.run old mode 100755 new mode 100644 diff --git a/SubSystems/Online_Cobalt/test/Commensal/tMultipleBeamFormers.sh b/SubSystems/Online_Cobalt/test/Commensal/tMultipleBeamFormers.sh old mode 100755 new mode 100644 diff --git a/SubSystems/Online_Cobalt/test/Commensal/tMultipleBeamFormers_examine.py b/SubSystems/Online_Cobalt/test/Commensal/tMultipleBeamFormers_examine.py old mode 100755 new mode 100644 diff --git a/SubSystems/Online_Cobalt/test/Correlator/tCorrelate_3sec_2st_5sb_doppler.run b/SubSystems/Online_Cobalt/test/Correlator/tCorrelate_3sec_2st_5sb_doppler.run old mode 100755 new mode 100644 diff --git a/SubSystems/Online_Cobalt/test/Correlator/tCorrelate_3sec_2st_5sb_doppler.sh b/SubSystems/Online_Cobalt/test/Correlator/tCorrelate_3sec_2st_5sb_doppler.sh old mode 100755 new mode 100644