This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 837
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix listing size and added pagination to consumer groups. Ref issue #302
- Loading branch information
Panagis Tselentis
committed
Dec 24, 2018
1 parent
6dd4f77
commit d615352
Showing
7 changed files
with
302 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| (function() { | ||
| 'use strict'; | ||
|
|
||
| /** | ||
| * Model for Author API, this is used to wrap all Author objects specified actions and data change actions. | ||
| */ | ||
| angular.module('frontend.consumers') | ||
| .service('ACLModel', [ | ||
| 'DataModel','DataService','$q','$log', | ||
| function(DataModel,DataService,$q,$log) { | ||
|
|
||
| var model = new DataModel('kong/acls',true); | ||
|
|
||
|
|
||
| model.handleError = function($scope,err) { | ||
| $scope.errors = {} | ||
| if(err.data){ | ||
|
|
||
| for(var key in err.data.invalidAttributes){ | ||
| $scope.errors[key] = err.data.invalidAttributes[key][0].message | ||
| } | ||
|
|
||
| // Passport errors | ||
| if(err.data.raw && err.data.raw.length) { | ||
| err.data.raw.forEach(function(raw){ | ||
| for(var key in raw.err.invalidAttributes){ | ||
| $scope.errors[key] = raw.err.invalidAttributes[key][0].message | ||
| } | ||
| }) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| return model; | ||
| } | ||
| ]) | ||
| ; | ||
| }()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,48 @@ | ||
|
|
||
| <div class="row"> | ||
| <div class="col-md-3" data-ng-repeat="acl in acls"> | ||
| <div | ||
| class="panel panel-default panel-flat elipsize" style="background: #fff"> | ||
| <i | ||
| data-ng-click="deleteGroup(acl)" | ||
| class="mdi mdi-close clickable pull-right margin-top margin-right"></i> | ||
| <div class="panel-body elipsize"> | ||
| <div ng-if="items && items.data"> | ||
| <div class="col-md-12 bg-light-grey padding margin-bottom"> | ||
| <list-search | ||
| class="pull-right" | ||
| data-filters="filters" | ||
| data-options="itemsPerPageOptions" | ||
| data-items="itemsPerPage" | ||
| ></list-search> | ||
| </div> | ||
| <div class="row"> | ||
| <div class="col-md-3" dir-paginate="acl in items.data | orderBy:sort.column:sort.direction | filter : filters.searchWord | itemsPerPage: itemsPerPage as filteredItems"> | ||
| <div | ||
| class="panel panel-default panel-flat elipsize" style="background: #fff"> | ||
| <i | ||
| data-ng-click="deleteGroup(acl)" | ||
| class="mdi mdi-close clickable pull-right margin-top margin-right"></i> | ||
| <div class="panel-body elipsize"> | ||
| <span class=" no-wrap "> | ||
| <i class="mdi mdi-account-multiple-outline"></i> | ||
| <strong>{{acl.group}}</strong> | ||
|
|
||
| </span> | ||
| </div> | ||
|
|
||
| </div> | ||
|
|
||
| </div> | ||
|
|
||
| </div> | ||
| <div class="col-md-3"> | ||
| <div | ||
| data-ng-click="addGroup(consumer)" | ||
| class="panel panel-dashed panel-flat clickable"> | ||
| <div class="panel-body elipsize"> | ||
| <div class="col-md-3"> | ||
| <div | ||
| data-ng-click="addGroup(consumer)" | ||
| class="panel panel-dashed panel-flat clickable"> | ||
| <div class="panel-body elipsize"> | ||
| <span class=" no-wrap"> | ||
| <i class="mdi mdi-plus"></i> | ||
| Add a group | ||
| </span> | ||
|
|
||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="row"> | ||
| <div class="col-md-12"> | ||
| <dir-pagination-controls class="pull-right"></dir-pagination-controls> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.