Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2016-02-22 18:07:06 -0500
committerRyan D. Brooks2016-02-22 18:07:06 -0500
commit1b3547f2c6b93bcc981723bfa642feccbc6bf3f1 (patch)
treea50e596c8e77d3d0f6e6fb3924e390c5797cf59e /plugins/org.eclipse.osee.web.ui
parenta2d41db0488eef201f4a295f937e90afd67bbcfc (diff)
downloadorg.eclipse.osee-1b3547f2c6b93bcc981723bfa642feccbc6bf3f1.tar.gz
org.eclipse.osee-1b3547f2c6b93bcc981723bfa642feccbc6bf3f1.tar.xz
org.eclipse.osee-1b3547f2c6b93bcc981723bfa642feccbc6bf3f1.zip
feature[ATS253909]: Update Dispo Operation Report for better feedback
Diffstat (limited to 'plugins/org.eclipse.osee.web.ui')
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/css/admin.css53
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js108
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html20
3 files changed, 157 insertions, 24 deletions
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
index c6f8d2bae9..f9adb77e82 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/css/admin.css
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/css/admin.css
@@ -3,6 +3,17 @@
width: 200px;
}
+#summaryContainer {
+ margin-left: 5px;
+ margin-right: 5px;
+ overflow: auto;
+}
+
+#stateButton {
+ width: 99%;
+}
+
+
.createSetModal .modal-content {
width: 500px;
@@ -17,14 +28,50 @@ button.btn.btn-default.btn-sm.setDelete.ng-scope {
}
button.btn.btn-primary.ng-scope {
- width: 70px;
+ width: 99%;
+ height: 30px;
+}
+
+.ng-binding.ng-scope.btn.btn-primary {
+ width: 99%;
+}
+
+button.btn.btn-warning.ng-scope {
+ width: 99%;
+ height: 30px;
+}
+button.btn.btn-danger.ng-scope {
+ width: 99%;
+ height: 30px;
+}
+button.btn.btn-success.ng-scope {
+ width: 99%;
height: 30px;
}
#reportRow {
- margin-top: 100px;
+ margin-top: 40px;
}
#generateReportBtn {
margin-top:20px;
-} \ No newline at end of file
+}
+
+button#mergetAnnotationsBtn {
+ margin-top: 20px;
+ margin-bottom: 20px;
+}
+
+.nav, .pagination, .carousel, .panel-title a { cursor: pointer; }
+
+.ngHeaderSortColumn.ngSorted {
+ max-width: 100px;
+}
+
+.ngHeaderScroller {
+ max-width: 0px;
+}
+
+.state-btn {
+ 'btn btn-default';
+}
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
index 2e72cf0e15..3e99dae852 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
@@ -37,12 +37,18 @@
multiSelect: false,
columnDefs: 'columnDefs' // link to scope variable which we will define dynamically
}
+
+ var isPrimary = function(importState) {
+ return row.entity.importState != "Warnings" && row.entity.importState != "Failed";
+ }
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>';
-
+ var lastOperationCellTmpl = '<id="stateButton" button width="99%" ng-disabled="row.entity.processingImport || row.entity.gettingDetails" ng-class="{btn: true, \'btn-primary\': \'isPrimary(row.entity.importState)\',' +
+ '\'btn-warning\': row.entity.importState == \'Warnings\', \'btn-danger\': row.entity.importState == \'Failed\', \'btn-success\': row.entity.importState == \'OK\'}" ng-click="getSetImportDetails(row.entity)">{{row.entity.importState}}</button>';
+
$scope.columnDefs1 = [{
field: "",
displayName: "Import",
@@ -55,14 +61,19 @@
width: 70,
cellTemplate: exportCellTmpl
}, {
+ field: "",
+ displayName: "Last Operation",
+ width: 120,
+ cellTemplate: lastOperationCellTmpl
+ }, {
field: "name",
displayName: "Name",
- width: 200,
+ width: 140,
enableCellEdit: false
}, {
field: "importPath",
displayName: "Path",
- width: 460,
+ width: 432,
enableCellEdit: false
}];
@@ -78,14 +89,19 @@
width: 70,
cellTemplate: exportCellTmpl
},{
+ field: "",
+ displayName: "Last Operation",
+ width: 120,
+ cellTemplate: lastOperationCellTmpl
+ }, {
field: "name",
displayName: "Name",
- width: 200,
+ width: 140,
enableCellEdit: true
}, {
field: "importPath",
displayName: "Path",
- width: 413,
+ width: 375,
enableCellEdit: true
}, {
field: "delete",
@@ -155,10 +171,23 @@
window.open(url);
}
-
+ $scope.getSetImportDetails = function(set) {
+ set.gettingDetails = true;
+ Set.get({
+ programId: $scope.programSelection,
+ setId: set.guid
+ }, function(data) {
+ set.gettingDetails = false;
+ $scope.operationSummary = data.operationSummary;
+ set.importState = data.importState;
+ }, function(data) {
+ set.gettingDetails = false;
+ alert("Could not update Set from Server");
+ })
+ }
$scope.updateProgram = function updateProgram() {
- var loadingModal = $scope.showLoadingModal();
+ var loadingModal = $scope.showLoadingModal();
$scope.loading = true;
$scope.items = {};
Set.query({
@@ -192,7 +221,7 @@
});
}
-
+
$scope.importSet = function importSet(set) {
console.log(new Date().getTime());
@@ -203,15 +232,11 @@
programId: $scope.programSelection,
setId: set.guid
}, newSet, function(data){
- var reportUrl = data.operationStatus;
- window.open(reportUrl);
- console.log(data);
set.processingImport = false;
+ $scope.getSetImportDetails(set);
}, function() {
- console.log("Failed");
- console.log(new Date().getTime());
set.processingImport = false;
- alert("Could not Import");
+ $scope.getSetImportDetails(set);
});
};
@@ -268,6 +293,61 @@
});
}
+ // -------------------- Summary Grids ----------------------\\
+ 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.summaryGrid = {
+ data: 'operationSummary.entries',
+ enableHighlighting: true,
+ enableColumnResize: true,
+ enableRowReordering: true,
+ multiSelect: false,
+ headerRowHeight: 60, // give room for filter bar
+ plugins: [filterBarPlugin],
+ columnDefs: [{
+ field: "severity.name",
+ displayName: "Severity",
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ width: 70
+ },{
+ field: "name",
+ displayName: "Name",
+ width: 350,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ enableCellEdit: false
+ },{
+ field: "message",
+ width: 782,
+ displayName: "Message",
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ enableCellEdit: false
+ }]
+ }
+
+
+
+
+
// Loading Modal
$scope.showLoadingModal = function() {
var modalInstance = $modal.open({
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
index 320dce2974..4d281d3254 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html
@@ -22,15 +22,15 @@
</div>
</div>
- <div class="row" id=setCopyRow>
- <div class="col-sm-10 col-sm-offset-2" id=setCopyContainer>
- <button ng-disabled="isCopying" ng-click="openCopySetModal()" ng-show="sets.length > 0" class="btn btn-primary active" id=generateReportBtn>Merge Annotations</button>
+ <div class="row" id=mergeAnnotationsRow>
+ <div class="col-sm-10 col-sm-offset-2" id=mergetAnnotationsContainer>
+ <button ng-disabled="isCopying" ng-click="openCopySetModal()" ng-show="sets.length > 0" class="btn btn-primary active" id=mergetAnnotationsBtn>Merge Annotations</button>
</div>
</div>
- <div ng-show="false" class="row" id=setCopyRow>
- <div class="col-sm-10 col-sm-offset-2" id=setCopyCoverageContainer>
- <button ng-click="openCopyCoverageModal()" ng-show="sets.length > 0" class="btn btn-primary active" id=generateReportBtn>Import From Coverage</button>
+ <div ng-show="false" class="row" id=coverageCopyRow>
+ <div class="col-sm-10 col-sm-offset-2" id=coverageCopyContainer>
+ <button ng-click="openCopyCoverageModal()" ng-show="sets.length > 0" class="btn btn-primary active" id=coverageCopyRowBtn>Import From Coverage</button>
</div>
</div>
@@ -41,10 +41,16 @@
<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 style="height: 300px;" class="gridStyle" ng-grid="gridOptions"></div>
</div>
</div>
</div>
+ <div class="row">
+ <div class="col-md-9 col-md-offset-1">
+ <div class="row" id="summaryContainer">
+ <div style="height: 400px;" class="gridStyle" ng-grid="summaryGrid"></div>
+ </div>
+ </div>
</div>
<!-- definitions for modal forms -->

Back to the top