mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
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:
@@ -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) {
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -185,7 +185,6 @@ export class FrontendService {
|
||||
},
|
||||
dataTables: {
|
||||
maxSize: this.globalConfig.dataTable.maxSize,
|
||||
warningThreshold: this.globalConfig.dataTable.warningThreshold,
|
||||
},
|
||||
publicApi: {
|
||||
enabled: isApiEnabled(),
|
||||
|
||||
Reference in New Issue
Block a user