Merge pull request #724 from edewit/description-col-with
fixed description coll with and make text truncate
This commit is contained in:
commit
19459edf6c
1 changed files with 15 additions and 5 deletions
|
@ -12,17 +12,18 @@ import {
|
||||||
TabTitleText,
|
TabTitleText,
|
||||||
} from "@patternfly/react-core";
|
} from "@patternfly/react-core";
|
||||||
|
|
||||||
|
import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
|
||||||
|
import { emptyFormatter, exportClient, getBaseUrl } from "../util";
|
||||||
|
import { formattedLinkTableCell } from "../components/external-link/FormattedLink";
|
||||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||||
import { useAdminClient } from "../context/auth/AdminClient";
|
import { useAdminClient } from "../context/auth/AdminClient";
|
||||||
|
import { useRealm } from "../context/realm-context/RealmContext";
|
||||||
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
|
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
|
||||||
import { emptyFormatter, exportClient, getBaseUrl } from "../util";
|
|
||||||
import { useAlerts } from "../components/alert/Alerts";
|
import { useAlerts } from "../components/alert/Alerts";
|
||||||
import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
|
|
||||||
import { formattedLinkTableCell } from "../components/external-link/FormattedLink";
|
|
||||||
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
|
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
|
||||||
import { KeycloakTabs } from "../components/keycloak-tabs/KeycloakTabs";
|
import { KeycloakTabs } from "../components/keycloak-tabs/KeycloakTabs";
|
||||||
import { InitialAccessTokenList } from "./initial-access/InitialAccessTokenList";
|
import { InitialAccessTokenList } from "./initial-access/InitialAccessTokenList";
|
||||||
import { useRealm } from "../context/realm-context/RealmContext";
|
import { cellWidth, TableText } from "@patternfly/react-table";
|
||||||
|
|
||||||
export const ClientsSection = () => {
|
export const ClientsSection = () => {
|
||||||
const { t } = useTranslation("clients");
|
const { t } = useTranslation("clients");
|
||||||
|
@ -80,6 +81,14 @@ export const ClientsSection = () => {
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const ClientDescription = (client: ClientRepresentation) => (
|
||||||
|
<>
|
||||||
|
<TableText wrapModifier="truncate">
|
||||||
|
{emptyFormatter()(client.description)}
|
||||||
|
</TableText>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ViewHeader
|
<ViewHeader
|
||||||
|
@ -150,7 +159,8 @@ export const ClientsSection = () => {
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
displayKey: "common:description",
|
displayKey: "common:description",
|
||||||
cellFormatters: [emptyFormatter()],
|
transforms: [cellWidth(20)],
|
||||||
|
cellRenderer: ClientDescription,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "baseUrl",
|
name: "baseUrl",
|
||||||
|
|
Loading…
Reference in a new issue