Merge branch 'master' of ssh://bitbucket.org/yackob03/quay
This commit is contained in:
commit
63bfde1036
8 changed files with 51 additions and 8 deletions
|
@ -2672,7 +2672,8 @@ quayApp.directive('triggerDescription', function () {
|
|||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'trigger': '=trigger'
|
||||
'trigger': '=trigger',
|
||||
'short': '=short'
|
||||
},
|
||||
controller: function($scope, $element) {
|
||||
}
|
||||
|
|
|
@ -816,9 +816,23 @@ function BuildPackageCtrl($scope, Restangular, ApiService, $routeParams, $rootSc
|
|||
// itself (should) be the Dockerfile.
|
||||
if (zipFiles && Object.keys(zipFiles).length) {
|
||||
// Load the dockerfile contents.
|
||||
var dockerfile = zip.file('Dockerfile');
|
||||
var dockerfilePath = 'Dockerfile';
|
||||
if ($scope.repobuild['job_config']) {
|
||||
var dockerfileFolder = ($scope.repobuild['job_config']['build_subdir'] || '');
|
||||
if (dockerfileFolder[0] == '/') {
|
||||
dockerfileFolder = dockerfileFolder.substr(1);
|
||||
}
|
||||
if (dockerfileFolder[dockerfileFolder.length - 1] == '/') {
|
||||
dockerfileFolder = dockerfileFolder.substr(0, dockerfileFolder.length - 1);
|
||||
}
|
||||
|
||||
dockerfilePath = dockerfileFolder + 'Dockerfile';
|
||||
}
|
||||
|
||||
var dockerfile = zip.file(dockerfilePath);
|
||||
if (dockerfile) {
|
||||
$scope.dockerFileContents = dockerfile.asText();
|
||||
$scope.dockerFilePath = dockerfilePath;
|
||||
}
|
||||
|
||||
// Build the zip file tree.
|
||||
|
@ -833,6 +847,7 @@ function BuildPackageCtrl($scope, Restangular, ApiService, $routeParams, $rootSc
|
|||
});
|
||||
} else {
|
||||
$scope.dockerFileContents = response;
|
||||
$scope.dockerFilePath = 'Dockerfile';
|
||||
}
|
||||
|
||||
$scope.loaded = true;
|
||||
|
@ -951,8 +966,14 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
|
|||
$scope.restartBuild = function(build) {
|
||||
$('#confirmRestartBuildModal').modal('hide');
|
||||
|
||||
var subdirectory = '';
|
||||
if (build['job_config']) {
|
||||
subdirectory = build['job_config']['build_subdir'] || '';
|
||||
}
|
||||
|
||||
var data = {
|
||||
'file_id': build['resource_key']
|
||||
'file_id': build['resource_key'],
|
||||
'subdirectory': subdirectory
|
||||
};
|
||||
|
||||
var params = {
|
||||
|
|
|
@ -851,7 +851,8 @@ function FileTreeBase() {
|
|||
* Calculates the dimensions of the tree.
|
||||
*/
|
||||
FileTreeBase.prototype.calculateDimensions_ = function(container) {
|
||||
var cw = document.getElementById(container).clientWidth;
|
||||
var containerElm = document.getElementById(container);
|
||||
var cw = containerElm ? containerElm.clientWidth : 1200;
|
||||
var barHeight = 20;
|
||||
var ch = (this.getNodesHeight() * barHeight) + 40;
|
||||
|
||||
|
|
Reference in a new issue