[keycloak-dev] Column Sorting

KevinO oneal.kevin at gmail.com
Mon Oct 15 11:55:21 EDT 2018


Question about the API for ordering resources. There are a couple of
different ways that ordering can be handled.

Option 1
auth/admin/realms/external/groups?first=20&max=20&search=test&sort_by=+group
auth/admin/realms/external/groups?first=20&max=20&search=test&sort_by=-group


Option 2
auth/admin/realms/external/groups?first=20&max=20&search=test&sort_by=group:asc
auth/admin/realms/external/groups?first=20&max=20&search=test&sort_by=group:desc

Option 3
auth/admin/realms/external/groups?first=20&max=20&search=test&sort_by=group&order_by=asc
auth/admin/realms/external/groups?first=20&max=20&search=test&sort_by=group&order_by=desc

I don't think multi-column sorting is necessary, so I skipped that option.
Let me know if I missed an example of sorting that has defined how to do
sorting or if there is an alternative to the three options I've given.

Kevin


On Wed, Oct 3, 2018 at 11:04 AM KevinO <oneal.kevin at gmail.com> wrote:

> I 100% agree with pagination on the server side. I'd like to start with
> the Groups page. I'm assuming the API will have to change. I'll use the
> Users page as a template.
>
> On Wed, Oct 3, 2018 at 9:38 AM Stian Thorgersen <sthorger at redhat.com>
> wrote:
>
>> Not 100% sure what the current status is. Some are paginated server-side,
>> some on client-side, some are missing pagination. Users are paginated on
>> server side for sure.
>>
>> For a large portion of tables though pagination has to be done on server
>> side (users, clients, roles, groups, etc. can all have large number of
>> entries). With that in mind I think to keep things consistent we should do
>> pagination and sorting on the server side for everything.
>>
>> On Wed, 3 Oct 2018 at 15:57, KevinO <oneal.kevin at gmail.com> wrote:
>>
>>> Stian, could you point me to a table that currently has server side
>>> pagination? And is there currently an effort to make all tables have
>>> server-side pagination?
>>>
>>> On Mon, Oct 1, 2018 at 8:05 PM KevinO <oneal.kevin at gmail.com> wrote:
>>>
>>> > Is there any opposition to me adding column sorting? There is the
>>> ticket
>>> > for it:
>>> > https://issues.jboss.org/browse/KEYCLOAK-4676
>>> >
>>> > I've tested a solution that uses standard angular ordering. I don't
>>> want
>>> > to update all the tables if this is a feature that is not wanted.
>>> >
>>> > Here is what one option of sorting would look like using Font-Awesoms
>>> > chevron as the clickable item.
>>> > [image: image.png]
>>> > [image: image.png]
>>> >
>>> _______________________________________________
>>> keycloak-dev mailing list
>>> keycloak-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>>
>>


More information about the keycloak-dev mailing list