mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-6852: UI - modules - (1) add new shared function addExtraPropertiesIfDrModuleIncluded(). (2) add DR fields to Instances detailView.
This commit is contained in:
parent
ea196a4ffc
commit
36ec16e4f5
@ -1878,6 +1878,9 @@
|
|||||||
jsonObj.xenserverToolsVersion61plus = false;
|
jsonObj.xenserverToolsVersion61plus = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if DR module is included
|
||||||
|
addExtraPropertiesIfDrModuleIncluded(jsonObj, "UserVM");
|
||||||
|
|
||||||
args.response.success({
|
args.response.success({
|
||||||
actionFilter: vmActionfilter,
|
actionFilter: vmActionfilter,
|
||||||
data: jsonObj
|
data: jsonObj
|
||||||
|
|||||||
@ -1175,6 +1175,32 @@ function listViewDataProvider(args, data, options) {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var addExtraPropertiesIfDrModuleIncluded = function(jsonObj, resourceType) {
|
||||||
|
if (drModuleIncluded) {
|
||||||
|
$.ajax({
|
||||||
|
url: createURL("listResourceDetails"),
|
||||||
|
data: {
|
||||||
|
resourceid: jsonObj.id,
|
||||||
|
resourcetype: resourceType
|
||||||
|
},
|
||||||
|
async: false,
|
||||||
|
success: function(json) {
|
||||||
|
var drFieldNameArray = [];
|
||||||
|
var resourcedetails = json.listresourcedetailsresponse.resourcedetail;
|
||||||
|
if (resourcedetails != undefined) {
|
||||||
|
for (var i = 0; i < resourcedetails.length; i++) {
|
||||||
|
if (resourcedetails[i].key.indexOf("DR_") > -1) {
|
||||||
|
drFieldNameArray.push(resourcedetails[i].key);
|
||||||
|
jsonObj[resourcedetails[i].key] = resourcedetails[i].value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jsonObj["drFieldNameArray"] = drFieldNameArray;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//used by infrastructure page and network page
|
//used by infrastructure page and network page
|
||||||
var addExtraPropertiesToGuestNetworkObject = function(jsonObj) {
|
var addExtraPropertiesToGuestNetworkObject = function(jsonObj) {
|
||||||
jsonObj.networkdomaintext = jsonObj.networkdomain;
|
jsonObj.networkdomaintext = jsonObj.networkdomain;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user