[Reporting] Generate CSV Package (#151801)

## Summary

Partially resolves https://github.com/elastic/kibana/issues/150392 

This PR creates reporting related packages geared towards `Generate CSV`
functionality
- @kbn/generate-csv
- @kbn/generate-csv-types
- @kbn/reporting-common
- updated Readme.md for the @kbn/reporting plugin

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
This commit is contained in:
Rachel Shen 2023-04-13 11:27:35 -06:00 committed by GitHub
parent 92c8699cc2
commit e35e924d92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 601 additions and 269 deletions

3
.github/CODEOWNERS vendored
View file

@ -380,6 +380,8 @@ packages/kbn-ftr-common-functional-services @elastic/kibana-operations
packages/kbn-ftr-screenshot-filename @elastic/kibana-operations
x-pack/test/functional_with_es_ssl/plugins/cases @elastic/response-ops
packages/kbn-generate @elastic/kibana-operations
packages/kbn-generate-csv @elastic/appex-sharedux
packages/kbn-generate-csv-types @elastic/appex-sharedux
packages/kbn-get-repo-files @elastic/kibana-operations
x-pack/plugins/global_search_bar @elastic/appex-sharedux
x-pack/plugins/global_search @elastic/appex-sharedux
@ -504,6 +506,7 @@ packages/kbn-repo-packages @elastic/kibana-operations
packages/kbn-repo-path @elastic/kibana-operations
packages/kbn-repo-source-classifier @elastic/kibana-operations
packages/kbn-repo-source-classifier-cli @elastic/kibana-operations
packages/kbn-reporting/common @elastic/appex-sharedux
x-pack/examples/reporting_example @elastic/appex-sharedux
x-pack/plugins/reporting @elastic/appex-sharedux
x-pack/test/plugin_functional/plugins/resolver_test @elastic/security-solution

View file

@ -47,6 +47,7 @@
"files": "src/plugins/files",
"filesManagement": "src/plugins/files_management",
"flot": "packages/kbn-flot-charts/lib",
"generateCsv": "packages/kbn-generate-csv",
"grouping": "packages/kbn-securitysolution-grouping/src",
"guidedOnboarding": "src/plugins/guided_onboarding",
"guidedOnboardingPackage": "packages/kbn-guided-onboarding",
@ -75,6 +76,7 @@
"navigation": "src/plugins/navigation",
"newsfeed": "src/plugins/newsfeed",
"presentationUtil": "src/plugins/presentation_util",
"reporting": "packages/kbn-reporting/common",
"savedObjects": "src/plugins/saved_objects",
"savedObjectsFinder": "src/plugins/saved_objects_finder",
"savedObjectsManagement": "src/plugins/saved_objects_management",

View file

@ -406,6 +406,8 @@
"@kbn/foo-plugin": "link:x-pack/test/ui_capabilities/common/plugins/foo_plugin",
"@kbn/ftr-apis-plugin": "link:src/plugins/ftr_apis",
"@kbn/functional-with-es-ssl-cases-test-plugin": "link:x-pack/test/functional_with_es_ssl/plugins/cases",
"@kbn/generate-csv": "link:packages/kbn-generate-csv",
"@kbn/generate-csv-types": "link:packages/kbn-generate-csv-types",
"@kbn/global-search-bar-plugin": "link:x-pack/plugins/global_search_bar",
"@kbn/global-search-plugin": "link:x-pack/plugins/global_search",
"@kbn/global-search-providers-plugin": "link:x-pack/plugins/global_search_providers",
@ -506,6 +508,7 @@
"@kbn/rendering-plugin": "link:test/plugin_functional/plugins/rendering_plugin",
"@kbn/repo-info": "link:packages/kbn-repo-info",
"@kbn/repo-packages": "link:packages/kbn-repo-packages",
"@kbn/reporting-common": "link:packages/kbn-reporting/common",
"@kbn/reporting-example-plugin": "link:x-pack/examples/reporting_example",
"@kbn/reporting-plugin": "link:x-pack/plugins/reporting",
"@kbn/resolver-test-plugin": "link:x-pack/test/plugin_functional/plugins/resolver_test",

View file

@ -0,0 +1,3 @@
# @kbn/generate-csv-types
This package includes interfaces specific to the @kbn/generate-csv package.

View file

@ -0,0 +1,27 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { ByteSizeValue } from '@kbn/config-schema';
import type { SerializedSearchSourceFields } from '@kbn/data-plugin/public';
export interface JobParams {
searchSource: SerializedSearchSourceFields;
columns?: string[];
browserTimezone?: string;
}
export interface CsvConfig {
checkForFormulas: boolean;
escapeFormulaValues: boolean;
maxSizeBytes: number | ByteSizeValue;
useByteOrderMarkEncoding: boolean;
scroll: {
duration: string;
size: number;
};
}

View file

@ -0,0 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/generate-csv-types",
"owner": "@elastic/appex-sharedux"
}

View file

@ -0,0 +1,6 @@
{
"name": "@kbn/generate-csv-types",
"private": true,
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0"
}

View file

@ -0,0 +1,20 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
"jest",
"node"
]
},
"include": [
"**/*.ts",
],
"exclude": [
"target/**/*"
],
"kbn_references": [
"@kbn/config-schema",
"@kbn/data-plugin",
]
}

View file

@ -0,0 +1,13 @@
---
id: Generate-CSV
slug: generate-csv
title: Generate CSV Reporting
description:
tags: ['shared-ux', 'component', 'reporting', 'generate csv']
date: 2023-02-21
---
Github issue for reference: https://github.com/elastic/kibana/issues/150392
### Goals of this refactoring
- Removes dependencies from the reporting plugin as it stands currently

View file

@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export { CsvGenerator } from './src/generate_csv';

View file

@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
module.exports = {
preset: '@kbn/test/jest_node',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-generate-csv/'],
};

View file

@ -0,0 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/generate-csv",
"owner": "@elastic/appex-sharedux"
}

View file

@ -0,0 +1,6 @@
{
"name": "@kbn/generate-csv",
"private": true,
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0"
}

View file

@ -0,0 +1,12 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export const CSV_BOM_CHARS = '\ufeff';
export const CONTENT_TYPE_CSV = 'text/csv';
export const UI_SETTINGS_CSV_SEPARATOR = 'csv:separator';
export const UI_SETTINGS_CSV_QUOTE_VALUES = 'csv:quoteValues';

View file

