Filter
@@ -30,9 +30,9 @@
{{ certificate.owner }}
-
+
@@ -106,7 +106,7 @@
- ARNs
+ ARNs
diff --git a/lemur/static/app/angular/components/filters.js b/lemur/static/app/angular/components/filters.js
index 96471a44..6229e25d 100644
--- a/lemur/static/app/angular/components/filters.js
+++ b/lemur/static/app/angular/components/filters.js
@@ -1,8 +1,8 @@
angular.module('lemur').
filter('titleCase', function () {
return function (str) {
- return (str === undefined || str === null) ? '' : str.replace(/_|-/, ' ').replace(/\w\S*/g, function (txt) {
- return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
+ return (str === undefined || str === null) ? '' : str.replace(/([A-Z])/g, ' $1').replace(/^./, function (txt) {
+ return txt.toUpperCase();
});
};
});
diff --git a/lemur/static/app/angular/loadingModal.html b/lemur/static/app/angular/loadingModal.html
deleted file mode 100644
index 1f65a57e..00000000
--- a/lemur/static/app/angular/loadingModal.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/lemur/static/app/angular/roles/role/role.js b/lemur/static/app/angular/roles/role/role.js
index fb8bbee4..2e977637 100644
--- a/lemur/static/app/angular/roles/role/role.js
+++ b/lemur/static/app/angular/roles/role/role.js
@@ -2,29 +2,37 @@
angular.module('lemur')
- .config(function config($routeProvider) {
- $routeProvider.when('/roles/create', {
- templateUrl: '/angular/roles/role/role.tpl.html',
- controller: 'RoleCreateController'
- });
- $routeProvider.when('/roles/:id/edit', {
- templateUrl: '/angular/roles/role/role.tpl.html',
- controller: 'RoleEditController'
- });
- })
- .controller('RoleEditController', function ($scope, $routeParams, RoleApi, RoleService, UserService) {
- RoleApi.get($routeParams.id).then(function (role) {
+ .controller('RolesEditController', function ($scope, $modalInstance, RoleApi, RoleService, UserService, editId) {
+ RoleApi.get(editId).then(function (role) {
$scope.role = role;
RoleService.getUsers(role);
});
- $scope.save = RoleService.update;
+ $scope.save = function (role) {
+ RoleService.update(role).then(function () {
+ $modalInstance.close();
+ });
+ };
+
+ $scope.cancel = function () {
+ $modalInstance.dismiss('cancel');
+ };
+
$scope.userService = UserService;
$scope.roleService = RoleService;
})
- .controller('RoleCreateController', function ($scope, RoleApi, RoleService, UserService, LemurRestangular ) {
+ .controller('RolesCreateController', function ($scope,$modalInstance, RoleApi, RoleService, UserService, LemurRestangular) {
$scope.role = LemurRestangular.restangularizeElement(null, {}, 'roles');
$scope.userService = UserService;
- $scope.save = RoleService.create;
+
+ $scope.save = function (role) {
+ RoleService.create(role).then(function () {
+ $modalInstance.close();
+ });
+ };
+
+ $scope.cancel = function () {
+ $modalInstance.dismiss('cancel');
+ };
});
diff --git a/lemur/static/app/angular/roles/role/role.tpl.html b/lemur/static/app/angular/roles/role/role.tpl.html
index d88e08d4..dc36bf19 100644
--- a/lemur/static/app/angular/roles/role/role.tpl.html
+++ b/lemur/static/app/angular/roles/role/role.tpl.html
@@ -1,85 +1,82 @@
-Create Edit Role The nail that sticks out farthest gets hammered the hardest
-
-
-
-
Show Credentials
-
Cancel
-
-
-
-
+
Edit
-
+
Remove
diff --git a/lemur/static/app/angular/users/services.js b/lemur/static/app/angular/users/services.js
index b1077b6f..3075beb3 100644
--- a/lemur/static/app/angular/users/services.js
+++ b/lemur/static/app/angular/users/services.js
@@ -50,7 +50,7 @@ angular.module('lemur')
};
UserService.create = function (user) {
- UserApi.post(user).then(
+ return UserApi.post(user).then(
function () {
toaster.pop({
type: 'success',
@@ -69,7 +69,7 @@ angular.module('lemur')
};
UserService.update = function (user) {
- user.put().then(
+ return user.put().then(
function () {
toaster.pop({
type: 'success',
diff --git a/lemur/static/app/angular/users/user/user.js b/lemur/static/app/angular/users/user/user.js
index 009133cb..7a3524f2 100644
--- a/lemur/static/app/angular/users/user/user.js
+++ b/lemur/static/app/angular/users/user/user.js
@@ -2,19 +2,8 @@
angular.module('lemur')
- .config(function config($routeProvider) {
- $routeProvider.when('/users/create', {
- templateUrl: '/angular/users/user/user.tpl.html',
- controller: 'UsersCreateController'
- });
- $routeProvider.when('/users/:id/edit', {
- templateUrl: '/angular/users/user/user.tpl.html',
- controller: 'UsersEditController'
- });
- })
-
- .controller('UsersEditController', function ($scope, $routeParams, UserApi, UserService, RoleService) {
- UserApi.get($routeParams.id).then(function (user) {
+ .controller('UsersEditController', function ($scope, $modalInstance, UserApi, UserService, RoleService, editId) {
+ UserApi.get(editId).then(function (user) {
UserService.getRoles(user);
$scope.user = user;
});
@@ -24,15 +13,36 @@ angular.module('lemur')
$scope.rolePage = 1;
+
+ $scope.save = function (user) {
+ UserService.update(user).then(function () {
+ $modalInstance.close();
+ });
+ }
+
+ $scope.cancel = function () {
+ $modalInstance.dismiss('cancel');
+ };
+
$scope.loadMoreRoles = function () {
$scope.rolePage += 1;
UserService.loadMoreRoles($scope.user, $scope.rolePage);
};
})
- .controller('UsersCreateController', function ($scope, UserService, LemurRestangular, RoleService) {
+ .controller('UsersCreateController', function ($scope, $modalInstance, UserService, LemurRestangular, RoleService) {
$scope.user = LemurRestangular.restangularizeElement(null, {}, 'users');
$scope.save = UserService.create;
$scope.roleService = RoleService;
+ $scope.create = function (user) {
+ UserService.create(user).then(function () {
+ $modalInstance.close();
+ });
+ };
+
+ $scope.cancel = function () {
+ $modalInstance.dismiss('cancel');
+ };
+
});
diff --git a/lemur/static/app/angular/users/user/user.tpl.html b/lemur/static/app/angular/users/user/user.tpl.html
index 21ade85b..9b1aca52 100644
--- a/lemur/static/app/angular/users/user/user.tpl.html
+++ b/lemur/static/app/angular/users/user/user.tpl.html
@@ -1,89 +1,86 @@
-
Create Edit User what was your name again?
-
-
-
-
-
-
-
-
-
-
diff --git a/lemur/static/app/angular/users/view/view.js b/lemur/static/app/angular/users/view/view.js
index 71dc8ff6..104fc245 100644
--- a/lemur/static/app/angular/users/view/view.js
+++ b/lemur/static/app/angular/users/view/view.js
@@ -9,7 +9,7 @@ angular.module('lemur')
});
})
- .controller('UsersViewController', function ($scope, UserApi, UserService, ngTableParams) {
+ .controller('UsersViewController', function ($scope, $modal, UserApi, UserService, ngTableParams) {
$scope.filter = {};
$scope.usersTable = new ngTableParams({
page: 1, // show first page
@@ -36,6 +36,39 @@ angular.module('lemur')
});
};
+ $scope.edit = function (userId) {
+ var modalInstance = $modal.open({
+ animation: true,
+ templateUrl: '/angular/users/user/user.tpl.html',
+ controller: 'UsersEditController',
+ size: 'lg',
+ resolve: {
+ editId: function () {
+ return userId;
+ }
+ }
+ });
+
+ modalInstance.result.then(function () {
+ $scope.usersTable.reload();
+ });
+
+ };
+
+ $scope.create = function () {
+ var modalInstance = $modal.open({
+ animation: true,
+ controller: 'UsersCreateController',
+ templateUrl: '/angular/users/user/user.tpl.html',
+ size: 'lg'
+ });
+
+ modalInstance.result.then(function () {
+ $scope.usersTable.reload();
+ });
+
+ };
+
$scope.toggleFilter = function (params) {
params.settings().$scope.show_filter = !params.settings().$scope.show_filter;
};
diff --git a/lemur/static/app/angular/users/view/view.tpl.html b/lemur/static/app/angular/users/view/view.tpl.html
index 41f91dea..b27b2c05 100644
--- a/lemur/static/app/angular/users/view/view.tpl.html
+++ b/lemur/static/app/angular/users/view/view.tpl.html
@@ -5,7 +5,7 @@
diff --git a/lemur/static/app/angular/wizard.html b/lemur/static/app/angular/wizard.html
index 56090a3f..1ff4b641 100644
--- a/lemur/static/app/angular/wizard.html
+++ b/lemur/static/app/angular/wizard.html
@@ -1,23 +1,12 @@
-
-
-
diff --git a/lemur/static/app/index.html b/lemur/static/app/index.html
index 3a81560c..f8bd8abb 100644
--- a/lemur/static/app/index.html
+++ b/lemur/static/app/index.html
@@ -55,7 +55,7 @@
Domains
Roles
Users
-
Accounts
+
Destinations
Login
diff --git a/lemur/static/app/styles/lemur.css b/lemur/static/app/styles/lemur.css
index 17fc85af..dfd45f03 100644
--- a/lemur/static/app/styles/lemur.css
+++ b/lemur/static/app/styles/lemur.css
@@ -159,3 +159,13 @@ a {
margin-top: 10px;
}
+.wave-spinner {
+ margin: 5px auto !important;
+ width: 40px !important;
+ height: 12px !important;
+}
+
+.wave-spinner>div {
+ background-color: #FFFFFF !important;
+}
+