Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2015-04-28 21:57:18 -0400
committerjmisinco2015-04-28 21:57:18 -0400
commit4ca21719d44791d7ca25cf665c00cb69bbb34a74 (patch)
tree198f0751c2b6809dc97dcc62e9cf9773c74185e9 /plugins/org.eclipse.osee.web.ui
parent156763e5f94e4167040f7c172ffa3ea057c7c88e (diff)
downloadorg.eclipse.osee-4ca21719d44791d7ca25cf665c00cb69bbb34a74.tar.gz
org.eclipse.osee-4ca21719d44791d7ca25cf665c00cb69bbb34a74.tar.xz
org.eclipse.osee-4ca21719d44791d7ca25cf665c00cb69bbb34a74.zip
feature[ats_ATS192531]: Enable OAuth for Coverage
Diffstat (limited to 'plugins/org.eclipse.osee.web.ui')
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/coverage/js/coverageController.js4
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html58
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/css/admin.css30
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/css/user.css231
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js311
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/coverageController.js42
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js156
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/linkRewrite.js30
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/mainController.js5
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/resizer.js61
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js933
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/ui/index.html58
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html100
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/main.html3
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/nameFilterTmpl.html12
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html160
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/oseeAuth.js23
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/views/header.html4
18 files changed, 2215 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.web.ui/src/coverage/js/coverageController.js b/plugins/org.eclipse.osee.web.ui/src/coverage/js/coverageController.js
new file mode 100644
index 0000000000..0672b43c2b
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/coverage/js/coverageController.js
@@ -0,0 +1,4 @@
+app.controller('coverageController', ['$rootScope',
+ function($rootScope) {
+ $rootScope.type = "code_coverage";
+}]); \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html b/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html
new file mode 100644
index 0000000000..e6a8532919
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <base href="/coverage/ui/index.html">
+ <meta charset="UTF-8">
+ </meta>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ </meta>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ </meta>
+ <link rel="stylesheet" href="/ajax/libs/bootstrap/3.3.2/css/bootstrap.min.css">
+ </link>
+ <link rel="stylesheet" href="/ajax/libs/ng-grid/2.0.11/ng-grid.min.css">
+ </link>
+ <link rel="stylesheet" href="/dispo/css/user.css">
+ </link>
+ <link rel="stylesheet" href="/dispo/css/admin.css">
+ </link>
+ <script src="/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
+ <script src="/ajax/libs/angularjs/1.3.11/angular.js"></script>
+ <script src="/ajax/libs/angularjs/1.3.11/angular-route.min.js"></script>
+ <script src="/ajax/libs/angularjs/1.3.11/angular-resource.min.js"></script>
+ <script src="/ajax/libs/angularjs/1.3.11/angular-cookies.js"></script>
+ <script src="/ajax/libs/ng-grid/2.0.11/ng-grid.min.js"></script>
+ <script src="/ajax/libs/bootstrap/3.3.2/js/bootstrap.min.js"></script>
+ <script src="/ajax/libs/ui-bootstrap/0.12.0/ui-bootstrap-tpls-0.12.0.min.js"></script>
+ <script src="/ajax/libs/ngStorage/0.3.0/ngStorage.min.js"></script>
+ <script src="/ajax/libs/oauth-ng/0.3.8/oauth-ng.js"></script>
+ <script src="/libs/js/oseeAuth/oseeAuth.js"></script>
+ <script src="/libs/js/support/linkRewrite.js"></script>
+ <script src="/dispo/js/resizer.js"></script>
+ <script src="/dispo/js/dispoApp.js"></script>
+ <script src="/dispo/js/userController.js"></script>
+ <script src="/dispo/js/adminController.js"></script>
+ <script src="/dispo/js/mainController.js"></script>
+ <script>
+ app.controller("indexController", [
+ "$scope", "$rootScope",
+ function($scope, $rootScope) {
+ $scope.links = [ { ref: '', name: 'Home', roles: ['all']}, { ref: 'user', name: 'User', roles: ['all']}, { ref: 'admin', name: 'Admin', roles: ['DispoAdmin']}];
+ $rootScope.type = "codeCoverage";
+ }]);
+
+ </script>
+ <link rel="icon" type="image/x-icon" href="images/osee.ico" />
+ <link rel="shortcut icon" type="image/x-icon" href="/libs/images/osee.ico" />
+ <title>Disposition</title>
+ </head>
+ <body ng-app="dispoApp">
+ <div ng-controller="indexController">
+ <osee
+ redirect-uri="../coverage/ui/index.html"
+ links="links">
+ </osee>
+ </div>
+ <div ng-view></div>
+ </body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/css/admin.css b/plugins/org.eclipse.osee.web.ui/src/dispo/css/admin.css
new file mode 100644
index 0000000000..c6f8d2bae9
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/css/admin.css
@@ -0,0 +1,30 @@
+#programSelect {
+ background-color: yellow;
+ width: 200px;
+}
+
+.createSetModal .modal-content {
+width: 500px;
+
+}
+
+button.btn.btn-default.btn-sm.setDelete.ng-scope {
+ width: 57px;
+}
+
+#importButton {
+ width:150px;
+}
+
+button.btn.btn-primary.ng-scope {
+ width: 70px;
+ height: 30px;
+}
+
+#reportRow {
+ margin-top: 100px;
+}
+
+#generateReportBtn {
+ margin-top:20px;
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/css/user.css b/plugins/org.eclipse.osee.web.ui/src/dispo/css/user.css
new file mode 100644
index 0000000000..a29a4bc2ee
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/css/user.css
@@ -0,0 +1,231 @@
+
+#top-content {
+ margin-left: 5px;
+ margin-right: 5px;
+ overflow: auto;
+}
+#bottom-content {
+ position: fixed;
+ height: 300px;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ overflow: auto;
+ background-color: lightslategray;
+}
+
+#content-resizer {
+ position: fixed;
+ height: 6px;
+ bottom: 300px;
+ left: 0;
+ right: 0;
+ background-color: #666;
+ cursor: n-resize;
+}
+
+#sidebar-resizer:hover, #preview-resizer:hover {
+ background-color: #AAA;
+}
+
+.ngHeaderScroller{
+ position:fixed;
+}
+
+#annotationsGrid {
+background-color: lightslategray;
+}
+
+.textarea {
+ resize: vertical;
+}
+
+#itemSelectedBar {
+ background-color: lightcyan;
+}
+
+
+
+#compareText {
+ width: 110px;
+ margin: 0px 0px 0px 75px;
+ border-style: solid;
+ border-width: 1px;
+ text-align: center;
+ background-color: #B0E0E6;
+}
+#dispoTable {
+ background-color: white;
+ border: 5px solid black;
+}
+th {
+ background-color: #969AA0;
+}
+
+.subTable {
+ border-spacing: 1px;
+ background-color: #FFF;
+ border: 1px solid #000;
+}
+
+td {
+ border: 1px solid black;
+}
+
+.itemData {
+ overflow: hidden;
+ white-space: nowrap;
+ max-width:50px;
+ height:30px;
+ background-color: white;
+}
+.itemDataFail {
+ overflow: hidden;
+ white-space: nowrap;
+ max-width:50px;
+ height:30px;
+ background-color: yellow;
+}
+
+input:disabled {
+ background-color: #D3DFE0;
+}
+.spacer {
+ background-color: white;
+}
+.emptyCell {
+ height:30px;
+ background-color: rgb(200, 200, 200);
+}
+td {
+ background-color: #9AEAF5;
+}
+.emptyAnnotation {
+ height:20px;
+ background-color: #9AEAF5;
+}
+textarea {
+ resize: none;
+}
+
+.annotationInput {
+ border: none;
+ width: 100%;
+ height: 32px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+ -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+ background-color: #9AEAF5;
+}
+.annotationInput:focus {
+ border: 2px dashed green;
+}
+.annotationInput.details {
+ height: 200px;
+ overflow: visible;
+ white-space: pre-line;
+}
+.annotationInput.invalid {
+ border: 4px solid red;
+}
+.annotationInput:disabled {
+ background-color: #D3DFE0;
+}
+
+.annotationInput.details:disabled {
+ height: 200px;
+ transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+ background-color: #D3DFE0;
+}
+.annotationInput.invalid:focus {
+ border: 2px dashed red;
+}
+
+.annotationInput.details:focus {
+ border: 2px dashed green;
+}
+.annotationInput.details.invalid {
+ border: 4px solid red;
+}
+.annotationInput.details.invalid:focus {
+ border: 2px dashed red;
+}
+.annotationDelete {
+ display: block;
+ width: 100%;
+ height: 34px;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #555;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+ -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+}
+
+.annotationDelete.details {
+ height: 200px;
+ overflow: visible;
+ white-space: pre-line;
+}
+
+.annotationDelete:disabled {
+ background-color: white;
+ color: white;
+ border: none;
+}
+
+.ItemStatus.incomplete {
+ background-color: yellow;
+}
+.ItemStatus.complete {
+ background-color: green;
+}
+
+#multItemEditDiv {
+ margin-top: 20px;
+}
+
+#refresh {
+ margin-top: 20px;
+ }
+
+ #search {
+ margin-top: 20px;
+ margin-right: 0px;
+ }
+
+ .modal.fade.ng-isolate-scope.needsRerunModal.in {
+ background-color: rgba(0, 0, 0, 0.5);
+ }
+
+ #loadingModal {
+ margin-bottom: 0px;
+ }
+
+ #helpButton {
+ height: 50px;
+ }
+
+input.cellInput{
+ background-color: inherit;
+ border: none;
+ width: 100%;
+ height: 30px;
+}
+
+input.cellInput:disabled {
+ background-color: inherit;
+}
+
+input.cellInput:focus{
+ background-color: inherit;
+ border: solid cyan;
+}
+
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
new file mode 100644
index 0000000000..d45ad15387
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
@@ -0,0 +1,311 @@
+ app.controller('adminController', ['$scope', '$rootScope', '$modal', 'Program', 'Set', 'Report', 'CopySet',
+ function($scope, $rootScope, $modal, Program, Set, Report, CopySet) {
+ $scope.readOnly = true;
+ $scope.programSelection = null;
+ $scope.modalShown = false;
+ $scope.primarySet = "";
+ $scope.secondarySet = "";
+ $scope.sets = [];
+
+ $scope.cachedValue = "";
+
+ $scope.$on('ngGridEventStartCellEdit', function(data) {
+ var field = data.targetScope.col.field;
+ $scope.cachedValue = data.targetScope.row.getProperty(field);
+ });
+
+ $scope.$on('ngGridEventEndCellEdit', function(data) {
+ var field = data.targetScope.col.field;
+ var row = data.targetScope.row;
+ var newValue = row.getProperty(field);
+
+ if ($scope.cachedValue != newValue) {
+ $scope.editSet(row.entity);
+ }
+ });
+
+
+
+ $scope.gridOptions = {
+ data: 'sets',
+ enableHighlighting: true,
+ enableColumnResize: false,
+ enableRowReordering: true,
+ multiSelect: false,
+ columnDefs: 'columnDefs' // link to scope variable which we will define dynamically
+ }
+
+ var editCellTmpl = '<input editable="true" >'
+ var dellCellTmpl = '<button width="50px" class="btn btn-default btn-sm setDelete" ng-show="!readOnly" ng-click="deleteSet(row.entity)">X</button>';
+ var importCellTmpl = '<button width="50px" class="btn btn-primary" ng-disabled="row.entity.processingImport" ng-click="importSet(row.entity)">Import</button>';
+ var exportCellTmpl = '<button width="50px" class="btn btn-primary" ng-disabled="row.entity.processingImport" ng-click="exportSet(row.entity)">Export</button>';
+
+ $scope.columnDefs1 = [{
+ field: "",
+ displayName: "Import",
+ width: 70,
+ enableCellEdit: false,
+ cellTemplate: importCellTmpl
+ }, {
+ field: "",
+ displayName: "Export",
+ width: 70,
+ cellTemplate: exportCellTmpl
+ }, {
+ field: "name",
+ displayName: "Name",
+ width: 200,
+ enableCellEdit: false
+ }, {
+ field: "importPath",
+ displayName: "Path",
+ width: 460,
+ enableCellEdit: false
+ }];
+
+ $scope.columnDefs2 = [{
+ field: "",
+ displayName: "Import",
+ width: 70,
+ enableCellEdit: false,
+ cellTemplate: importCellTmpl
+ }, {
+ field: "",
+ displayName: "Export",
+ width: 70,
+ cellTemplate: exportCellTmpl
+ },{
+ field: "name",
+ displayName: "Name",
+ width: 200,
+ enableCellEdit: true
+ }, {
+ field: "importPath",
+ displayName: "Path",
+ width: 413,
+ enableCellEdit: true
+ }, {
+ field: "delete",
+ displayName: "Delete",
+ width: 57,
+ cellTemplate: dellCellTmpl
+ }];
+
+ $scope.columnDefs = $scope.columnDefs1;
+
+ $scope.programs = Program.query();
+
+ $scope.toggleModal = function() {
+ $scope.modalShown = !$scope.modalShown
+ };
+
+ $scope.toggleReadOnly = function() {
+ if ($scope.readOnly) {
+ $scope.columnDefs = $scope.columnDefs2;
+ $scope.readOnly = false;
+ } else {
+ $scope.columnDefs = $scope.columnDefs1;
+ $scope.readOnly = true;
+ }
+
+ };
+
+ $scope.generateReport = function() {
+ var requst = [];
+ requst.push(
+ "program/",
+ $scope.programSelection,
+ "/admin/report?primarySet=",
+ $scope.primarySet,
+ "&secondarySet=",
+ $scope.secondarySet
+ );
+ var url = requst.join("");
+
+ window.open(url);
+ }
+
+
+
+ $scope.updateProgram = function updateProgram() {
+ $scope.loading = true;
+ $scope.items = {};
+ $scope.sets = {};
+ Set.query({
+ programId: $scope.programSelection,
+ type: $rootScope.type
+ }, function(data) {
+ $scope.loading = false;
+ $scope.sets = data;
+ });
+ };
+
+ $scope.editSet = function editSet(set) {
+ Set.update({
+ programId: $scope.programSelection,
+ setId: set.guid
+ }, set);
+ };
+
+ $scope.deleteSet = function deleteSet(set) {
+ Set.delete({
+ programId: $scope.programSelection,
+ setId: set.guid
+ }, function() {
+ var index = $scope.sets.indexOf(set);
+ if (index > -1) {
+ $scope.sets.splice(index, 1);
+ }
+ });
+
+ }
+
+
+ $scope.importSet = function importSet(set) {
+ console.log(new Date().getTime());
+ var newSet = new Set;
+ newSet.operation = "Import";
+ set.processingImport = true;
+ Set.update({
+ programId: $scope.programSelection,
+ setId: set.guid
+ }, newSet, function(data){
+ var reportUrl = data.operationStatus;
+ window.open(reportUrl);
+ console.log(data);
+ set.processingImport = false;
+ }, function() {
+ console.log("Failed");
+ console.log(new Date().getTime());
+ set.processingImport = false;
+ alert("Could not Import");
+ });
+ };
+
+ $scope.exportSet = function importSet(set) {
+ var requst = [];
+ requst.push(
+ "program/",
+ $scope.programSelection,
+ "/admin/export?primarySet=",
+ set.guid,
+ "&option=detailed"
+ );
+ var url = requst.join("");
+
+ window.open(url);
+ };
+
+ $scope.createNewSet = function createNewSet(name, path) {
+ if (name != "" && path != "") {
+ var newSet = new Set;
+ newSet.name = name;
+ newSet.importPath = path;
+ newSet.dispoType = $rootScope.type;
+ newSet.$save({
+ programId: $scope.programSelection
+ }, function() {
+ $scope.sets.push(newSet);
+ });
+ }
+ };
+
+ $scope.copySet = function(inputs) {
+ var copySetOp = new CopySet;
+ copySetOp.annotationParam = inputs.annotationParam;
+ copySetOp.categoryParam = inputs.categoryParam;
+ copySetOp.assigneeParam = inputs.assigneeParam;
+ copySetOp.noteParam = inputs.noteParam;
+
+ copySetOp.$save({
+ programId: $scope.programSelection,
+ destinationSet: inputs.destinationSet,
+ sourceSet: inputs.sourceSet,
+ }, function(data) {
+ var reportUrl = data.operationStatus;
+ window.open(reportUrl);
+ console.log(data);
+ });
+ }
+
+ // Create Set Modal
+ $scope.createNewSetModal = function() {
+ var modalInstance = $modal.open({
+ templateUrl: 'popup.html',
+ controller: CreateSetModalCtrl,
+ size: 'sm',
+ windowClass: 'createSetModal'
+ });
+
+ modalInstance.result.then(function(inputs) {
+ $scope.createNewSet(inputs.name, inputs.path);
+ });
+ }
+
+ var CreateSetModalCtrl = function($scope, $modalInstance) {
+ $scope.setName = "";
+ $scope.importPath = "";
+
+ $scope.ok = function() {
+ var inputs = {};
+ inputs.name = this.setName;
+ inputs.path = this.importPath;
+ $modalInstance.close(inputs);
+ };
+
+ $scope.cancel = function() {
+ $modalInstance.dismiss('cancel');
+ };
+ };
+
+ // Copy Set Modal
+ $scope.openCopySetModal = function() {
+ var modalInstance = $modal.open({
+ templateUrl: 'copySets.html',
+ controller: CopySetModalCtrl,
+ size: 'md',
+ windowClass: 'copySetModal',
+ resolve: {
+ sets: function() {
+ return $scope.sets;
+ }
+ }
+ });
+
+ modalInstance.result.then(function(inputs) {
+ $scope.copySet(inputs);
+ });
+ }
+
+
+ var CopySetModalCtrl = function($scope, $modalInstance, sets) {
+ $scope.setsLocal = angular.copy(sets);
+ $scope.annotationOptions = [{ value: 0, text: 'NONE'}, { value: 1, text: 'OVERRIDE'}];
+ $scope.categoryOptions = [{ value: 0, text: 'NONE'}, { value: 1, text: 'OVERRIDE'}, { value: 2, text: 'ONLY COPY IF DEST IS EMPTY'}, { value: 3, text: 'MERGE DEST AND SOURCE'}];
+ $scope.assigneeOptions = [{ value: 0, text: 'NONE'}, { value: 1, text: 'OVERRIDE'}, { value: 2, text: 'ONLY COPY IF DEST IS UNASSIGNED'}];
+ $scope.noteOptions = [{ value: 0, text: 'NONE'}, { value: 1, text: 'OVERRIDE'}, { value: 2, text: 'ONLY COPY IF DEST IS EMPTY'}, { value: 3, text: 'MERGE DEST AND SOURCE'}];
+
+ $scope.annotationParam = 0;
+ $scope.categoryParam = 0;
+ $scope.assigneeParam = 0;
+ $scope.noteParam = 0;
+
+ $scope.ok = function() {
+ var inputs = {};
+ inputs.destinationSet = this.destinationSet;
+ inputs.sourceSet = this.sourceSet;
+ inputs.annotationParam = this.annotationParam;
+ inputs.categoryParam = this.categoryParam;
+ inputs.noteParam = this.noteParam;
+ inputs.assigneeParam = this.assigneeParam;
+
+ $modalInstance.close(inputs);
+ };
+
+ $scope.cancel = function() {
+ $modalInstance.dismiss('cancel');
+ };
+ };
+
+ }
+ ]); \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/coverageController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/coverageController.js
new file mode 100644
index 0000000000..d3b57ae5e9
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/coverageController.js
@@ -0,0 +1,42 @@
+app.controller('coverageController', [
+ '$rootScope',
+ '$cookieStore',
+ '$modal',
+
+ function($rootScope, $cookieStore, $modal) {
+ $rootScope.type = 'codeCoverage';
+
+ $rootScope.setUserName = function() {
+ $rootScope.attempts = 0;
+ while(($rootScope.cachedName == null || $rootScope.cachedName == "") && $rootScope.attempts < 5) {
+ var nameEnter=prompt("Please enter your name","");
+ $cookieStore.put('cachedName', nameEnter);
+ $rootScope.cachedName = nameEnter;
+ $rootScope.attempts++;
+ }
+ if($rootScope>=5) {
+ $rootScope.cachedName = "Need To Log In";
+ }
+
+ }
+
+ $rootScope.cachedName = $cookieStore.get('cachedName');
+ $rootScope.setUserName();
+
+ $rootScope.resetUserName = function() {
+ $rootScope.cachedName = null;
+ $rootScope.setUserName();
+ }
+
+ // Help Modal
+ $rootScope.showHelpModal = function() {
+ var modalInstance = $modal.open({
+ templateUrl: 'helpModal.html',
+ size: 'large',
+ windowClass: 'needsRerunModal'
+ });
+ }
+
+ }]);
+
+ \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js
new file mode 100644
index 0000000000..ed2faf9527
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js
@@ -0,0 +1,156 @@
+/**
+ * Dispo app definition
+ */
+var app = angular.module('dispoApp', ['oauth', 'ngRoute','ngResource', 'ui.bootstrap', 'ngGrid', 'mc.resizer', 'ngCookies', 'aLinkRewrite', 'oseeProvider']);
+
+app.config(['$routeProvider',
+function($routeProvider) {
+
+ $routeProvider.when('/', {
+ templateUrl: '/dispo/views/main.html',
+ controller: 'mainController'
+ }).when('/user', {
+ templateUrl: '/dispo/views/user.html',
+ controller: 'userController'
+ }).when('/admin', {
+ templateUrl: '/dispo/views/admin.html',
+ controller: 'adminController'
+ }).when('/search', {
+ templateUrl: '/dispo/views/user.html',
+ controller: 'userController'
+ })
+ .otherwise({
+ redirectTo: "/"
+ });
+ }
+]);
+
+app.directive('focusMe', function($timeout) {
+ return function(scope, element, attrs) {
+ scope.$watch(attrs.focusMe, function() {
+ $timeout(function() {
+ element[0].focus();
+ }, 20);
+ });
+ };
+});
+
+//http://stackoverflow.com/questions/11868393/angularjs-inputtext-ngchange-fires-while-the-value-is-changing
+app.directive('ngModelOnblur', function() {
+ return {
+ restrict: 'A',
+ require: 'ngModel',
+ priority: 1, // needed for angular 1.2.x
+ link: function(scope, elm, attr, ngModelCtrl) {
+ if (attr.type === 'radio' || attr.type === 'checkbox') return;
+
+ elm.unbind('input').unbind('keydown').unbind('change');
+ elm.bind('blur', function() {
+ scope.$apply(function() {
+ ngModelCtrl.$setViewValue(elm.val());
+ });
+ });
+ }
+ };
+});
+
+app.provider('Program', function() {
+ this.$get = ['$resource',
+ function($resource) {
+ var Program = $resource('/dispo/program/:programId', {}, {});
+ return Program;
+ }
+ ];
+});
+
+app.provider('Report', function() {
+ this.$get = ['$resource',
+ function($resource) {
+ var Program = $resource('/dispo/program/:programId/admin/report', {}, {});
+ return Program;
+ }
+ ];
+});
+
+app.provider('ExportSet', function() {
+ this.$get = ['$resource',
+ function($resource) {
+ var ExportSet = $resource('/dispo/program/:programId/admin/export', {}, {});
+ return ExportSet;
+ }
+ ];
+ });
+
+app.provider('CopySet', function() {
+ this.$get = ['$resource',
+ function($resource) {
+ var CopySet = $resource('/dispo/program/:programId/admin/copy', {}, {});
+ return CopySet;
+ }
+ ];
+});
+
+app.provider('Set', function() {
+ this.$get = ['$resource',
+ function($resource) {
+ var Set = $resource('/dispo/program/:programId/set/:setId', {}, {
+ update: {
+ method: 'PUT',
+ headers: {
+ "Accept": "application/json"
+ }
+ }
+ });
+ return Set;
+ }
+ ];
+});
+
+app.provider('Item', function() {
+ this.$get = [
+ '$resource',
+ function($resource) {
+ var Item = $resource(
+ '/dispo/program/:programId/set/:setId/item/:itemId', {}, {
+ update: {
+ method: 'PUT',
+ headers: {
+ "Accept": "application/json"
+ }
+ }
+ });
+ return Item;
+ }
+ ];
+});
+
+app.provider('SetSearch', function() {
+ this.$get = [
+ '$resource',
+ function($resource) {
+ var SetSearch = $resource(
+ '/dispo/program/:programId/set/:setId/search/', {}, {
+ });
+ return SetSearch;
+ }
+ ];
+});
+
+
+app.provider('Annotation', function() {
+ this.$get = [
+ '$resource',
+ function($resource) {
+ var Annotation = $resource(
+ '/dispo/program/:programId/set/:setId/item/:itemId/annotation/:annotationId', {}, {
+ update: {
+ method: 'PUT',
+ headers: {
+ "Accept": "application/json"
+ }
+ }
+ });
+ return Annotation;
+ }
+ ];
+}); \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/linkRewrite.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/linkRewrite.js
new file mode 100644
index 0000000000..bb30c00f1b
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/linkRewrite.js
@@ -0,0 +1,30 @@
+(function(window,angular)
+{
+ 'use strict';
+
+ var module;
+
+ module = angular.module('aLinkRewrite',[]);
+ module.config
+ (
+ [
+ '$provide','$locationProvider',
+ function (p,lp)
+ { // (decorator is undocumented... *sigh*)
+ p.decorator( // decorate the
+ '$sniffer', // sniffer service
+ [
+ '$delegate', // obtain a delegate object to modify the sniffer
+ function(d) // which we will call 'd'
+ {
+ d.history = false; // tell angular that we don't have html5 history capabilities
+ return d;
+ }
+ ]
+ );
+
+ lp.html5Mode(true).hashPrefix('!'); // HTML5 mode
+ }
+ ]
+ ).run(['$location',function($location){}]); // inject $location into the browser
+})(window,window.angular); \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/mainController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/mainController.js
new file mode 100644
index 0000000000..d988229c9b
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/mainController.js
@@ -0,0 +1,5 @@
+app.controller("mainController", ["$scope", "$rootScope",
+ function($scope, $rootScope) {
+ $scope.links = [ { ref: '', name: 'Home'}, { ref: 'user', name: 'User'}, { ref: 'admin', name: 'Admin'}];
+ $rootScope.type = "test_script";
+ }]); \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/resizer.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/resizer.js
new file mode 100644
index 0000000000..4250ced4db
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/resizer.js
@@ -0,0 +1,61 @@
+angular.module('mc.resizer', []).directive('resizer', function($document) {
+
+ return function($scope, $element, $attrs) {
+
+ $element.on('mousedown', function(event) {
+ event.preventDefault();
+
+ $document.on('mousemove', mousemove);
+ $document.on('mouseup', mouseup);
+ });
+
+ function mousemove(event) {
+
+ if ($attrs.resizer == 'vertical') {
+ // Handle vertical resizer
+ var x = event.pageX;
+
+ if ($attrs.resizerMax && x > $attrs.resizerMax) {
+ x = parseInt($attrs.resizerMax);
+ }
+
+ $element.css({
+ left: x + 'px'
+ });
+
+ $($attrs.resizerLeft).css({
+ width: x + 'px'
+ });
+ $($attrs.resizerRight).css({
+ left: (x + parseInt($attrs.resizerWidth)) + 'px'
+ });
+
+ } else {
+ var innerHeight = window.innerHeight;
+ var y = innerHeight - event.pageY;
+
+ console.log(window.innerHeight);
+ if(y < innerHeight - 200 && y > 50) {
+
+ // Handle horizontal resizer
+
+ $element.css({
+ bottom: y + 'px'
+ });
+
+ $($attrs.resizerTop).css({
+ bottom: (y + parseInt($attrs.resizerHeight)) + 'px'
+ });
+ $($attrs.resizerBottom).css({
+ height: y + 'px'
+ });
+ }
+ }
+ }
+
+ function mouseup() {
+ $document.unbind('mousemove', mousemove);
+ $document.unbind('mouseup', mouseup);
+ }
+ };
+}); \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
new file mode 100644
index 0000000000..6d6f68b7d3
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
@@ -0,0 +1,933 @@
+app.controller('userController', [
+ '$scope',
+ '$modal',
+ '$rootScope',
+ '$cookieStore',
+ 'Program',
+ 'Set',
+ 'Item',
+ 'Annotation',
+ 'SetSearch',
+
+ function($scope, $modal, $rootScope, $cookieStore, Program, Set, Item, Annotation, SetSearch) {
+ $scope.unselectingItem = false;
+ $scope.editItems = false;
+ $scope.selectedItems = [];
+ $scope.programSelection = null;
+ $scope.setSelection = null;
+ $scope.lastFocused = null;
+ $scope.isMulitEditRequest = false;
+ $scope.loading = false;
+ $scope.isSearchView = false;
+
+ $scope.getDispoType = function() {
+ if($rootScope.type == 'codeCoverage') {
+ $scope.annotationHeaders = {
+ 'locationRefs': 'Code Line',
+ 'resolutionType': 'Disposition Type',
+ 'resolution': 'Resolution'}
+ } else if($rootScope.type == 'testScript') {
+ $scope.annotationHeaders = {
+ 'locationRefs': 'Test Point(s)',
+ 'resolutionType': 'PCR Type',
+ 'resolution': 'PCR'}
+ }
+ };
+
+ // if this is a search result view, populate program, set and items from parent scope
+ if(window.opener != null) {
+ $scope.programs = window.opener.$windowScope.programs;
+ $scope.sets = window.opener.$windowScope.sets;
+ $scope.programSelection = window.opener.$windowScope.programSelection;
+ $scope.setSelection = window.opener.$windowScope.setSelection;
+ $scope.items = window.opener.$windowScope.searchData;
+
+ $scope.isSearchView = true;
+ $scope.searchValue = window.opener.$windowScope.searchValue;
+
+ $scope.dispoType = window.opener.$windowScope.dispoType;
+ } else {
+ // Get programs from server
+ Program.query(function(data) {
+ $scope.programs = data;
+ });
+ $scope.getDispoType();
+ }
+
+ $scope.isDefaultResolution = function isDefaultResolution(annotation) {
+ var resolutionType = annotation.resolutionType;
+ return resolutionType == 'Test_Script' || resolutionType == 'Exception_Handling';
+ }
+
+ $scope.updateProgram = function updateProgram() {
+ var loadingModal = $scope.showLoadingModal();
+ $scope.items = {};
+ $scope.sets = {};
+ Set.query({
+ programId: $scope.programSelection,
+ type: $rootScope.type
+ }, function(data) {
+ loadingModal.close();
+ $scope.sets = data;
+ });
+ };
+
+ $scope.updateSet = function updateSet() {
+ var loadingModal = $scope.showLoadingModal();
+ $scope.items = {};
+
+ if($scope.isSearchView) {
+ $scope.doAdvSearch($scope.searchValue, loadingModal);
+ } else {
+ Item.query({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection
+ }, function(data) {
+ loadingModal.close();
+ $scope.items = data;
+ }, function(data) {
+ loadingModal.close();
+ alert("Ooops...Something went wrong");
+ });
+ }
+ };
+
+ $scope.getItemDetails = function getItemDetails(item, row) {
+ $scope.unselectingItem = true;
+ $scope.gridOptions.selectAll(false);
+ $scope.unselectingItem = false;
+ $scope.selectedItem = item;
+ Annotation.query({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: item.guid
+ }, function(data) {
+ $scope.annotations = data;
+ var blankAnnotation = new Annotation();
+ $scope.annotations.push(blankAnnotation);
+
+ $scope.gridOptions.selectRow(row.rowIndex, true);
+ });
+
+
+ };
+
+ $scope.$on('ngGridEventStartCellEdit', function(data) {
+ var field = data.targetScope.col.field;
+ $scope.cachedValue = data.targetScope.row.getProperty(field);
+ });
+
+ $scope.$on('ngGridEventEndCellEdit', function(data) {
+ var field = data.targetScope.col.field;
+ var newValue = data.targetScope.row.getProperty(field);
+
+ if ($scope.cachedValue != newValue) {
+ var object = data.targetScope.row.entity;
+ $scope.editItem(data.targetScope.row.entity);
+ }
+ });
+
+ $scope.saveLastFocused = function saveLastFocused(element) {
+ $scope.lastFocused = element;
+ }
+
+ $scope.toggleEditItems = function toggleEditItems() {
+ var size = $scope.selectedItems.length;
+ $scope.gridOptions.selectAll(false);
+
+ // Why do this last? Good question, checkSeletable gets called by selectAll and needs editItems to be true so ng-grid can properly unselect the selected items withouth breaking it's 'watch' function
+ $scope.editItems = !$scope.editItems;
+ $scope.annotations.length = 0;
+ }
+
+ // Need this so that user clicks on grid rows doesn't automatically change the selected/highlighted row
+ var checkSelectable = function checkSelectable(data) {
+ if($scope.editItems || $scope.unselectingItem){
+ return true;
+ } else {
+ return false;
+ }
+ };
+
+ $scope.$on('ngGridEventStartCellEdit', function (event) {
+ $scope.previousCellData = event.targetScope.row.entity[event.targetScope.col.field];
+ });
+
+ $scope.$on('ngGridEventEndCellEdit', function (event) {
+ cellData = event.targetScope.row.entity[event.targetScope.col.field];
+ if(cellData != $scope.previousCellData) {
+ }
+ });
+
+ var dateSorting = function (itemA, itemB) {
+ var DateA = new Date(itemA);
+ var DateB = new Date(itemB);
+
+ if (DateA < DateB) {
+ return -1;
+ } else if (DateB < DateA) {
+ return 1;
+ } else {
+ return 0;
+ }
+ };
+
+ var checkboxSorting = function checkboxSorting(itemA, itemB) {
+ if(itemA == itemB) {
+ return 0;
+ } else if (itemA) {
+ return -1;
+ } else if (itemB) {
+ return 1;
+ }
+ };
+
+ $scope.checkEditable = function checkEditable(item) {
+ return item.assignee != $rootScope.cachedName;
+ }
+
+ var origCellTmpl = '<div ng-dblclick="getItemDetails(row.entity, row)">{{row.entity.name}}</div>';
+ var editCellTmpl = '<input ng-model="row.getProperty(col.field)" ng-model-onblur ng-change="editItem(row.entity);" value="row.getProperty(col.field);></input>';
+ var cellEditNotes = '<input class="cellInput" ng-model="COL_FIELD" ng-disabled="checkEditable(row.entity);" ng-model-onblur ng-change="editNotes(row.entity)"/>'
+ var chkBoxTemplate = '<input type="checkbox" class="form-control" ng-model="COL_FIELD" ng-change="editNeedsRerun(row.entity)"></input>';
+ var assigneeCellTmpl = '<div ng-dblclick="stealItem(row.entity)">{{row.entity.assignee}}</div>';
+ var dateCellTmpl = '<div>getReadableDate({{row.getProperty(col.field)}})</div>';
+
+
+ $scope.smallColumns = [{
+ field: 'name',
+ displayName: 'Name',
+ cellTemplate: origCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'status',
+ displayName: 'Status',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'totalPoints',
+ displayName: 'Total',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'failureCount',
+ displayName: 'Failure Count',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'discrepanciesAsRanges',
+ displayName: 'Failed Points',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'assignee',
+ displayName: 'Assignee',
+ enableCellEdit: false,
+ cellTemplate: assigneeCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'itemNotes',
+ displayName: 'Script Notes',
+ cellTemplate: cellEditNotes,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'needsRerun',
+ displayName: 'Rerun?',
+ enableCellEdit: false,
+ cellTemplate: chkBoxTemplate,
+ sortFn: checkboxSorting
+ },{
+ field: 'lastUpdated',
+ displayName: 'Last Ran',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ }, {
+ field: 'category',
+ displayName: 'Category',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'machine',
+ displayName: 'Station',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'elapsedTime',
+ displayName: 'Elapsed Time',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'creationDate',
+ displayName: 'Creation Date',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ },{
+ field: 'aborted',
+ displayName: 'Aborted',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'version',
+ displayName: 'Version',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }];
+
+ $scope.wideColumns = [{
+ field: 'name',
+ displayName: 'Name',
+ width: 350,
+ cellTemplate: origCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'status',
+ displayName: 'Status',
+ width: 100,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'totalPoints',
+ displayName: 'Total',
+ width: 100,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'failureCount',
+ displayName: 'Failure Count',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'discrepanciesAsRanges',
+ displayName: 'Failed Points',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'assignee',
+ displayName: 'Assignee',
+ enableCellEdit: false,
+ cellTemplate: assigneeCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'itemNotes',
+ displayName: 'Script Notes',
+ cellTemplate: cellEditNotes,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'needsRerun',
+ displayName: 'Rerun?',
+ enableCellEdit: false,
+ cellTemplate: chkBoxTemplate,
+ sortFn: checkboxSorting,
+ width: 70
+ },{
+ field: 'lastUpdated',
+ displayName: 'Last Ran',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ }, {
+ field: 'category',
+ displayName: 'Category',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'machine',
+ displayName: 'Station',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'elapsedTime',
+ displayName: 'Elapsed Time',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'creationDate',
+ displayName: 'Creation Date',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ },{
+ field: 'aborted',
+ displayName: 'Aborted',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'version',
+ displayName: 'Version',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }];
+
+ if(window.innerWidth < 1000) {
+ $scope.columns = $scope.smallColumns;
+ } else {
+ $scope.columns = $scope.wideColumns;
+ }
+
+
+ var filterBarPlugin = {
+ init: function(scope, grid) {
+ filterBarPlugin.scope = scope;
+ filterBarPlugin.grid = grid;
+ $scope.$watch(function() {
+ var searchQuery = "";
+ angular.forEach(filterBarPlugin.scope.columns, function(col) {
+ if (col.visible && col.filterText) {
+ var filterText = (col.filterText.indexOf('*') == 0 ? col.filterText.replace('*', '') : "^" + col.filterText) + ";";
+ searchQuery += col.displayName + ": " + filterText;
+ }
+ });
+ return searchQuery;
+ }, function(searchQuery) {
+ filterBarPlugin.scope.$parent.filterText = searchQuery;
+ filterBarPlugin.grid.searchProvider.evalFilter();
+ });
+ },
+ scope: undefined,
+ grid: undefined,
+ };
+
+ $scope.gridOptions = {
+ data: 'items',
+ enableHighlighting: true,
+ enableColumnResize: true,
+ enableRowReordering: true,
+ multiSelect: true,
+ showColumnMenu: true,
+ selectedItems: $scope.selectedItems,
+ beforeSelectionChange: checkSelectable,
+ showGroupPanel: true,
+ showFilter: true,
+ noTabInterference: true,
+ tabIndex: 0,
+ columnDefs: 'columns',
+ plugins: [filterBarPlugin],
+ headerRowHeight: 60 // give room for filter bar
+ };
+
+ $scope.stealItem = function(item) {
+ Item.get({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: item.guid
+ }, function(data) {
+ $scope.updateItemFromServer(item, data);
+ $scope.askToSteal(item);
+ });
+ }
+
+ $scope.askToSteal = function askToSteal(item) {
+ if ($rootScope.cachedName != null) {
+ if ($rootScope.cachedName != item.assignee) {
+ var confirmed = false;
+ if(item.assignee.toUpperCase() == 'UNASSIGNED'){
+ confirmed = true;
+ } else {
+ confirmed = window.confirm("Are you sure you want to steal this Item from " + item.assignee);
+ }
+ if (confirmed) {
+ item.assignee = $rootScope.cachedName;
+ $scope.editItem(item);
+ }
+ }
+ }
+ }
+
+
+ $scope.testResolutionTypes = [{
+ text: "Code",
+ value: "CODE"
+ }, {
+ text: "Test",
+ value: "TEST"
+ }, {
+ text: "Requirement",
+ value: "REQUIREMENT"
+ }, {
+ text: "Other",
+ value: "OTHER"
+ }, {
+ text: "Undetermined",
+ value: "UNDETERMINED"
+ }];
+
+ $scope.coverageResolutionTypes = [{
+ text: "Test Script",
+ value: "Test_Script",
+ isDefault: true
+ }, {
+ text: "Exception_Handling",
+ value: "Exception_Handling",
+ isDefault: true
+ }, {
+ text: "Other",
+ value: "other",
+ isDefault: false
+ }, {
+ text: "Undetermined",
+ value: "UNDETERMINED",
+ isDefault: false
+ }];
+
+
+ $scope.searchAnnotations = function() {
+ Item.get({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: $scope.selectedItem.guid,
+ keyword: "text"
+ })
+ }
+
+ $scope.getResolutionTypes = function getResolutionTypes() {
+ if($scope.dispoType == 'codeCoverage') {
+ return $scope.coverageResolutionTypes;
+ } else {
+ return $scope.testResolutionTypes;
+ }
+ }
+
+ $scope.deleteAnnotation = function deleteAnnotation(annotation) {
+ Annotation.delete({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: $scope.selectedItem.guid,
+ annotationId: annotation.guid,
+ userName: $rootScope.cachedName,
+ }, function() {
+ var index = $scope.annotations.indexOf(annotation);
+ if (index > -1) {
+ $scope.annotations.splice(index, 1);
+ }
+ Item.get({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: $scope.selectedItem.guid
+ }, function(data) {
+ $scope.updateItemFromServer($scope.selectedItem, data);
+ });
+ }, function(data) {
+ alert("Could not make change, please try refreshing");
+ });
+
+ }
+
+ $scope.editItem = function editItem(item) {
+ $scope.editItem(item, null);
+ }
+
+ $scope.editNotes = function (item) {
+ $scope.editItem(item, 'itemNotes');
+ }
+
+ $scope.editNeedsRerun = function (item) {
+ $scope.editItem(item, 'needsRerun');
+ }
+
+ $scope.editItem = function editItem(item, field) {
+ var newItem = new Item;
+ if(field == null) {
+ newItem = item;
+ } else if(field == 'itemNotes') {
+ newItem.itemNotes = item.itemNotes;
+ } else if(field == 'needsRerun') {
+ newItem.needsRerun = item.needsRerun;
+ }
+
+ Item.update({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: item.guid,
+ }, newItem, function() {
+ if($scope.isMulitEditRequest) {
+ $scope.gridOptions.selectAll(false);
+ $scope.isMulitEditRequest=false;
+ }
+ }, function(data) {
+ alert("Could not make change, please try refreshing");
+ });
+
+ }
+
+ $scope.getInvalidLocRefs = function getInvalidLocRefs(annotation) {
+ if(annotation.isConnected != null) {
+ return !annotation.isConnected && annotation.locationRefs != null;
+ } else {
+ return false;
+ }
+ }
+
+ $scope.getInvalidRes = function getInvalidRes(annotation) {
+ return annotation.resolution != null && annotation.resolution != "" && !annotation.isResolutionValid;
+ }
+
+ $scope.editAnnotation = function editAnnotation(annotation) {
+ $scope.lastFocused;
+ if (annotation.guid == null) {
+ if(/[^\s]+/.test(annotation.locationRefs)) {
+ $scope.createAnnotation(annotation);
+ }
+ } else {
+ Annotation.update({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: $scope.selectedItem.guid,
+ annotationId: annotation.guid,
+ userName: $rootScope.cachedName,
+ }, annotation, function(annot) {
+ // get latest Annotation version from Server
+ Annotation.get({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: $scope.selectedItem.guid,
+ annotationId: annotation.guid
+ }, function(data) {
+ annotation.isConnected = data.isConnected;
+ annotation.isResolutionValid = data.isResolutionValid;
+ });
+
+ // Get new latest Item version from server
+ Item.get({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: $scope.selectedItem.guid
+ }, function(data) {
+ $scope.updateItemFromServer($scope.selectedItem, data);
+ });
+ }, function(data) {
+ alert("Could not make change, please try refreshing");
+ });
+ }
+ }
+
+ $scope.createAnnotation = function createAnnotation(annotation) {
+ annotation.$save({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: $scope.selectedItem.guid,
+ userName: $rootScope.cachedName,
+ }, function() {
+ var nextFocused = $scope.lastFocused.$$prevSibling;
+ nextFocused.focus;
+ nextFocused.focusMe;
+
+ Item.get({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: $scope.selectedItem.guid
+ }, function(data) {
+ $scope.updateItemFromServer($scope.selectedItem, data);
+ });
+
+ var blankAnnotation = new Annotation();
+ $scope.annotations.push(blankAnnotation);
+ }, function(data) {
+ alert("Could not make change, please try refreshing");
+ });
+ }
+
+ $scope.expandAnnotations = function expandAnnotations(item) {
+ $scope.selectedItem = item;
+ if (item.annotations == null) {
+ Annotation.query({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: item.guid
+ }, function(data) {
+ item.annotations = data;
+
+ var blankAnnotation = new Annotation;
+ item.annotations.push(blankAnnotation);
+ item.showDetails = (data.length > 0);
+ });
+ } else if (!item.showDetails) {
+ item.showDetails = (item.annotations.length > 0);
+ } else {
+ item.showDetails = false;
+ }
+ };
+
+ $scope.toggleDetails = function toggleDetails(annotation) {
+ if (annotation.showDeets == null) {
+ annotation.showDeets = true;
+ } else if (annotation.showDeets) {
+ annotation.showDeets = false;
+ } else {
+ annotation.showDeets = true;
+ }
+ }
+
+ $scope.updateItemFromServer = function(oldItem, newItem) {
+ oldItem.assignee = newItem.assignee;
+ oldItem.scriptNotes = newItem.scriptNotes;
+ oldItem.status = newItem.status;
+ }
+
+ $scope.doAdvSearch = function(value, loadingModal) {
+ SetSearch.query({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ value: value,
+ }, function(data) {
+ if($scope.isSearchView) {
+ $scope.items = data;
+ if(loadingModal != null) {
+ loadingModal.close();
+ }
+ } else {
+ $scope.searchData = data;
+ window.$windowScope = $scope;
+ $scope.searchValue = value;
+ window.open("/dispo/main.html#/search");
+ }
+ }, function(data) {
+ if($scope.isSearchView) {
+ $scope.items = $scope.emptyItems;
+ } else {
+ $scope.searchData = $scope.emptyItems;
+ window.$windowScope = $scope;
+ window.open("/dispo/main.html#/search");
+ }
+ if(loadingModal != null) {
+ loadingModal.close();
+ }
+ });
+ }
+
+ $scope.emptyItems = [{"name": "NONE FOUND"}]
+
+
+ // MODALS -------------------------------------------------------------------------------------------------
+ $scope.showAssigneeModal = function() {
+ $scope.isMulitEditRequest = true;
+ var modalInstance = $modal.open({
+ templateUrl: 'assigneeModal.html',
+ controller: AssigneeModalCtrl,
+ size: 'sm',
+ windowClass: 'assigneeModal'
+ });
+
+ modalInstance.result.then(function(inputs) {
+ var size = $scope.selectedItems.length;
+ for(var i = 0; i < size; i++) {
+ if($scope.selectedItems[i].assignee != inputs.multiAssignee){
+ $scope.selectedItems[i].assignee = inputs.multiAssignee;
+ $scope.editItem($scope.selectedItems[i]);
+ }
+ }
+ });
+ }
+
+ var AssigneeModalCtrl = function($scope, $modalInstance) {
+ $scope.multiAssignee = "";
+
+ $scope.ok = function() {
+ var inputs = {};
+ inputs.multiAssignee = this.multiAssignee;
+ $modalInstance.close(inputs);
+ };
+
+ $scope.cancel = function() {
+ $modalInstance.dismiss('cancel');
+ };
+ };
+
+ // Category Modal
+ $scope.showCategoryModal = function() {
+ $scope.isMulitEditRequest = true;
+ var modalInstance = $modal.open({
+ templateUrl: 'categoryModal.html',
+ controller: CategoryModalCtrl,
+ size: 'sm',
+ windowClass: 'categoryModal'
+ });
+
+ modalInstance.result.then(function(inputs) {
+ var size = $scope.selectedItems.length;
+ for(var i = 0; i < size; i++) {
+ if($scope.selectedItems[i].category != inputs.category){
+ $scope.selectedItems[i].category = inputs.category;
+ $scope.editItem($scope.selectedItems[i]);
+ }
+ }
+ });
+ }
+
+ var CategoryModalCtrl = function($scope, $modalInstance) {
+ $scope.multiCategory = "";
+
+ $scope.ok = function() {
+ var inputs = {};
+ inputs.category = this.multiCategory;
+ $modalInstance.close(inputs);
+ };
+
+ $scope.cancel = function() {
+ $modalInstance.dismiss('cancel');
+ };
+ };
+
+ // Needs Rerun Modal
+ $scope.showNeedsRerunModal = function() {
+ $scope.isMulitEditRequest = true;
+ var modalInstance = $modal.open({
+ templateUrl: 'needsRerunModal.html',
+ controller: NeedsRerunModalCtrl,
+ size: 'sm',
+ windowClass: 'needsRerunModal'
+ });
+
+ modalInstance.result.then(function(inputs) {
+ var size = $scope.selectedItems.length;
+ for(var i = 0; i < size; i++) {
+ if($scope.selectedItems[i].needsRerun != inputs.needsRerun) {
+ $scope.selectedItems[i].needsRerun = inputs.needsRerun;
+ $scope.editItem($scope.selectedItems[i]);
+ }
+ }
+ });
+ }
+
+ var NeedsRerunModalCtrl = function($scope, $modalInstance) {
+ $scope.ok = function() {
+ var inputs = {};
+ if(this.formData == undefined) {
+ inputs.needsRerun = true;
+ } else {
+ inputs.needsRerun = this.formData.multiNeedsRerun;
+ }
+ $modalInstance.close(inputs);
+ };
+
+ $scope.cancel = function() {
+ $modalInstance.dismiss('cancel');
+ };
+ };
+
+
+
+ // Advanced Serach Modal
+ $scope.showAdvSearchModal = function() {
+ var modalInstance = $modal.open({
+ templateUrl: 'advSearchModal.html',
+ controller: AdvSearchModalCtrl,
+ size: 'md',
+ windowClass: 'advSearch',
+ resolve: {
+ value: function() {
+ return $scope.searchValue;
+ }
+ }
+ });
+
+ modalInstance.result.then(function(inputs) {
+ var loadingModal = null;
+ if($scope.isSearchView) {
+ $scope.searchValue = inputs.value;
+ loadingModal = $scope.showLoadingModal();
+ }
+ $scope.doAdvSearch(inputs.value, loadingModal)
+ });
+ }
+
+ var AdvSearchModalCtrl = function($scope, $modalInstance, value) {
+ $scope.searchValue = value;
+ $scope.ok = function() {
+ var inputs = {};
+ inputs.value = this.searchValue;
+ $modalInstance.close(inputs);
+ };
+
+ $scope.cancel = function() {
+ $modalInstance.dismiss('cancel');
+ };
+ };
+
+ // Loading Modal
+ $scope.showLoadingModal = function() {
+ var modalInstance = $modal.open({
+ templateUrl: 'loadingModal.html',
+ size: 'sm',
+ windowClass: 'needsRerunModal',
+ backdrop: 'static'
+ });
+
+ return modalInstance;
+ }
+
+
+ }
+]);
+
+//http://stackoverflow.com/questions/11868393/angularjs-inputtext-ngchange-fires-while-the-value-is-changing
+app.directive('ngModelOnblur', function() {
+ return {
+ restrict: 'A',
+ require: 'ngModel',
+ priority: 1, // needed for angular 1.2.x
+ link: function(scope, elm, attr, ngModelCtrl) {
+ if (attr.type === 'radio' || attr.type === 'checkbox') return;
+
+ elm.unbind('input').unbind('keydown').unbind('change');
+ elm.bind('blur', function() {
+ scope.$apply(function() {
+ ngModelCtrl.$setViewValue(elm.val());
+ });
+ });
+ }
+ };
+});
+
+// http://stackoverflow.com/questions/18398472/disabled-text-box-accessible-using-tab-key
+app.directive('focusMe', function($timeout) {
+ return {
+ scope: { trigger: '=focusMe' },
+ link: function(scope, element) {
+ scope.$watch('trigger', function(value) {
+ if(value === true) {
+ element[0].focus();
+ }
+ });
+ }
+ };
+ });
+
+//http://stackoverflow.com/questions/16202254/ng-options-with-disabled-rows
+app.directive('optionsDisabled', function($parse) {
+ var disableOptions = function(scope, attr, element, data, fnDisableIfTrue) {
+ // refresh the disabled options in the select element.
+ $("option[value!='?']", element).each(function(i, e) {
+ var locals = {};
+ locals[attr] = data[i];
+ $(this).attr("disabled", fnDisableIfTrue(scope, locals));
+ });
+ };
+ return {
+ priority: 0,
+ require: 'ngModel',
+ link: function(scope, iElement, iAttrs, ctrl) {
+ // parse expression and build array of disabled options
+ var expElements = iAttrs.optionsDisabled.match(/^\s*(.+)\s+for\s+(.+)\s+in\s+(.+)?\s*/);
+ var attrToWatch = expElements[3];
+ var fnDisableIfTrue = $parse(expElements[1]);
+ scope.$watch(attrToWatch, function(newValue, oldValue) {
+ if(newValue)
+ disableOptions(scope, expElements[2], iElement, newValue, fnDisableIfTrue);
+ }, true);
+ // handle model updates properly
+ scope.$watch(iAttrs.ngModel, function(newValue, oldValue) {
+ var disOptions = $parse(attrToWatch)(scope);
+ if(newValue)
+ disableOptions(scope, expElements[2], iElement, disOptions, fnDisableIfTrue);
+ });
+ }
+ };
+});
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/ui/index.html b/plugins/org.eclipse.osee.web.ui/src/dispo/ui/index.html
new file mode 100644
index 0000000000..0cd66c8675
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/ui/index.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <base href="/dispo/ui/index.html">
+ <meta charset="UTF-8">
+ </meta>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ </meta>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ </meta>
+ <link rel="stylesheet" href="/ajax/libs/bootstrap/3.3.2/css/bootstrap.min.css">
+ </link>
+ <link rel="stylesheet" href="/ajax/libs/ng-grid/2.0.11/ng-grid.min.css">
+ </link>
+ <link rel="stylesheet" href="../css/user.css">
+ </link>
+ <link rel="stylesheet" href="../css/admin.css">
+ </link>
+ <script src="/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
+ <script src="/ajax/libs/angularjs/1.3.11/angular.js"></script>
+ <script src="/ajax/libs/angularjs/1.3.11/angular-route.min.js"></script>
+ <script src="/ajax/libs/angularjs/1.3.11/angular-resource.min.js"></script>
+ <script src="/ajax/libs/angularjs/1.3.11/angular-cookies.js"></script>
+ <script src="/ajax/libs/ng-grid/2.0.11/ng-grid.min.js"></script>
+ <script src="/ajax/libs/bootstrap/3.3.2/js/bootstrap.min.js"></script>
+ <script src="/ajax/libs/ui-bootstrap/0.12.0/ui-bootstrap-tpls-0.12.0.min.js"></script>
+ <script src="/ajax/libs/ngStorage/0.3.0/ngStorage.min.js"></script>
+ <script src="/ajax/libs/oauth-ng/0.3.8/oauth-ng.js"></script>
+ <script src="/libs/js/oseeAuth/oseeAuth.js"></script>
+ <script src="/libs/js/support/linkRewrite.js"></script>
+ <script src="/dispo/js/resizer.js"></script>
+ <script src="/dispo/js/dispoApp.js"></script>
+ <script src="/dispo/js/userController.js"></script>
+ <script src="/dispo/js/adminController.js"></script>
+ <script src="/dispo/js/mainController.js"></script>
+ <script>
+ app.controller("indexController", [
+ "$scope",
+ function($scope) {
+ $scope.links = [ { ref: '', name: 'Home'}, { ref: 'user', name: 'User'}, { ref: 'admin', name: 'Admin'}];
+ $rootScope.type = "testScripts";
+ }]);
+
+ </script>
+ <link rel="icon" type="image/x-icon" href="images/osee.ico" />
+ <link rel="shortcut icon" type="image/x-icon" href="/libs/images/osee.ico" />
+ <title>Disposition</title>
+ </head>
+ <body ng-app="dispoApp">
+ <div ng-controller="indexController">
+ <osee
+ redirect-uri="../dispo/ui/index.html"
+ links="links">
+ </osee>
+ </div>
+ <div ng-view></div>
+ </body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html b/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html
new file mode 100644
index 0000000000..cc0115743c
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html
@@ -0,0 +1,100 @@
+<!doctype html>
+<html>
+<body>
+ <div class="container-fluid" id="content">
+ <div class="row">
+ <div class="col-md-3 col-md-offset-1">
+ <div class="row">
+ <h5>Select ATS Version</h5>
+ <select class="form-control" ng-model="programSelection" ng-change="updateProgram()" ng-options="obj.value as obj.text for obj in programs"></select>
+ </div>
+ <div class="row" id=reportRow>
+ <div ng-show="sets.length > 0" class="col-sm-10 col-sm-offset-2" id=reportContainer>
+ <h3>STRS Report</h3>
+ <h5>Select Primary Set (Demo Set)</h5>
+ <select class="form-control" ng-model="primarySet" ng-options="obj.guid as obj.name for obj in sets"></select>
+ <h5>Select Secondary Set (Dryrun Set)</h5>
+ <select class="form-control" ng-model="secondarySet" ng-options="obj.guid as obj.name for obj in sets"></select>
+ <button ng-click="generateReport()" class="btn btn-primary active" id=generateReportBtn>Generate Report</button>
+ </div>
+ </div>
+
+ <div class="row" id=setCopyRow>
+ <div class="col-sm-10 col-sm-offset-2" id=setCopyContainer>
+ <button ng-click="openCopySetModal()" ng-show="sets.length > 0" class="btn btn-primary active" id=generateReportBtn>Merge Annotations</button>
+ </div>
+ </div>
+
+ </div>
+ <div class="col-md-6 col-md-offset-1">
+ <div class="row">
+ <button ng-disabled="programSelection == null" ng-click="createNewSetModal()" class="btn pull-left">New</button>
+ <button ng-disabled="programSelection == null" ng-click="toggleReadOnly()" class="btn pull-right">Edit</button>
+ </div>
+ <div class="row">
+ <div style="height: 600px;" class="gridStyle" ng-grid="gridOptions"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- definitions for modal forms -->
+ <script type="text/ng-template" id="popup.html">
+ <div class="modal-header">
+ <h3 class="modal-title">Create Set</h3>
+ </div>
+ <div class="modal-body" style="height: 300px; overflow: auto;">
+ <div class="form-group">
+ <label for="setNameInput">Set Name</label>
+ <input ng-model="setName" class="form-control" name="setName" placeholder="Enter Set Name" required>
+ </div>
+ <div class="form-group">
+ <label for="setPathInput">Path</label>
+ <input ng-model="importPath" class="form-control" name="setPath" placeholder="Enter Import Path" required>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-click="ok()">OK</button>
+ <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
+ </div>
+
+ </script>
+
+
+ <script type="text/ng-template" id="copySets.html">
+ <div class="modal-header">
+ <h3 class="modal-title">Copy Annotations</h3>
+ </div>
+ <div class="modal-body" overflow: auto;">
+ <div class="form-group">
+ Select Destination Set
+ <select class="form-control" ng-model="destinationSet" ng-options="obj.guid as obj.name for obj in setsLocal">
+ </select>
+ </div>
+ <div class="form-group">
+ Select Source Set
+ <select class="form-control" ng-model="sourceSet" ng-options="obj.guid as obj.name for obj in setsLocal">
+ </select>
+ </div>
+
+ <div class="form-inline">
+ <h5>Copy Dispositions</h5>
+ <select class="form-control" ng-model="annotationParam" ng-options="obj.value as obj.text for obj in annotationOptions"></select>
+ <h5>Copy Categories</h5>
+ <select class="form-control" ng-model="categoryParam" ng-options="obj.value as obj.text for obj in categoryOptions"></select>
+ <h5>Copy Assignees</h5>
+ <select class="form-control" ng-model="assigneeParam" ng-options="obj.value as obj.text for obj in assigneeOptions"></select>
+ <h5>Copy Item Notes</h5>
+ <select class="form-control" ng-model="noteParam" ng-options="obj.value as obj.text for obj in noteOptions"></select>
+ </div>
+
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-click="ok()">OK</button>
+ <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
+ </div>
+
+ </script>
+
+</body>
+
+</html>
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/views/main.html b/plugins/org.eclipse.osee.web.ui/src/dispo/views/main.html
new file mode 100644
index 0000000000..307d653c20
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/main.html
@@ -0,0 +1,3 @@
+<div>
+ Welcome To Dispo
+</div> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/views/nameFilterTmpl.html b/plugins/org.eclipse.osee.web.ui/src/dispo/views/nameFilterTmpl.html
new file mode 100644
index 0000000000..8c6c4a8e66
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/nameFilterTmpl.html
@@ -0,0 +1,12 @@
+<div class="ngHeaderSortColumn {{col.headerClass}}" ng-style="{'cursor': col.cursor}" ng-class="{ 'ngSorted': !noSortVisible }">
+ <div ng-click="col.sort($event)"ng-class="'colt' + col.index" class="ngHeaderText">{{col.displayName}}</div>
+ <div class="ngSortButtonDown" ng-show="col.showSortButtonDown()"></div>
+ <div class="ngSortButtonUp" ng-show="col.showSortButtonUp()"></div>
+ <div class="ngSortPriority">{{col.sortPriority}}</div>
+ <div ng-class="{ ngPinnedIcon: col.pinned, ngUnPinnedIcon: !col.pinned }" ng-click="togglePin(col)" ng-show="col.pinnable"></div>
+</div>
+
+<input type="text" ng-click="stopClickProp($event)" placeholder="Filter..." ng-model="col.filterText" style="position: absolute; width: 100%; top: 30px; bottom: 30px; left: 0; bottom:0;"/>
+<div ng-show="col.resizable" class="ngHeaderGrip" ng-click="col.gripClick($event)" ng-mousedown="col.gripOnMouseDown($event)"></div>
+
+
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html b/plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html
new file mode 100644
index 0000000000..42becb6a9d
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html
@@ -0,0 +1,160 @@
+<!doctype html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>Dispo User</title>
+ </head>
+ <body>
+ <div class="container-fluid" id="content">
+ <div class="row">
+ <div id="refresh" class="col-md-1">
+ <button ng-show="items.length>0" class="btn btn-primary active" ng-click="updateSet()">Refresh</button>
+ </div>
+ <div class="col-md-2">
+ ATS Version:
+ <select class="form-control" ng-show="programs" ng-model="programSelection" ng-disabled="isSearchView" ng-change="updateProgram()" ng-options="obj.value as obj.text for obj in programs"></select>
+ </div>
+ <div class="col-md-2">
+ Set:
+ <select ng-show="programSelection != null" class="form-control" ng-show="sets" ng-disabled="isSearchView" ng-model="setSelection" ng-change="updateSet()" ng-options="obj.guid as obj.name for obj in sets">
+ </select>
+ </div>
+ <div id="multItemEditDiv" class="col-md-5">
+ <div ng-show="items.length>0" class="btn-group">
+ <button class="btn btn-primary active" ng-click="toggleEditItems()">Edit Multiple Items</button>
+ <button type="button" class="btn btn-default" ng-show="editItems" ng-disabled="selectedItems.length == 0" ng-click="showAssigneeModal()">Assignee</button>
+ <button type="button" class="btn btn-default" ng-show="editItems" ng-disabled="selectedItems.length == 0" ng-click="showCategoryModal()">Category</button>
+ <button type="button" class="btn btn-default" ng-show="editItems" ng-disabled="selectedItems.length == 0" ng-click="showNeedsRerunModal()">Needs Rerun</button>
+ </div>
+ </div>
+ <div id="search" class="col-md-1 col-md-offset-1">
+ <button class="btn btn-primary active" ng-show="items.length>0 && !isSearchView" ng-click="showAdvSearchModal()">Adv Search</button>
+ <button class="btn btn-primary active" ng-show="items.length>0 && isSearchView" ng-click="showAdvSearchModal()">Searching: {{ searchValue }}</button>
+ </div>
+ </div>
+ <div id="top-content" class="row">
+ <div style='height: 500px;' id="itemsGrid" class="gridStyle" ng-grid="gridOptions"></div>
+ </div>
+ </div>
+ <div id="bottom-content">
+ <div id="itemSelectedBar">
+ Item: {{ selectedItem.name || "Select an Item"}} Failures: {{ selectedItem.discrepanciesAsRanges || "N/A"}}
+ </div>
+ <div id="annotationsGrid">
+ <table class="table subTable">
+ <th>{{ annotationHeaders.locationRefs }}</th>
+ <th>{{ annotationHeaders.resolutionType }}</th>
+ <th>{{ annotationHeaders.resolution }}</th>
+ <th>Developer Notes</th>
+ <th>Customer Notes</th>
+ <th width="50px;">Delete</th>
+ <tr ng-repeat="annotation in annotations">
+ <td>
+ <textarea ng-class="{annotationInput: true, invalid: getInvalidLocRefs(annotation), details: annotation.showDeets}" ng-disabled="isDefaultResolution(annotation);" ng-model="annotation.locationRefs" type=text ng-model-onblur ng-change="editAnnotation(annotation); saveLastFocused(this);" ng-dblclick="toggleDetails(annotation)"></textarea>
+ </td>
+ <td>
+ <select ng-class="{annotationInput: true, details: annotation.showDeets}" focus-me="annotation.guid !=null" ng-options="obj.value as obj.text for obj in getResolutionTypes();" options-disabled="option.isDefault for option in getResolutionTypes();" ng-disabled="annotation.guid == null || isDefaultResolution(annotation);" ng-model="annotation.resolutionType" ng-change="editAnnotation(annotation)" ng-dblclick="toggleDetails(annotation)"></select>
+ </td>
+ <td>
+ <textarea ng-class="{annotationInput: true, invalid: getInvalidRes(annotation), details: annotation.showDeets}" ng-disabled="annotation.guid == null || isDefaultResolution(annotation);" ng-model="annotation.resolution" type=text ng-model-onblur ng-change="editAnnotation(annotation)" ng-dblclick="toggleDetails(annotation)"></textarea>
+ </td>
+ <td>
+ <textarea ng-class="{annotationInput: true, details: annotation.showDeets}" ng-disabled="annotation.guid == null" ng-model="annotation.developerNotes" type=text ng-model-onblur ng-change="editAnnotation(annotation)" ng-dblclick="toggleDetails(annotation)"></textarea>
+ </td>
+ <td>
+ <textarea ng-class="{annotationInput: true, details: annotation.showDeets}" ng-disabled="annotation.guid == null" ng-model="annotation.customerNotes" type=text ng-model-onblur ng-change="editAnnotation(annotation)" ng-dblclick="toggleDetails(annotation)"></textarea>
+ </td>
+ <td>
+ <button ng-class="{annotationDelete: true, details: annotation.showDeets}" ng-disabled="annotation.guid == null || isDefaultResolution(annotation);" ng-click="deleteAnnotation(annotation)">X</button>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="content-resizer" resizer="horizontal" resizer-height="6" resizer-top="#top-content" resizer-bottom="#bottom-content">
+ </div>
+ <!-- definitions for modal forms -->
+ <script type="text/ng-template" id="assigneeModal.html">
+ <div class="modal-header">
+ <h3 class="modal-title">Edit Assignees</h3>
+ </div>
+ <div class="modal-body" style="height: 300px; overflow: auto;">
+ <div class="form-group">
+ <label for="setAssignee">Assignee</label>
+ <input ng-model="multiAssignee" class="form-control" name="setMultiAssignee" placeholder="Enter Assignee" required>
+ </div>
+ </div>
+
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-click="ok()">OK</button>
+ <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
+ </div>
+
+ </script>
+ <script type="text/ng-template" id="categoryModal.html">
+ <div class="modal-header">
+ <h3 class="modal-title">Edit Category</h3>
+ </div>
+ <div class="modal-body" style="height: 300px; overflow: auto;">
+ <div class="form-group">
+ <label for="setCategory">Category</label>
+ <input ng-model="multiCategory" class="form-control" name="setMultiCategory" placeholder="Enter Category" required>
+ </div>
+ </div>
+
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-click="ok()">OK</button>
+ <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
+ </div>
+
+ </script>
+ <script type="text/ng-template" id="needsRerunModal.html">
+ <div class="modal-header">
+ <h3 class="modal-title">Edit Rerun Flag</h3>
+ </div>
+ <div class="modal-body" style="height: 300px; overflow: auto;">
+ <label>Needs Rerun?</label>
+ <div class="form-group">
+ <div class="radio">
+ <label>
+ <input ng-checked="true" type="radio" name="needsRerun" value="true" ng-model="formData.multiNeedsRerun">
+ TRUE
+ </label>
+ </div>
+ <div class="radio">
+ <label>
+ <input type="radio" name="needsRerun" value="false" ng-model="formData.multiNeedsRerun">
+ FALSE
+ </label>
+ </div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-click="ok()">OK</button>
+ <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="advSearchModal.html">
+ <div class="modal-header">
+ <h3 class="modal-title">Advanced Search</h3>
+ </div>
+ <div class="modal-body" style="height: 300px; overflow: auto;">
+ <label>Disposition Keyword</label>
+ <input ng-model="searchValue" class="form-control" name="setMultiCategory" placeholder="Enter Search Value" required>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-click="ok()">OK</button>
+ <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="loadingModal.html">
+ <div id="loadingModal" class="alert alert-info">
+ Loading...
+ </div>
+ </script>
+
+ </body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/oseeAuth.js b/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/oseeAuth.js
index 1d55327a26..7a2dd7c0a2 100644
--- a/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/oseeAuth.js
+++ b/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/oseeAuth.js
@@ -50,7 +50,22 @@ directives.directive('osee', [
};
return toReturn;
}
-
+
+ scope.isDisabled = function(link) {
+ if(link.roles) {
+ for(var i =0; i < link.roles.length; i++) {
+ var role = link.roles[i];
+ if(role == 'all' || $.inArray(role, scope.profile.roles) > 0) {
+ return false;
+ }
+ }
+ } else {
+ return false;
+ }
+
+ return true;
+ }
+
scope.isActive = function(viewLocation) {
var toCompare = "/" + viewLocation.ref;
return toCompare === $location.path();
@@ -126,10 +141,10 @@ directives.directive('osee', [
}
});
// END
-
+
scope.$on("oauth:authorized", function(event, token) {
Profile.find(scope.profileUri).success(function(response) {
- scope.profile = response
+ scope.profile = response;
});
if($localStorage.continueTo) {
// Change the state to the continueTo we caught when User first tried to get into page
@@ -138,8 +153,8 @@ directives.directive('osee', [
}
})
scope.$on("oauth:logout", function() {
- AccessToken.destroy();
scope.profile = scope.anonymousUser;
+ var fr = AccessToken.destroy();
$location.path("/");
})
scope.$on("oauth:denied", function(event, token) {
diff --git a/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/views/header.html b/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/views/header.html
index 3999daf5b4..65e0191160 100644
--- a/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/views/header.html
+++ b/plugins/org.eclipse.osee.web.ui/src/libs/js/oseeAuth/views/header.html
@@ -9,10 +9,10 @@
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
- <li ng-repeat="link in links" ng-class='getNgClass(link)'><a href='{{ link.ref }}'>{{ link.name }}</a></li>
+ <li ng-repeat="link in links" ng-hide='isDisabled(link)' ng-class='getNgClass(link)'><a href='{{ link.ref }}'>{{ link.name }}</a></li>
</ul>
<oauth class="ng-isolate-scope" site='{{ site }}'
- client-id="b48d7a3462f66a42718ce3c914a2519"
+ client-id="36fe99bb6c4158c041d6e6624f75460"
redirect-uri='{{ redirectUri }}'
scope="public"
template="/libs/js/oseeAuth/views/default.html"

Back to the top