mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
new UI - volume page - AttachVolume API, DetachVolumeAPI return objects in different structure. This is related UI change.
This commit is contained in:
parent
0d27ac2e31
commit
5a4aaade73
@ -528,18 +528,8 @@ var volumeActionMap = {
|
||||
asyncJobResponse: "attachvolumeresponse",
|
||||
dialogBeforeActionFn : doAttachDisk,
|
||||
inProcessText: "Attaching disk....",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
//var jsonObj = json.queryasyncjobresultresponse.virtualmachine[0];
|
||||
//Get embedded object from lsitVolume API until Bug 6481(embedded object returned by attachVolume API should include "type" property) is fixed.
|
||||
var jsonObj;
|
||||
$.ajax({
|
||||
data: createURL("command=listVolumes&id="+id),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
jsonObj = json.listvolumesresponse.volume[0];
|
||||
}
|
||||
});
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
var jsonObj = json.queryasyncjobresultresponse.jobresult.volume;
|
||||
volumeToMidmenu(jsonObj, $midmenuItem1);
|
||||
volumeJsonToDetailsTab($midmenuItem1);
|
||||
}
|
||||
@ -549,18 +539,8 @@ var volumeActionMap = {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "detachvolumeresponse",
|
||||
inProcessText: "Detaching disk....",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id){
|
||||
//var jsonObj = json.queryasyncjobresultresponse.virtualmachine[0];
|
||||
//Get embedded object from lsitVolume API until Bug 6480(detachVolume API should return embedded object, like attachVolume API does.) is fixed.
|
||||
var jsonObj;
|
||||
$.ajax({
|
||||
data: createURL("command=listVolumes&id="+id),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
jsonObj = json.listvolumesresponse.volume[0];
|
||||
}
|
||||
});
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id){
|
||||
var jsonObj = json.queryasyncjobresultresponse.jobresult.volume;
|
||||
volumeToMidmenu(jsonObj, $midmenuItem1);
|
||||
volumeJsonToDetailsTab($midmenuItem1);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user