Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

address feedback

x032205ca010af8286b
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
index 7c44a4fa91..ea6e9e5f62 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
@@ -129,7 +129,7 @@ export const PamAccountsTable = ({ projectId }: Props) => {
setOrderDirection,
setOrderBy
} = usePagination<PamAccountOrderBy>(PamAccountOrderBy.Name, {
- initPerPage: getUserTablePreference("pamAccountsTable", PreferenceKey.PerPage, 16),
+ initPerPage: getUserTablePreference("pamAccountsTable", PreferenceKey.PerPage, 18),
initSearch
});
@@ -260,12 +260,6 @@ export const PamAccountsTable = ({ projectId }: Props) => {
setPage(1);
setFilter({ resourceIds: [] });
setAccountView(e);
-
- // Reset perPage to appropriate default for the view
- const newPerPage = e === PamAccountView.Flat ? 12 : 10;
- setPerPage(newPerPage);
- setUserTablePreference("pamAccountsTable", PreferenceKey.PerPage, newPerPage);
-
navigate({
search: (prev) => ({
...prev,
@@ -427,15 +421,24 @@ export const PamAccountsTable = ({ projectId }: Props) => {
/>
))}
</div>
- <Pagination
- className="col-span-full justify-start! border-transparent bg-transparent pl-2"
- count={totalCount}
- page={page}
- perPage={perPage}
- onChangePage={(newPage) => setPage(newPage)}
- onChangePerPage={handlePerPageChange}
- perPageList={[9, 12, 15, 18, 27]}
- />
+ {!isLoading && isContentEmpty && (
+ <EmptyState
+ title={isSearchEmpty ? "No accounts match search" : "No accounts"}
+ icon={isSearchEmpty ? faSearch : faCircleXmark}
+ className="rounded border border-mineshaft-500"
+ />
+ )}
+ {Boolean(totalCount) && !isLoading && !isContentEmpty && (
+ <Pagination
+ className="col-span-full justify-start! border-transparent bg-transparent pl-2"
+ count={totalCount}
+ page={page}
+ perPage={perPage}
+ onChangePage={(newPage) => setPage(newPage)}
+ onChangePerPage={handlePerPageChange}
+ perPageList={[9, 18, 48, 99]}
+ />
+ )}
</>
) : (
<TableContainer>
@@ -487,20 +490,20 @@ export const PamAccountsTable = ({ projectId }: Props) => {
)}
</TBody>
</Table>
-
- {Boolean(totalCount) && !isLoading && (
+ {!isLoading && isContentEmpty && (
+ <EmptyState
+ title={isSearchEmpty ? "No accounts match search" : "No accounts"}
+ icon={isSearchEmpty ? faSearch : faCircleXmark}
+ />
+ )}
+ {Boolean(totalCount) && !isLoading && !isContentEmpty && (
<Pagination
count={totalCount}
page={page}
perPage={perPage}
onChangePage={(newPage) => setPage(newPage)}
onChangePerPage={handlePerPageChange}
- />
- )}
- {!isLoading && isContentEmpty && (
- <EmptyState
- title={isSearchEmpty ? "No accounts match search" : "No accounts"}
- icon={isSearchEmpty ? faSearch : faCircleXmark}
+ perPageList={[9, 18, 48, 99]}
/>
)}
</TableContainer>
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAddAccountModal.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAddAccountModal.tsx
index 6074e572af..00ef0e1b74 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAddAccountModal.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAddAccountModal.tsx
@@ -48,6 +48,7 @@ export const PamAddAccountModal = ({
onComplete={(account) => {
if (onComplete) onComplete(account);
onOpenChange(false);
+ setSelectedResource(null);
}}
onBack={() => setSelectedResource(null)}
resourceId={selectedResource.id}