Merge remote-tracking branch 'origin/laffa' into nomenclature
Conflicts: test/data/test.db
This commit is contained in:
commit
a0d94f9d59
26 changed files with 1088 additions and 83 deletions
|
@ -843,6 +843,15 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
return config['SERVER_HOSTNAME'];
|
||||
};
|
||||
|
||||
config.getHost = function(opt_auth) {
|
||||
var auth = opt_auth;
|
||||
if (auth) {
|
||||
auth = auth + '@';
|
||||
}
|
||||
|
||||
return config['PREFERRED_URL_SCHEME'] + '://' + auth + config['SERVER_HOSTNAME'];
|
||||
};
|
||||
|
||||
config.getUrl = function(opt_path) {
|
||||
var path = opt_path || '';
|
||||
return config['PREFERRED_URL_SCHEME'] + '://' + config['SERVER_HOSTNAME'] + path;
|
||||
|
@ -2589,7 +2598,7 @@ quayApp.directive('copyBox', function () {
|
|||
restrict: 'C',
|
||||
scope: {
|
||||
'value': '=value',
|
||||
'hoveringMessage': '=hoveringMessage'
|
||||
'hoveringMessage': '=hoveringMessage',
|
||||
},
|
||||
controller: function($scope, $element, $rootScope) {
|
||||
$scope.disabled = false;
|
||||
|
@ -2598,7 +2607,7 @@ quayApp.directive('copyBox', function () {
|
|||
$rootScope.__copyBoxIdCounter = number + 1;
|
||||
$scope.inputId = "copy-box-input-" + number;
|
||||
|
||||
var button = $($element).find('.input-group-addon');
|
||||
var button = $($element).find('.copy-icon');
|
||||
var input = $($element).find('input');
|
||||
|
||||
input.attr('id', $scope.inputId);
|
||||
|
|
|
@ -365,6 +365,9 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
var namespace = $routeParams.namespace;
|
||||
var name = $routeParams.name;
|
||||
|
||||
$scope.pullCommands = [];
|
||||
$scope.currentPullCommand = null;
|
||||
|
||||
$rootScope.title = 'Loading...';
|
||||
|
||||
// Watch for the destruction of the scope.
|
||||
|
@ -399,6 +402,46 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
$scope.buildDialogShowCounter = 0;
|
||||
$scope.getFormattedCommand = ImageMetadataService.getFormattedCommand;
|
||||
|
||||
$scope.setCurrentPullCommand = function(pullCommand) {
|
||||
$scope.currentPullCommand = pullCommand;
|
||||
};
|
||||
|
||||
$scope.updatePullCommand = function() {
|
||||
$scope.pullCommands = [];
|
||||
|
||||
if ($scope.currentTag) {
|
||||
$scope.pullCommands.push({
|
||||
'title': 'docker pull (Tag ' + $scope.currentTag.name + ')',
|
||||
'shortTitle': 'Pull Tag',
|
||||
'icon': 'fa-tag',
|
||||
'command': 'docker pull ' + Config.getDomain() + '/' + namespace + '/' + name + ':' + $scope.currentTag.name
|
||||
});
|
||||
}
|
||||
|
||||
$scope.pullCommands.push({
|
||||
'title': 'docker pull (Full Repository)',
|
||||
'shortTitle': 'Pull Repo',
|
||||
'icon': 'fa-code-fork',
|
||||
'command': 'docker pull ' + Config.getDomain() + '/' + namespace + '/' + name
|
||||
});
|
||||
|
||||
if ($scope.currentTag) {
|
||||
var squash = 'curl -f ' + Config.getHost('ACCOUNTNAME:PASSWORDORTOKEN');
|
||||
squash += '/c1/squash/' + namespace + '/' + name + '/' + $scope.currentTag.name;
|
||||
squash += ' | docker load';
|
||||
|
||||
$scope.pullCommands.push({
|
||||
'title': 'Squashed image (Tag ' + $scope.currentTag.name + ')',
|
||||
'shortTitle': 'Squashed',
|
||||
'icon': 'fa-file-archive-o',
|
||||
'command': squash,
|
||||
'experimental': true
|
||||
});
|
||||
}
|
||||
|
||||
$scope.currentPullCommand = $scope.pullCommands[0];
|
||||
};
|
||||
|
||||
$scope.showNewBuildDialog = function() {
|
||||
$scope.buildDialogShowCounter++;
|
||||
};
|
||||
|
@ -593,6 +636,8 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
$location.search('tag', null);
|
||||
$location.search('image', imageId.substr(0, 12));
|
||||
}
|
||||
|
||||
$scope.updatePullCommand();
|
||||
};
|
||||
|
||||
$scope.setTag = function(tagName, opt_updateURL) {
|
||||
|
@ -627,6 +672,8 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
$scope.currentTag = null;
|
||||
$scope.currentImage = null;
|
||||
}
|
||||
|
||||
$scope.updatePullCommand();
|
||||
};
|
||||
|
||||
$scope.getFirstTextLine = getFirstTextLine;
|
||||
|
|
Reference in a new issue