- if (vf_Services === null || vf_Services === undefined) {
- loadSharedPropertyByService()
- } else {
- try {
- $("#vf").empty().multiselect("refresh");
- $("#location").empty().multiselect("refresh");
- $("#actionSet").empty().multiselect("refresh");
- $("#vfc").empty().multiselect("refresh");
- $("#paramsWarn").hide();
- var uuid = Object.keys(vf_Services['shared']['byService'])[0];
-
- var vf_values = vf_Services['shared']['byService'][uuid] &&
- vf_Services['shared']['byService'][uuid]['vf'] &&
- _.keys(vf_Services['shared']['byService'][uuid]['vf']).length > 0 ?
- vf_Services['shared']['byService'][uuid]['vf'] : null;
-
- var selectedVF = {}
- for (let e in elementMap["global"]) {
- if (elementMap['global'][e].name === "vf") {
- selectedVF = elementMap['global'][e].value[0]
- }
- }
-
- var vfc_values2 = selectedVF &&
- vf_Services['shared']['byVf'][selectedVF] &&
- vf_Services['shared']['byVf'][selectedVF]['vfc'] &&
- _.keys(vf_Services['shared']['byVf'][selectedVF]['vfc']).length > 0 ?
- vf_Services['shared']['byVf'][selectedVF]['vfc'] : null;
-
- if (vf_values) {
- for (key in vf_values) {
- if ($("#vf").length > 0) {
- $("#vf").append("<option value=\"" + key + "\">" + vf_values[key] + "</opton>")
- }
- }
- $("#vf").multiselect("rebuild");
- }
-
- var location_values = vf_Services['global']['location'];
- if (location_values) {
- for (key in location_values) {
- if ($("#location").length > 0) {
- $("#location").append("<option value=\"" + key + "\">" + location_values[key] + "</opton>")
- }
- }
- $("#location").multiselect("rebuild");
- }
-
- var actionSet_values = vf_Services['global']['actionSet'];
- if (actionSet_values) {
- for (key in actionSet_values) {
- if ($("#actionSet").length > 0) {
- $("#actionSet").append("<option value=\"" + key + "\">" + actionSet_values[key] + "</opton>")
- }
- }
- $("#actionSet").multiselect("rebuild");
- }
-
- if (vfc_values2) {
- $("#vfc").append("<option value=\"\"></opton>");
- for (key in vfc_values2) {
- if ($("#vfc").length > 0) {
- $("#vfc").append("<option value=\"" + key.split("\"").join("") + "\">" + vfc_values2[key] + "</opton>")
- }
- }
- $("#vfc").multiselect("rebuild");
- }
- if($("#vfc").length > 0 && !vfc_values2){
- showWarn();
- }
- if($("#vf").length > 0 && !vf_values){
- showWarn();
- }
- if($("#location").length > 0 && !location_values){
- showWarn();
- }
+ if (vf_Services === null || vf_Services === undefined) {
+ loadSharedPropertyByService()
+ } else {
+ try {
+ $("#vf").empty().multiselect("refresh");
+ $("#location").empty().multiselect("refresh");
+ $("#actionSet").empty().multiselect("refresh");
+ $("#vfc").empty().multiselect("refresh");
+ $("#paramsWarn").hide();
+ var uuid = Object.keys(vf_Services['shared']['byService'])[0];