diff --git a/.gitattributes b/.gitattributes index 2910f7cab4e97ef1d04a9d96a2e4e59edf92d29a..e0e8da446b49b7fb935bf9f50b5118690dd7bc0e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5480,6 +5480,7 @@ SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/app.js -text SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/chartresourceusagecontroller.js -text SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/cleanupcontroller.js -text SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/datacontroller.js -text +SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/eventgridcontroller.js -text SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/ganttprojectcontroller.js -text SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/ganttresourcecontroller.js -text SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/gridcontroller.js -text diff --git a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/CMakeLists.txt b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/CMakeLists.txt index 1a52f7524967f2fcf9ca35a08e0abe23ae6c627c..97eb8af52918070df05eed222d567c73f09bf373 100644 --- a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/CMakeLists.txt +++ b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/CMakeLists.txt @@ -37,6 +37,7 @@ set(app_files static/app/controllers/datacontroller.js static/app/controllers/cleanupcontroller.js static/app/controllers/gridcontroller.js + static/app/controllers/eventgridcontroller.js static/app/controllers/ganttresourcecontroller.js static/app/controllers/chartresourceusagecontroller.js static/app/controllers/ganttprojectcontroller.js diff --git a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/app.js b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/app.js index ce05ea5a84bc136bbdabb54b8f521afe638c62a5..052ef9c596afab9eacf77426063d84f9652e8700 100644 --- a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/app.js +++ b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/app.js @@ -7,6 +7,7 @@ var app = angular.module('raeApp', 'GanttProjectControllerMod', 'ChartResourceUsageControllerMod', 'GridControllerMod', + 'EventGridControllerMod', 'ui.layout', 'ui.bootstrap', 'ui.bootstrap.tabs', diff --git a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/eventgridcontroller.js b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/eventgridcontroller.js new file mode 100644 index 0000000000000000000000000000000000000000..06f6331da071d6f6688c065109423a63178e9fcd --- /dev/null +++ b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/eventgridcontroller.js @@ -0,0 +1,49 @@ +// $Id: controller.js 32761 2015-11-02 11:50:21Z schaap $ + +var eventGridControllerMod = angular.module('EventGridControllerMod', ['ui.grid', + 'ui.grid.resizeColumns', + 'ui.grid.autoResize']); + +eventGridControllerMod.controller('EventGridController', ['$scope', 'dataService', 'uiGridConstants', function($scope, dataService, uiGridConstants) { + + var self = this; + + $scope.dataService = dataService; + + $scope.columns = [ + { field: 'timestamp', + displayName: 'Timestamp', + width: '120', + type: 'date', + enableCellEdit: false, + enableCellEditOnFocus: false, + cellTemplate:'<div style=\'text-align:center; padding-top:5px;\'>{{row.entity[col.field] | date:\'yyyy-MM-dd HH:mm:ss\'}}</div>', + sort: { direction: uiGridConstants.ASC } + }, + { field: 'message', + displayName: 'Message', + enableCellEdit: false, + width: '*', + minWidth: '100', + }]; + + $scope.gridOptions = { + enableGridMenu: false, + enableSorting: true, + enableFiltering: true, + enableCellEdit: false, + enableColumnResize: true, + enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER, + enableRowSelection: false, + enableRowHeaderSelection: false, + enableFullRowSelection: false, + modifierKeysToMultiSelect: false, + multiSelect:false, + enableSelectionBatchEvent:false, + gridMenuShowHideColumns: false, + columnDefs: $scope.columns, + data: dataService.events, + rowTemplate: "<div ng-repeat=\"(colRenderIndex, col) in colContainer.renderedColumns track by col.uid\" ui-grid-one-bind-id-grid=\"rowRenderIndex + '-' + col.uid + '-cell'\" class=\"ui-grid-cell\" ng-class=\"{ 'ui-grid-row-header-cell': col.isRowHeader }\" role=\"{{col.isRowHeader ? 'rowheader' : 'gridcell'}}\" ui-grid-cell></div>" + }; +}]); + diff --git a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/templates/index.html b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/templates/index.html index 9e5bec8c592849e8c163e3c075977892b3af9e27..0bf77d3f733f687b34c9da8360cab8272d098fc9 100644 --- a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/templates/index.html +++ b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/templates/index.html @@ -43,6 +43,7 @@ <script src="/static/app/controllers/datacontroller.js"></script> <script src="/static/app/controllers/cleanupcontroller.js"></script> <script src="/static/app/controllers/gridcontroller.js"></script> + <script src="/static/app/controllers/eventgridcontroller.js"></script> <script src="/static/app/controllers/ganttresourcecontroller.js"></script> <script src="/static/app/controllers/ganttprojectcontroller.js"></script> <script src="/static/app/gantt-plugins/angular-gantt-contextmenu-plugin.js"></script> @@ -111,60 +112,68 @@ ui-grid-edit ui-grid-selection ui-grid-cellNav ui-grid-resize-columns ui-grid-auto-resize class="grid"></div> </div> - <md-content margin-top='10px' style="margin-right: 4px;"> - <md-tabs md-dynamic-height md-border-bottom style="height: 100%; width: 100%;" > - <div ng-controller="GanttProjectController as ganttProjectCtrl" ng-init="enabled=true"> - <md-tab label="Tasks" md-on-select="enabled=true" md-on-deselect="enabled=false"> - <div gantt data=ganttData - api=options.api - show-side='true' - view-scale="options.viewScale" - from-date="options.fromDate" - to-date="options.toDate" - current-date="options.currentDate" - current-date-value="options.currentDateValue" - column-magnet="options.columnMagnet" - style="height: 75%; max-height:1200px; width: 100%; overflow-x: hidden; overflow-y: auto; margin-left: 8px;"> - <gantt-table enabled="true"></gantt-table> - <gantt-movable enabled="true" - allow-moving="true" - allow-resizing="true" - allow-row-switching="false"> - </gantt-movable> - <gantt-tooltips enabled="true" date-format="'YYYY-MM-DD HH:mm'"></gantt-tooltips> - <gantt-dependencies enabled="options.dependencies"></gantt-dependencies> - <gantt-contextmenu enabled="true"></gantt-contextmenu> - </div> - </md-tab> - </div> + <div ui-layout options="{flow: 'row'}"> + <md-content margin-top='10px' style="margin-right: 4px;"> + <md-tabs md-dynamic-height md-border-bottom style="height: 100%; width: 100%;" > + <div ng-controller="GanttProjectController as ganttProjectCtrl" ng-init="enabled=true"> + <md-tab label="Tasks" md-on-select="enabled=true" md-on-deselect="enabled=false"> + <div gantt data=ganttData + api=options.api + show-side='true' + view-scale="options.viewScale" + from-date="options.fromDate" + to-date="options.toDate" + current-date="options.currentDate" + current-date-value="options.currentDateValue" + column-magnet="options.columnMagnet" + style="height: 75%; max-height:1200px; width: 100%; overflow-x: hidden; overflow-y: auto; margin-left: 8px;"> + <gantt-table enabled="true"></gantt-table> + <gantt-movable enabled="true" + allow-moving="true" + allow-resizing="true" + allow-row-switching="false"> + </gantt-movable> + <gantt-tooltips enabled="true" date-format="'YYYY-MM-DD HH:mm'"></gantt-tooltips> + <gantt-dependencies enabled="options.dependencies"></gantt-dependencies> + <gantt-contextmenu enabled="true"></gantt-contextmenu> + </div> + </md-tab> + </div> - <div ng-controller="GanttResourceController as ganttResourceCtrl" ng-init="enabled=false"> - <md-tab label="Resources" md-on-select="enabled=true" md-on-deselect="enabled=false"> - <div gantt data=ganttData - api=options.api - show-side='true' - view-scale="options.viewScale" - from-date="options.fromDate" - to-date="options.toDate" - current-date="options.currentDate" - current-date-value="options.currentDateValue" - column-magnet="options.columnMagnet" - style="height: 75%; max-height:800px; width: 100%; overflow-x: hidden; overflow-y: auto; margin-left: 8px;"> - <gantt-tree enabled="true"></gantt-tree> - <gantt-movable enabled="true" - allow-moving="true" - allow-resizing="true" - allow-row-switching="false"></gantt-movable> - <gantt-tooltips enabled="true" date-format="'YYYY-MM-DD HH:mm'"></gantt-tooltips> - <gantt-contextmenu enabled="true"></gantt-contextmenu> - </div> - <div ng-controller="ChartResourceUsageController as chartResourceUsageCtrl" style="height: 25%"> - <highchart id="chart_resource_usage" config="chartConfig" style="margin: 12px;" ></highchart> - </div> - </md-tab> - </div> - </md-tabs> - </md-content> + <div ng-controller="GanttResourceController as ganttResourceCtrl" ng-init="enabled=false"> + <md-tab label="Resources" md-on-select="enabled=true" md-on-deselect="enabled=false"> + <div gantt data=ganttData + api=options.api + show-side='true' + view-scale="options.viewScale" + from-date="options.fromDate" + to-date="options.toDate" + current-date="options.currentDate" + current-date-value="options.currentDateValue" + column-magnet="options.columnMagnet" + style="height: 75%; max-height:800px; width: 100%; overflow-x: hidden; overflow-y: auto; margin-left: 8px;"> + <gantt-tree enabled="true"></gantt-tree> + <gantt-movable enabled="true" + allow-moving="true" + allow-resizing="true" + allow-row-switching="false"></gantt-movable> + <gantt-tooltips enabled="true" date-format="'YYYY-MM-DD HH:mm'"></gantt-tooltips> + <gantt-contextmenu enabled="true"></gantt-contextmenu> + </div> + <div ng-controller="ChartResourceUsageController as chartResourceUsageCtrl" style="height: 25%"> + <highchart id="chart_resource_usage" config="chartConfig" style="margin: 12px;" ></highchart> + </div> + </md-tab> + </div> + </md-tabs> + </md-content> + <div ng-controller="EventGridController as eventGridCtrl" style="margin-right: 4px;" ui-layout-init-min-width="150px"> + <div id="grid" + ui-grid="gridOptions" + ui-grid-resize-columns ui-grid-auto-resize + class="grid"></div> + </div> + </div> </div> </div> {% endraw %}