policyType : "Config",
configPolicyType : "Micro Service"
}
- };
+ }
$scope.refresh = function(){
if($scope.refreshCheck){
layer++;
if(layer > 4){
layer = 1
- };
+ }
div.className += ' children_group border' + layer; //here is div with a group of children.
}
}
}
};
- var splitDash = '-';
var splitEqual = '=';
var splitComma = ',';
var splitcolon = ':';
- var splitsemicolon = ";";
var splitEnum = "],";
var plainAttributeKeys = [];
var matching = [];
document.getElementById("msPolicyloader").style.visibility = "hidden";
$scope.$apply(function(){
- var plainAttributeKeys = [];
$scope.dcaeModelData = data[0].dcaeModelData;
$scope.dcaeJsonDate = data[0].jsonValue;
$scope.dataOrderInfo = null;
$scope.temp.policy.priority = headDefautlsData.priority;
}
- var enumAttributes = $scope.dcaeModelData.enumValues;
var annotation = $scope.dcaeModelData.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 double = "double";
var boolean = "boolean";
var baseLevel = level;
- var list = "list";
- var String = "String";
var attributekey = "";
layer++;
if(layer > 4){
layer = 1
- };
+ }
firstChild_element.className += ' children_group border' + layer; //here is div with a group of children.
}
}
$scope.labelLayout = function(labelValue, lableName, labelManyKey ){
var label = document.createElement("Label")
var divID = labelValue;
- if (labelValue.endsWith('.')){
- var workingLabel = labelValue.substring(0, labelValue.length-1);
- }else {
- var workingLabel = labelValue;
- }
if (labelValue.length < 1){
divID = "DynamicTemplate";
layer++;
if(layer > 4){
layer = 1
- };
+ }
divTag.className += ' children_group border' + layer; //here is div with a group of children.
}
if(required){
layer++;
if(layer > 4){
layer = 1
- };
+ }
divTag.className += ' children_group border' + layer; //here is div with a group of children.
}
if(required){
label.appendChild(labeltext);
isRequired = true; //set required as true for matching element
}else {
- var labeltext = document.createTextNode(attributeName);
if(isRequired){
var requiredLabName = attributeName+ " * ";
labeltext = document.createTextNode(requiredLabName);
function onlyUnique(value, index, self) {
return self.indexOf(value) === index;
- };
-
-
- function checkDictionary(value){
- for (i = 0; i < $scope.microServiceAttributeDictionaryDatas.length; i++) {
- if ($scope.microServiceAttributeDictionaryDatas[i].name.localeCompare(value)){
- return true;
- }
- }
-
}
+
$scope.savePolicy = function(policy){
if(policy.itemContent != undefined){
$scope.refreshCheck = true;
$scope.validatePolicy = function(policy){
document.getElementById("validate").innerHTML = "";
var splitAt = '*';
- var dot ='.';
var jsonPolicy = {};
if(plainAttributeKeys != null){
for(a = 0; a < plainAttributeKeys.length; a++){
});
};
- function extend(obj, src) {
- for (var key in src) {
- if (src.hasOwnProperty(key)) obj[key] = src[key];
- }
- return obj;
- }
-
// Switch Click
$('.Switch').click(function() {
// Check If Enabled (Has 'On' Class)