Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: do not cache the page count (#18643)

ecmadaobe22d292fbb4
diff --git a/frontend/src/components/AuditLog/AuditLogDataTable.vue b/frontend/src/components/AuditLog/AuditLogDataTable.vue
index dfc7333761..28b584caf8 100644
--- a/frontend/src/components/AuditLog/AuditLogDataTable.vue
+++ b/frontend/src/components/AuditLog/AuditLogDataTable.vue
@@ -78,9 +78,6 @@ const columnList = computed((): AuditDataTableColumn[] => {
title: t("audit-log.table.created-ts"),
width: 220,
resizable: true,
- ellipsis: {
- tooltip: true,
- },
render: (auditLog) =>
dayjs(getDateForPbTimestampProtoEs(auditLog.createTime)).format(
"YYYY-MM-DD HH:mm:ss Z"
@@ -116,9 +113,6 @@ const columnList = computed((): AuditDataTableColumn[] => {
resizable: true,
width: 256,
title: t("audit-log.table.method"),
- ellipsis: {
- tooltip: true,
- },
render: (auditLog) => auditLog.method,
},
{
diff --git a/frontend/src/components/v2/Model/PagedTable.vue b/frontend/src/components/v2/Model/PagedTable.vue
index a1795d5e4d..ad9cc0a56e 100644
--- a/frontend/src/components/v2/Model/PagedTable.vue
+++ b/frontend/src/components/v2/Model/PagedTable.vue
@@ -45,8 +45,6 @@ type LocalState = {
};
type SessionState = {
- // How many times the user clicks the "load more" button.
- page: number;
// Help us to check if the session is outdated.
updatedTs: number;
pageSize: number;
@@ -99,7 +97,6 @@ const dataList = ref([]) as Ref<T[]>;
const sessionState = useDynamicLocalStorage<SessionState>(
computed(() => `${props.sessionKey}.${currentUser.value.name}`),
{
- page: 1,
updatedTs: 0,
pageSize: options.value[0].value,
}
@@ -125,16 +122,9 @@ const fetchData = async (refresh = false) => {
state.loading = true;
- const isFirstFetch = state.paginationToken === "";
- const expectedRowCount = isFirstFetch
- ? // Load one or more page for the first fetch to restore the session
- pageSize.value * sessionState.value.page
- : // Always load one page if NOT the first fetch
- pageSize.value;
-
try {
const { nextPageToken, list } = await props.fetchList({
- pageSize: expectedRowCount,
+ pageSize: pageSize.value,
pageToken: state.paginationToken,
refresh,
});
@@ -144,11 +134,6 @@ const fetchData = async (refresh = false) => {
dataList.value.push(...list);
}
- if (!isFirstFetch && list.length === expectedRowCount) {
- // If we didn't reach the end, memorize we've clicked the "load more" button.
- sessionState.value.page++;
- }
-
sessionState.value.updatedTs = Date.now();
state.paginationToken = nextPageToken ?? "";
} catch (e) {
@@ -160,7 +145,6 @@ const fetchData = async (refresh = false) => {
const resetSession = () => {
sessionState.value = {
- page: 1,
updatedTs: 0,
pageSize: pageSize.value,
};