mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 18:14:10 +00:00

I made this PR to see if this feature would be useful for other people. Right now, you can't see all of a user or server's details in the admin page so I added a collapsible view which will let you see the entire server and user objects. I'm open to ideas about how the information is displayed. Will add more tests if this feature is accepted.  Signed-off-by: Min RK <benjaminrk@gmail.com>
31 lines
776 B
JavaScript
31 lines
776 B
JavaScript
export const initialState = {
|
|
user_data: undefined,
|
|
user_page: 0,
|
|
name_filter: "",
|
|
groups_data: undefined,
|
|
groups_page: 0,
|
|
limit: window.api_page_limit,
|
|
};
|
|
|
|
export const reducers = (state = initialState, action) => {
|
|
switch (action.type) {
|
|
// Updates the client user model data and stores the page
|
|
case "USER_PAGE":
|
|
return Object.assign({}, state, {
|
|
user_page: action.value.page,
|
|
user_data: action.value.data,
|
|
name_filter: action.value.name_filter || "",
|
|
});
|
|
|
|
// Updates the client group model data and stores the page
|
|
case "GROUPS_PAGE":
|
|
return Object.assign({}, state, {
|
|
groups_page: action.value.page,
|
|
groups_data: action.value.data,
|
|
});
|
|
|
|
default:
|
|
return state;
|
|
}
|
|
};
|