summaryrefslogtreecommitdiffstats
path: root/src/main/resources
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2019-04-11 02:05:56 +0200
committersebdet <sebastien.determe@intl.att.com>2019-04-11 02:05:56 +0200
commit5431f6e5c621a094c33d01b2be89762b80273434 (patch)
tree479770bdb321336ba642c23569daa4d85b390be4 /src/main/resources
parente4e7c6a19dd50516247ad33dbe2a868b7825ea10 (diff)
Add Loop name
Add Loop name in UI + removal of useless javascript code Issue-ID: CLAMP-313 Change-Id: Iba72f3bfcf2a0bf2731120c77b17f41ed7ac77f6 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/META-INF/resources/designer/partials/portfolios/clds_modelling.html36
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js4
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/DashboardCtrl.js56
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/app.js55
4 files changed, 3 insertions, 148 deletions
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/clds_modelling.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/clds_modelling.html
index f98fd9524..3b2e31233 100644
--- a/src/main/resources/META-INF/resources/designer/partials/portfolios/clds_modelling.html
+++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/clds_modelling.html
@@ -498,7 +498,7 @@ width: 14px;
<span id="modeler_name">Closed Loop Modeler</span>
</span>
<span class="pull-right" >
- <span id="templa_name"></span>
+ <span id="loop_name">No LOOP loaded yet</span>
&nbsp;
<i ng-click="showTDRView=!showTDRView" ng-class="showTDRView == true ?'fa fa-plus-circle':'fa fa-minus-circle'"></i>
</span>
@@ -514,9 +514,7 @@ width: 14px;
</div>
- <!--Commented becoz i m not able to find the htmls-->
- <!-- <div ng-show="isTestset && !isPalette && !isRequirementCoverage" style="width: 100%;height: 83.5vh;" ng-include src="'partials/portfolios/generate_testset.html'" ></div>
- <div ng-show="!isTestset && !isPalette && isRequirementCoverage" style="width: 100%;height: 83.5vh;" ng-include src="'partials/portfolios/requirement_coverage.html'" ></div> -->
+
</div>
</div>
@@ -525,36 +523,6 @@ width: 14px;
</div>
</div>
-
- <!-- <div id="propertyExplorer" style="width: 20%;height:90vh" >
-
- <div class="panel panel-primary">
- <div class="panel-heading">
- <div style="color: white;">
-
- <span class="pull-left"> <span>Property Explorer</span>
-
- </span> <span class="pull-right" ng-click="showTDRView=!showTDRView"><i
- ng-class="showTDRView == true ?'fa fa-plus-circle':'fa fa-minus-circle'"></i></span>
- </div>
-
- <div class="clearfix"></div>
- </div>
- <div ng-class="{hidden:showTDRView,chaldean:showTDRView}">
- <div class="panel-body" style="height: 79vh; overflow: auto;">
-
-
-
- <div id="propertyDiv" ng-show="ispropertyExplorer" ng-include src="'./partials/portfolios/Property_Explorer.html'"></div>
-
-
- </div>
- </div>
-
- </div>
-
- </div> -->
-
</div>
</div>
<div ng-show ="isResult"> </div>
diff --git a/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js b/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js
index 90cdc0d78..b0977be02 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js
@@ -68,11 +68,9 @@ app
var def = $q.defer();
var sets = [];
var svcUrl = "/restservices/clds/v2/loop/" + modelName;
- //var svcUrl = "/restservices/clds/v1/clds/model/" + modelName;
$http.get(svcUrl).success(function(data) {
- //var clModel = '{"name": "ClosedLoopTest","lastComputedState":"DESIGN","svgRepresentation": "representation","globalPropertiesJson": [{"name":"service","value":["4cc5b45a-1f63-4194-8100-cd8e14248c92"]},{"name":"vf","value":["07e266fc-49ab-4cd7-8378-ca4676f1b9ec"]},{"name":"actionSet","value":["vnfRecipe"]},{"name":"location","value":["DC1"]},{"name":"deployParameters","value":{"location_id":"","service_id":"","policy_id":"AUTO_GENERATED_POLICY_ID_AT_SUBMIT"}}], "blueprint": "yaml","lastComputedState": "DESIGN","operationalPolicies": [ {"name": "OpPolicyTest", "configurationsJson": { "policy1": [{"name": "pname","value": "policy1"},{"name": "pid","value": "0"},{"name": "timeout","value": "345"},{"policyConfigurations": [[{"name": "recipe","value": ["restart"]},{"name": "maxRetries","value": ["3"]},{"name": "retryTimeLimit","value": ["180"]},{"name": "_id","value": ["6TtHGPq"]},{"name": "parentPolicy","value": [""]},{"name": "actor","value": ["APPC"]},{"name": "recipeInput","value": [""]},{"name": "recipeLevel","value": ["VM"]},{"name": "targetResourceId","value": ["07e266fc-49ab-4cd7-8378-ca4676f1b9ec"]},{"name": "targetResourceIdOther","value": [""]},{"name": "enableGuardPolicy","value": ["on"]},{"name": "guardPolicyType","value": ["GUARD_YAML"]},{"name": "guardTargets","value": [".*"]},{"name": "minGuard","value": ["1"]},{"name": "maxGuard","value": ["1"]},{"name": "limitGuard","value": ["1"]},{"name": "timeUnitsGuard","value": ["minute"]},{"name": "timeWindowGuard","value": ["10"]},{"name": "guardActiveStart","value": ["00:00:01-05:00"]},{"name": "guardActiveEnd","value": ["00:00:00-05:00"]}]]}]} }],"microServicePolicies": [{"name": "tca","properties": "", "shared": true,"policyTosca": "tosca","jsonRepresentation": {"schema":{"title":"DCAE TCA Config","type":"object","required":["name","eventName"],"properties":{"name":{"propertyOrder":101,"title":"Name","type":"string","default":"New_Set"},"eventName":{"propertyOrder":102,"title":"EventName","type":"string","enum":["event1","event2"]},"clSchemaType":{"propertyOrder":103,"title":"Control Loop Schema Type","type":"string","enum":["","type1","type2"]},"threshold":{"propertyOrder":104,"title":"Threshold","format":"tabs","type":"array","items":{"type":"object","title":"Threshold","required":["metric","operator"],"properties":{"metric":{"propertyOrder":1001,"title":"Metric","type":"string","enum":["metric1","metric2"]},"operator":{"propertyOrder":1003,"default":">","title":"Operator","type":"string","enum":[">","<","=","<=",">="]}, "clEventStatus":{"propertyOrder":1004,"title":"Closed Loop Event Status","type":"string","enum":["","ONSET","ABATED"]}}}}}}}}],"loopLogs": [{ } ] }';
- //cl_props = JSON.parse(clModel);
cl_props = data;
+ $("#loop_name").text(getLoopName());
def.resolve(data);
}).error(function(data) {
def.reject("Open Model not successful");
diff --git a/src/main/resources/META-INF/resources/designer/scripts/DashboardCtrl.js b/src/main/resources/META-INF/resources/designer/scripts/DashboardCtrl.js
index 005a69347..f60b47449 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/DashboardCtrl.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/DashboardCtrl.js
@@ -38,7 +38,6 @@ angular.module('clds-app').controller(
$rootScope.isModel = false;
$rootScope.isPalette = false;
$rootScope.isTestSet = false;
- $rootScope.isRequirementCoverage = false;
$rootScope.ispropertyExplorer = false;
$rootScope.parameters;
$scope.orientation = "horizontal";
@@ -53,45 +52,7 @@ angular.module('clds-app').controller(
console.log("interval");
}, $scope.autosaveInterval);
- $rootScope.onSelectActivityModel = function(obj) {
- console.log("onSelectActivityModel");
- $rootScope.isPalette = true;
- $rootScope.isTestSet = false;
- $rootScope.isRequirementCoverage = false;
- $rootScope.ispropertyExplorer = false;
- $("#activity_modeler").prev().css("display", "block");
- $('div').find('.k-expand-next').click();
- if (obj == undefined) {
- document.getElementById("modeler_name").textContent = "Activity Modeler";
- } else {
- selected_model = obj;
- document.getElementById("modeler_name").textContent = "Activity Modeler" + " - " + selected_model;
- }
- $rootScope.modelName = selected_model;
- $rootScope.modeltestset = list_model_test_sets[selected_model];
- if (list_model_schema_extensions[selected_model] == null) {
- if (list_model_schema_extensions[$rootScope.utmModels.name] != null) {
- list_model_schema_extensions[selected_model] = jQuery.extend(true, {},
- list_model_schema_extensions[$rootScope.utmModels.name]);
- } else {
- list_model_schema_extensions[selected_model] = {};
- }
- }
- $rootScope.initProjectExplorer();
- changecolor(selected_model);
- };
- $scope.selectActivityTestSet = function() {
-
- console.log("selectActivityTestSet");
- $rootScope.isPalette = false;
- $rootScope.isRequirementCoverage = false;
- $rootScope.isTestset = true;
- document.getElementById("modeler_name").textContent = "UTM Test Set";
- $('div').find('.k-collapse-next').click();
- $rootScope.modeltestset = list_model_test_sets[selected_model];
- $rootScope.$apply();
- };
$scope.showPalette = function() {
console.log("showPalette");
@@ -106,21 +67,4 @@ angular.module('clds-app').controller(
};
$scope.showTDSSView = true;
} ]);
-function changecolor(selected_model) {
-
- console.log("changecolor");
- var i = 0;
- // var modelNames =[];
- $(".models").each(function(i) {
- console.log("each");
- var model_value = $(this).text().trim();
- // modelName.push(model_value);
- if (model_value == selected_model || model_value == "") {
- $(this).addClass("selectedcolor");
- } else {
- $(this).removeClass("selectedcolor");
- }
- i++;
- });
-}
diff --git a/src/main/resources/META-INF/resources/designer/scripts/app.js b/src/main/resources/META-INF/resources/designer/scripts/app.js
index 8f98f7087..2a2994ab4 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/app.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/app.js
@@ -390,61 +390,6 @@ function($scope, $rootScope, $timeout, dialogs) {
var dlg = dialogs.notify('Error', msg);
}
- $scope.reviewTestSet = function() {
-
- $rootScope.modeltestset = list_model_test_sets[selected_model];
- $rootScope.isPalette = false;
- $rootScope.isTestset = true;
- $rootScope.isRequirementCoverage = false;
- document.getElementById("modeler_name").textContent = "UTM Test Set";
- $('div').find('.k-collapse-next').click();
- };
- $scope.requirementCoverage = function() {
-
- $rootScope.testCaseRequirements = [];
- $rootScope.validTestRequirementArray = [];
- $rootScope.validTestRequirements = {};
- $rootScope.modeltestset = list_model_test_sets[selected_model];
- var allPathDetails = [];
- $scope.currentSelectedModel = {};
- $rootScope.pathDetailsList = list_model_path_details[selected_model];
- for (var x = 0; x < allPathDetails.length; x++) {
- var tempPathDetails = allPathDetails[x];
- if (tempPathDetails != null) {
- for (var i = 0; i < tempPathDetails.length; i++) {
- var pathDetails = tempPathDetails[i];
- if (pathDetails.requirement !== ''
- && pathDetails.requirement !== null) {
- $rootScope.testCaseRequirements
- .push(pathDetails.requirement);
- }
- }
- }
- }
- for (var p = 0; p < $rootScope.modeltestset.activityTestCases.length; p++) {
- var activityTestCases = $rootScope.modeltestset.activityTestCases[p];
- if (activityTestCases.mappedRequirements != null) {
- for (var i = 0; i < activityTestCases.mappedRequirements.length; i++) {
- var testCaseNames = $rootScope.validTestRequirements[activityTestCases.mappedRequirements[i]];
- if (testCaseNames == null) {
- testCaseNames = [];
- }
- if (activityTestCases.version != null)
- var testCase = activityTestCases.testCaseName + "_"
- + activityTestCases.version;
- else
- var testCase = activityTestCases.testCaseName;
- testCaseNames.push(testCase);
- $rootScope.validTestRequirements[activityTestCases.mappedRequirements[i]] = testCaseNames;
- }
- }
- }
- $rootScope.isPalette = false;
- $rootScope.isTestset = false;
- $rootScope.isRequirementCoverage = true;
- document.getElementById("modeler_name").textContent = "Test Case / Requirement Coverage";
- $('div').find('.k-collapse-next').click();
- };
$scope.activityModelling = function() {
};