initial list
This commit is contained in:
parent
b4a73f86c1
commit
3399b16c7e
4 changed files with 40 additions and 6 deletions
|
@ -24,7 +24,7 @@
|
||||||
"@patternfly/react-table": "4.23.0",
|
"@patternfly/react-table": "4.23.0",
|
||||||
"file-saver": "^2.0.2",
|
"file-saver": "^2.0.2",
|
||||||
"i18next": "^19.6.2",
|
"i18next": "^19.6.2",
|
||||||
"keycloak-admin": "1.14.7",
|
"keycloak-admin": "1.14.8",
|
||||||
"lodash": "^4.17.20",
|
"lodash": "^4.17.20",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"react": "^16.8.5",
|
"react": "^16.8.5",
|
||||||
|
|
|
@ -1,8 +1,41 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import moment from "moment";
|
||||||
|
|
||||||
|
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
|
||||||
import { useAdminClient } from "../context/auth/AdminClient";
|
import { useAdminClient } from "../context/auth/AdminClient";
|
||||||
|
import { useRealm } from "../context/realm-context/RealmContext";
|
||||||
|
|
||||||
export const InitialAccessTokenList = () => {
|
export const InitialAccessTokenList = () => {
|
||||||
const adminClient = useAdminClient();
|
const adminClient = useAdminClient();
|
||||||
return <h1>Hello</h1>;
|
const { realm } = useRealm();
|
||||||
|
const loader = async () =>
|
||||||
|
await adminClient.realms.getClientsInitialAccess({ realm });
|
||||||
|
|
||||||
|
return (
|
||||||
|
<KeycloakDataTable
|
||||||
|
ariaLabelKey="clients:initialAccessToken"
|
||||||
|
searchPlaceholderKey="clients:searchInitialAccessToken"
|
||||||
|
loader={loader}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "timestamp",
|
||||||
|
cellRenderer: (row) => moment(row.timestamp * 1000).fromNow(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "expiration",
|
||||||
|
cellRenderer: (row) =>
|
||||||
|
moment(moment.now() - row.expiration * 1000).fromNow(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "count",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "remainingCount",
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
"downloadAdapterConfig": "Download adapter config",
|
"downloadAdapterConfig": "Download adapter config",
|
||||||
"disableConfirm": "If you disable this client, you cannot initiate a login or obtain access tokens.",
|
"disableConfirm": "If you disable this client, you cannot initiate a login or obtain access tokens.",
|
||||||
"clientDeleteConfirm": "If you delete this client, all associated data will be removed.",
|
"clientDeleteConfirm": "If you delete this client, all associated data will be removed.",
|
||||||
|
"searchInitialAccessToken": "Search token",
|
||||||
"clientAuthentication": "Client authentication",
|
"clientAuthentication": "Client authentication",
|
||||||
"authentication": "Authentication",
|
"authentication": "Authentication",
|
||||||
"authenticationFlow": "Authentication flow",
|
"authenticationFlow": "Authentication flow",
|
||||||
|
|
|
@ -13477,10 +13477,10 @@ junk@^3.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/junk/-/junk-3.1.0.tgz#31499098d902b7e98c5d9b9c80f43457a88abfa1"
|
resolved "https://registry.yarnpkg.com/junk/-/junk-3.1.0.tgz#31499098d902b7e98c5d9b9c80f43457a88abfa1"
|
||||||
integrity sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==
|
integrity sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==
|
||||||
|
|
||||||
keycloak-admin@1.14.7:
|
keycloak-admin@1.14.8:
|
||||||
version "1.14.7"
|
version "1.14.8"
|
||||||
resolved "https://registry.yarnpkg.com/keycloak-admin/-/keycloak-admin-1.14.7.tgz#fe86f296cc6774ec3256b3211d5cd3c76cf79b9c"
|
resolved "https://registry.yarnpkg.com/keycloak-admin/-/keycloak-admin-1.14.8.tgz#c6935146eab94ba125761888b04442c51ec1d5e5"
|
||||||
integrity sha512-PvDcs8E9VVlhe/1Te/TA5AP8gOkQqIxOmI08Eae3gOvxtt7Ucdd4hxa/ZUX5B7/PvOQH+mFqP5XHVovAZWtmFA==
|
integrity sha512-1eX7HTL/C1M51QGWg47TiYNZrIhmv6ximyscghCZxd1waKC7jjo1vqHOZkBUBQDSFYDEq61b7hH64gbw2XOgYw==
|
||||||
dependencies:
|
dependencies:
|
||||||
axios "^0.21.0"
|
axios "^0.21.0"
|
||||||
camelize "^1.0.0"
|
camelize "^1.0.0"
|
||||||
|
|
Loading…
Reference in a new issue