Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorangel.avila22019-02-20 02:18:16 -0500
committerangel.avila22019-05-02 16:12:07 -0400
commit118b435ec9732b7e08694615548491757f0ea50e (patch)
tree35ea43ede4a295cb6285739169bd3bdc47d69187
parent2270e34f1074c9a5c3ceeeb39270176da34cb0df (diff)
downloadorg.eclipse.osee-mult_env_3.tar.gz
org.eclipse.osee-mult_env_3.tar.xz
org.eclipse.osee-mult_env_3.zip
improve edit config popupmult_env_3
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/css/admin.css9
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js13
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html6
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/editDispoConfig.html13
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/multiEnv.html2
5 files changed, 33 insertions, 10 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 dc8ec85c9f..60b1a26413 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
@@ -76,5 +76,10 @@ button#mergetAnnotationsBtn {
background-color: pink;
}
-input#multiEnvTargePathInput {
- border: none; \ No newline at end of file
+#editMultiEnvBtn {
+ margin-top:20px;
+}
+
+#editConfigBtn {
+ margin-top:20px;
+} \ No newline at end of file
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 e99359b7d0..f14507837f 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
@@ -1036,11 +1036,17 @@ app.controller('adminController', [
modalInstance.result.then(function (inputs) {
$scope.updateDispoConfig(inputs.config);
});
+ }, function(data) {
+ alert("Oops...Something went wrong");
});
}
var EditDispoConfigCtrl = function ($scope, $modalInstance, config) {
- $scope.validResolutionsJson = JSON.stringify(config.validResolutions);
+ $scope.resolutionsLocal = angular.copy(config.validResolutions);
+ $scope.addNew = false;
+
+ $scope.previewedResolution = null;
+ $scope.validResolutionsJson = JSON.stringify($scope.resolutionsLocal);
$scope.multiEnvTargetsJson = JSON.stringify(config.multiEnvTargets);
$scope.ok = function () {
var inputs = {};
@@ -1076,7 +1082,12 @@ app.controller('adminController', [
}
$scope.isValidJson = function () {
return $scope.isResolutionTypesValidJson && $scope.ismultiEnvTargetsValidJson;
+ }
+ $scope.addToResolutions = function() {
+ $scope.resolutionsLocal.push($scope.previewedResolution);
+ $scope.addNew = false;
+ $scope.previewedResolution = null;
}
}
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 50937f6c08..7a54bf7b25 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
@@ -68,9 +68,9 @@
ng-show="isCoverage && sets.length > 0" class="btn btn-primary" id=generateReportBtn>Get
Rerun Report</button>
<button ng-disabled="isRunningOperation" ng-click="openMultiEnvModal()" ng-show="isCoverage && sets.length > 0"
- class="btn btn-primary" id=multiEnvBtn>Multi Environment</button>
- <button ng-disabled="isRunningOperation" ng-click="openEditDispoConfigModal()" ng-show="sets.length > 0"
- class="btn btn-primary" id=multiEnvBtn>Edit Config</button>
+ class="btn btn-primary" id=editMultiEnvBtn>Multi Environment</button>
+ <button ng-disabled="isRunningOperation" ng-click="openEditDispoConfigModal()" ng-show="isCoverage && sets.length > 0"
+ class="btn btn-primary" id=editConfigBtn>Edit Config</button>
</div>
</div>
</div>
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/views/editDispoConfig.html b/plugins/org.eclipse.osee.web.ui/src/dispo/views/editDispoConfig.html
index 8f95658674..e45c386888 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/views/editDispoConfig.html
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/editDispoConfig.html
@@ -3,9 +3,16 @@
<h4 class="modal-title">Each field must be a valid JSON Array</h4>
</div>
<div class="modal-body" overflow: auto;>
+
Resolution Types:
- <textarea ng-class="{ 'config-json-invalid': !isResolutionTypesValidJson() }" rows=10 style="resize: vertical"
- class="form-control" ng-model="validResolutionsJson"></textarea>
+ <select class="form-control" ng-model="previewedResolution" ng-options="obj as obj.text for obj in resolutionsLocal"></select>
+ <u ng-click="addNew = !addNew; previewedResolution = null">Add New</u>
+ <div ng-show="addNew && !previewedResolution"><input class="form-control" ng-model="newResolution" type="text" name="newResolution"><button
+ ng-click="resolutionsLocal.push(previewedResolution); addNew = false" class="form-control">Add</button></div>
+ <br>
+ <div ng-show="!addNew && previewedResolution" id="previewedResolutionDiv">
+ <input ng-readonly="previewedResolution.isDefault" type="text" name="resolutionValue" ng-model="previewedResolution.value">
+ </div>
<br>
Multi Env Targets:
<textarea placeholder='[{"name": "example", "path": "src_host/example"}]' ng-class="{ 'config-json-invalid': !ismultiEnvTargetsValidJson() }"
@@ -13,6 +20,6 @@
</div>
<div class="modal-footer">
- <button ng-disabled="!isValidJson()" class="btn btn-primary" ng-click="ok()">OK</button>
+ <button ng-disabled="!isValidJson()" class="btn btn-primary" ng-click="ok()">Save</button>
<button class="btn btn-warning" ng-click="cancel()">Cancel</button>
</div> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/views/multiEnv.html b/plugins/org.eclipse.osee.web.ui/src/dispo/views/multiEnv.html
index 7dda8a7f9a..d95b083cec 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/views/multiEnv.html
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/multiEnv.html
@@ -13,7 +13,7 @@
</div>
<div class="form-group">
Select Multi Environment Target
- <select class="form-control" ng-model="selectedSet.multiEnvSettings.multiEnvTarget" ng-options="obj as obj.name for obj in multiEnvTargets"></select>
+ <select class="form-control" ng-model="selectedSet.multiEnvSettings.multiEnvTarget" ng-options="obj as obj.text for obj in multiEnvTargets"></select>
</div>
Path: <input id="multiEnvTargePathInput" readonly type="text" ng-model="selectedSet.multiEnvSettings.multiEnvTarget.path">
</div>

Back to the top