Skip to content
Snippets Groups Projects
Commit 50c1f47b authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #8887: merged feature branch back into trunk

parents 902406f3 1580b0df
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,27 @@ angular.module('raeApp').factory("dataService", ['$http', '$q', function($http,
self.initialLoadComplete = false;
self.resourceClaimStatusColors = {'claimed':'#ffa64d',
'conflict':'#ff0000',
'allocated': '#66ff66',
'mixed': '#bfbfbf'}
self.taskStatusColors = {'prepared':'#cccccc',
'approved':'#8cb3d9',
'on_hold':'#b34700',
'conflict':'#ff0000',
'prescheduled': '#6666ff',
'scheduled': '#0000ff',
'queued': '#6666ff',
'active': '#ffff00',
'completing': '#99ff33',
'finished': '#00ff00',
'aborted': '#cc0000',
'error': '#990033',
'obsolete': '#555555'};
//start with local client time
//lofarTime will be synced with server,
//because local machine might have incorrect clock
......
......@@ -25,19 +25,7 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS
$scope.dataService = dataService;
$scope.ganttData = [];
self.taskStatusColors = {'prepared':'#aaff00',
'approved':'#ffaa00',
'on_hold':'#ff0000',
'conflict':'#ffccaa',
'prescheduled': '#6666ff',
'scheduled': '#ff66ff',
'queued': '#bb6644',
'active': '#77ff77',
'completing': '#776688',
'finished': '#66ff33',
'aborted': '#ff3366',
'error': '#ff4488',
'obsolete': '#555555'};
self.taskStatusColors = dataService.taskStatusColors;
$scope.options = {
mode: 'custom',
......
......@@ -23,10 +23,8 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat
$scope.dataService = dataService;
$scope.ganttData = []
self.resourceClaimStatusColors = {'claimed':'#ffa64d',
'conflict':'#ff0000',
'allocated': '#66ff66',
'mixed': '#bfbfbf'}
self.taskStatusColors = dataService.taskStatusColors;
self.resourceClaimStatusColors = dataService.resourceClaimStatusColors;
$scope.options = {
mode: 'custom',
......@@ -275,7 +273,8 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat
name: task.name,
from: claim.starttime,
to: claim.endtime,
color: self.resourceClaimStatusColors[claim.status],
color: self.taskStatusColors[task.status],
classes: 'claim-status-' + claim.status,
raTask: task,
claim: claim,
movable: $.inArray(task.status_id, editableTaskStatusIds) > -1
......@@ -359,7 +358,8 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat
name: task.name,
from: aggClaimForTask.starttime,
to: aggClaimForTask.endtime,
color: self.resourceClaimStatusColors[aggClaimForTask.status],
color: self.taskStatusColors[task.status],
classes: 'claim-status-' + aggClaimForTask.status,
raTask: task,
movable: $.inArray(task.status_id, editableTaskStatusIds) > -1
};
......@@ -405,7 +405,7 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat
$scope.$watch('dataService.resourceClaims', updateGanttData, true);
$scope.$watch('dataService.resourceGroups', updateGanttData);
$scope.$watch('dataService.resourceGroupMemberships', updateGanttData);
$scope.$watch('dataService.filteredTaskDict', updateGanttData);
$scope.$watch('dataService.filteredTaskDict', updateGanttData, true);
$scope.$watch('dataService.lofarTime', function() {$scope.options.currentDateValue= $scope.dataService.lofarTime;});
}
]);
......@@ -46,3 +46,20 @@
.top-stretch {
top: 20px;
}
.gantt-task.claim-status-claimed {
border-bottom: 4px solid #ffa64d;
}
.gantt-task.claim-status-conflict {
border-bottom: 4px solid #ff0000;
}
.gantt-task.claim-status-allocated {
border-bottom: 4px solid #66ff66;
}
.gantt-task.claim-status-mixed {
border-bottom: 4px solid #bfbfbf;
}
......@@ -45,15 +45,12 @@
<body>
{% raw %}
<div ng-controller="DataController as dataCtrl">
<div >Lofar Time:
<span>{{dataCtrl.dataService.lofarTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
</div>
<div >Time (local): <span>{{dataService.lofarTime | date:'yyyy-MM-dd HH:mm:ss' }}</span></div>
<div ui-layout class="top-stretch" ui-layout="{flow: 'column'}">
<header>
<uib-tabset margin-top='10px'>
<uib-tab heading="Tasks" index='0' active='true'>
<div ng-controller="GridController as gridCtrl">
<strong>Tasks:</strong>
<div id="grid" ui-grid="gridOptions" ui-grid-edit ui-grid-selection ui-grid-cellnav ui-grid-resize-columns class="grid">
</div>
</div>
......
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