PR#3894: Sort channels on hosts page

Merges #3894
https://pagure.io/koji/pull-request/3894
This commit is contained in:
Tomas Kopecek 2023-10-23 13:56:54 +02:00
commit b3d37d22ca

View file

@ -1723,7 +1723,7 @@ def hosts(environ, state='enabled', start=None, order='name', ready='all', chann
channel = 'all'
values['channel'] = channel
values['channels'] = server.listChannels()
values['channels'] = sorted(server.listChannels(), key=lambda x: x['name'])
if hosts and 'update_ts' not in hosts[0]:
# be nice with older hub