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 { PageSelector } from './PageSelector';
|
||||
|
||||
|
@ -9,6 +11,7 @@ interface Props {
|
|||
showAll?: boolean;
|
||||
totalCount: number;
|
||||
isPageInputVisible?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function PaginationControls({
|
||||
|
@ -19,9 +22,10 @@ export function PaginationControls({
|
|||
onPageChange,
|
||||
totalCount,
|
||||
isPageInputVisible,
|
||||
className,
|
||||
}: Props) {
|
||||
return (
|
||||
<div className="paginationControls">
|
||||
<div className={clsx('paginationControls', className)}>
|
||||
<div className="form-inline flex">
|
||||
<ItemsPerPageSelector
|
||||
value={pageLimit}
|
||||
|
|
|
@ -140,8 +140,7 @@ export function EnvironmentList({ onClickBrowse, onRefresh }: Props) {
|
|||
return (
|
||||
<>
|
||||
{totalAvailable === 0 && <NoEnvironmentsInfoPanel isAdmin={isAdmin} />}
|
||||
<div className="row">
|
||||
<div className="col-sm-12">
|
||||
|
||||
<TableContainer>
|
||||
<div className="px-4">
|
||||
<TableTitle
|
||||
|
@ -221,8 +220,7 @@ export function EnvironmentList({ onClickBrowse, onRefresh }: Props) {
|
|||
key={env.Id}
|
||||
environment={env}
|
||||
groupName={
|
||||
groupsQuery.data?.find((g) => g.Id === env.GroupId)
|
||||
?.Name
|
||||
groupsQuery.data?.find((g) => g.Id === env.GroupId)?.Name
|
||||
}
|
||||
onClickBrowse={() => onClickBrowse(env)}
|
||||
isActive={env.Id === currentEnvironmentId}
|
||||
|
@ -232,6 +230,7 @@ export function EnvironmentList({ onClickBrowse, onRefresh }: Props) {
|
|||
</div>
|
||||
<TableFooter>
|
||||
<PaginationControls
|
||||
className="!mr-0"
|
||||
showAll={totalCount <= 100}
|
||||
pageLimit={pageLimit}
|
||||
page={page}
|
||||
|
@ -242,8 +241,6 @@ export function EnvironmentList({ onClickBrowse, onRefresh }: Props) {
|
|||
</TableFooter>
|
||||
</div>
|
||||
</TableContainer>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue