You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ec40aff
Browse filesBrowse the repository at this point in the historyBrowse files
Jessica Wang
committed
CLOUDSTACK-459: cloudstack UI - create network offering - When capability ElasticIp=true is passed to API, if capability associatePublicIP=true/false is not passed to API, cloudStack API will assume associatePublicIP=true. So, UI has to explicitly pass associatePublicIP=false to API if its checkbox is unchecked.
Copy file name to clipboardExpand all lines: ui/scripts/configuration.js
+22-1Lines changed: 22 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1720,7 +1720,28 @@
1720
1720
inputData[key]=value;
1721
1721
}
1722
1722
});
1723
-
1723
+
1724
+
for(varkey1ininputData){
1725
+
/* When capability ElasticIp=true is passed to API, if capability associatePublicIP is not passed to API, cloudStack API will assume associatePublicIP=true.
1726
+
So, UI has to explicitly pass associatePublicIP=false to API if its checkbox is unchecked. */
1727
+
if(inputData[key1]=='ElasticIp'){//ElasticIp checkbox is checked
1728
+
varassociatePublicIPExists=false;
1729
+
for(varkey2ininputData){
1730
+
if(inputData[key2]=='associatePublicIP'){
1731
+
associatePublicIPExists=true;
1732
+
break;//break key2 for loop
1733
+
}
1734
+
}
1735
+
if(associatePublicIPExists==false){//but associatePublicIP checkbox is unchecked
1736
+
//UI explicitly passes associatePublicIP=false to API
0 commit comments