in google-cloud-server/src/main/resources/buildServerResources/images.vm.js [499:535]
function loadInfoBySourceProject(sourceProject) {
if (!self.isValidCredentials()) {
return
}
var credentialsType = self.credentials().type();
var accessKey = self.credentials().accessKey();
self.loadingResources(true);
var url = getBasePath() +
"sourceProject=" + sourceProject +
"&resource=images" +
"&resource=imageFamilies";
$.post(url, {
"prop:credentialsType": credentialsType,
"prop:secure:accessKey": accessKey
}).then(function (response) {
var $response = $(response);
var errors = getErrors($response);
if (errors) {
self.errorResources(errors);
return;
} else {
self.errorResources("");
}
self.sourceImages(getSourceImages($response));
self.sourceImageFamilies(getSourceImageFamilies($response));
}, function (error) {
self.errorResources("Failed to load data: " + error.message);
console.log(error);
}).always(function () {
self.loadingResources(false);
});
}