Skip to content

Commit

Permalink
Change landing page to repositories
Browse files Browse the repository at this point in the history
Currently the landing page is the home page but that requires the user to make
one mouse click to navigate to the repositories page which is where the action
is. This change set just updates the default landing route from Home to
repositories (with a default page of 20). The Home page still exists but is not
the default location the user lands on when going to the site.

This fixes issues #34
  • Loading branch information
Brad van der Laan committed Jun 9, 2018
1 parent acd3f1f commit 4419f2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ angular
controller: 'CreateTagController',
}).
otherwise({
redirectTo: '/home'
redirectTo: '/repositories/20'
});
}]);
8 changes: 4 additions & 4 deletions app/app.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ describe('docker-registry-frontend', function() {
expect($route.current.controller).toBe('CreateTagController');
});

it('/unknown-url should display home page', function() {
$httpBackend.expectGET('home.html').respond(200);
it('/unknown-url should display repositories page', function() {
$httpBackend.expectGET('repository/repository-list.html').respond(200);
$location.path('/unknown-url');
$rootScope.$digest();
expect($route.current.templateUrl).toBe('home.html');
expect($route.current.controller).toBe('HomeController');
expect($route.current.templateUrl).toBe('repository/repository-list.html');
expect($route.current.controller).toBe('RepositoryListController');
});

});

0 comments on commit 4419f2a

Please sign in to comment.