@ -1,8 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { errors as esErrors, estypes } from '@elastic/elasticsearch';
@ -22,25 +23,18 @@ import { FieldFormatsRegistry } from '@kbn/field-formats-plugin/common';
import { identity, range } from 'lodash';
import * as Rx from 'rxjs';
import type { Writable } from 'stream';
import type { DeepPartial } from 'utility-types';
import { CancellationToken } from '../../../../common/cancellation_token';
import {
UI_SETTINGS_CSV_QUOTE_VALUES,
UI_SETTINGS_CSV_SEPARATOR,
UI_SETTINGS_DATEFORMAT_TZ,
} from '../../../../common/constants';
import { ReportingConfigType } from '../../../config';
import { createMockConfig, createMockConfigSchema } from '../../../test_helpers';
import { JobParamsCSV } from '../types';
import { CsvGenerator } from './generate_csv';
import { CancellationToken, UI_SETTINGS_DATEFORMAT_TZ } from '@kbn/reporting-common';
import { CsvConfig, JobParams } from '@kbn/generate-csv-types';
import { UI_SETTINGS_CSV_QUOTE_VALUES, UI_SETTINGS_CSV_SEPARATOR } from './constants';
const createMockJob = (baseObj: any = {}): JobParamsCSV => ({
const createMockJob = (baseObj: any = {}): JobParams => ({
...baseObj,
});
let mockEsClient: IScopedClusterClient;
let mockDataClient: IScopedSearchClient;
let mockConfig: ReportingConfigType['csv'];
let mockConfig: CsvConfig;
let mockLogger: jest.Mocked<Logger>;
let uiSettingsClient: IUiSettingsClient;
let stream: jest.Mocked<Writable>;
@ -83,11 +77,6 @@ const mockFieldFormatsRegistry = {
.mockImplementation(() => ({ id: 'string', convert: jest.fn().mockImplementation(identity) })),
} as unknown as FieldFormatsRegistry;
const getMockConfig = (properties: DeepPartial<ReportingConfigType> = {}) => {
const config = createMockConfig(createMockConfigSchema(properties));
return config.get('csv');
};
beforeEach(async () => {
content = '';
stream = { write: jest.fn((chunk) => (content += chunk)) } as unknown as typeof stream;
@ -111,14 +100,13 @@ beforeEach(async () => {
}
});
mockConfig = getMockConfig({
csv: {
checkForFormulas: true,
escapeFormulaValues: true,
maxSizeBytes: 180000,
scroll: { size: 500, duration: '30s' },
},
});
mockConfig = {
checkForFormulas: true,
escapeFormulaValues: true,
maxSizeBytes: 180000,
useByteOrderMarkEncoding: false,
scroll: { size: 500, duration: '30s' },
};
searchSourceMock.getField = jest.fn((key: string) => {
switch (key) {
@ -238,14 +226,13 @@ it('calculates the bytes of the content', async () => {
it('warns if max size was reached', async () => {
const TEST_MAX_SIZE = 500;
mockConfig = getMockConfig({
csv: {
checkForFormulas: true,
escapeFormulaValues: true,
maxSizeBytes: TEST_MAX_SIZE,
scroll: { size: 500, duration: '30s' },
},
});
mockConfig = {
checkForFormulas: true,
escapeFormulaValues: true,
maxSizeBytes: TEST_MAX_SIZE,
useByteOrderMarkEncoding: false,
scroll: { size: 500, duration: '30s' },
};
mockDataClient.search = jest.fn().mockImplementation(() =>
Rx.of({
@ -752,14 +739,13 @@ describe('formulas', () => {
});
it('can check for formulas, without escaping them', async () => {
mockConfig = getMockConfig({
csv: {
checkForFormulas: true,
escapeFormulaValues: false,
maxSizeBytes: 180000,
scroll: { size: 500, duration: '30s' },
},
});
mockConfig = {
checkForFormulas: true,
escapeFormulaValues: false,
maxSizeBytes: 180000,
useByteOrderMarkEncoding: false,
scroll: { size: 500, duration: '30s' },
};
mockDataClient.search = jest.fn().mockImplementation(() =>
Rx.of({
rawResponse: getMockRawResponse([
@ -829,6 +815,16 @@ it('can override ignoring frozen indices', async () => {
{ maxRetries: 0, requestTimeout: '30s' }
);
expect(mockEsClient.asCurrentUser.openPointInTime).toHaveBeenCalledWith(
{
ignore_unavailable: true,
ignore_throttled: false,
index: 'logstash-*',
keep_alive: '30s',
},
{ maxRetries: 0, requestTimeout: '30s' }
);
expect(mockDataClient.search).toBeCalledWith(
{
params: {
@ -866,21 +862,21 @@ it('adds a warning if export was unable to close the PIT', async () => {
);
await expect(generateCsv.generateData()).resolves.toMatchInlineSnapshot(`
Object {
"content_type": "text/csv",
"csv_contains_formulas": false,
"error_code": undefined,
"max_size_reached": false,
"metrics": Object {
"csv": Object {
"rows": 0,
},
},
"warnings": Array [
"Unable to close the Point-In-Time used for search. Check the Kibana server logs.",
],
}
`);
Object {
"content_type": "text/csv",
"csv_contains_formulas": false,
"error_code": undefined,
"max_size_reached": false,
"metrics": Object {
"csv": Object {
"rows": 0,
},
},
"warnings": Array [
"Unable to close the Point-In-Time used for search. Check the Kibana server logs.",
],
}
`);
});
it('will return partial data if the scroll or search fails', async () => {
@ -909,22 +905,22 @@ it('will return partial data if the scroll or search fails', async () => {
stream
);
await expect(generateCsv.generateData()).resolves.toMatchInlineSnapshot(`
Object {
"content_type": "text/csv",
"csv_contains_formulas": false,
"error_code": undefined,
"max_size_reached": false,
"metrics": Object {
"csv": Object {
"rows": 0,
},
},
"warnings": Array [
"Received a 500 response from Elasticsearch: my error",
"Encountered an error with the number of CSV rows generated from the search: expected NaN, received 0.",
],
}
`);
Object {
"content_type": "text/csv",
"csv_contains_formulas": false,
"error_code": undefined,
"max_size_reached": false,
"metrics": Object {
"csv": Object {
"rows": 0,
},
},
"warnings": Array [
"Received a 500 response from Elasticsearch: my error",
"Encountered an error with the number of CSV rows generated from the search: expected NaN, received 0.",
],
}
`);
expect(mockLogger.error.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
@ -958,22 +954,22 @@ it('handles unknown errors', async () => {
stream
);
await expect(generateCsv.generateData()).resolves.toMatchInlineSnapshot(`
Object {
"content_type": "text/csv",
"csv_contains_formulas": false,
"error_code": undefined,
"max_size_reached": false,
"metrics": Object {
"csv": Object {
"rows": 0,
},
},
"warnings": Array [
"Encountered an unknown error: An unknown error",
"Encountered an error with the number of CSV rows generated from the search: expected NaN, received 0.",
],
}
`);
Object {
"content_type": "text/csv",
"csv_contains_formulas": false,
"error_code": undefined,
"max_size_reached": false,
"metrics": Object {
"csv": Object {
"rows": 0,
},
},
"warnings": Array [
"Encountered an unknown error: An unknown error",
"Encountered an error with the number of CSV rows generated from the search: expected NaN, received 0.",
],
}
`);
});
describe('error codes', () => {

View file

@ -1,8 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { errors as esErrors, estypes } from '@elastic/elasticsearch';
@ -18,16 +19,18 @@ import type {
} from '@kbn/field-formats-plugin/common';
import { lastValueFrom } from 'rxjs';
import type { Writable } from 'stream';
import type { CancellationToken } from '../../../../common/cancellation_token';
import { CONTENT_TYPE_CSV } from '../../../../common/constants';
import { AuthenticationExpiredError, ReportingError } from '../../../../common/errors';
import { byteSizeValueToNumber } from '../../../../common/schema_utils';
import { ReportingConfigType } from '../../../config';
import type { TaskRunResult } from '../../../lib/tasks';
import type { JobParamsCSV } from '../types';
import { CsvExportSettings, getExportSettings } from './get_export_settings';
import { i18nTexts } from './i18n_texts';
import {
CancellationToken,
AuthenticationExpiredError,
ReportingError,
TaskRunResult,
byteSizeValueToNumber,
} from '@kbn/reporting-common';
import { CsvConfig, JobParams } from '@kbn/generate-csv-types';
import { MaxSizeStringBuilder } from './max_size_string_builder';
import { i18nTexts } from './i18n_texts';
import { CsvExportSettings, getExportSettings } from './get_export_settings';
import { CONTENT_TYPE_CSV } from './constants';
interface Clients {
es: IScopedClusterClient;
@ -46,8 +49,8 @@ export class CsvGenerator {
private csvRowCount = 0;
constructor(
private job: Omit<JobParamsCSV, 'version'>,
private config: ReportingConfigType['csv'],
private job: Omit<JobParams, 'version'>,
private config: CsvConfig,
private clients: Clients,
private dependencies: Dependencies,
private cancellationToken: CancellationToken,

View file

@ -1,28 +1,34 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import {
UI_SETTINGS_DATEFORMAT_TZ,
UI_SETTINGS_CSV_QUOTE_VALUES,
UI_SETTINGS_CSV_SEPARATOR,
UI_SETTINGS_SEARCH_INCLUDE_FROZEN,
} from '../../../../common/constants';
UI_SETTINGS_DATEFORMAT_TZ,
} from '@kbn/reporting-common';
import { IUiSettingsClient } from '@kbn/core/server';
import {
loggingSystemMock,
savedObjectsClientMock,
uiSettingsServiceMock,
} from '@kbn/core/server/mocks';
import { createMockConfig, createMockConfigSchema } from '../../../test_helpers';
import { getExportSettings } from './get_export_settings';
import { CsvConfig } from '@kbn/generate-csv-types';
import { UI_SETTINGS_CSV_QUOTE_VALUES, UI_SETTINGS_CSV_SEPARATOR } from './constants';
describe('getExportSettings', () => {
let uiSettingsClient: IUiSettingsClient;
const config = createMockConfig(createMockConfigSchema({})).get('csv');
const config: CsvConfig = {
checkForFormulas: true,
escapeFormulaValues: false,
maxSizeBytes: 180000,
scroll: { size: 500, duration: '30s' },
useByteOrderMarkEncoding: false,
};
const logger = loggingSystemMock.createLogger();
beforeEach(() => {
@ -49,11 +55,11 @@ describe('getExportSettings', () => {
expect(await getExportSettings(uiSettingsClient, config, '', logger)).toMatchInlineSnapshot(`
Object {
"bom": "",
"checkForFormulas": undefined,
"escapeFormulaValues": undefined,
"checkForFormulas": true,
"escapeFormulaValues": false,
"escapeValue": [Function],
"includeFrozen": false,
"maxSizeBytes": undefined,
"maxSizeBytes": 180000,
"scroll": Object {
"duration": "30s",
"size": 500,

View file

@ -1,21 +1,24 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { ByteSizeValue } from '@kbn/config-schema';
import type { IUiSettingsClient, Logger } from '@kbn/core/server';
import { createEscapeValue } from '@kbn/data-plugin/common';
import { CsvConfig } from '@kbn/generate-csv-types';
import {
UI_SETTINGS_DATEFORMAT_TZ,
UI_SETTINGS_SEARCH_INCLUDE_FROZEN,
} from '@kbn/reporting-common';
import {
CSV_BOM_CHARS,
UI_SETTINGS_CSV_QUOTE_VALUES,
UI_SETTINGS_CSV_SEPARATOR,
UI_SETTINGS_DATEFORMAT_TZ,
UI_SETTINGS_SEARCH_INCLUDE_FROZEN,
} from '../../../../common/constants';
import { ReportingConfigType } from '../../../config';
} from './constants';
export interface CsvExportSettings {
timezone: string;
@ -34,7 +37,7 @@ export interface CsvExportSettings {
export const getExportSettings = async (
client: IUiSettingsClient,
config: ReportingConfigType['csv'],
config: CsvConfig,
timezone: string | undefined,
logger: Logger
): Promise<CsvExportSettings> => {

View file

@ -1,22 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { i18n } from '@kbn/i18n';
export const i18nTexts = {
escapedFormulaValuesMessage: i18n.translate(
'xpack.reporting.exportTypes.csv.generateCsv.escapedFormulaValues',
{
defaultMessage: 'CSV may contain formulas whose values have been escaped',
}
),
escapedFormulaValuesMessage: i18n.translate('generateCsv.escapedFormulaValues', {
defaultMessage: 'CSV may contain formulas whose values have been escaped',
}),
authenticationError: {
partialResultsMessage: i18n.translate(
'xpack.reporting.exportTypes.csv.generateCsv.authenticationExpired.partialResultsMessage',
'generateCsv.authenticationExpired.partialResultsMessage',
{
defaultMessage:
'This report contains partial CSV results because the authentication token expired. Export a smaller amount of data or increase the timeout of the authentication token.',
@ -24,23 +22,23 @@ export const i18nTexts = {
),
},
esErrorMessage: (statusCode: number, message: string) =>
i18n.translate('xpack.reporting.exportTypes.csv.generateCsv.esErrorMessage', {
i18n.translate('generateCsv.esErrorMessage', {
defaultMessage: 'Received a {statusCode} response from Elasticsearch: {message}',
values: { statusCode, message },
}),
unknownError: (message: string = 'unknown') =>
i18n.translate('xpack.reporting.exportTypes.csv.generateCsv.unknownErrorMessage', {
i18n.translate('generateCsv.unknownErrorMessage', {
defaultMessage: 'Encountered an unknown error: {message}',
values: { message },
}),
csvRowCountError: ({ expected, received }: { expected?: number; received: number }) =>
i18n.translate('xpack.reporting.exportTypes.csv.generateCsv.incorrectRowCount', {
i18n.translate('generateCsv.incorrectRowCount', {
defaultMessage:
'Encountered an error with the number of CSV rows generated from the search: expected {expected}, received {received}.',
values: { expected, received },
}),
csvUnableToClosePit: () =>
i18n.translate('xpack.reporting.exportTypes.csv.generateCsv.csvUnableToClosePit', {
i18n.translate('generateCsv.csvUnableToClosePit', {
defaultMessage:
'Unable to close the Point-In-Time used for search. Check the Kibana server logs.',
}),

View file

@ -1,8 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export { CsvGenerator } from './generate_csv';

View file

@ -1,8 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { Writable } from 'stream';

View file

@ -1,8 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { Writable } from 'stream';

View file

@ -0,0 +1,29 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
"jest",
"node",
"react"
]
},
"include": [
"**/*.ts",
"**/*.tsx",
"**/*.d.ts"
],
"exclude": [
"target/**/*"
],
"kbn_references": [
"@kbn/core",
"@kbn/data-plugin",
"@kbn/expressions-plugin",
"@kbn/field-formats-plugin",
"@kbn/reporting-common",
"@kbn/config-schema",
"@kbn/i18n",
"@kbn/generate-csv-types",
]
}

View file

@ -0,0 +1,5 @@
# @kbn/reporting-common
Removes any circular dependency from the reporting plugin and the @kbn/generate-csv package.
This package includes the `CancellationToken` class, schema utils, constants, errors that extend `ReportingError`, and metrics such as `TaskRunResult`. p

View file

@ -1,8 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { CancellationToken } from './cancellation_token';

View file

@ -1,8 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { isFunction } from 'lodash';

View file

@ -0,0 +1,11 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export const UI_SETTINGS_SEARCH_INCLUDE_FROZEN = 'search:includeFrozen';
export const UI_SETTINGS_CUSTOM_PDF_LOGO = 'xpackReporting:customPdfLogo';
export const UI_SETTINGS_DATEFORMAT_TZ = 'dateFormat:tz';
export const CSV_REPORTING_ACTION = 'downloadCsvReport';

View file

@ -1,11 +1,12 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import * as errors from '.';
import * as errors from './errors';
const { ReportingError: _, ...nonAbstractErrors } = errors;

View file

@ -1,8 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/* eslint-disable max-classes-per-file */
@ -94,7 +95,7 @@ export class PdfWorkerOutOfMemoryError extends ReportingError {
}
public humanFriendlyMessage() {
return i18n.translate('xpack.reporting.common.pdfWorkerOutOfMemoryErrorMessage', {
return i18n.translate('reporting.common.pdfWorkerOutOfMemoryErrorMessage', {
defaultMessage: `Can't generate a PDF due to insufficient memory. Try making a smaller PDF and retrying this report.`,
});
}
@ -107,7 +108,7 @@ export class BrowserCouldNotLaunchError extends ReportingError {
}
public humanFriendlyMessage() {
return i18n.translate('xpack.reporting.common.browserCouldNotLaunchErrorMessage', {
return i18n.translate('reporting.common.browserCouldNotLaunchErrorMessage', {
defaultMessage: `Can't generate screenshots because the browser did not launch. See the server logs for more information.`,
});
}
@ -145,7 +146,7 @@ export class VisualReportingSoftDisabledError extends ReportingError {
}
humanFriendlyMessage() {
return i18n.translate('xpack.reporting.common.cloud.insufficientSystemMemoryError', {
return i18n.translate('reporting.common.cloud.insufficientSystemMemoryError', {
defaultMessage: `Can't generate this report due to insufficient memory.`,
});
}

View file

@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export { CancellationToken } from './cancellation_token';
export type { TaskRunMetrics, CsvMetrics, TaskRunResult } from './metrics';
export * from './errors';
export * from './constants';
export * from './schema_utils';

View file

@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/packages/kbn-reporting/common'],
};

View file

@ -0,0 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/reporting-common",
"owner": "@elastic/appex-sharedux"
}

View file

@ -0,0 +1,40 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import type { PdfScreenshotResult, PngScreenshotResult } from '@kbn/screenshotting-plugin/server';
export type PngMetrics = PngScreenshotResult['metrics'];
export type PdfMetrics = PdfScreenshotResult['metrics'];
export interface CsvMetrics {
rows: number;
}
export interface TaskRunMetrics {
csv?: CsvMetrics;
png?: PngMetrics;
pdf?: PdfMetrics;
}
export interface TaskRunResult {
content_type: string | null;
csv_contains_formulas?: boolean;
max_size_reached?: boolean;
warnings?: string[];
metrics?: TaskRunMetrics;
/**
* When running a report task we may finish with warnings that were triggered
* by an error. We can pass the error code via the task run result to the
* task runner so that it can be recorded for telemetry.
*
* Alternatively, this field can be populated in the event that the task does
* not complete in the task runner's error handler.
*/
error_code?: string;
}

View file

@ -0,0 +1,6 @@
{
"name": "@kbn/reporting-common",
"private": true,
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0"
}

View file

@ -0,0 +1,17 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import moment from 'moment';
import { numberToDuration } from './schema_utils';
describe('Schema Utils', () => {
it('numberToDuration converts a number/Duration into a Duration object', () => {
expect(numberToDuration(500)).toMatchInlineSnapshot(`"PT0.5S"`);
expect(numberToDuration(moment.duration(1, 'hour'))).toMatchInlineSnapshot(`"PT1H"`);
});
});

View file

@ -0,0 +1,37 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { ByteSizeValue } from '@kbn/config-schema';
import moment from 'moment';
/*
* For cleaner code: use these functions when a config schema value could be
* one type or another. This allows you to treat the value as one type.
*/
export const durationToNumber = (value: number | moment.Duration): number => {
if (typeof value === 'number') {
return value;
}
return value.asMilliseconds();
};
export const numberToDuration = (value: number | moment.Duration): moment.Duration => {
if (typeof value === 'number') {
return moment.duration(value, 'milliseconds');
}
return value;
};
export const byteSizeValueToNumber = (value: number | ByteSizeValue) => {
if (typeof value === 'number') {
return value;
}
return value.getValueInBytes();
};

View file

@ -0,0 +1,23 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
"jest",
"node",
"react"
]
},
"include": [
"**/*.ts",
"**/*.tsx",
],
"exclude": [
"target/**/*"
],
"kbn_references": [
"@kbn/i18n",
"@kbn/screenshotting-plugin",
"@kbn/config-schema",
]
}

View file

@ -754,6 +754,10 @@
"@kbn/functional-with-es-ssl-cases-test-plugin/*": ["x-pack/test/functional_with_es_ssl/plugins/cases/*"],
"@kbn/generate": ["packages/kbn-generate"],
"@kbn/generate/*": ["packages/kbn-generate/*"],
"@kbn/generate-csv": ["packages/kbn-generate-csv"],
"@kbn/generate-csv/*": ["packages/kbn-generate-csv/*"],
"@kbn/generate-csv-types": ["packages/kbn-generate-csv-types"],
"@kbn/generate-csv-types/*": ["packages/kbn-generate-csv-types/*"],
"@kbn/get-repo-files": ["packages/kbn-get-repo-files"],
"@kbn/get-repo-files/*": ["packages/kbn-get-repo-files/*"],
"@kbn/global-search-bar-plugin": ["x-pack/plugins/global_search_bar"],
@ -1002,6 +1006,8 @@
"@kbn/repo-source-classifier/*": ["packages/kbn-repo-source-classifier/*"],
"@kbn/repo-source-classifier-cli": ["packages/kbn-repo-source-classifier-cli"],
"@kbn/repo-source-classifier-cli/*": ["packages/kbn-repo-source-classifier-cli/*"],
"@kbn/reporting-common": ["packages/kbn-reporting/common"],
"@kbn/reporting-common/*": ["packages/kbn-reporting/common/*"],
"@kbn/reporting-example-plugin": ["x-pack/examples/reporting_example"],
"@kbn/reporting-example-plugin/*": ["x-pack/examples/reporting_example/*"],
"@kbn/reporting-plugin": ["x-pack/plugins/reporting"],

View file

@ -1,3 +1,13 @@
# Kibana Reporting
An awesome Kibana reporting plugin
An awesome Kibana reporting plugin
## csv_searchsource.
This is the endpoint used in the Discover UI. It must be replaced by csv_v2 at some point, when we have more capacity in reporting. https://github.com/elastic/kibana/issues/151190
## csv_searchsource_immediate.
This should be deprecated. It is historically a customer driven endpoint. This will be replaced in the UI with an async export option in the future.
## csv_v2.
This new endpoint is designed to have a more automation-friendly signature. It will replace csv_searchsource in the UI at some point, when there is more capacity in reporting. It will need a little more work to have parity: it needs to be able to export "unsaved" searches.
## Generate CSV
Although historically related to reporting, the CsvGenerator class has now be moved into its own package `@kbn/generate-csv` and `@kbn/generate-csv-types`.

View file

@ -5,6 +5,7 @@
* 2.0.
*/
import { CONTENT_TYPE_CSV } from '@kbn/generate-csv/src/constants';
import * as reportTypes from './report_types';
import * as jobTypes from './job_types';
@ -19,11 +20,6 @@ export const REPORTING_SYSTEM_INDEX = '.reporting';
export const JOB_COMPLETION_NOTIFICATIONS_SESSION_KEY =
'xpack.reporting.jobCompletionNotifications';
export const CONTENT_TYPE_CSV = 'text/csv';
export const CSV_REPORTING_ACTION = 'downloadCsvReport';
export const CSV_BOM_CHARS = '\ufeff';
export const CSV_FORMULA_CHARS = ['=', '+', '-', '@'];
export const ALLOWED_JOB_CONTENT_TYPES = [
'application/json',
'application/pdf',
@ -32,12 +28,6 @@ export const ALLOWED_JOB_CONTENT_TYPES = [
'text/plain',
];
export const UI_SETTINGS_SEARCH_INCLUDE_FROZEN = 'search:includeFrozen';
export const UI_SETTINGS_CUSTOM_PDF_LOGO = 'xpackReporting:customPdfLogo';
export const UI_SETTINGS_CSV_SEPARATOR = 'csv:separator';
export const UI_SETTINGS_CSV_QUOTE_VALUES = 'csv:quoteValues';
export const UI_SETTINGS_DATEFORMAT_TZ = 'dateFormat:tz';
// Re-export type definitions here for convenience.
export * from './report_types';
export * from './job_types';

View file

@ -13,7 +13,7 @@ import {
BrowserUnexpectedlyClosedError,
BrowserScreenshotError,
InvalidLayoutParametersError,
} from '.';
} from '@kbn/reporting-common';
describe('mapToReportingError', () => {
test('Non-Error values', () => {

View file

@ -16,7 +16,7 @@ import {
ReportingError,
UnknownError,
VisualReportingSoftDisabledError,
} from '.';
} from '@kbn/reporting-common';
/**
* Map an error object from the Screenshotting plugin into an error type of the Reporting domain.

View file

@ -5,8 +5,7 @@
* 2.0.
*/
import type { BaseParamsV2, BasePayloadV2 } from '../base';
import type { BaseParamsV2, BasePayloadV2 } from '..';
interface CsvFromSavedObjectBase {
objectType: 'search';
}

View file

@ -5,6 +5,7 @@
* 2.0.
*/
import { TaskRunMetrics, TaskRunResult } from '@kbn/reporting-common';
import type { PdfScreenshotResult, PngScreenshotResult } from '@kbn/screenshotting-plugin/server';
import type { BaseParams, BaseParamsV2, BasePayload, BasePayloadV2, JobId } from './base';
@ -38,38 +39,10 @@ export interface ReportOutput extends TaskRunResult {
size: number;
}
export interface CsvMetrics {
rows: number;
}
export type PngMetrics = PngScreenshotResult['metrics'];
export type PdfMetrics = PdfScreenshotResult['metrics'];
export interface TaskRunMetrics {
csv?: CsvMetrics;
png?: PngMetrics;
pdf?: PdfMetrics;
}
export interface TaskRunResult {
content_type: string | null;
csv_contains_formulas?: boolean;
max_size_reached?: boolean;
warnings?: string[];
metrics?: TaskRunMetrics;
/**
* When running a report task we may finish with warnings that were triggered
* by an error. We can pass the error code via the task run result to the
* task runner so that it can be recorded for telemetry.
*
* Alternatively, this field can be populated in the event that the task does
* not complete in the task runner's error handler.
*/
error_code?: string;
}
export interface ReportFields {
queue_time_ms?: number[]; // runtime field: started_at - created_at
execution_time_ms?: number[]; // runtime field: completed_at - started_at

View file

@ -7,6 +7,7 @@
import { EuiText, EuiTextColor } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { TaskRunResult } from '@kbn/reporting-common';
import moment from 'moment';
import React from 'react';
import { JobTypes, JOB_STATUSES } from '../../common/constants';
@ -17,7 +18,6 @@ import type {
ReportFields,
ReportOutput,
ReportSource,
TaskRunResult,
} from '../../common/types';
const { COMPLETED, FAILED, PENDING, PROCESSING, WARNINGS } = JOB_STATUSES;

View file

@ -15,9 +15,9 @@ import {
EuiSpacer,
} from '@elastic/eui';
import moment from 'moment';
import { VisualReportingSoftDisabledError } from '@kbn/reporting-common';
import { USES_HEADLESS_JOB_TYPES } from '../../../common/constants';
import { VisualReportingSoftDisabledError } from '../../../common/errors';
import type { Job } from '../../lib/job';
import { useKibana } from '../../shared_imports';

View file

@ -10,8 +10,8 @@ import { FormattedMessage } from '@kbn/i18n-react';
import React from 'react';
import { DocLinksStart, ThemeServiceStart, ToastInput } from '@kbn/core/public';
import { toMountPoint } from '@kbn/kibana-react-plugin/public';
import * as errors from '@kbn/reporting-common/errors';
import type { JobSummary, ManagementLinkFn } from '../../common/types';
import * as errors from '../../common/errors';
import { sharedI18nTexts } from '../shared_i18n_texts';
export const getFailureToast = (

View file

@ -15,7 +15,7 @@ import type { IEmbeddable } from '@kbn/embeddable-plugin/public';
import { ViewMode } from '@kbn/embeddable-plugin/public';
import type { UiActionsActionDefinition as ActionDefinition } from '@kbn/ui-actions-plugin/public';
import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public';
import { CSV_REPORTING_ACTION } from '../../common/constants';
import { CSV_REPORTING_ACTION } from '@kbn/reporting-common';
import { checkLicense } from '../lib/license_check';
import { ReportingAPIClient } from '../lib/reporting_api_client';
import type { ReportingPublicPluginStartDendencies } from '../plugin';

View file

@ -8,7 +8,8 @@
import { schema } from '@kbn/config-schema';
import { i18n } from '@kbn/i18n';
import { CoreSetup, UiSettingsParams } from '@kbn/core/server';
import { PLUGIN_ID, UI_SETTINGS_CUSTOM_PDF_LOGO } from '../../common/constants';
import { UI_SETTINGS_CUSTOM_PDF_LOGO } from '@kbn/reporting-common';
import { PLUGIN_ID } from '../../common/constants';
const kbToBase64Length = (kb: number) => Math.floor((kb * 1024 * 8) / 6);
const maxLogoSizeInBase64 = kbToBase64Length(200);

View file

@ -6,8 +6,8 @@
*/
import type { Headers, Logger } from '@kbn/core/server';
import { UI_SETTINGS_CUSTOM_PDF_LOGO } from '@kbn/reporting-common';
import { ReportingCore } from '../..';
import { UI_SETTINGS_CUSTOM_PDF_LOGO } from '../../../common/constants';
export const getCustomLogo = async (
reporting: ReportingCore,

View file

@ -5,7 +5,7 @@
* 2.0.
*/
jest.mock('./generate_csv/generate_csv', () => ({
jest.mock('@kbn/generate-csv', () => ({
CsvGenerator: class CsvGeneratorMock {
generateData() {
return {
@ -20,7 +20,7 @@ import nodeCrypto from '@elastic/node-crypto';
import { loggingSystemMock } from '@kbn/core/server/mocks';
import { Writable } from 'stream';
import { ReportingCore } from '../..';
import { CancellationToken } from '../../../common/cancellation_token';
import { CancellationToken } from '@kbn/reporting-common';
import { createMockConfigSchema, createMockReportingCore } from '../../test_helpers';
import { runTaskFnFactory } from './execute_job';

View file

@ -5,11 +5,11 @@
* 2.0.
*/
import { CsvGenerator } from '@kbn/generate-csv';
import { TaskPayloadCSV } from './types';
import { getFieldFormats } from '../../services';
import { RunTaskFn, RunTaskFnFactory } from '../../types';
import { decryptJobHeaders } from '../common';
import { CsvGenerator } from './generate_csv/generate_csv';
import { TaskPayloadCSV } from './types';
export const runTaskFnFactory: RunTaskFnFactory<RunTaskFn<TaskPayloadCSV>> = (
reporting,

View file

@ -7,11 +7,10 @@
import { KibanaRequest } from '@kbn/core/server';
import { Writable } from 'stream';
import { CancellationToken } from '../../../common/cancellation_token';
import { TaskRunResult } from '../../lib/tasks';
import { CancellationToken, TaskRunResult } from '@kbn/reporting-common';
import { CsvGenerator } from '@kbn/generate-csv';
import { getFieldFormats } from '../../services';
import { ReportingRequestHandlerContext, RunTaskFnFactory } from '../../types';
import { CsvGenerator } from '../csv_searchsource/generate_csv/generate_csv';
import { JobParamsDownloadCSV } from './types';
/*

View file

@ -5,11 +5,11 @@
* 2.0.
*/
import { CsvGenerator } from '@kbn/generate-csv';
import type { TaskPayloadCsvFromSavedObject } from '../../../common/types';
import { getFieldFormats } from '../../services';
import type { RunTaskFn, RunTaskFnFactory } from '../../types';
import { decryptJobHeaders } from '../common';
import { CsvGenerator } from '../csv_searchsource/generate_csv';
type RunTaskFnType = RunTaskFn<TaskPayloadCsvFromSavedObject>;

View file

@ -9,7 +9,7 @@ import * as Rx from 'rxjs';
import { loggingSystemMock } from '@kbn/core/server/mocks';
import { Writable } from 'stream';
import { ReportingCore } from '../../..';
import { CancellationToken } from '../../../../common/cancellation_token';
import { CancellationToken } from '@kbn/reporting-common';
import { cryptoFactory } from '../../../lib';
import {
createMockConfig,

View file

@ -5,11 +5,11 @@
* 2.0.
*/
import { TaskRunResult } from '@kbn/reporting-common';
import apm from 'elastic-apm-node';
import * as Rx from 'rxjs';
import { finalize, map, mergeMap, takeUntil, tap } from 'rxjs/operators';
import { REPORTING_TRANSACTION_TYPE } from '../../../../common/constants';
import { TaskRunResult } from '../../../lib/tasks';
import { RunTaskFn, RunTaskFnFactory } from '../../../types';
import { decryptJobHeaders, generatePngObservable, getFullUrls } from '../../common';
import { TaskPayloadPNG } from '../types';

View file

@ -9,7 +9,7 @@ import * as Rx from 'rxjs';
import { loggingSystemMock } from '@kbn/core/server/mocks';
import { Writable } from 'stream';
import { ReportingCore } from '../..';
import { CancellationToken } from '../../../common/cancellation_token';
import { CancellationToken } from '@kbn/reporting-common';
import { LocatorParams } from '../../../common/types';
import { cryptoFactory } from '../../lib';
import {

View file

@ -5,11 +5,11 @@
* 2.0.
*/
import { TaskRunResult } from '@kbn/reporting-common';
import apm from 'elastic-apm-node';
import * as Rx from 'rxjs';
import { finalize, map, mergeMap, takeUntil, tap } from 'rxjs/operators';
import { REPORTING_TRANSACTION_TYPE } from '../../../common/constants';
import { TaskRunResult } from '../../lib/tasks';
import { RunTaskFn, RunTaskFnFactory } from '../../types';
import { decryptJobHeaders, generatePngObservable } from '../common';
import { getFullRedirectAppUrl } from '../common/v2/get_full_redirect_app_url';

View file

@ -9,7 +9,7 @@ import * as Rx from 'rxjs';
import { loggingSystemMock } from '@kbn/core/server/mocks';
import { Writable } from 'stream';
import { ReportingCore } from '../../..';
import { CancellationToken } from '../../../../common/cancellation_token';
import { CancellationToken } from '@kbn/reporting-common';
import { cryptoFactory } from '../../../lib';
import { createMockConfigSchema, createMockReportingCore } from '../../../test_helpers';
import { generatePdfObservable } from '../lib/generate_pdf';

View file

@ -5,11 +5,11 @@
* 2.0.
*/
import { TaskRunResult } from '@kbn/reporting-common';
import apm from 'elastic-apm-node';
import * as Rx from 'rxjs';
import { catchError, map, mergeMap, takeUntil, tap } from 'rxjs/operators';
import { REPORTING_TRANSACTION_TYPE } from '../../../../common/constants';
import { TaskRunResult } from '../../../lib/tasks';
import { RunTaskFn, RunTaskFnFactory } from '../../../types';
import { decryptJobHeaders, getCustomLogo, getFullUrls } from '../../common';
import { generatePdfObservable } from '../lib/generate_pdf';

View file

@ -11,7 +11,7 @@ import * as Rx from 'rxjs';
import { loggingSystemMock } from '@kbn/core/server/mocks';
import { Writable } from 'stream';
import { ReportingCore } from '../..';
import { CancellationToken } from '../../../common/cancellation_token';
import { CancellationToken } from '@kbn/reporting-common';
import { LocatorParams } from '../../../common/types';
import { cryptoFactory } from '../../lib';
import { createMockConfigSchema, createMockReportingCore } from '../../test_helpers';

View file

@ -8,8 +8,8 @@
import apm from 'elastic-apm-node';
import * as Rx from 'rxjs';
import { catchError, map, mergeMap, takeUntil, tap } from 'rxjs/operators';
import { TaskRunResult } from '@kbn/reporting-common';
import { REPORTING_TRANSACTION_TYPE } from '../../../common/constants';
import { TaskRunResult } from '../../lib/tasks';
import { RunTaskFn, RunTaskFnFactory } from '../../types';
import { decryptJobHeaders, getCustomLogo } from '../common';
import { generatePdfObservable } from './lib/generate_pdf';

View file

@ -7,8 +7,8 @@
import deepMerge from 'deepmerge';
import type { Logger, LogMeta } from '@kbn/core/server';
import { TaskRunMetrics } from '@kbn/reporting-common';
import { PLUGIN_ID } from '../../../common/constants';
import type { TaskRunMetrics } from '../../../common/types';
import { IReport } from '../store';
import { ActionType } from '.';
import { EcsLogAdapter } from './adapter';

View file

@ -6,7 +6,7 @@
*/
import { LogMeta } from '@kbn/core/server';
import type { TaskRunMetrics } from '../../../common/types';
import { TaskRunMetrics } from '@kbn/reporting-common';
import { ActionType } from '.';
export interface ReportingAction<A extends ActionType> extends LogMeta {

View file

@ -6,14 +6,14 @@
*/
import { loggingSystemMock } from '@kbn/core/server/mocks';
import { ReportingCore } from '../..';
import { KibanaShuttingDownError } from '@kbn/reporting-common';
import { RunContext } from '@kbn/task-manager-plugin/server';
import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks';
import { KibanaShuttingDownError } from '../../../common/errors';
import type { SavedReport } from '../store';
import { ExecuteReportTask } from '.';
import { ReportingCore } from '../..';
import { ReportingConfigType } from '../../config';
import { createMockConfigSchema, createMockReportingCore } from '../../test_helpers';
import { ExecuteReportTask } from '.';
import type { SavedReport } from '../store';
const logger = loggingSystemMock.createLogger();
@ -115,10 +115,14 @@ describe('Execute Report Task', () => {
});
await taskPromise;
expect(store.setReportFailed).toHaveBeenCalledWith(
expect.anything(),
expect(store.setReportFailed).toHaveBeenLastCalledWith(
expect.objectContaining({
output: expect.objectContaining({ error_code: new KibanaShuttingDownError().code }),
_id: 'test',
}),
expect.objectContaining({
output: expect.objectContaining({
error_code: new KibanaShuttingDownError().code,
}),
})
);
});

View file

@ -18,11 +18,16 @@ import type {
TaskManagerStartContract,
TaskRunCreatorFunction,
} from '@kbn/task-manager-plugin/server';
import {
CancellationToken,
ReportingError,
QueueTimeoutError,
KibanaShuttingDownError,
TaskRunResult,
} from '@kbn/reporting-common';
import { mapToReportingError } from '../../../common/errors/map_to_reporting_error';
import { getContentStream } from '..';
import type { ReportingCore } from '../..';
import { CancellationToken } from '../../../common/cancellation_token';
import { mapToReportingError } from '../../../common/errors/map_to_reporting_error';
import { ReportingError, QueueTimeoutError, KibanaShuttingDownError } from '../../../common/errors';
import { durationToNumber, numberToDuration } from '../../../common/schema_utils';
import type { ReportOutput } from '../../../common/types';
import type { ReportingConfigType } from '../../config';
@ -30,13 +35,7 @@ import type { BasePayload, ExportTypeDefinition, RunTaskFn } from '../../types';
import type { ReportDocument, ReportingStore } from '../store';
import { Report, SavedReport } from '../store';
import type { ReportFailedFields, ReportProcessingFields } from '../store/store';
import {
ReportingTask,
ReportingTaskStatus,
REPORTING_EXECUTE_TYPE,
ReportTaskParams,
TaskRunResult,
} from '.';
import { ReportingTask, ReportingTaskStatus, REPORTING_EXECUTE_TYPE, ReportTaskParams } from '.';
import { errorLogger } from './error_logger';
type CompletedReportOutput = Omit<ReportOutput, 'content'>;

View file

@ -6,7 +6,7 @@
*/
import { TaskRunCreatorFunction } from '@kbn/task-manager-plugin/server';
import { ReportSource, TaskRunResult } from '../../../common/types';
import { ReportSource } from '../../../common/types';
import { BasePayload } from '../../types';
export const REPORTING_EXECUTE_TYPE = 'report:execute';
@ -14,7 +14,6 @@ export const REPORTING_MONITOR_TYPE = 'reports:monitor';
export { ExecuteReportTask } from './execute_report';
export { MonitorReportsTask } from './monitor_reports';
export type { TaskRunResult };
export interface ReportTaskParams<JobPayloadType = BasePayload> {
id: string;

View file

@ -29,8 +29,8 @@ import type {
} from '@kbn/task-manager-plugin/server';
import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server';
import type { Writable } from 'stream';
import type { CancellationToken } from '../common/cancellation_token';
import type { BaseParams, BasePayload, TaskRunResult, UrlOrUrlLocatorTuple } from '../common/types';
import type { CancellationToken, TaskRunResult } from '@kbn/reporting-common';
import type { BaseParams, BasePayload, UrlOrUrlLocatorTuple } from '../common/types';
import type { ReportingConfigType } from './config';
import type { ReportingCore } from './core';
import type { ReportTaskParams } from './lib/tasks';

View file

@ -35,8 +35,9 @@
"@kbn/logging-mocks",
"@kbn/core-http-server",
"@kbn/core-test-helpers-test-utils",
"@kbn/expressions-plugin",
"@kbn/safer-lodash-set",
"@kbn/generate-csv",
"@kbn/reporting-common",
],
"exclude": [
"target/**/*",

View file

@ -4882,6 +4882,9 @@
"presentationUtil.saveModalDashboard.saveAndGoToDashboardLabel": "Enregistrer et accéder au tableau de bord",
"presentationUtil.saveModalDashboard.saveLabel": "Enregistrer",
"presentationUtil.saveModalDashboard.saveToLibraryLabel": "Enregistrer et ajouter à la bibliothèque",
"reporting.common.browserCouldNotLaunchErrorMessage": "Impossible de générer des captures d'écran, car le navigateur ne sest pas lancé. Consultez les logs de serveur pour en savoir plus.",
"reporting.common.cloud.insufficientSystemMemoryError": "Impossible de générer ce rapport en raison dun manque de mémoire.",
"reporting.common.pdfWorkerOutOfMemoryErrorMessage": "Impossible de générer un PDF en raison dun manque de mémoire. Essayez de réduire la taille du PDF et relancez ce rapport.",
"savedObjects.confirmModal.overwriteConfirmationMessage": "Voulez-vous vraiment écraser {title} ?",
"savedObjects.confirmModal.overwriteTitle": "Écraser {name} ?",
"savedObjects.confirmModal.saveDuplicateButtonLabel": "Enregistrer {name}",
@ -26607,9 +26610,9 @@
"xpack.reporting.diagnostic.browserMissingFonts": "Le navigateur n'a pas réussi à localiser de police par défaut. Consultez {url} pour corriger ce problème.",
"xpack.reporting.diagnostic.noUsableSandbox": "Impossible d'utiliser la sandbox Chromium. Vous pouvez la désactiver à vos risques et périls avec \"xpack.screenshotting.browser.chromium.disableSandbox\". Veuillez consulter {url}",
"xpack.reporting.exportTypes.common.failedToDecryptReportJobDataErrorMessage": "Impossible de déchiffrer les données de la tâche de reporting. Veuillez vous assurer que {encryptionKey} est défini et générez à nouveau ce rapport. {err}",
"xpack.reporting.exportTypes.csv.generateCsv.esErrorMessage": "Réponse {statusCode} reçue d'Elasticsearch : {message}",
"xpack.reporting.exportTypes.csv.generateCsv.incorrectRowCount": "Une erreur a été rencontrée avec le nombre de lignes CSV générées à partir de la recherche : {expected} prévues, {received} reçues.",
"xpack.reporting.exportTypes.csv.generateCsv.unknownErrorMessage": "Une erreur inconnue est survenue : {message}",
"generateCsv.esErrorMessage": "Réponse {statusCode} reçue d'Elasticsearch : {message}",
"generateCsv.incorrectRowCount": "Une erreur a été rencontrée avec le nombre de lignes CSV générées à partir de la recherche : {expected} prévues, {received} reçues.",
"generateCsv.unknownErrorMessage": "Une erreur inconnue est survenue : {message}",
"xpack.reporting.jobResponse.errorHandler.notAuthorized": "Désolé, vous n'êtes pas autorisé à afficher ou supprimer les rapports {jobtype}",
"xpack.reporting.jobsQuery.deleteError": "Impossible de supprimer le rapport : {error}",
"xpack.reporting.jobStatusDetail.attemptXofY": "Tentative {attempts} sur {max_attempts}.",
@ -26638,9 +26641,6 @@
"xpack.reporting.statusIndicator.processingMaxAttemptsLabel": "En cours de traitement, tentative {attempt} sur {of}",
"xpack.reporting.userAccessError.message": "Demandez à votre administrateur un accès aux fonctionnalités de reporting. {grantUserAccessDocs}.",
"xpack.reporting.breadcrumb": "Reporting",
"xpack.reporting.common.browserCouldNotLaunchErrorMessage": "Impossible de générer des captures d'écran, car le navigateur ne sest pas lancé. Consultez les logs de serveur pour en savoir plus.",
"xpack.reporting.common.cloud.insufficientSystemMemoryError": "Impossible de générer ce rapport en raison dun manque de mémoire.",
"xpack.reporting.common.pdfWorkerOutOfMemoryErrorMessage": "Impossible de générer un PDF en raison dun manque de mémoire. Essayez de réduire la taille du PDF et relancez ce rapport.",
"xpack.reporting.dashboard.csvDownloadStartedMessage": "Votre CSV sera téléchargé dans un instant.",
"xpack.reporting.dashboard.csvDownloadStartedTitle": "Téléchargement du CSV démarré",
"xpack.reporting.dashboard.downloadCsvPanelTitle": "Télécharger CSV",
@ -26669,9 +26669,9 @@
"xpack.reporting.diagnostic.screenshotFailureMessage": "Impossible d'effectuer une capture d'écran de votre installation Kibana.",
"xpack.reporting.errorHandler.unknownError": "Erreur inconnue",
"xpack.reporting.exportTypes.common.missingJobHeadersErrorMessage": "Les en-têtes de tâche sont manquants",
"xpack.reporting.exportTypes.csv.generateCsv.authenticationExpired.partialResultsMessage": "Ce rapport contient des résultats CSV partiels, car le token d'authentification a expiré. Exportez une quantité moindre de données ou augmentez le délai d'expiration du token d'authentification.",
"xpack.reporting.exportTypes.csv.generateCsv.csvUnableToClosePit": "Impossible de fermer le point temporel utilisé pour la recherche. Vérifiez les logs de serveur Kibana.",
"xpack.reporting.exportTypes.csv.generateCsv.escapedFormulaValues": "Le CSV peut contenir des formules dont les valeurs sont précédées d'un caractère d'échappement",
"generateCsv.authenticationExpired.partialResultsMessage": "Ce rapport contient des résultats CSV partiels, car le token d'authentification a expiré. Exportez une quantité moindre de données ou augmentez le délai d'expiration du token d'authentification.",
"generateCsv.csvUnableToClosePit": "Impossible de fermer le point temporel utilisé pour la recherche. Vérifiez les logs de serveur Kibana.",
"generateCsv.escapedFormulaValues": "Le CSV peut contenir des formules dont les valeurs sont précédées d'un caractère d'échappement",
"xpack.reporting.jobCreatedBy.unknownUserPlaceholderText": "Inconnu",
"xpack.reporting.jobResponse.errorHandler.unknownError": "Erreur inconnue",
"xpack.reporting.jobStatusDetail.deprecatedText": "Il s'agit d'un type d'exportation déclassé. L'automatisation de ce rapport devra être à nouveau créée pour une question de compatibilité avec les futures versions de Kibana.",

View file

@ -4883,6 +4883,9 @@
"presentationUtil.saveModalDashboard.saveAndGoToDashboardLabel": "保存してダッシュボードを開く",
"presentationUtil.saveModalDashboard.saveLabel": "保存",
"presentationUtil.saveModalDashboard.saveToLibraryLabel": "保存してライブラリに追加",
"reporting.common.browserCouldNotLaunchErrorMessage": "ブラウザーが起動していないため、スクリーンショットを生成できません。詳細については、サーバーログを参照してください。",
"reporting.common.cloud.insufficientSystemMemoryError": "メモリ不足のため、このレポートを生成できません。",
"reporting.common.pdfWorkerOutOfMemoryErrorMessage": "メモリ不足のため、PDFを生成できません。PDFのサイズを小さくして、このレポートを再試行してください。",
"savedObjects.confirmModal.overwriteConfirmationMessage": "{title}を上書きしてよろしいですか?",
"savedObjects.confirmModal.overwriteTitle": "{name}を上書きしますか?",
"savedObjects.confirmModal.saveDuplicateButtonLabel": "{name}を保存",
@ -26588,9 +26591,9 @@
"xpack.reporting.diagnostic.browserMissingFonts": "ブラウザーはデフォルトフォントを検索できませんでした。この問題を修正するには、{url}を参照してください。",
"xpack.reporting.diagnostic.noUsableSandbox": "Chromiumサンドボックスを使用できません。これは「xpack.screenshotting.browser.chromium.disableSandbox」で無効にすることができます。この作業はご自身の責任で行ってください。{url}を参照してください",
"xpack.reporting.exportTypes.common.failedToDecryptReportJobDataErrorMessage": "レポートジョブデータの解読に失敗しました。{encryptionKey} が設定されていることを確認してこのレポートを再生成してください。{err}",
"xpack.reporting.exportTypes.csv.generateCsv.esErrorMessage": "Elasticsearchから{statusCode}応答を受け取りました:{message}",
"xpack.reporting.exportTypes.csv.generateCsv.incorrectRowCount": "検索から生成されたCSVの行数でエラーが発生しました。正しい行数{expected}、実際の行数:{received}。",
"xpack.reporting.exportTypes.csv.generateCsv.unknownErrorMessage": "不明なエラーが発生しました:{message}",
"generateCsv.esErrorMessage": "Elasticsearchから{statusCode}応答を受け取りました:{message}",
"generateCsv.incorrectRowCount": "検索から生成されたCSVの行数でエラーが発生しました。正しい行数{expected}、実際の行数:{received}。",
"generateCsv.unknownErrorMessage": "不明なエラーが発生しました:{message}",
"xpack.reporting.jobResponse.errorHandler.notAuthorized": "{jobtype}レポートを表示または削除する権限がありません",
"xpack.reporting.jobsQuery.deleteError": "レポートを削除できません:{error}",
"xpack.reporting.jobStatusDetail.attemptXofY": "{max_attempts}回中{attempts}回試行します。",
@ -26619,9 +26622,6 @@
"xpack.reporting.statusIndicator.processingMaxAttemptsLabel": "処理中。{attempt}/{of}回試行",
"xpack.reporting.userAccessError.message": "レポート機能にアクセスするには、管理者に問い合わせてください。{grantUserAccessDocs}。",
"xpack.reporting.breadcrumb": "レポート",
"xpack.reporting.common.browserCouldNotLaunchErrorMessage": "ブラウザーが起動していないため、スクリーンショットを生成できません。詳細については、サーバーログを参照してください。",
"xpack.reporting.common.cloud.insufficientSystemMemoryError": "メモリ不足のため、このレポートを生成できません。",
"xpack.reporting.common.pdfWorkerOutOfMemoryErrorMessage": "メモリ不足のため、PDFを生成できません。PDFのサイズを小さくして、このレポートを再試行してください。",
"xpack.reporting.dashboard.csvDownloadStartedMessage": "間もなく CSV がダウンロードされます。",
"xpack.reporting.dashboard.csvDownloadStartedTitle": "CSV のダウンロードが開始しました",
"xpack.reporting.dashboard.downloadCsvPanelTitle": "CSV をダウンロード",
@ -26650,9 +26650,9 @@
"xpack.reporting.diagnostic.screenshotFailureMessage": "Kibanaインストールのスクリーンショットを作成できませんでした。",
"xpack.reporting.errorHandler.unknownError": "不明なエラー",
"xpack.reporting.exportTypes.common.missingJobHeadersErrorMessage": "ジョブヘッダーがありません",
"xpack.reporting.exportTypes.csv.generateCsv.authenticationExpired.partialResultsMessage": "認証トークが有効期限切れのため、このレポートには一部のCSVの結果が含まれています。少ない量のデータをエクスポートするか、認証トークンのタイムアウトを大きくします。",
"xpack.reporting.exportTypes.csv.generateCsv.csvUnableToClosePit": "検索に使用したPoint-In-Timeを閉じることができません。Kibanaサーバーログを確認してください。",
"xpack.reporting.exportTypes.csv.generateCsv.escapedFormulaValues": "CSVには、値がエスケープされた式が含まれる場合があります",
"generateCsv.authenticationExpired.partialResultsMessage": "認証トークが有効期限切れのため、このレポートには一部のCSVの結果が含まれています。少ない量のデータをエクスポートするか、認証トークンのタイムアウトを大きくします。",
"generateCsv.csvUnableToClosePit": "検索に使用したPoint-In-Timeを閉じることができません。Kibanaサーバーログを確認してください。",
"generateCsv.escapedFormulaValues": "CSVには、値がエスケープされた式が含まれる場合があります",
"xpack.reporting.jobCreatedBy.unknownUserPlaceholderText": "不明",
"xpack.reporting.jobResponse.errorHandler.unknownError": "不明なエラー",
"xpack.reporting.jobStatusDetail.deprecatedText": "これは廃止予定のエクスポートタイプです。将来のバージョンのKibanaとの互換性のためには、このレポートの自動化を再作成する必要があります。",

View file

@ -4883,6 +4883,9 @@
"presentationUtil.saveModalDashboard.saveAndGoToDashboardLabel": "保存并前往仪表板",
"presentationUtil.saveModalDashboard.saveLabel": "保存",
"presentationUtil.saveModalDashboard.saveToLibraryLabel": "保存并添加到库",
"reporting.common.browserCouldNotLaunchErrorMessage": "无法生成屏幕截图,因为浏览器未启动。有关更多信息,请查看服务器日志。",
"reporting.common.cloud.insufficientSystemMemoryError": "由于内存不足,无法生成此报告。",
"reporting.common.pdfWorkerOutOfMemoryErrorMessage": "由于内存不足,无法生成 PDF。尝试生成更小的 PDF然后重试此报告。",
"savedObjects.confirmModal.overwriteConfirmationMessage": "确定要覆盖“{title}”?",
"savedObjects.confirmModal.overwriteTitle": "覆盖 {name}",
"savedObjects.confirmModal.saveDuplicateButtonLabel": "保存 {name}",
@ -26604,9 +26607,9 @@
"xpack.reporting.diagnostic.browserMissingFonts": "浏览器找不到默认字体。请参见 {url} 以解决此问题。",
"xpack.reporting.diagnostic.noUsableSandbox": "无法使用 Chromium 沙盒。您自行承担使用“xpack.screenshotting.browser.chromium.disableSandbox”禁用此项的风险。请参见 {url}",
"xpack.reporting.exportTypes.common.failedToDecryptReportJobDataErrorMessage": "无法解密报告作业数据。请确保已设置 {encryptionKey},然后重新生成此报告。{err}",
"xpack.reporting.exportTypes.csv.generateCsv.esErrorMessage": "从 Elasticsearch 收到 {statusCode} 响应:{message}",
"xpack.reporting.exportTypes.csv.generateCsv.incorrectRowCount": "从搜索生成的 CSV 行数出现错误:应为 {expected},但收到 {received}。",
"xpack.reporting.exportTypes.csv.generateCsv.unknownErrorMessage": "出现未知错误:{message}",
"generateCsv.esErrorMessage": "从 Elasticsearch 收到 {statusCode} 响应:{message}",
"generateCsv.incorrectRowCount": "从搜索生成的 CSV 行数出现错误:应为 {expected},但收到 {received}。",
"generateCsv.unknownErrorMessage": "出现未知错误:{message}",
"xpack.reporting.jobResponse.errorHandler.notAuthorized": "抱歉,您无权查看或删除 {jobtype} 报告",
"xpack.reporting.jobsQuery.deleteError": "无法删除报告:{error}",
"xpack.reporting.jobStatusDetail.attemptXofY": "尝试 {attempts} 次,最多可尝试 {max_attempts} 次。",
@ -26635,9 +26638,6 @@
"xpack.reporting.statusIndicator.processingMaxAttemptsLabel": "正在处理,尝试 {attempt} {of}",
"xpack.reporting.userAccessError.message": "请联系管理员以访问报告功能。{grantUserAccessDocs}.",
"xpack.reporting.breadcrumb": "Reporting",
"xpack.reporting.common.browserCouldNotLaunchErrorMessage": "无法生成屏幕截图,因为浏览器未启动。有关更多信息,请查看服务器日志。",
"xpack.reporting.common.cloud.insufficientSystemMemoryError": "由于内存不足,无法生成此报告。",
"xpack.reporting.common.pdfWorkerOutOfMemoryErrorMessage": "由于内存不足,无法生成 PDF。尝试生成更小的 PDF然后重试此报告。",
"xpack.reporting.dashboard.csvDownloadStartedMessage": "您的 CSV 将很快下载。",
"xpack.reporting.dashboard.csvDownloadStartedTitle": "CSV 下载已开始",
"xpack.reporting.dashboard.downloadCsvPanelTitle": "下载 CSV",
@ -26666,9 +26666,9 @@
"xpack.reporting.diagnostic.screenshotFailureMessage": "我们无法拍摄 Kibana 安装的屏幕截图。",
"xpack.reporting.errorHandler.unknownError": "未知错误",
"xpack.reporting.exportTypes.common.missingJobHeadersErrorMessage": "作业标头缺失",
"xpack.reporting.exportTypes.csv.generateCsv.authenticationExpired.partialResultsMessage": "此报告包含部分 CSV 结果,因为身份验证令牌已过期。导出更少量的数据,或增加身份验证令牌的超时时间。",
"xpack.reporting.exportTypes.csv.generateCsv.csvUnableToClosePit": "无法关闭用于搜索的时间点。查看 Kibana 服务器日志。",
"xpack.reporting.exportTypes.csv.generateCsv.escapedFormulaValues": "CSV 可能包含值已转义的公式",
"generateCsv.authenticationExpired.partialResultsMessage": "此报告包含部分 CSV 结果,因为身份验证令牌已过期。导出更少量的数据,或增加身份验证令牌的超时时间。",
"generateCsv.csvUnableToClosePit": "无法关闭用于搜索的时间点。查看 Kibana 服务器日志。",
"generateCsv.escapedFormulaValues": "CSV 可能包含值已转义的公式",
"xpack.reporting.jobCreatedBy.unknownUserPlaceholderText": "未知",
"xpack.reporting.jobResponse.errorHandler.unknownError": "未知错误",
"xpack.reporting.jobStatusDetail.deprecatedText": "这是已弃用的导出类型。此报告的自动化将需要重新创建,才能与未来版本的 Kibana 兼容。",

View file

@ -4241,6 +4241,14 @@
version "0.0.0"
uid ""
"@kbn/generate-csv-types@link:packages/kbn-generate-csv-types":
version "0.0.0"
uid ""
"@kbn/generate-csv@link:packages/kbn-generate-csv":
version "0.0.0"
uid ""
"@kbn/generate@link:packages/kbn-generate":
version "0.0.0"
uid ""
@ -4741,6 +4749,10 @@
version "0.0.0"
uid ""
"@kbn/reporting-common@link:packages/kbn-reporting/common":
version "0.0.0"
uid ""
"@kbn/reporting-example-plugin@link:x-pack/examples/reporting_example":
version "0.0.0"
uid ""