perspective fixes

This commit is contained in:
Jan Prochazka
2022-08-28 08:42:07 +02:00
parent 0813f4387d
commit 1e347f6535
5 changed files with 49 additions and 23 deletions

View File

@@ -42,16 +42,13 @@ function getPerspectiveDefaultColumns(
return [[columns[0]], null];
}
export function shouldProcessPerspectiveDefaultColunns(
export function perspectiveNodesHaveStructure(
config: PerspectiveConfig,
dbInfos: MultipleDatabaseInfo,
conid: string,
database: string
) {
const nodesNotProcessed = config.nodes.filter(x => !x.defaultColumnsProcessed);
if (nodesNotProcessed.length == 0) return false;
for (const node of nodesNotProcessed) {
for (const node of config.nodes) {
const db = dbInfos?.[node.conid || conid]?.[node.database || database];
if (!db) return false;
@@ -64,6 +61,18 @@ export function shouldProcessPerspectiveDefaultColunns(
return true;
}
export function shouldProcessPerspectiveDefaultColunns(
config: PerspectiveConfig,
dbInfos: MultipleDatabaseInfo,
conid: string,
database: string
) {
const nodesNotProcessed = config.nodes.filter(x => !x.defaultColumnsProcessed);
if (nodesNotProcessed.length == 0) return false;
return perspectiveNodesHaveStructure(config, dbInfos, conid, database);
}
function processPerspectiveDefaultColunnsStep(
config: PerspectiveConfig,
dbInfos: MultipleDatabaseInfo,