|
|
|
@ -29,7 +29,7 @@ const DEFAULT_PROGRESS = {
|
|
|
|
|
export class Exporter { |
|
|
|
|
private _task: ExportTask; |
|
|
|
|
|
|
|
|
|
public async export(task: ExportTask, datasourceUrl: string, timeZoneName: string) { |
|
|
|
|
public async export(task: ExportTask, datasourceUrl: string, timeZoneName: string, apiKey: string) { |
|
|
|
|
try { |
|
|
|
|
this._task = _.cloneDeep(task); |
|
|
|
|
this._task.id = uuidv4(); |
|
|
|
@ -72,9 +72,6 @@ export class Exporter {
|
|
|
|
|
let values = []; |
|
|
|
|
|
|
|
|
|
for(const queryConfig of queryConfigs) { |
|
|
|
|
const host = new URL(datasourceUrl).origin; |
|
|
|
|
const apiKey = getApiKey(host); |
|
|
|
|
|
|
|
|
|
const datasourceMetrics = await queryByConfig(queryConfig, datasourceUrl, from, to, apiKey); |
|
|
|
|
|
|
|
|
|
if(_.isEmpty(columns)) { |
|
|
|
|