Adding ui router and perma links to certificates and authorities
This commit is contained in:
parent
c0f14db5bb
commit
162482dbc4
@ -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",
|
||||
|
14
lemur/static/app/angular/app.js
vendored
14
lemur/static/app/angular/app.js
vendored
@ -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({
|
||||
|
@ -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'
|
||||
});
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -34,6 +34,9 @@
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td data-title="''">
|
||||
<a ui-sref="authority({'name': '{{ authority.name }}'})">Permalink</a>
|
||||
</td>
|
||||
<td data-title="''">
|
||||
<div class="btn-group-vertical pull-right">
|
||||
<button tooltip="Edit Authority" ng-click="edit(authority.id)" class="btn btn-sm btn-info">
|
||||
|
@ -2,15 +2,23 @@
|
||||
|
||||
angular.module('lemur')
|
||||
|
||||
.config(function config($routeProvider) {
|
||||
$routeProvider.when('/certificates', {
|
||||
templateUrl: '/angular/certificates/view/view.tpl.html',
|
||||
controller: 'CertificatesViewController'
|
||||
});
|
||||
.config(function config($stateProvider) {
|
||||
|
||||
$stateProvider
|
||||
.state('certificates', {
|
||||
url: "/certificates",
|
||||
templateUrl: '/angular/certificates/view/view.tpl.html',
|
||||
controller: 'CertificatesViewController'
|
||||
})
|
||||
.state('certificate', {
|
||||
url: "/certificates/:name",
|
||||
templateUrl: '/angular/certificates/view/view.tpl.html',
|
||||
controller: 'CertificatesViewController'
|
||||
});
|
||||
})
|
||||
|
||||
.controller('CertificatesViewController', function ($q, $scope, $modal, CertificateApi, CertificateService, MomentService, ngTableParams) {
|
||||
$scope.filter = {};
|
||||
.controller('CertificatesViewController', function ($q, $scope, $modal, $stateParams, CertificateApi, CertificateService, MomentService, ngTableParams) {
|
||||
$scope.filter = $stateParams;
|
||||
$scope.certificateTable = new ngTableParams({
|
||||
page: 1, // show first page
|
||||
count: 10, // count per page
|
||||
|
@ -41,6 +41,9 @@
|
||||
<td data-title="'Common Name'" filter="{ 'cn': 'text'}">
|
||||
{{ certificate.cn }}
|
||||
</td>
|
||||
<td data-title="''">
|
||||
<a ui-sref="certificate({'name': '{{ certificate.name }}'})">Permalink</a>
|
||||
</td>
|
||||
<td data-title="''">
|
||||
<div class="btn-group pull-right">
|
||||
<button ng-model="certificate.toggle" class="btn btn-sm btn-info" btn-checkbox btn-checkbox-true="1" butn-checkbox-false="0">More</button>
|
||||
@ -122,6 +125,7 @@
|
||||
</div>
|
||||
</tab>
|
||||
</tabset>
|
||||
|
||||
<tabset justified="true" class="col-md-6">
|
||||
<tab heading="Chain">
|
||||
<p>
|
||||
|
@ -1,8 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('lemur')
|
||||
.config(function config($routeProvider) {
|
||||
$routeProvider.when('/dashboard', {
|
||||
.config(function config($stateProvider) {
|
||||
$stateProvider.state('dashboard', {
|
||||
url: '/dashboard',
|
||||
templateUrl: '/angular/dashboard/dashboard.tpl.html',
|
||||
controller: 'DashboardController'
|
||||
});
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
angular.module('lemur')
|
||||
|
||||
.config(function config($routeProvider) {
|
||||
$routeProvider.when('/destinations', {
|
||||
.config(function config($stateProvider) {
|
||||
$stateProvider.state('destinations', {
|
||||
url: '/destinations',
|
||||
templateUrl: '/angular/destinations/view/view.tpl.html',
|
||||
controller: 'DestinationsViewController'
|
||||
});
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
angular.module('lemur')
|
||||
|
||||
.config(function config($routeProvider) {
|
||||
$routeProvider.when('/domains', {
|
||||
.config(function config($stateProvider) {
|
||||
$stateProvider.state('domains', {
|
||||
url: '/domains',
|
||||
templateUrl: '/angular/domains/view/view.tpl.html',
|
||||
controller: 'DomainsViewController'
|
||||
});
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
angular.module('lemur')
|
||||
|
||||
.config(function config($routeProvider) {
|
||||
$routeProvider.when('/notifications', {
|
||||
.config(function config($stateProvider) {
|
||||
$stateProvider.state('notifications', {
|
||||
url: '/notifications',
|
||||
templateUrl: '/angular/notifications/view/view.tpl.html',
|
||||
controller: 'NotificationsViewController'
|
||||
});
|
||||
|
5
lemur/static/app/angular/roles/view/view.js
vendored
5
lemur/static/app/angular/roles/view/view.js
vendored
@ -2,8 +2,9 @@
|
||||
|
||||
angular.module('lemur')
|
||||
|
||||
.config(function config($routeProvider) {
|
||||
$routeProvider.when('/roles', {
|
||||
.config(function config($stateProvider) {
|
||||
$stateProvider.state('roles', {
|
||||
url: '/roles',
|
||||
templateUrl: '/angular/roles/view/view.tpl.html',
|
||||
controller: 'RolesViewController'
|
||||
});
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
angular.module('lemur')
|
||||
|
||||
.config(function config($routeProvider) {
|
||||
$routeProvider.when('/sources', {
|
||||
.config(function config($stateProvider) {
|
||||
$stateProvider.state('sources', {
|
||||
url: '/sources',
|
||||
templateUrl: '/angular/sources/view/view.tpl.html',
|
||||
controller: 'SourcesViewController'
|
||||
});
|
||||
|
5
lemur/static/app/angular/users/view/view.js
vendored
5
lemur/static/app/angular/users/view/view.js
vendored
@ -2,8 +2,9 @@
|
||||
|
||||
angular.module('lemur')
|
||||
|
||||
.config(function config($routeProvider) {
|
||||
$routeProvider.when('/users', {
|
||||
.config(function config($stateProvider) {
|
||||
$stateProvider.state('users', {
|
||||
url: '/users',
|
||||
templateUrl: '/angular/users/view/view.tpl.html',
|
||||
controller: 'UsersViewController'
|
||||
});
|
||||
|
@ -49,24 +49,24 @@
|
||||
</div>
|
||||
<div class="navbar-collapse collapse" ng-controller="LoginController">
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li><a href="/#/dashboard">Dashboard</a></li>
|
||||
<li><a href="/#/certificates">Certificates</a></li>
|
||||
<li><a href="/#/authorities">Authorities</a></li>
|
||||
<li><a href="/#/notifications">Notifications</a></li>
|
||||
<li><a href="/#/destinations">Destinations</a></li>
|
||||
<li><a href="/#/sources">Sources</a></li>
|
||||
<li><a ui-sref="dashboard">Dashboard</a></li>
|
||||
<li><a ui-sref="certificates">Certificates</a></li>
|
||||
<li><a ui-sref="authorities">Authorities</a></li>
|
||||
<li><a ui-sref="notifications">Notifications</a></li>
|
||||
<li><a ui-sref="destinations">Destinations</a></li>
|
||||
<li><a ui-sref="sources">Sources</a></li>
|
||||
<li></li>
|
||||
<li class="dropdown" dropdown on-toggle="toggled(open)">
|
||||
<a href class="dropdown-toggle" dropdown-toggle>Settings <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="/#/roles">Roles</a></li>
|
||||
<li><a href="/#/users">Users</a></li>
|
||||
<li><a href="/#/domains">Domains</a></li>
|
||||
<li><a ui-sref="roles">Roles</a></li>
|
||||
<li><a ui-sref="users">Users</a></li>
|
||||
<li><a ui-sref="domains">Domains</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul ng-show="!currentUser.username" class="nav navbar-nav navbar-right">
|
||||
<li><a href="/#/login">Login</a></li>
|
||||
<li><a ui-sref="login">Login</a></li>
|
||||
</ul>
|
||||
<ul ng-show="currentUser.username" class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown" dropdown on-toggle="toggled(open)">
|
||||
@ -88,7 +88,7 @@
|
||||
</div>
|
||||
<!-- Add your site or application content here -->
|
||||
<div class="container-fluid">
|
||||
<div ng-view></div>
|
||||
<div ui-view></div>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
|
Loading…
Reference in New Issue
Block a user