* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
policyType : "Config",
configPolicyType : "Optimization"
}
- };
+ }
$scope.refresh = function(){
if($scope.refreshCheck){
console.log("failed");
});
- PolicyAppService.getData('get_PriorityValues').then(function (data) {
+ PolicyAppService.getData('get_DCAEPriorityValues').then(function (data) {
var j = data;
$scope.data = JSON.parse(j.data);
console.log($scope.data);
}
};
- var splitDash = '-';
var splitEqual = '=';
var splitComma = ',';
var splitcolon = ':';
- var splitsemicolon = ";";
var splitEnum = "],";
var plainAttributeKeys = [];
var matching = [];
data: JSON.stringify(postData),
success : function(data){
$scope.$apply(function(){
- var plainAttributeKeys = [];
$scope.optimizationModelData = data[0].optimizationModelData;
$scope.optimizationJsonDate = data[0].jsonValue;
$scope.dataOrderInfo = null;
$scope.temp.policy.priority = "";
}
- var enumAttributes = $scope.optimizationModelData.enumValues;
var annotation = $scope.optimizationModelData.annotation;
var dictionary = $scope.microServiceAttributeDictionaryDatas;
if (dictionary!= null && dictionary.length>1){
for (m=0; m < dictionary.length; m += 1){
- var keyCompare = dictionary[m].name;
var valueCompare = dictionary[m].value;
var valueModel = dictionary[m].modelName;
var conpairService = serviceName;
var label = $scope.labelManyKeys[i];
// first add parent/label level
for (k = 0; k < unique.length; k++){
- var newindex = unique[k].lastIndexOf("@");
var newKey = unique[k].substring(0, index);
if(label == newKey){
//Check this label has bee created or not
listField.appendChild(optionFirst);
}
- for (i=0; i < listemunerateValues.length; i += 1) {
- if(listemunerateValues[i].includes("equal-sign")){
+ for (var i=0; i < listemunerateValues.length; i += 1) {
+ if(typeof listemunerateValues[i] == "string" && listemunerateValues[i].includes("equal-sign")){
listemunerateValues[i] = listemunerateValues[i].replace('equal-sign','=');
}
- option = document.createElement('option');
+ var option = document.createElement('option');
option.setAttribute('value', listemunerateValues[i]);
option.appendChild(document.createTextNode(listemunerateValues[i]));
option.setAttribute('value', listemunerateValues[i]);
}
}]);/**
*
- */
\ No newline at end of file
+ */