mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-10 11:33:01 +00:00
Pass front-end the api page limit with Jinja
This commit is contained in:
@@ -3,7 +3,7 @@ export const initialState = {
|
||||
user_page: 0,
|
||||
groups_data: undefined,
|
||||
groups_page: 0,
|
||||
limit: 50,
|
||||
limit: window.api_page_limit,
|
||||
};
|
||||
|
||||
export const reducers = (state = initialState, action) => {
|
||||
|
@@ -466,6 +466,7 @@ class AdminHandler(BaseHandler):
|
||||
allow_named_servers=self.allow_named_servers,
|
||||
named_server_limit_per_user=self.named_server_limit_per_user,
|
||||
server_version='{} {}'.format(__version__, self.version_hash),
|
||||
api_page_limit=self.settings["app"].api_page_default_limit,
|
||||
)
|
||||
self.finish(html)
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@@ -17,6 +17,9 @@
|
||||
|
||||
{% block main %}
|
||||
<div id="react-admin-hook">
|
||||
<script id="jupyterhub-admin-config">
|
||||
window.api_page_limit = parseInt("{{ api_page_limit|safe }}")
|
||||
</script>
|
||||
<script src="static/js/admin-react.js"></script>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user