Fix handling of larger build packs and straight Dockerfiles

This commit is contained in:
Joseph Schorr 2014-05-01 01:48:39 -04:00
parent 77b9bc05ac
commit 65e6041f55
2 changed files with 40 additions and 9 deletions

View file

@ -841,7 +841,7 @@ function BuildPackageCtrl($scope, Restangular, ApiService, DataFileService, $rou
if (dockerfile && dockerfile.canRead) {
DataFileService.blobToString(dockerfile.toBlob(), function(result) {
$scope.$apply(function() {
$scope.dockerFilePath = dockerfilePath;
$scope.dockerFilePath = dockerfilePath || 'Dockerfile';
$scope.dockerFileContents = result;
});
});
@ -851,8 +851,11 @@ function BuildPackageCtrl($scope, Restangular, ApiService, DataFileService, $rou
};
var notarchive = function() {
$scope.dockerFileContents = DataFileService.arrayToString(uint8array);
$scope.loaded = true;
DataFileService.arrayToString(uint8array, function(r) {
$scope.dockerFilePath = 'Dockerfile';
$scope.dockerFileContents = r;
$scope.loaded = true;
});
};
DataFileService.readDataArrayAsPossibleArchive(uint8array, archiveread, notarchive);