From e382fa1e588721c7118c71ab6cb335adcd05abff Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 17 Oct 2013 17:45:08 -0400 Subject: [PATCH] Add a status page to /v1/ so that people don't get confused by the message that docker emits --- endpoints/web.py | 4 ++++ static/js/app.js | 5 ++++- static/js/controllers.js | 12 +++++++++++- static/partials/v1-page.html | 20 ++++++++++++++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 static/partials/v1-page.html diff --git a/endpoints/web.py b/endpoints/web.py index 6fb7e2f33..3e6b2fc4d 100644 --- a/endpoints/web.py +++ b/endpoints/web.py @@ -71,6 +71,10 @@ def signin(): def repository(): return index('') +@app.route('/v1') +@app.route('/v1/') +def v1(): + return index('') @app.route('/status', methods=['GET']) def status(): diff --git a/static/js/app.js b/static/js/app.js index 375779ee0..e534c2a97 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -151,9 +151,12 @@ quayApp = angular.module('quay', ['restangular', 'angularMoment', 'angulartics', when('/repository/:namespace/:name/admin', {templateUrl: '/static/partials/repo-admin.html', controller:RepoAdminCtrl}). when('/repository/', {title: 'Repositories', templateUrl: '/static/partials/repo-list.html', controller: RepoListCtrl}). when('/user/', {title: 'User Admin', templateUrl: '/static/partials/user-admin.html', controller: UserAdminCtrl}). - when('/guide/', {title: 'Getting Started Guide', templateUrl: '/static/partials/guide.html', controller: GuideCtrl}). + when('/guide/', {title: 'User Guide', templateUrl: '/static/partials/guide.html', controller: GuideCtrl}). when('/plans/', {title: 'Plans and Pricing', templateUrl: '/static/partials/plans.html', controller: PlansCtrl}). when('/signin/', {title: 'Signin', templateUrl: '/static/partials/signin.html', controller: SigninCtrl}). + + when('/v1/', {title: 'Activation information', templateUrl: '/static/partials/v1-page.html', controller: V1Ctrl}). + when('/', {title: 'Hosted Private Docker Registry', templateUrl: '/static/partials/landing.html', controller: LandingCtrl}). otherwise({redirectTo: '/'}); }]). diff --git a/static/js/controllers.js b/static/js/controllers.js index f472f9fbb..c3b58cc1c 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -50,7 +50,7 @@ function getMarkedDown(string) { } function HeaderCtrl($scope, $location, UserService, Restangular) { - $scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) { + $scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) { $scope.user = currentUser; }, true); @@ -755,4 +755,14 @@ function UserAdminCtrl($scope, $timeout, Restangular, PlanService, UserService, }); }); }; +} + +function V1Ctrl($scope, UserService) { + $scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) { + $scope.user = currentUser; + }, true); + + $scope.browseRepos = function() { + document.location = '/repository/'; + }; } \ No newline at end of file diff --git a/static/partials/v1-page.html b/static/partials/v1-page.html new file mode 100644 index 000000000..821654fdd --- /dev/null +++ b/static/partials/v1-page.html @@ -0,0 +1,20 @@ +
+
+

Welcome {{ user.username }}. Your account is fully activated!

+ +
+ +
+
+
+

Welcome {{ user.username }}. Your account is pending email confirmation.

+

Please check your inbox (and potentially your spam folder) for an email from support@quay.io

+
+
+

Docker sent me here. What do I need to do?

+

+ Sign In to check the activation status of your account. If you have already activated + your account previously, then you do not need to do anything further. +

+
+