Skip to content

Commit

Permalink
added v2 pdf to export type registry
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Jun 2, 2021
1 parent 5b2d07d commit 512324e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion x-pack/plugins/reporting/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { ManagementSetup, ManagementStart } from '../../../../src/plugins/manage
import { SharePluginSetup, SharePluginStart } from '../../../../src/plugins/share/public';
import { LicensingPluginSetup, LicensingPluginStart } from '../../licensing/public';
import { constants, getDefaultLayoutSelectors } from '../common';
import { REPORT_BODY_STORE_KEY } from '../common/constants';
import { durationToNumber } from '../common/schema_utils';
import { JobId, JobSummarySet } from '../common/types';
import { ReportingSetup, ReportingStart } from './';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { runTaskFnFactory } from './execute_job';
import { metadata } from './metadata';
import { JobParamsPDF, TaskPayloadPDF } from './types';

export { getExportType as getExportTypeV2 } from './v2';

export const getExportType = (): ExportTypeDefinition<
CreateJobFn<JobParamsPDF>,
RunTaskFn<TaskPayloadPDF>
Expand Down
6 changes: 5 additions & 1 deletion x-pack/plugins/reporting/server/lib/export_types_registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import { getExportType as getTypeCsvDeprecated } from '../export_types/csv';
import { getExportType as getTypeCsvFromSavedObject } from '../export_types/csv_searchsource_immediate';
import { getExportType as getTypeCsv } from '../export_types/csv_searchsource';
import { getExportType as getTypePng } from '../export_types/png';
import { getExportType as getTypePrintablePdf } from '../export_types/printable_pdf';
import {
getExportType as getTypePrintablePdf,
getExportTypeV2 as getTypePrintablePdfV2,
} from '../export_types/printable_pdf';
import { CreateJobFn, ExportTypeDefinition } from '../types';

type GetCallbackFn = (item: ExportTypeDefinition) => boolean;
Expand Down Expand Up @@ -89,6 +92,7 @@ export function getExportTypesRegistry(): ExportTypesRegistry {
getTypeCsvFromSavedObject,
getTypePng,
getTypePrintablePdf,
getTypePrintablePdfV2,
];
getTypeFns.forEach((getType) => {
registry.register(getType());
Expand Down

0 comments on commit 512324e

Please sign in to comment.