mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-3950: UI > remove global variable havingS3, havingSwift who are no longer in use.
This commit is contained in:
parent
fea7d21dcd
commit
fd47059436
@ -207,40 +207,7 @@
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
if (userValid && isAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL("listImageStores"),
|
||||
data: {
|
||||
provider: 'Swift'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.listimagestoreresponse.imagestore;
|
||||
if (items != null && items.length > 0)
|
||||
havingSwift = true;
|
||||
}
|
||||
});
|
||||
if (havingSwift == false) {
|
||||
$.ajax({
|
||||
url: createURL("listImageStores"),
|
||||
data: {
|
||||
provider: 'S3'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.listimagestoreresponse.imagestore;
|
||||
if (items != null && items.length > 0) {
|
||||
havingS3 = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
havingSwift = false;
|
||||
havingS3 = false;
|
||||
}
|
||||
|
||||
|
||||
return userValid ? {
|
||||
user: {
|
||||
userid: g_userid,
|
||||
@ -387,40 +354,7 @@
|
||||
args.response.error();
|
||||
}
|
||||
});
|
||||
|
||||
if (isAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL("listImageStores"),
|
||||
data: {
|
||||
provider: 'Swift'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.listimagestoreresponse.imagestore;
|
||||
if (items != null && items.length > 0)
|
||||
havingSwift = true;
|
||||
}
|
||||
});
|
||||
if (havingSwift = false) {
|
||||
$.ajax({
|
||||
url: createURL("listImageStores"),
|
||||
data: {
|
||||
provider: 'S3'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.listimagestoreresponse.imagestore;
|
||||
if (items != null && items.length > 0) {
|
||||
havingS3 = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
havingSwift = false;
|
||||
havingS3 = false;
|
||||
}
|
||||
|
||||
|
||||
// Get project configuration
|
||||
// TEMPORARY -- replace w/ output of capability response, etc., once implemented
|
||||
window.g_projectsInviteRequired = false;
|
||||
|
||||
@ -48,8 +48,6 @@ var md5HashedLogin = false;
|
||||
var pageSize = 20;
|
||||
|
||||
var rootAccountId = 1;
|
||||
var havingSwift = false;
|
||||
var havingS3 = false;
|
||||
|
||||
//async action
|
||||
var pollAsyncJobResult = function(args) {
|
||||
|
||||
@ -5619,27 +5619,37 @@
|
||||
label: 'label.enable.swift',
|
||||
isHeader: true,
|
||||
addRow: false,
|
||||
preFilter: function(args) {
|
||||
var swiftEnabled = false;
|
||||
$.ajax({
|
||||
preFilter: function(args) {
|
||||
var swiftEnableConfiguration = false;
|
||||
$.ajax({
|
||||
url: createURL('listConfigurations'),
|
||||
data: {
|
||||
name: 'swift.enable'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
swiftEnabled = json.listconfigurationsresponse.configuration[0].value == 'true' && !havingSwift ?
|
||||
true : false;
|
||||
},
|
||||
|
||||
error: function(json) {
|
||||
cloudStack.dialog.notice({
|
||||
message: parseXMLHttpResponse(json)
|
||||
});
|
||||
swiftEnableConfiguration = json.listconfigurationsresponse.configuration[0].value == 'true' ? true : false;
|
||||
}
|
||||
});
|
||||
|
||||
return swiftEnabled;
|
||||
|
||||
var havingSwift = false;
|
||||
$.ajax({
|
||||
url: createURL("listImageStores"),
|
||||
data: {
|
||||
provider: 'Swift'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.listimagestoreresponse.imagestore;
|
||||
if (items != null && items.length > 0)
|
||||
havingSwift = true;
|
||||
}
|
||||
});
|
||||
|
||||
if(swiftEnableConfiguration == true && havingSwift == false)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
},
|
||||
messages: {
|
||||
notification: function(args) {
|
||||
@ -5675,8 +5685,7 @@
|
||||
username: args.data.username,
|
||||
key: args.data.key
|
||||
},
|
||||
success: function(json) {
|
||||
havingSwift = true;
|
||||
success: function(json) {
|
||||
args.response.success();
|
||||
|
||||
cloudStack.dialog.notice({
|
||||
@ -5695,8 +5704,8 @@
|
||||
isHeader: true,
|
||||
addRow: false,
|
||||
|
||||
preFilter: function(args) {
|
||||
var s3Enabled = false;
|
||||
preFilter: function(args) {
|
||||
var s3EnableConfiguration = false;
|
||||
$.ajax({
|
||||
url: createURL('listConfigurations'),
|
||||
data: {
|
||||
@ -5704,17 +5713,29 @@
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
s3Enabled = json.listconfigurationsresponse.configuration[0].value == 'true' && !havingS3 ?
|
||||
true : false;
|
||||
},
|
||||
error: function(json) {
|
||||
cloudStack.dialog.notice({
|
||||
message: parseXMLHttpResponse(json)
|
||||
});
|
||||
s3EnableConfiguration = json.listconfigurationsresponse.configuration[0].value == 'true' ? true : false;
|
||||
}
|
||||
});
|
||||
|
||||
return s3Enabled;
|
||||
|
||||
var havingS3 = false;
|
||||
$.ajax({
|
||||
url: createURL("listImageStores"),
|
||||
data: {
|
||||
provider: 'S3'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.listimagestoreresponse.imagestore;
|
||||
if (items != null && items.length > 0) {
|
||||
havingS3 = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(s3EnableConfiguration == true && havingS3 == false)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
},
|
||||
|
||||
messages: {
|
||||
@ -5778,8 +5799,7 @@
|
||||
maxerrorretry: args.data.maxerrorretry,
|
||||
sockettimeout: args.data.sockettimeout
|
||||
},
|
||||
success: function(json) {
|
||||
havingS3 = true;
|
||||
success: function(json) {
|
||||
args.response.success();
|
||||
|
||||
cloudStack.dialog.notice({
|
||||
@ -14543,9 +14563,7 @@
|
||||
$.ajax({
|
||||
url: createURL('addImageStore'),
|
||||
data: data,
|
||||
success: function(json) {
|
||||
havingS3 = true;
|
||||
|
||||
success: function(json) {
|
||||
g_regionsecondaryenabled = true;
|
||||
|
||||
var item = json.addimagestoreresponse.imagestore;
|
||||
@ -14606,9 +14624,7 @@
|
||||
$.ajax({
|
||||
url: createURL('addImageStore'),
|
||||
data: data,
|
||||
success: function(json) {
|
||||
havingSwift = true;
|
||||
|
||||
success: function(json) {
|
||||
g_regionsecondaryenabled = true;
|
||||
|
||||
var item = json.addimagestoreresponse.imagestore;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user