Fix build package viewer to use the archive url from the status API call
This commit is contained in:
parent
3542a520f5
commit
14182a94f2
1 changed files with 3 additions and 8 deletions
|
@ -856,16 +856,11 @@ function BuildPackageCtrl($scope, Restangular, ApiService, $routeParams, $rootSc
|
||||||
$scope.loaded = true;
|
$scope.loaded = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
var downloadBuildPack = function() {
|
var downloadBuildPack = function(url) {
|
||||||
$scope.downloadProgress = 0;
|
$scope.downloadProgress = 0;
|
||||||
$scope.downloading = true;
|
$scope.downloading = true;
|
||||||
|
|
||||||
ApiService.getRepoBuildArchiveUrl(null, params).then(function(resp) {
|
startDownload(url);
|
||||||
startDownload(resp['url']);
|
|
||||||
}, function() {
|
|
||||||
$scope.downloading = false;
|
|
||||||
$scope.downloadError = true;
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var startDownload = function(url) {
|
var startDownload = function(url) {
|
||||||
|
@ -916,7 +911,7 @@ function BuildPackageCtrl($scope, Restangular, ApiService, $routeParams, $rootSc
|
||||||
'name': name
|
'name': name
|
||||||
};
|
};
|
||||||
|
|
||||||
downloadBuildPack();
|
downloadBuildPack(resp['archive_url']);
|
||||||
return resp;
|
return resp;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Reference in a new issue