mirror of
https://github.com/dkmstr/openuds.git
synced 2025-08-29 01:50:00 +03:00
Added support for configurable admin pagesizes
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -93,6 +93,6 @@
|
||||
</svg>
|
||||
</div>
|
||||
</uds-root>
|
||||
<script src="/uds/res/admin/runtime.js?stamp=1602729551" defer></script><script src="/uds/res/admin/polyfills-es5.js?stamp=1602729551" nomodule defer></script><script src="/uds/res/admin/polyfills.js?stamp=1602729551" defer></script><script src="/uds/res/admin/main.js?stamp=1602729551" defer></script></body>
|
||||
<script src="/uds/res/admin/runtime.js?stamp=1603184654" defer></script><script src="/uds/res/admin/polyfills-es5.js?stamp=1603184654" nomodule defer></script><script src="/uds/res/admin/polyfills.js?stamp=1603184654" defer></script><script src="/uds/res/admin/main.js?stamp=1603184654" defer></script></body>
|
||||
|
||||
</html>
|
||||
|
@ -198,8 +198,11 @@ def udsJs(request: 'HttpRequest') -> str:
|
||||
config['urls']['admin'] = reverse('uds.admin.views.index')
|
||||
config['urls']['rest'] = reverse('REST', kwargs={'arguments': ''})
|
||||
# Admin config
|
||||
page_size = GlobalConfig.ADMIN_PAGESIZE.getInt(True)
|
||||
# Fix page size to razonable usable values
|
||||
page_size = 10 if page_size < 10 else 50 if page_size > 50 else page_size
|
||||
config['admin'] = {
|
||||
'page_size': GlobalConfig.ADMIN_PAGESIZE.getInt(True),
|
||||
'page_size': page_size,
|
||||
}
|
||||
|
||||
errors: typing.List = []
|
||||
|
Reference in New Issue
Block a user