|
|
@ -146,6 +146,11 @@ export class AtImportProcessor { |
|
|
|
this.debugLog(log); |
|
|
|
this.debugLog(log); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const logWarning = (log) => { |
|
|
|
|
|
|
|
this.jobsLogService.sendLog(job, { message: `WARNING: ${log}` }); |
|
|
|
|
|
|
|
this.debugLog(log); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const logDetailed = (log) => { |
|
|
|
const logDetailed = (log) => { |
|
|
|
if (debugMode) this.jobsLogService.sendLog(job, { message: log }); |
|
|
|
if (debugMode) this.jobsLogService.sendLog(job, { message: log }); |
|
|
|
this.debugLog(log); |
|
|
|
this.debugLog(log); |
|
|
@ -291,7 +296,7 @@ export class AtImportProcessor { |
|
|
|
rating: UITypes.Rating, |
|
|
|
rating: UITypes.Rating, |
|
|
|
formula: UITypes.Formula, |
|
|
|
formula: UITypes.Formula, |
|
|
|
rollup: UITypes.Rollup, |
|
|
|
rollup: UITypes.Rollup, |
|
|
|
count: UITypes.Count, |
|
|
|
count: UITypes.Rollup, |
|
|
|
lookup: UITypes.Lookup, |
|
|
|
lookup: UITypes.Lookup, |
|
|
|
autoNumber: UITypes.AutoNumber, |
|
|
|
autoNumber: UITypes.AutoNumber, |
|
|
|
barcode: UITypes.SingleLineText, |
|
|
|
barcode: UITypes.SingleLineText, |
|
|
@ -1091,7 +1096,7 @@ export class AtImportProcessor { |
|
|
|
ARRAYCOMPACT: '', |
|
|
|
ARRAYCOMPACT: '', |
|
|
|
ARRAYJOIN: '', |
|
|
|
ARRAYJOIN: '', |
|
|
|
ARRAYUNIQUE: '', |
|
|
|
ARRAYUNIQUE: '', |
|
|
|
AVERAGE: 'average', |
|
|
|
AVERAGE: 'avg', |
|
|
|
CONCATENATE: '', |
|
|
|
CONCATENATE: '', |
|
|
|
COUNT: 'count', |
|
|
|
COUNT: 'count', |
|
|
|
COUNTA: '', |
|
|
|
COUNTA: '', |
|
|
@ -1197,6 +1202,7 @@ export class AtImportProcessor { |
|
|
|
|
|
|
|
|
|
|
|
logDetailed(`NC API: dbTableColumn.create ROLLUP ${ncName.title}`); |
|
|
|
logDetailed(`NC API: dbTableColumn.create ROLLUP ${ncName.title}`); |
|
|
|
const _perfStart = recordPerfStart(); |
|
|
|
const _perfStart = recordPerfStart(); |
|
|
|
|
|
|
|
try { |
|
|
|
const ncTbl: any = await this.columnsService.columnAdd({ |
|
|
|
const ncTbl: any = await this.columnsService.columnAdd({ |
|
|
|
tableId: srcTableId, |
|
|
|
tableId: srcTableId, |
|
|
|
column: { |
|
|
|
column: { |
|
|
@ -1226,6 +1232,11 @@ export class AtImportProcessor { |
|
|
|
aTblColumns[i].name, |
|
|
|
aTblColumns[i].name, |
|
|
|
ncTbl.id, |
|
|
|
ncTbl.id, |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
logWarning( |
|
|
|
|
|
|
|
`Skipped creating rollup column ${aTblColumns[i].name} :: ${e.message}`, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1803,9 +1814,14 @@ export class AtImportProcessor { |
|
|
|
}, |
|
|
|
}, |
|
|
|
req: { user: syncDB.user, clientIp: '' }, |
|
|
|
req: { user: syncDB.user, clientIp: '' }, |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch((e) => |
|
|
|
.catch((e) => { |
|
|
|
e.message ? logBasic(`NOTICE: ${e.message}`) : console.log(e), |
|
|
|
if (e.message) { |
|
|
|
), |
|
|
|
// TODO enable after fixing user invite role issue
|
|
|
|
|
|
|
|
// logWarning(e.message);
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
console.log(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}), |
|
|
|
); |
|
|
|
); |
|
|
|
recordPerfStats(_perfStart, 'auth.baseUserAdd'); |
|
|
|
recordPerfStats(_perfStart, 'auth.baseUserAdd'); |
|
|
|
} |
|
|
|
} |
|
|
@ -2097,12 +2113,16 @@ export class AtImportProcessor { |
|
|
|
// insert filters
|
|
|
|
// insert filters
|
|
|
|
for (let i = 0; i < ncFilters.length; i++) { |
|
|
|
for (let i = 0; i < ncFilters.length; i++) { |
|
|
|
const _perfStart = recordPerfStart(); |
|
|
|
const _perfStart = recordPerfStart(); |
|
|
|
|
|
|
|
try { |
|
|
|
await this.filtersService.filterCreate({ |
|
|
|
await this.filtersService.filterCreate({ |
|
|
|
viewId: viewId, |
|
|
|
viewId: viewId, |
|
|
|
filter: ncFilters[i], |
|
|
|
filter: ncFilters[i], |
|
|
|
user: syncDB.user, |
|
|
|
user: syncDB.user, |
|
|
|
req: {}, |
|
|
|
req: {}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
logWarning(`Skipped creating filter for ${viewId} :: ${e.message}`); |
|
|
|
|
|
|
|
} |
|
|
|
recordPerfStats(_perfStart, 'dbTableFilter.create'); |
|
|
|
recordPerfStats(_perfStart, 'dbTableFilter.create'); |
|
|
|
|
|
|
|
|
|
|
|
rtc.filter++; |
|
|
|
rtc.filter++; |
|
|
|