bug 12358: cloudstack 3.0 new UI - hide copyTemplate and copyISO action for swift setup.

This commit is contained in:
Jessica Wang 2011-12-21 17:25:53 -08:00
parent fea9ca582c
commit a653db3f22
4 changed files with 15 additions and 2 deletions

View File

@ -234,6 +234,17 @@
args.response.error();
}
});
$.ajax({
url: createURL("listSwift"),
dataType: "json",
async: false,
success: function(json) {
var items = json.ListSwiftresponse.swift;
if(items != null && items.length > 0)
havingSwift = true;
}
});
// Get project configuration
// TEMPORARY -- replace w/ output of capability response, etc., once implemented

View File

@ -29,6 +29,7 @@ var md5HashedLogin = false;
var pageSize = 20;
var rootAccountId = 1;
var havingSwift = false;
//async action
var pollAsyncJobResult = function(args) {

View File

@ -3386,6 +3386,7 @@
key: args.data.key
},
success: function(json) {
havingSwift = true;
args.response.success();
},
error: function(json) {

View File

@ -1518,7 +1518,7 @@
else {
allowedActions.push("edit");
if(jsonObj.zoneid != null || jsonObj.zoneid != "-1")
if(havingSwift == false)
allowedActions.push("copyTemplate");
//allowedActions.push("createVm"); // For Beta2, this simply doesn't work without a network.
@ -1560,7 +1560,7 @@
else {
allowedActions.push("edit");
if(jsonObj.zoneid != null || jsonObj.zoneid != "-1")
if(havingSwift == false)
allowedActions.push("copyISO");
}