|
|
@ -98,7 +98,7 @@ export class Exporter { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private _updateColumns(columnsToUpdate: string[], queriedColumns: string[]): string[] { |
|
|
|
private _updateColumns(columnsToUpdate: string[], queriedColumns: string[]): string[] { |
|
|
|
// slice(1) to avoid time fields
|
|
|
|
// slice(1) to avoid key fields
|
|
|
|
return _.concat(columnsToUpdate, queriedColumns.slice(1)); |
|
|
|
return _.concat(columnsToUpdate, queriedColumns.slice(1)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -116,10 +116,11 @@ export class Exporter { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private _getRowsFromDict(dict: any, columns: string[]): (number | null)[][] { |
|
|
|
private _getRowsFromDict(dict: any, columns: string[]): (number | null)[][] { |
|
|
|
let keyList = _.orderBy(_.keys(dict)); |
|
|
|
const keyList = _.map(_.keys(dict), value => _.toNumber(value)); |
|
|
|
|
|
|
|
const orderedKeyList = _.orderBy(keyList); |
|
|
|
let rows = []; |
|
|
|
let rows = []; |
|
|
|
for(const keyIdx in keyList) { |
|
|
|
for(const keyIdx in orderedKeyList) { |
|
|
|
const key = _.toNumber(keyList[keyIdx]); |
|
|
|
const key = orderedKeyList[keyIdx]; |
|
|
|
rows[keyIdx] = [key]; |
|
|
|
rows[keyIdx] = [key]; |
|
|
|
for(const column of columns) { |
|
|
|
for(const column of columns) { |
|
|
|
const value = dict[key][column] || null; |
|
|
|
const value = dict[key][column] || null; |
|
|
|