diff --git a/bower.json b/bower.json
index e0a15d3f..ccb98a7a 100644
--- a/bower.json
+++ b/bower.json
@@ -30,7 +30,8 @@
"angular-chart.js": "~0.7.1",
"satellizer": "~0.9.4",
"angularjs-toaster": "~0.4.14",
- "ngletteravatar": "~3.0.1"
+ "ngletteravatar": "~3.0.1",
+ "angular-ui-router": "~0.2.15"
},
"devDependencies": {
"angular-mocks": "~1.3",
diff --git a/lemur/static/app/angular/app.js b/lemur/static/app/angular/app.js
index c00bb26d..386b696d 100644
--- a/lemur/static/app/angular/app.js
+++ b/lemur/static/app/angular/app.js
@@ -2,7 +2,7 @@
var lemur = angular
.module('lemur', [
- 'ngRoute',
+ 'ui.router',
'ngTable',
'ngAnimate',
'chart.js',
@@ -16,13 +16,13 @@ var lemur = angular
'satellizer',
'ngLetterAvatar'
])
- .config(function ($routeProvider, $authProvider) {
- $routeProvider
- .when('/', {
+ .config(function ($stateProvider, $urlRouterProvider, $authProvider) {
+ $urlRouterProvider.otherwise('/welcome');
+
+ $stateProvider
+ .state('welcome', {
+ url: '/welcome',
templateUrl: 'angular/welcome/welcome.html'
- })
- .otherwise({
- redirectTo: '/'
});
$authProvider.oauth2({
diff --git a/lemur/static/app/angular/authentication/login/login.js b/lemur/static/app/angular/authentication/login/login.js
index b7cc7902..cfcd715c 100644
--- a/lemur/static/app/angular/authentication/login/login.js
+++ b/lemur/static/app/angular/authentication/login/login.js
@@ -1,8 +1,9 @@
'use strict';
angular.module('lemur')
- .config(function config($routeProvider) {
- $routeProvider.when('/login', {
+ .config(function config($stateProvider) {
+ $stateProvider.state('login', {
+ url: '/login',
templateUrl: '/angular/authentication/login/login.tpl.html',
controller: 'LoginController'
});
diff --git a/lemur/static/app/angular/authentication/logout/logout.js b/lemur/static/app/angular/authentication/logout/logout.js
index 18cbd489..a8acacfb 100644
--- a/lemur/static/app/angular/authentication/logout/logout.js
+++ b/lemur/static/app/angular/authentication/logout/logout.js
@@ -1,9 +1,10 @@
'use strict';
angular.module('lemur')
- .config(function config($routeProvider) {
- $routeProvider.when('/logout', {
- controller: 'LogoutCtrl'
+ .config(function config($stateProvider) {
+ $stateProvider.state('logout', {
+ controller: 'LogoutCtrl',
+ url: '/logout'
});
})
.controller('LogoutCtrl', function ($scope, $location, lemurRestangular, userService) {
diff --git a/lemur/static/app/angular/authorities/view/view.js b/lemur/static/app/angular/authorities/view/view.js
index 71cdbb9a..8ae7343b 100644
--- a/lemur/static/app/angular/authorities/view/view.js
+++ b/lemur/static/app/angular/authorities/view/view.js
@@ -2,15 +2,22 @@
angular.module('lemur')
- .config(function config($routeProvider) {
- $routeProvider.when('/authorities', {
- templateUrl: '/angular/authorities/view/view.tpl.html',
- controller: 'AuthoritiesViewController'
- });
+ .config(function config($stateProvider) {
+ $stateProvider
+ .state('authorities', {
+ url: '/authorities',
+ templateUrl: '/angular/authorities/view/view.tpl.html',
+ controller: 'AuthoritiesViewController'
+ })
+ .state('authority', {
+ url: '/authorities/:name',
+ templateUrl: '/angular/authorities/view/view.tpl.html',
+ controller: 'AuthoritiesViewController'
+ });
})
- .controller('AuthoritiesViewController', function ($scope, $q, $modal, AuthorityApi, AuthorityService, ngTableParams) {
- $scope.filter = {};
+ .controller('AuthoritiesViewController', function ($scope, $q, $modal, $stateParams, AuthorityApi, AuthorityService, ngTableParams) {
+ $scope.filter = $stateParams;
$scope.authoritiesTable = new ngTableParams({
page: 1, // show first page
count: 10, // count per page
diff --git a/lemur/static/app/angular/authorities/view/view.tpl.html b/lemur/static/app/angular/authorities/view/view.tpl.html
index d04bc750..5bbc2e30 100644
--- a/lemur/static/app/angular/authorities/view/view.tpl.html
+++ b/lemur/static/app/angular/authorities/view/view.tpl.html
@@ -34,6 +34,9 @@
+
+ Permalink
+ |
|