mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-12 04:23:01 +00:00
Add UI pagination, update Redux and API service lib
This commit is contained in:
@@ -3,7 +3,14 @@ import { jhapiRequest } from "./jhapiUtil";
|
||||
|
||||
const withAPI = withProps((props) => ({
|
||||
updateUsers: (offset, limit) =>
|
||||
jhapiRequest(`/users?offset=${offset}&limit=${limit}`, "GET"),
|
||||
jhapiRequest(`/users?offset=${offset}&limit=${limit}`, "GET").then((data) =>
|
||||
data.json()
|
||||
),
|
||||
updateGroups: (offset, limit) =>
|
||||
jhapiRequest(
|
||||
`/groups?offset=${offset}&limit=${limit}`,
|
||||
"GET"
|
||||
).then((data) => data.json()),
|
||||
shutdownHub: () => jhapiRequest("/shutdown", "POST"),
|
||||
startServer: (name) => jhapiRequest("/users/" + name + "/server", "POST"),
|
||||
stopServer: (name) => jhapiRequest("/users/" + name + "/server", "DELETE"),
|
||||
|
Reference in New Issue
Block a user