1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

fix(UI): some minor fixes [EE-6667] (#11061)
Some checks failed
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
Test / test-server (map[arch:arm64 platform:linux]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
ci / build_images (map[arch:arm platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:s390x platform:linux version:]) (push) Has been cancelled
/ triage (push) Has been cancelled
Test / test-client (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:linux]) (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
ci / build_manifests (push) Has been cancelled

* minor tweeks for kubernetes settings

* address review comments
This commit is contained in:
Prabhat Khera 2024-02-06 12:17:38 +13:00 committed by GitHub
parent a93344386c
commit 01cd64037f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 36 additions and 15 deletions

View file

@ -58,6 +58,7 @@ export interface Props<D extends DefaultType> extends AutomationTestingProps {
emptyContentLabel?: string;
title?: string;
titleIcon?: IconProps['icon'];
titleId?: string;
initialTableState?: Partial<TableState>;
isLoading?: boolean;
description?: ReactNode;
@ -78,6 +79,7 @@ export function Datatable<D extends DefaultType>({
getRowId = defaultGetRowId,
isRowSelectable = () => true,
title,
titleId,
titleIcon,
emptyContentLabel,
initialTableState = {},
@ -172,6 +174,7 @@ export function Datatable<D extends DefaultType>({
onSearchChange={handleSearchBarChange}
searchValue={settings.search}
title={title}
titleId={titleId}
titleIcon={titleIcon}
description={description}
renderTableActions={() => renderTableActions(selectedItems)}

View file

@ -13,6 +13,7 @@ type Props = {
renderTableSettings?(): ReactNode;
renderTableActions?(): ReactNode;
description?: ReactNode;
titleId?: string;
};
export function DatatableHeader({
@ -23,6 +24,7 @@ export function DatatableHeader({
title,
titleIcon,
description,
titleId,
}: Props) {
if (!title) {
return null;
@ -37,7 +39,12 @@ export function DatatableHeader({
);
return (
<Table.Title label={title} icon={titleIcon} description={description}>
<Table.Title
id={titleId}
label={title}
icon={titleIcon}
description={description}
>
{searchBar}
{tableActions}
{tableTitleSettings}

View file

@ -8,6 +8,7 @@ interface Props {
label: string;
description?: ReactNode;
className?: string;
id?: string;
}
export function TableTitle({
@ -16,10 +17,11 @@ export function TableTitle({
children,
description,
className,
id,
}: PropsWithChildren<Props>) {
return (
<>
<div className={clsx('toolBar flex-col', className)}>
<div className={clsx('toolBar flex-col', className)} id={id}>
<div className="flex w-full items-center gap-1 p-0">
<div className="toolBarTitle">
{icon && (