feat(home): remove margins from env list [EE-4868] (#8285)

pull/8294/head
Chaim Lev-Ari 2023-01-11 10:59:56 +02:00 committed by GitHub
parent 7793b98813
commit 4bdf30c038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 102 additions and 101 deletions

View File

@ -1,3 +1,5 @@
import clsx from 'clsx';
import { ItemsPerPageSelector } from './ItemsPerPageSelector'; import { ItemsPerPageSelector } from './ItemsPerPageSelector';
import { PageSelector } from './PageSelector'; import { PageSelector } from './PageSelector';
@ -9,6 +11,7 @@ interface Props {
showAll?: boolean; showAll?: boolean;
totalCount: number; totalCount: number;
isPageInputVisible?: boolean; isPageInputVisible?: boolean;
className?: string;
} }
export function PaginationControls({ export function PaginationControls({
@ -19,9 +22,10 @@ export function PaginationControls({
onPageChange, onPageChange,
totalCount, totalCount,
isPageInputVisible, isPageInputVisible,
className,
}: Props) { }: Props) {
return ( return (
<div className="paginationControls"> <div className={clsx('paginationControls', className)}>
<div className="form-inline flex"> <div className="form-inline flex">
<ItemsPerPageSelector <ItemsPerPageSelector
value={pageLimit} value={pageLimit}

View File

@ -140,8 +140,7 @@ export function EnvironmentList({ onClickBrowse, onRefresh }: Props) {
return ( return (
<> <>
{totalAvailable === 0 && <NoEnvironmentsInfoPanel isAdmin={isAdmin} />} {totalAvailable === 0 && <NoEnvironmentsInfoPanel isAdmin={isAdmin} />}
<div className="row">
<div className="col-sm-12">
<TableContainer> <TableContainer>
<div className="px-4"> <div className="px-4">
<TableTitle <TableTitle
@ -221,8 +220,7 @@ export function EnvironmentList({ onClickBrowse, onRefresh }: Props) {
key={env.Id} key={env.Id}
environment={env} environment={env}
groupName={ groupName={
groupsQuery.data?.find((g) => g.Id === env.GroupId) groupsQuery.data?.find((g) => g.Id === env.GroupId)?.Name
?.Name
} }
onClickBrowse={() => onClickBrowse(env)} onClickBrowse={() => onClickBrowse(env)}
isActive={env.Id === currentEnvironmentId} isActive={env.Id === currentEnvironmentId}
@ -232,6 +230,7 @@ export function EnvironmentList({ onClickBrowse, onRefresh }: Props) {
</div> </div>
<TableFooter> <TableFooter>
<PaginationControls <PaginationControls
className="!mr-0"
showAll={totalCount <= 100} showAll={totalCount <= 100}
pageLimit={pageLimit} pageLimit={pageLimit}
page={page} page={page}
@ -242,8 +241,6 @@ export function EnvironmentList({ onClickBrowse, onRefresh }: Props) {
</TableFooter> </TableFooter>
</div> </div>
</TableContainer> </TableContainer>
</div>
</div>
</> </>
); );