feat(editor): Show data table storage limit banners (no-changelog) (#19175)

Co-authored-by: Ricardo Espinoza <ricardo@n8n.io>
Co-authored-by: Charlie Kolb <charlie@n8n.io>
This commit is contained in:
Svetoslav Dekov
2025-09-12 09:51:32 +03:00
committed by GitHub
parent c3ce2f4819
commit c4d26982e3
20 changed files with 171 additions and 20 deletions

View File

@@ -23,10 +23,7 @@ export class DataStoreSizeValidator {
return sizeInBytes === undefined;
}
private async getCachedSize(
fetchSizeFn: () => Promise<number>,
now = new Date(),
): Promise<number> {
async getCachedSize(fetchSizeFn: () => Promise<number>, now = new Date()): Promise<number> {
// If there's a pending check, wait for it to complete
if (this.pendingCheck) {

View File

@@ -425,7 +425,9 @@ export class DataStoreService {
}
async getDataTablesSize() {
const sizeBytes = await this.dataStoreRepository.findDataTablesSize();
const sizeBytes = await this.dataStoreSizeValidator.getCachedSize(
async () => await this.dataStoreRepository.findDataTablesSize(),
);
return {
sizeBytes,
sizeState: this.dataStoreSizeValidator.sizeToState(sizeBytes),

View File

@@ -185,7 +185,6 @@ export class FrontendService {
},
dataTables: {
maxSize: this.globalConfig.dataTable.maxSize,
warningThreshold: this.globalConfig.dataTable.warningThreshold,
},
publicApi: {
enabled: isApiEnabled(),