-
- {{ currentWorkspace?.title }}
+ {{ currentWorkspace?.title }} > {{ $t('title.teamAndSettings') }}
diff --git a/packages/nocodb/src/controllers/audits.controller.ts b/packages/nocodb/src/controllers/audits.controller.ts
index 13f02b5a25..37042dfb65 100644
--- a/packages/nocodb/src/controllers/audits.controller.ts
+++ b/packages/nocodb/src/controllers/audits.controller.ts
@@ -74,9 +74,7 @@ export class AuditsController {
query: req.query,
}),
{
- count: await this.auditsService.projectAuditCount({
- query: req.query,
- }),
+ count: await this.auditsService.projectAuditCount(),
...req.query,
},
);
diff --git a/packages/nocodb/src/models/Audit.ts b/packages/nocodb/src/models/Audit.ts
index c3528e6d71..873356d01e 100644
--- a/packages/nocodb/src/models/Audit.ts
+++ b/packages/nocodb/src/models/Audit.ts
@@ -141,19 +141,11 @@ export default class Audit implements AuditType {
limit = 25,
offset = 0,
sourceId,
- user,
- type,
- startDate,
- endDate,
orderBy,
}: {
limit?: number;
offset?: number;
sourceId?: string;
- user?: string;
- type?: string;
- startDate?: string;
- endDate?: string;
orderBy?: {
created_at?: 'asc' | 'desc';
user?: 'asc' | 'desc';
@@ -168,8 +160,6 @@ export default class Audit implements AuditType {
condition: {
base_id: baseId,
...(sourceId ? { source_id: sourceId } : {}),
- ...(user ? { user: user } : {}),
- ...(type ? { op_type: type } : {}),
},
orderBy: {
...(orderBy?.created_at
@@ -179,12 +169,6 @@ export default class Audit implements AuditType {
: {}),
...(orderBy?.user ? { user: orderBy?.user } : {}),
},
- xcCondition: {
- _and: [
- ...(startDate ? [{ created_at: { ge: startDate } }] : []),
- ...(endDate ? [{ created_at: { le: endDate } }] : []),
- ],
- },
limit,
offset,
},
@@ -195,16 +179,8 @@ export default class Audit implements AuditType {
baseId: string,
{
sourceId,
- user,
- type,
- startDate,
- endDate,
}: {
sourceId?: string;
- user?: string;
- type?: string;
- startDate?: string;
- endDate?: string;
},
): Promise {
return await Noco.ncMeta.metaCount(
@@ -214,15 +190,7 @@ export default class Audit implements AuditType {
{
condition: {
base_id: baseId,
- ...(user ? { user: user } : {}),
...(sourceId ? { source_id: sourceId } : {}),
- ...(type ? { op_type: type } : {}),
- },
- xcCondition: {
- _and: [
- ...(startDate ? [{ created_at: { ge: startDate } }] : []),
- ...(endDate ? [{ created_at: { le: endDate } }] : []),
- ],
},
},
);
@@ -257,22 +225,10 @@ export default class Audit implements AuditType {
static async projectAuditList({
limit = 25,
offset = 0,
- sourceId,
- user,
- baseId,
- type,
- startDate,
- endDate,
orderBy,
}: {
limit?: number;
offset?: number;
- sourceId?: string;
- user?: string;
- baseId?: string;
- type?: string;
- startDate?: string;
- endDate?: string;
orderBy?: {
created_at?: 'asc' | 'desc';
user?: 'asc' | 'desc';
@@ -285,12 +241,6 @@ export default class Audit implements AuditType {
{
limit,
offset,
- condition: {
- ...(user ? { user: user } : {}),
- ...(baseId ? { base_id: baseId } : {}),
- ...(sourceId ? { source_id: sourceId } : {}),
- ...(type ? { op_type: type } : {}),
- },
orderBy: {
...(orderBy?.created_at
? { created_at: orderBy?.created_at }
@@ -299,49 +249,16 @@ export default class Audit implements AuditType {
: {}),
...(orderBy?.user ? { user: orderBy?.user } : {}),
},
- xcCondition: {
- _and: [
- ...(startDate ? [{ created_at: { ge: startDate } }] : []),
- ...(endDate ? [{ created_at: { le: endDate } }] : []),
- ],
- },
},
);
}
- static async projectAuditCount({
- user,
- baseId,
- sourceId,
- type,
- startDate,
- endDate,
- }: {
- user?: string;
- baseId?: string;
- sourceId?: string;
- type?: string;
- startDate?: string;
- endDate?: string;
- }): Promise {
+ static async projectAuditCount(): Promise {
return await Noco.ncMeta.metaCount(
RootScopes.ROOT,
RootScopes.ROOT,
MetaTable.AUDIT,
- {
- condition: {
- ...(user ? { user: user } : {}),
- ...(baseId ? { base_id: baseId } : {}),
- ...(sourceId ? { source_id: sourceId } : {}),
- ...(type ? { op_type: type } : {}),
- },
- xcCondition: {
- _and: [
- ...(startDate ? [{ created_at: { ge: startDate } }] : []),
- ...(endDate ? [{ created_at: { le: endDate } }] : []),
- ],
- },
- },
+ {},
);
}
}
diff --git a/packages/nocodb/src/schema/swagger.json b/packages/nocodb/src/schema/swagger.json
index f89e52ff2b..ba546821b3 100644
--- a/packages/nocodb/src/schema/swagger.json
+++ b/packages/nocodb/src/schema/swagger.json
@@ -14140,48 +14140,6 @@
"in": "query",
"name": "limit"
},
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "user"
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "type"
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "baseId"
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "sourceId"
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "startDate"
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "endDate"
- },
{
"schema": {
"properties": {
@@ -14291,34 +14249,6 @@
"in": "query",
"name": "sourceId"
},
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "user"
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "type"
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "startDate"
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "endDate"
- },
{
"schema": {
"properties": {
diff --git a/packages/nocodb/src/services/audits.service.ts b/packages/nocodb/src/services/audits.service.ts
index 49a1e34434..2b7ddb3b40 100644
--- a/packages/nocodb/src/services/audits.service.ts
+++ b/packages/nocodb/src/services/audits.service.ts
@@ -89,7 +89,7 @@ export class AuditsService {
return await Audit.projectAuditList(param.query);
}
- async projectAuditCount(param: { query?: any }) {
- return await Audit.projectAuditCount(param.query);
+ async projectAuditCount() {
+ return await Audit.projectAuditCount();
}
}