Replace references seen in the enterprise version to "Quay.io" with a config-pulled value

This commit is contained in:
Joseph Schorr 2014-08-08 13:50:04 -04:00
parent 5d4a6fc279
commit 6f804c222a
18 changed files with 84 additions and 60 deletions

View file

@ -991,7 +991,7 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
return userService;
}]);
$provide.factory('ExternalNotificationData', [function() {
$provide.factory('ExternalNotificationData', ['Config', function(Config) {
var externalNotificationData = {};
var events = [
@ -1025,7 +1025,7 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
var methods = [
{
'id': 'quay_notification',
'title': 'Quay.io Notification',
'title': Config.REGISTRY_TITLE + ' Notification',
'icon': 'quay-icon',
'fields': [
{
@ -1111,7 +1111,7 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
},
'password_required': {
'level': 'error',
'message': 'In order to begin pushing and pulling repositories to Quay.io, a password must be set for your account',
'message': 'In order to begin pushing and pulling repositories, a password must be set for your account',
'page': '/user?tab=password'
},
'over_private_usage': {
@ -1130,7 +1130,7 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
'expiring_license': {
'level': 'error',
'message': 'Your license will expire at: {expires_at} ' +
'<br><br>Please contact Quay.io support to purchase a new license.',
'<br><br>Please contact support to purchase a new license.',
'page': '/contact/'
},
'maintenance': {
@ -1634,8 +1634,9 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
});
};
}).
config(['$routeProvider', '$locationProvider',
config(['$routeProvider', '$locationProvider',
function($routeProvider, $locationProvider) {
var title = window.__config['REGISTRY_TITLE'] || 'Quay.io';
$locationProvider.html5Mode(true);
@ -1654,13 +1655,14 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
when('/repository/:namespace/:name/build/:buildid/buildpack', {templateUrl: '/static/partials/build-package.html', controller:BuildPackageCtrl, reloadOnSearch: false}).
when('/repository/', {title: 'Repositories', description: 'Public and private docker repositories list',
templateUrl: '/static/partials/repo-list.html', controller: RepoListCtrl}).
when('/user/', {title: 'Account Settings', description:'Account settings for Quay.io', templateUrl: '/static/partials/user-admin.html',
when('/user/', {title: 'Account Settings', description:'Account settings for ' + title, templateUrl: '/static/partials/user-admin.html',
reloadOnSearch: false, controller: UserAdminCtrl}).
when('/superuser/', {title: 'Superuser Admin Panel', description:'Admin panel for Quay.io', templateUrl: '/static/partials/super-user.html',
when('/superuser/', {title: 'Superuser Admin Panel', description:'Admin panel for ' + title, templateUrl: '/static/partials/super-user.html',
reloadOnSearch: false, controller: SuperUserAdminCtrl}).
when('/guide/', {title: 'Guide', description:'Guide to using private docker repositories on Quay.io', templateUrl: '/static/partials/guide.html',
when('/guide/', {title: 'Guide', description:'Guide to using private docker repositories on ' + title,
templateUrl: '/static/partials/guide.html',
controller: GuideCtrl}).
when('/tutorial/', {title: 'Tutorial', description:'Interactive tutorial for using Quay.io', templateUrl: '/static/partials/tutorial.html',
when('/tutorial/', {title: 'Tutorial', description:'Interactive tutorial for using ' + title, templateUrl: '/static/partials/tutorial.html',
controller: TutorialCtrl}).
when('/contact/', {title: 'Contact Us', description:'Different ways for you to get a hold of us when you need us most.', templateUrl: '/static/partials/contact.html',
controller: ContactCtrl}).
@ -1669,12 +1671,12 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
templateUrl: '/static/partials/plans.html', controller: PlansCtrl}).
when('/security/', {title: 'Security', description: 'Security features used when transmitting and storing data',
templateUrl: '/static/partials/security.html'}).
when('/signin/', {title: 'Sign In', description: 'Sign into Quay.io', templateUrl: '/static/partials/signin.html'}).
when('/signin/', {title: 'Sign In', description: 'Sign into ' + title, templateUrl: '/static/partials/signin.html'}).
when('/new/', {title: 'Create new repository', description: 'Create a new public or private docker repository, optionally constructing from a dockerfile',
templateUrl: '/static/partials/new-repo.html', controller: NewRepoCtrl}).
when('/organizations/', {title: 'Organizations', description: 'Private docker repository hosting for businesses and organizations',
templateUrl: '/static/partials/organizations.html', controller: OrgsCtrl}).
when('/organizations/new/', {title: 'New Organization', description: 'Create a new organization on Quay.io',
when('/organizations/new/', {title: 'New Organization', description: 'Create a new organization on ' + title,
templateUrl: '/static/partials/new-organization.html', controller: NewOrgCtrl}).
when('/organization/:orgname', {templateUrl: '/static/partials/org-view.html', controller: OrgViewCtrl}).
when('/organization/:orgname/admin', {templateUrl: '/static/partials/org-admin.html', controller: OrgAdminCtrl, reloadOnSearch: false}).
@ -1685,10 +1687,10 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
when('/v1/', {title: 'Activation information', templateUrl: '/static/partials/v1-page.html', controller: V1Ctrl}).
when('/tour/', {title: 'Quay.io Tour', templateUrl: '/static/partials/tour.html', controller: TourCtrl}).
when('/tour/', {title: title + ' Tour', templateUrl: '/static/partials/tour.html', controller: TourCtrl}).
when('/tour/organizations', {title: 'Teams and Organizations Tour', templateUrl: '/static/partials/tour.html', controller: TourCtrl}).
when('/tour/features', {title: 'Quay.io Features', templateUrl: '/static/partials/tour.html', controller: TourCtrl}).
when('/tour/enterprise', {title: 'Quay.io Enterprise Edition', templateUrl: '/static/partials/tour.html', controller: TourCtrl}).
when('/tour/features', {title: title + ' Features', templateUrl: '/static/partials/tour.html', controller: TourCtrl}).
when('/tour/enterprise', {title: 'Enterprise Edition', templateUrl: '/static/partials/tour.html', controller: TourCtrl}).
when('/', {title: 'Hosted Private Docker Registry', templateUrl: '/static/partials/landing.html', controller: LandingCtrl,
pageClass: 'landing-page'}).
@ -3149,6 +3151,22 @@ quayApp.directive('quaySpinner', function () {
});
quayApp.directive('registryName', function () {
var directiveDefinitionObject = {
priority: 0,
templateUrl: '/static/directives/registry-name.html',
replace: false,
transclude: true,
restrict: 'C',
scope: {},
controller: function($scope, $element, Config) {
$scope.name = Config.REGISTRY_TITLE;
}
};
return directiveDefinitionObject;
});
quayApp.directive('organizationHeader', function () {
var directiveDefinitionObject = {
priority: 0,
@ -3355,7 +3373,7 @@ quayApp.directive('entitySearch', function () {
// Set this property to immediately clear the contents of the control.
'clearValue': '=clearValue',
},
controller: function($rootScope, $scope, $element, Restangular, UserService, ApiService) {
controller: function($rootScope, $scope, $element, Restangular, UserService, ApiService, Config) {
$scope.lazyLoading = true;
$scope.teams = null;
@ -3553,7 +3571,7 @@ quayApp.directive('entitySearch', function () {
}
if (val.indexOf('@') > 0) {
return '<div class="tt-empty">A Quay.io username (not an e-mail address) must be specified</div>';
return '<div class="tt-empty">A ' + Config.REGISTRY_TITLE_SHORT + ' username (not an e-mail address) must be specified</div>';
}
var classes = [];
@ -3580,7 +3598,7 @@ quayApp.directive('entitySearch', function () {
class_string += classes[i];
}
return '<div class="tt-empty">No matching Quay.io ' + class_string + ' found</div>';
return '<div class="tt-empty">No matching ' + Config.REGISTRY_TITLE_SHORT + ' ' + class_string + ' found</div>';
}
return null;