mirror of https://github.com/portainer/portainer
feat(home): remove margins from env list [EE-4868] (#8285)
parent
7793b98813
commit
4bdf30c038
|
@ -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}
|
||||||
|
|
|
@ -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>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue