mirror of https://github.com/apache/cloudstack.git
bug 7059: fixed more JS to accomodate new api output.
This commit is contained in:
parent
563b45a220
commit
eeb98499d5
|
|
@ -90,7 +90,7 @@ function initAddDiskOfferingButton($midmenuAddLink1) {
|
|||
data: createURL("command=createDiskOffering&isMirrored=false" + array1.join("")),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var item = json.creatediskofferingresponse;
|
||||
var item = json.creatediskofferingresponse.diskoffering;
|
||||
diskOfferingToMidmenu(item, $midmenuItem1);
|
||||
bindClickToMidMenu($midmenuItem1, diskOfferingToRightPanel, getMidmenuId);
|
||||
afterAddingMidMenuItem($midmenuItem1, true);
|
||||
|
|
@ -150,17 +150,7 @@ function doEditDiskOffering2($actionLink, $detailsTab, $midmenuItem1, $readonlyF
|
|||
data: createURL("command=updateDiskOffering&id="+id+array1.join("")),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
//call listDiskOffering before bug 6502(What updateDiskOffering API returns should include an embedded object) is fixed.
|
||||
var jsonObj;
|
||||
$.ajax({
|
||||
data: createURL("command=listDiskOfferings&id="+id),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
jsonObj = json.listdiskofferingsresponse.diskoffering[0];
|
||||
}
|
||||
});
|
||||
var $midmenuItem1 = $("#"+getMidmenuId(jsonObj));
|
||||
var $midmenuItem1 = $("#"+getMidmenuId(json.updatediskofferingresponse.diskoffering));
|
||||
diskOfferingToMidmenu(jsonObj, $midmenuItem1);
|
||||
diskOfferingToRightPanel($midmenuItem1);
|
||||
|
||||
|
|
|
|||
|
|
@ -534,7 +534,7 @@ function doEditPod2($actionLink, $detailsTab, $midmenuItem1, $readonlyFields, $e
|
|||
data: createURL("command=updatePod"+array1.join("")),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var item = json.updatepodresponse;
|
||||
var item = json.updatepodresponse.pod;
|
||||
$midmenuItem1.data("jsonObj", item);
|
||||
podJsonToRightPanel($midmenuItem1);
|
||||
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ function initUpdateConsoleCertButton($midMenuAddLink2) {
|
|||
$thisDialog.dialog("close");
|
||||
// TODO: Add a confirmation message
|
||||
} else if (result.jobstatus == 2) { // Failed
|
||||
var errorMsg = result.jobresult.uploadcustomcertificateresponse.errortext;
|
||||
var errorMsg = result.jobresult.errortext;
|
||||
$thisDialog.find("#info_container").text(errorMsg).show();
|
||||
}
|
||||
}
|
||||
|
|
@ -472,7 +472,7 @@ function initAddZoneButton($midmenuAddLink1) {
|
|||
$zoneTree.prepend(template);
|
||||
template.fadeIn("slow");
|
||||
|
||||
var item = json.createzoneresponse;
|
||||
var item = json.createzoneresponse.zone;
|
||||
zoneJSONToTreeNode(item, template);
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ function afterLoadServiceOfferingJSP() {
|
|||
data: createURL("command=createServiceOffering"+array1.join("")+"&response=json"),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var item = json.createserviceofferingresponse;
|
||||
var item = json.createserviceofferingresponse.serviceoffering;
|
||||
serviceOfferingToMidmenu(item, $midmenuItem1);
|
||||
bindClickToMidMenu($midmenuItem1, serviceOfferingToRightPanel, getMidmenuId);
|
||||
afterAddingMidMenuItem($midmenuItem1, true);
|
||||
|
|
@ -153,7 +153,7 @@ function doEditServiceOffering2($actionLink, $detailsTab, $midmenuItem1, $readon
|
|||
data: createURL("command=updateServiceOffering&id="+id+array1.join("")),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jsonObj = json.updateserviceofferingresponse;
|
||||
var jsonObj = json.updateserviceofferingresponse.serviceoffering;
|
||||
serviceOfferingToMidmenu(jsonObj, $midmenuItem1);
|
||||
serviceOfferingToRightPanel($midmenuItem1);
|
||||
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ function initAddVLANButton($addButton) {
|
|||
else //virtual
|
||||
$template1.find("#vlan_type_icon").removeClass("direct").addClass("virtual");
|
||||
|
||||
vlanJsonToTemplate(json.createvlaniprangeresponse, $template1);
|
||||
vlanJsonToTemplate(json.createvlaniprangeresponse.vlaniprange, $template1);
|
||||
$vlanContainer.prepend($template1);
|
||||
$template1.fadeIn("slow");
|
||||
},
|
||||
|
|
@ -523,7 +523,7 @@ function initAddPodButton($midmenuAddLink1) {
|
|||
$thisDialog.find("#spinning_wheel").hide();
|
||||
$thisDialog.dialog("close");
|
||||
|
||||
var item = json.createpodresponse;
|
||||
var item = json.createpodresponse.pod;
|
||||
var template = $("#leftmenu_pod_node_template").clone(true);
|
||||
podJSONToTreeNode(item, template);
|
||||
var $zoneNode = $("#leftmenu_zone_tree").find("#tree_container").find("#zone_" + zoneObj.id);
|
||||
|
|
@ -784,7 +784,7 @@ function doEditZone2($actionLink, $detailsTab, $midmenuItem1, $readonlyFields, $
|
|||
data: createURL("command=updateZone"+moreCriteria.join("")),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var item = json.updatezoneresponse;
|
||||
var item = json.updatezoneresponse.zone;
|
||||
$midmenuItem1.data("jsonObj", item);
|
||||
zoneJsonToRightPanel($midmenuItem1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue