Skip to content
Snippets Groups Projects
Commit 0a20162b authored by Muthukrishnanmatriot's avatar Muthukrishnanmatriot
Browse files

merged wih master

parent 127c2b09
No related branches found
No related tags found
3 merge requests!634WIP: COBALT commissioning delta,!538Resolve TMSS-888,!481Draft: SW-971 SW-973 SW-975: Various fixes to build LOFAR correctly.
...@@ -14,6 +14,7 @@ import UIConstants from '../../utils/ui.constants'; ...@@ -14,6 +14,7 @@ import UIConstants from '../../utils/ui.constants';
import UtilService from '../../services/util.service'; import UtilService from '../../services/util.service';
import AuthUtil from '../../utils/auth.util'; import AuthUtil from '../../utils/auth.util';
import AccessDenied from '../../layout/components/AccessDenied'; import AccessDenied from '../../layout/components/AccessDenied';
import UnitConverter from '../../utils/unit.converter';
class WorkflowList extends Component{ class WorkflowList extends Component{
lsKeySortColumn = 'SortDataWorkflowList'; lsKeySortColumn = 'SortDataWorkflowList';
...@@ -64,6 +65,7 @@ class WorkflowList extends Component{ ...@@ -64,6 +65,7 @@ class WorkflowList extends Component{
defaultSortColumn: [{id: "Scheduling unit ID", desc: false}], defaultSortColumn: [{id: "Scheduling unit ID", desc: false}],
isLoading: true, isLoading: true,
}; };
this.statusList = [];
this.pageUpdated = true; this.pageUpdated = true;
this.schedulingUnitList = null; this.schedulingUnitList = null;
this.workflowProcessList = null; this.workflowProcessList = null;
...@@ -94,8 +96,10 @@ class WorkflowList extends Component{ ...@@ -94,8 +96,10 @@ class WorkflowList extends Component{
const promises = [ WorkflowService.getWorkflowProcesses(), const promises = [ WorkflowService.getWorkflowProcesses(),
WorkflowService.getWorkflowTasks(), WorkflowService.getWorkflowTasks(),
ScheduleService.getSchedulingUnitsExpandWithFilter('blueprint',this.SU_BLUEPRINT_EXPAND, '', 10, 0), ScheduleService.getSchedulingUnitsExpandWithFilter('blueprint',this.SU_BLUEPRINT_EXPAND, '', 10, 0),
ScheduleService.getSchedulingUnitFilterDefinition('blueprint')
]; ];
Promise.all(promises).then(async responses => { Promise.all(promises).then(async responses => {
this.getStatusList(responses[3]);
this.workflowProcessList = responses[0]; this.workflowProcessList = responses[0];
this.workflowTasksList = responses[1]; this.workflowTasksList = responses[1];
this.schedulingUnitList = responses[2].data.results; this.schedulingUnitList = responses[2].data.results;
...@@ -105,6 +109,16 @@ class WorkflowList extends Component{ ...@@ -105,6 +109,16 @@ class WorkflowList extends Component{
} }
/**
* get Status list
* @param {*} suFilters
*/
getStatusList(suFilters) {
if(suFilters){
this.statusList = UnitConverter.getStatusList(suFilters);
}
}
toggleBySorting = (sortData) => { toggleBySorting = (sortData) => {
this.storeUIAttr(this.lsKeySortColumn, sortData) this.storeUIAttr(this.lsKeySortColumn, sortData)
...@@ -201,7 +215,7 @@ class WorkflowList extends Component{ ...@@ -201,7 +215,7 @@ class WorkflowList extends Component{
options = _.map(UIConstants.CURRENT_WORKFLOW_STAGE, stage=> {return {name: stage, value: stage}}); options = _.map(UIConstants.CURRENT_WORKFLOW_STAGE, stage=> {return {name: stage, value: stage}});
} }
else if(id && id === 'Scheduling Unit Status') { else if(id && id === 'Scheduling Unit Status') {
options = UIConstants.SU_STATUS; options = this.statusList;//UIConstants.SU_STATUS;
} }
return options; return options;
} }
......
...@@ -3,7 +3,8 @@ import UIConstants from "../utils/ui.constants"; ...@@ -3,7 +3,8 @@ import UIConstants from "../utils/ui.constants";
const TimelineConstants = { const TimelineConstants = {
SU_LIST_DEFAULT_COLUMNS: [{ SU_LIST_DEFAULT_COLUMNS: [{
status: { status: {
name:"Status" name:"Status",
filter: "select",
}, },
do_cancel: { do_cancel: {
name:"Cancelled" name:"Cancelled"
......
...@@ -236,6 +236,15 @@ const UnitConverter = { ...@@ -236,6 +236,15 @@ const UnitConverter = {
radian = this.convertToRadians((degreeHour * 15 + minute / 4 + second / 240)); radian = this.convertToRadians((degreeHour * 15 + minute / 4 + second / 240));
} }
return radian; return radian;
},
getStatusList(suFilters) {
let statusList = [];
if (suFilters.data.filters['status']) {
suFilters.data.filters['status'].choices.forEach(choice => {
statusList.push(choice.value);
});
}
return statusList;
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment