Remove debugger + fix missing info 81/15981/2
authorAnaël Closson <ac2550@intl.att.com>
Wed, 27 Sep 2017 11:59:33 +0000 (13:59 +0200)
committerAnaël Closson <ac2550@intl.att.com>
Thu, 28 Sep 2017 10:12:08 +0000 (12:12 +0200)
Change-Id: Ic6e016eef81fbad70d3ac61c435cd47feb23cf3b
Issue-ID: CLAMP-58
Signed-off-by: Anaël Closson <ac2550@intl.att.com>
src/main/resources/META-INF/resources/designer/partials/portfolios/tca_properties.html
src/main/resources/clds/globalClds.properties

index c19d8bc..49d05b1 100644 (file)
                                                                <select name="tcaPol" id="tcaPol" enableFilter="true"></select>
                                                        </div>
                                                </div>
+                                               <div class="col-sm-8 form-group">
+                                                       <label class="col-sm-3">EventName</label>
+                                                       <div class="col-sm-9" style="padding:0px;">
+                                                               <select name="eventName" id="eventName" enableFilter="true"></select>
+                                                       </div>
+                                               </div>            
                                                
                                                <div class="col-sm-8 form-group" style="display:none;">
                                                        <label class="col-sm-3"> Policy ID </label>
                                                                                onkeypress="return isNumberKey(event)" id="threshold"></input>
                                                                        </div>
                                                                </div>
+                                                               <div>
+                                                                       <label class="control-label">Control Loop Schema</label>
+                                                                       <div>
+                                                                               <select id="controlLoopSchema" name="controlLoopSchema"></select>
+                                                                       </div>
+                                                               </div>
+                                                               <div>
+                                                                       <label class="control-label">Closed Loop Event Status</label>
+                                                                       <div>
+                                                                               <select id="closedLoopEventStatus" name="closedLoopEventStatus"></select>
+                                                                       </div>
+                                                               </div>                
                                                        </div>
                                                </div>
                                        </div>
                                return (c == 'x' ? r : (r*0x3|0*8)).toString(16);
                        });
                        $("#formId" + count + " #tuuid").val(tuuid);
-               }
-               
+               };
+
+
+    var propertiesToString = function(formIdNum) {
+      return $('#formId'+formIdNum+' #fieldPathM').val() + ' ' +
+                               $('#formId'+formIdNum+' #operator').val() + ' ' +
+                               $('#formId'+formIdNum+' #threshold').val() + ' ' +
+        $('#formId'+formIdNum+' #controlLoopSchema').val() + ' ' +
+        $('#formId'+formIdNum+' #closedLoopEventStatus').val();
+    };
+
                loadPropertyWindow("tca");
                
                //load dropdown with policy options
                                };
                        };
                };
-               
+
                var arr = elementMap[lastElementSelected];
                
                if (arr !== undefined) {
                        } else {
                                $('#formId'+num+' .tcaErr').hide();
                                if ($('#formId'+num+' #tcaTable .highlight').length > 0){
-                                       $('#formId'+num+' #tcaTable .highlight td').text(
-                                                       $('#formId'+num+' #fieldPathM').val() + ' ' +
-                                                       $('#formId'+num+' #operator').val() + ' ' +
-                                                       $('#formId'+num+' #threshold').val());
+                                       $('#formId'+num+' #tcaTable .highlight td').text(propertiesToString(num));
                                }
                                var saveP = {};
                                $('.formId').each(function(){
                        var form=$($("#formSpan").children()[0]).clone();
                        var count=0;
                        if($(".formId").length>0){
-        debugger;
                                var greatest=0;
                                var s=$(".formId");
                                for(var i=0;i<s.length; i++){
                                        } else {
                                                $('#formId'+oldCount+' .tcaErr').hide();
                                                if ($('#formId'+oldCount+' #tcaTable .highlight').length > 0){
-                                                       $('#formId'+oldCount+' #tcaTable .highlight td').text(
-                                                                       $('#formId'+oldCount+' #fieldPathM').val() + ' ' +
-                                                                       $('#formId'+oldCount+' #operator').val() + ' ' +
-                                                                       $('#formId'+oldCount+' #threshold').val());
+                                                       $('#formId'+oldCount+' #tcaTable .highlight td').text(propertiesToString(oldCount));
                                                }
                                                $("#formId"+oldCount+" #tcaTable .highlight").removeClass("highlight")
                                        }
                                } else {
                                        $('#formId'+count+' .tcaErr').hide();
                                        if ($('#formId'+count+' #tcaTable .highlight').length > 0){
-                                               $('#formId'+count+' #tcaTable .highlight td').text(
-                                                               $('#formId'+count+' #fieldPathM').val() + ' ' +
-                                                               $('#formId'+count+' #operator').val() + ' ' +
-                                                               $('#formId'+count+' #threshold').val());
+                                               $('#formId'+count+' #tcaTable .highlight td').text(propertiesToString(num));
                                        }
                                        //$('#formId'+count+' #tcaTable .highlight').text();
                                        $(this).addClass('highlight').siblings().removeClass('highlight');
                                        var str = $(this).text().split(' ');
                                        $('#formId'+count + ' #properties_tab').visible();
-                                       if (str.length == 3){
+                                       if (str.length == 5){
                                                $('#formId'+count+' #fieldPathM').val(str[0]).multiselect('refresh');
                                                $('#formId'+count+' #operator').val(str[1]).multiselect('refresh');
                                                $('#formId'+count+' #threshold').val(str[2]);
+            $('#formId'+count+' #controlLoopSchema').val(str[3]).multiselect('refresh');
+            $('#formId'+count+' #closedLoopEventStatus').val(str[4]).multiselect('refresh');
                                        }
                                        
                                        if ((!(readOnly||readMOnly)) && ($('#formId'+count + ' #deleteThresh').prop('disabled'))) {
                                } else {
                                        $('#formId'+count+' .tcaErr').hide();
                                        if ($('#formId'+count+' #tcaTable .highlight').length > 0){
-                                               $('#formId'+count+' #tcaTable .highlight td').text(
-                                                               $('#formId'+count+' #fieldPathM').val() + ' ' +
-                                                               $('#formId'+count+' #operator').val() + ' ' +
-                                                               $('#formId'+count+' #threshold').val());
+                                               $('#formId'+count+' #tcaTable .highlight td').text(propertiesToString(count));
                                        }
                                        $('#formId'+count+ ' #properties_tab').visible();
                                        if (('#formId'+count+' #tcaTable .highlight').length > 0 ){
                                        $('#formId'+count+' #fieldPathM').prop("selectedIndex", 0).multiselect('refresh');
                                        $('#formId'+count+' #operator').prop("selectedIndex", 0).multiselect('refresh');
                                        $('#formId'+count+' #threshold').val("");
+          $('#formId'+count+' #controlLoopSchema').prop("selectedIndex", 0).multiselect('refresh');
+          $('#formId'+count+' #closedLoopEventStatus').prop("selectedIndex", 0).multiselect('refresh');
                                        
                                        if ($('#formId'+count + ' #deleteThresh').prop('disabled')) {
                                                $('#formId'+count + ' #deleteThresh').prop('disabled', false);
index ac4f0cf..fe5aeaf 100644 (file)
@@ -21,4 +21,4 @@
 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
 ###
 
-globalCldsProps ={"tca":{"tname":"New_Set","tcaInt":"1","tcaVio":"1","tcaSev":{"NORMAL":"NORMAL","CRITICAL":"CRITICAL","MAJOR":"MAJOR","MINOR":"MINOR","WARNING":"WARNING"},"fieldPath":{"FIELDPATH_test_1":"FIELDPATH_test_1","FIELDPATH_test_2":"FIELDPATH_test_2"},"operator":{">":"GREATER","=":"EQUAL","<":"LESS"},"opsPolicy":{"POLICY_test_X":"POLICY_test_X","POLICY_test_Y":"POLICY_test_Y"}},"global":{"actionSet":{"vnfRecipe":"VNF", "enbRecipe":"eNodeB"},"location":{"SNDGCA64":"San Diego SAN3","ALPRGAED":"Alpharetta PDK1","LSLEILAA":"Lisle DPA3","MDTWNJC1":"FTL_C_location1","MDTWNJC2":"FTL_C_location2","MDTWNJ21":"FTL_L_location1","MDTWNJ22":"FTL_L_location2","RDM2WAGPLCP":"ISTFTL_location","RDM3":"RDM3WAGPLCP"}},"policy":{"pname":"0","timeout":345,"vnfRecipe":{"":"","restart":"Restart","rebuild":"Rebuild","migrate":"Migrate","healthCheck":"Health Check"},"enbRecipe":{"":"","reset":"Reset"},"maxRetries":"3","retryTimeLimit":180,"resource":{"vCTS":"vCTS","v3CDB":"v3CDB","vUDR":"vUDR","vCOM":"vCOM","vRAR":"vRAR","vLCS":"vLCS","vUDR-BE":"vUDR-BE","vDBE":"vDBE"},"parentPolicyConditions":{"Failure_Retries":"Failure: Max Retries Exceeded","Failure_Timeout":"Failure: Time Limit Exceeded","Failure_Guard":"Failure: Guard","Failure_Exception":"Failure: Exception","Failure":"Failure: Other","Success":"Success"}},"shared":{"byService":{"":{"vf":{"":""},"location":{"":""},"alarmCondition":{"":""}}},"byVf":{"":{"vfc":{"":""}}}}}
\ No newline at end of file
+globalCldsProps ={"tca":{"tname":"New_Set","tcaInt":"1","tcaVio":"1","tcaSev":{"NORMAL":"NORMAL","CRITICAL":"CRITICAL","MAJOR":"MAJOR","MINOR":"MINOR","WARNING":"WARNING"},"fieldPath":{"FIELDPATH_test_1":"FIELDPATH_test_1","FIELDPATH_test_2":"FIELDPATH_test_2"},"operator":{">":"GREATER",">=":"GREATER_OR_EQUAL","=":"EQUAL","<=":"LESS_OR_EQUAL","<":"LESS"},"opsPolicy":{"POLICY_test_X":"POLICY_test_X","POLICY_test_Y":"POLICY_test_Y"},"controlLoopSchema":{"":"","VM":"VM","VNF":"VNF"},"closedLoopEventStatus":{"":"","ONSET":"ONSET","ABATED":"ABATED"}},"global":{"actionSet":{"vnfRecipe":"VNF", "enbRecipe":"eNodeB"},"location":{"SNDGCA64":"San Diego SAN3","ALPRGAED":"Alpharetta PDK1","LSLEILAA":"Lisle DPA3","MDTWNJC1":"FTL_C_location1","MDTWNJC2":"FTL_C_location2","MDTWNJ21":"FTL_L_location1","MDTWNJ22":"FTL_L_location2","RDM2WAGPLCP":"ISTFTL_location","RDM3":"RDM3WAGPLCP"}},"policy":{"pname":"0","timeout":345,"vnfRecipe":{"":"","restart":"Restart","rebuild":"Rebuild","migrate":"Migrate","healthCheck":"Health Check"},"enbRecipe":{"":"","reset":"Reset"},"maxRetries":"3","retryTimeLimit":180,"resource":{"vCTS":"vCTS","v3CDB":"v3CDB","vUDR":"vUDR","vCOM":"vCOM","vRAR":"vRAR","vLCS":"vLCS","vUDR-BE":"vUDR-BE","vDBE":"vDBE"},"parentPolicyConditions":{"Failure_Retries":"Failure: Max Retries Exceeded","Failure_Timeout":"Failure: Time Limit Exceeded","Failure_Guard":"Failure: Guard","Failure_Exception":"Failure: Exception","Failure":"Failure: Other","Success":"Success"}},"shared":{"byService":{"":{"vf":{"":""},"location":{"":""},"alarmCondition":{"":""}}},"byVf":{"":{"vfc":{"":""}}}}}