mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Reporting/Mgmt] Fix the missing deprecation warning under job status (#108484)
* [Reporting/Mgmt] Fix the missing deprecation warning under job status * improve unit test * add space before the text and update snapshots
This commit is contained in:
parent
3b31ffc5fd
commit
2fb785de64
4 changed files with 364 additions and 110 deletions
|
@ -103,11 +103,28 @@ export class Job {
|
|||
});
|
||||
}
|
||||
|
||||
let deprecatedMessage: React.ReactElement | undefined;
|
||||
if (this.isDeprecated) {
|
||||
deprecatedMessage = (
|
||||
<EuiText size="s">
|
||||
{' '}
|
||||
<EuiTextColor color="warning">
|
||||
{i18n.translate('xpack.reporting.jobStatusDetail.deprecatedText', {
|
||||
defaultMessage: `This is a deprecated export type. Automation of this report will need to be re-created for compatibility with future versions of Kibana.`,
|
||||
})}
|
||||
</EuiTextColor>
|
||||
</EuiText>
|
||||
);
|
||||
}
|
||||
|
||||
if (smallMessage) {
|
||||
return (
|
||||
<EuiText size="s">
|
||||
<EuiTextColor color="subdued">{smallMessage}</EuiTextColor>
|
||||
</EuiText>
|
||||
<>
|
||||
<EuiText size="s">
|
||||
<EuiTextColor color="subdued">{smallMessage}</EuiTextColor>
|
||||
</EuiText>
|
||||
{deprecatedMessage ? deprecatedMessage : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -169,45 +186,45 @@ export class Job {
|
|||
}
|
||||
|
||||
getWarnings() {
|
||||
if (this.status !== FAILED) {
|
||||
const warnings: string[] = [];
|
||||
if (this.isDeprecated) {
|
||||
warnings.push(
|
||||
i18n.translate('xpack.reporting.jobWarning.exportTypeDeprecated', {
|
||||
defaultMessage:
|
||||
'This is a deprecated export type. Automation of this report will need to be re-created for compatibility with future versions of Kibana.',
|
||||
})
|
||||
);
|
||||
}
|
||||
if (this.csv_contains_formulas) {
|
||||
warnings.push(
|
||||
i18n.translate('xpack.reporting.jobWarning.csvContainsFormulas', {
|
||||
defaultMessage:
|
||||
'Your CSV contains characters that spreadsheet applications might interpret as formulas.',
|
||||
})
|
||||
);
|
||||
}
|
||||
if (this.max_size_reached) {
|
||||
warnings.push(
|
||||
i18n.translate('xpack.reporting.jobWarning.maxSizeReachedTooltip', {
|
||||
defaultMessage: 'Your search reached the max size and contains partial data.',
|
||||
})
|
||||
);
|
||||
}
|
||||
const warnings: string[] = [];
|
||||
if (this.isDeprecated) {
|
||||
warnings.push(
|
||||
i18n.translate('xpack.reporting.jobWarning.exportTypeDeprecated', {
|
||||
defaultMessage:
|
||||
'This is a deprecated export type. Automation of this report will need to be re-created for compatibility with future versions of Kibana.',
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (this.warnings?.length) {
|
||||
warnings.push(...this.warnings);
|
||||
}
|
||||
if (this.csv_contains_formulas) {
|
||||
warnings.push(
|
||||
i18n.translate('xpack.reporting.jobWarning.csvContainsFormulas', {
|
||||
defaultMessage:
|
||||
'Your CSV contains characters that spreadsheet applications might interpret as formulas.',
|
||||
})
|
||||
);
|
||||
}
|
||||
if (this.max_size_reached) {
|
||||
warnings.push(
|
||||
i18n.translate('xpack.reporting.jobWarning.maxSizeReachedTooltip', {
|
||||
defaultMessage: 'Your search reached the max size and contains partial data.',
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (warnings.length) {
|
||||
return (
|
||||
<ul>
|
||||
{warnings.map((w, i) => {
|
||||
return <li key={`warning-key-${i}`}>{w}</li>;
|
||||
})}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
// warnings could contain the failure message
|
||||
if (this.status !== FAILED && this.warnings?.length) {
|
||||
warnings.push(...this.warnings);
|
||||
}
|
||||
|
||||
if (warnings.length) {
|
||||
return (
|
||||
<ul>
|
||||
{warnings.map((w, i) => {
|
||||
return <li key={`warning-key-${i}`}>{w}</li>;
|
||||
})}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -614,8 +614,8 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": false,
|
||||
"jobtype": "printable_pdf",
|
||||
"kibana_id": undefined,
|
||||
"kibana_name": undefined,
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
"layout": Object {
|
||||
"dimensions": Object {
|
||||
"height": 720,
|
||||
|
@ -660,8 +660,8 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": false,
|
||||
"jobtype": "printable_pdf",
|
||||
"kibana_id": undefined,
|
||||
"kibana_name": undefined,
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
"layout": Object {
|
||||
"dimensions": Object {
|
||||
"height": 720,
|
||||
|
@ -832,8 +832,8 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": false,
|
||||
"jobtype": "printable_pdf",
|
||||
"kibana_id": undefined,
|
||||
"kibana_name": undefined,
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
"layout": Object {
|
||||
"dimensions": Object {
|
||||
"height": 720,
|
||||
|
@ -1033,8 +1033,8 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": false,
|
||||
"jobtype": "printable_pdf",
|
||||
"kibana_id": undefined,
|
||||
"kibana_name": undefined,
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
"layout": Object {
|
||||
"dimensions": Object {
|
||||
"height": 720,
|
||||
|
@ -1234,8 +1234,8 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": false,
|
||||
"jobtype": "printable_pdf",
|
||||
"kibana_id": undefined,
|
||||
"kibana_name": undefined,
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
"layout": Object {
|
||||
"dimensions": Object {
|
||||
"height": 720,
|
||||
|
@ -7821,6 +7821,43 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
</span>
|
||||
</FormattedMessage>
|
||||
|
||||
<EuiText
|
||||
size="s"
|
||||
>
|
||||
<div
|
||||
className="euiText euiText--small"
|
||||
>
|
||||
<EuiTextColor
|
||||
color="subdued"
|
||||
>
|
||||
<span
|
||||
className="euiTextColor euiTextColor--subdued"
|
||||
style={Object {}}
|
||||
>
|
||||
See report info for warnings.
|
||||
</span>
|
||||
</EuiTextColor>
|
||||
</div>
|
||||
</EuiText>
|
||||
<EuiText
|
||||
size="s"
|
||||
>
|
||||
<div
|
||||
className="euiText euiText--small"
|
||||
>
|
||||
|
||||
<EuiTextColor
|
||||
color="warning"
|
||||
>
|
||||
<span
|
||||
className="euiTextColor euiTextColor--warning"
|
||||
style={Object {}}
|
||||
>
|
||||
This is a deprecated export type. Automation of this report will need to be re-created for compatibility with future versions of Kibana.
|
||||
</span>
|
||||
</EuiTextColor>
|
||||
</div>
|
||||
</EuiText>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -7865,7 +7902,7 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"csv_contains_formulas": undefined,
|
||||
"id": "k905zdw11d34cbae0c3y6tzh",
|
||||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": false,
|
||||
"isDeprecated": true,
|
||||
"jobtype": "printable_pdf",
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
|
@ -7911,7 +7948,7 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"csv_contains_formulas": undefined,
|
||||
"id": "k905zdw11d34cbae0c3y6tzh",
|
||||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": false,
|
||||
"isDeprecated": true,
|
||||
"jobtype": "printable_pdf",
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
|
@ -8083,7 +8120,7 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"csv_contains_formulas": undefined,
|
||||
"id": "k905zdw11d34cbae0c3y6tzh",
|
||||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": false,
|
||||
"isDeprecated": true,
|
||||
"jobtype": "printable_pdf",
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
|
@ -8145,7 +8182,7 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
}
|
||||
>
|
||||
<EuiToolTip
|
||||
content="Download report"
|
||||
content="Download report with warnings"
|
||||
delay="regular"
|
||||
position="top"
|
||||
>
|
||||
|
@ -8331,7 +8368,7 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"csv_contains_formulas": undefined,
|
||||
"id": "k905zdw11d34cbae0c3y6tzh",
|
||||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": false,
|
||||
"isDeprecated": true,
|
||||
"jobtype": "printable_pdf",
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
|
@ -8532,7 +8569,7 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"csv_contains_formulas": undefined,
|
||||
"id": "k905zdw11d34cbae0c3y6tzh",
|
||||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": false,
|
||||
"isDeprecated": true,
|
||||
"jobtype": "printable_pdf",
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
|
@ -8594,7 +8631,7 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
}
|
||||
>
|
||||
<EuiToolTip
|
||||
content="See report info."
|
||||
content="See report info and warnings."
|
||||
delay="regular"
|
||||
position="top"
|
||||
>
|
||||
|
@ -8606,16 +8643,16 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
>
|
||||
<EuiButtonIcon
|
||||
aria-label="Show report info"
|
||||
color="primary"
|
||||
color="warning"
|
||||
data-test-subj="reportInfoButton"
|
||||
iconType="iInCircle"
|
||||
iconType="alert"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
>
|
||||
<button
|
||||
aria-label="Show report info"
|
||||
className="euiButtonIcon euiButtonIcon--primary euiButtonIcon--empty euiButtonIcon--xSmall"
|
||||
className="euiButtonIcon euiButtonIcon--warning euiButtonIcon--empty euiButtonIcon--xSmall"
|
||||
data-test-subj="reportInfoButton"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
|
@ -8628,13 +8665,13 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
className="euiButtonIcon__icon"
|
||||
color="inherit"
|
||||
size="m"
|
||||
type="iInCircle"
|
||||
type="alert"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="euiButtonIcon__icon"
|
||||
color="inherit"
|
||||
data-euiicon-type="iInCircle"
|
||||
data-euiicon-type="alert"
|
||||
size="m"
|
||||
/>
|
||||
</EuiIcon>
|
||||
|
@ -8864,6 +8901,43 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
</span>
|
||||
</FormattedMessage>
|
||||
|
||||
<EuiText
|
||||
size="s"
|
||||
>
|
||||
<div
|
||||
className="euiText euiText--small"
|
||||
>
|
||||
<EuiTextColor
|
||||
color="subdued"
|
||||
>
|
||||
<span
|
||||
className="euiTextColor euiTextColor--subdued"
|
||||
style={Object {}}
|
||||
>
|
||||
See report info for warnings.
|
||||
</span>
|
||||
</EuiTextColor>
|
||||
</div>
|
||||
</EuiText>
|
||||
<EuiText
|
||||
size="s"
|
||||
>
|
||||
<div
|
||||
className="euiText euiText--small"
|
||||
>
|
||||
|
||||
<EuiTextColor
|
||||
color="warning"
|
||||
>
|
||||
<span
|
||||
className="euiTextColor euiTextColor--warning"
|
||||
style={Object {}}
|
||||
>
|
||||
This is a deprecated export type. Automation of this report will need to be re-created for compatibility with future versions of Kibana.
|
||||
</span>
|
||||
</EuiTextColor>
|
||||
</div>
|
||||
</EuiText>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -8907,17 +8981,17 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"created_by": "elastic",
|
||||
"csv_contains_formulas": undefined,
|
||||
"id": "k8t4ylcb07mi9d006214ifyg",
|
||||
"index": ".reporting-2020.04.05",
|
||||
"isDeprecated": false,
|
||||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": true,
|
||||
"jobtype": "PNG",
|
||||
"kibana_id": "f2e59b4e-f79b-4a48-8a7d-6d50a3c1d914",
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
"layout": Object {
|
||||
"dimensions": Object {
|
||||
"height": 1575,
|
||||
"width": 1423,
|
||||
"height": 720,
|
||||
"width": 1080,
|
||||
},
|
||||
"id": "png",
|
||||
"id": "preserve_layout",
|
||||
},
|
||||
"max_attempts": 1,
|
||||
"max_size_reached": undefined,
|
||||
|
@ -8953,17 +9027,17 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"created_by": "elastic",
|
||||
"csv_contains_formulas": undefined,
|
||||
"id": "k8t4ylcb07mi9d006214ifyg",
|
||||
"index": ".reporting-2020.04.05",
|
||||
"isDeprecated": false,
|
||||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": true,
|
||||
"jobtype": "PNG",
|
||||
"kibana_id": "f2e59b4e-f79b-4a48-8a7d-6d50a3c1d914",
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
"layout": Object {
|
||||
"dimensions": Object {
|
||||
"height": 1575,
|
||||
"width": 1423,
|
||||
"height": 720,
|
||||
"width": 1080,
|
||||
},
|
||||
"id": "png",
|
||||
"id": "preserve_layout",
|
||||
},
|
||||
"max_attempts": 1,
|
||||
"max_size_reached": undefined,
|
||||
|
@ -9125,17 +9199,17 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"created_by": "elastic",
|
||||
"csv_contains_formulas": undefined,
|
||||
"id": "k8t4ylcb07mi9d006214ifyg",
|
||||
"index": ".reporting-2020.04.05",
|
||||
"isDeprecated": false,
|
||||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": true,
|
||||
"jobtype": "PNG",
|
||||
"kibana_id": "f2e59b4e-f79b-4a48-8a7d-6d50a3c1d914",
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
"layout": Object {
|
||||
"dimensions": Object {
|
||||
"height": 1575,
|
||||
"width": 1423,
|
||||
"height": 720,
|
||||
"width": 1080,
|
||||
},
|
||||
"id": "png",
|
||||
"id": "preserve_layout",
|
||||
},
|
||||
"max_attempts": 1,
|
||||
"max_size_reached": undefined,
|
||||
|
@ -9188,7 +9262,7 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
}
|
||||
>
|
||||
<EuiToolTip
|
||||
content="Download report"
|
||||
content="Download report with warnings"
|
||||
delay="regular"
|
||||
position="top"
|
||||
>
|
||||
|
@ -9373,17 +9447,17 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"created_by": "elastic",
|
||||
"csv_contains_formulas": undefined,
|
||||
"id": "k8t4ylcb07mi9d006214ifyg",
|
||||
"index": ".reporting-2020.04.05",
|
||||
"isDeprecated": false,
|
||||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": true,
|
||||
"jobtype": "PNG",
|
||||
"kibana_id": "f2e59b4e-f79b-4a48-8a7d-6d50a3c1d914",
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
"layout": Object {
|
||||
"dimensions": Object {
|
||||
"height": 1575,
|
||||
"width": 1423,
|
||||
"height": 720,
|
||||
"width": 1080,
|
||||
},
|
||||
"id": "png",
|
||||
"id": "preserve_layout",
|
||||
},
|
||||
"max_attempts": 1,
|
||||
"max_size_reached": undefined,
|
||||
|
@ -9574,17 +9648,17 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
"created_by": "elastic",
|
||||
"csv_contains_formulas": undefined,
|
||||
"id": "k8t4ylcb07mi9d006214ifyg",
|
||||
"index": ".reporting-2020.04.05",
|
||||
"isDeprecated": false,
|
||||
"index": ".reporting-2020.04.12",
|
||||
"isDeprecated": true,
|
||||
"jobtype": "PNG",
|
||||
"kibana_id": "f2e59b4e-f79b-4a48-8a7d-6d50a3c1d914",
|
||||
"kibana_id": "5b2de169-2785-441b-ae8c-186a1936b17d",
|
||||
"kibana_name": "spicy.local",
|
||||
"layout": Object {
|
||||
"dimensions": Object {
|
||||
"height": 1575,
|
||||
"width": 1423,
|
||||
"height": 720,
|
||||
"width": 1080,
|
||||
},
|
||||
"id": "png",
|
||||
"id": "preserve_layout",
|
||||
},
|
||||
"max_attempts": 1,
|
||||
"max_size_reached": undefined,
|
||||
|
@ -9637,7 +9711,7 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
}
|
||||
>
|
||||
<EuiToolTip
|
||||
content="See report info."
|
||||
content="See report info and warnings."
|
||||
delay="regular"
|
||||
position="top"
|
||||
>
|
||||
|
@ -9649,16 +9723,16 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
>
|
||||
<EuiButtonIcon
|
||||
aria-label="Show report info"
|
||||
color="primary"
|
||||
color="warning"
|
||||
data-test-subj="reportInfoButton"
|
||||
iconType="iInCircle"
|
||||
iconType="alert"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
>
|
||||
<button
|
||||
aria-label="Show report info"
|
||||
className="euiButtonIcon euiButtonIcon--primary euiButtonIcon--empty euiButtonIcon--xSmall"
|
||||
className="euiButtonIcon euiButtonIcon--warning euiButtonIcon--empty euiButtonIcon--xSmall"
|
||||
data-test-subj="reportInfoButton"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
|
@ -9671,13 +9745,13 @@ exports[`ReportListing Report job listing with some items 1`] = `
|
|||
className="euiButtonIcon__icon"
|
||||
color="inherit"
|
||||
size="m"
|
||||
type="iInCircle"
|
||||
type="alert"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="euiButtonIcon__icon"
|
||||
color="inherit"
|
||||
data-euiicon-type="iInCircle"
|
||||
data-euiicon-type="alert"
|
||||
size="m"
|
||||
/>
|
||||
</EuiIcon>
|
||||
|
|
|
@ -31,17 +31,180 @@ jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => {
|
|||
};
|
||||
});
|
||||
|
||||
interface PayloadMock {
|
||||
payload: Omit<ReportApiJSON['payload'], 'browserTimezone' | 'version' | 'layout'>;
|
||||
}
|
||||
type ReportMock = Omit<
|
||||
ReportApiJSON,
|
||||
| 'index'
|
||||
| 'migration_version'
|
||||
| 'browser_type'
|
||||
| 'max_attempts'
|
||||
| 'timeout'
|
||||
| 'created_by'
|
||||
| 'payload'
|
||||
> &
|
||||
PayloadMock;
|
||||
|
||||
const buildMockReport = (baseObj: ReportMock) => ({
|
||||
index: '.reporting-2020.04.12',
|
||||
migration_version: '7.15.0',
|
||||
browser_type: 'chromium',
|
||||
max_attempts: 1,
|
||||
timeout: 300000,
|
||||
created_by: 'elastic',
|
||||
kibana_id: '5b2de169-2785-441b-ae8c-186a1936b17d',
|
||||
kibana_name: 'spicy.local',
|
||||
...baseObj,
|
||||
payload: {
|
||||
browserTimezone: 'America/Phoenix',
|
||||
layout: { dimensions: { height: 720, width: 1080 }, id: 'preserve_layout' },
|
||||
version: '7.14.0',
|
||||
isDeprecated: baseObj.payload.isDeprecated === true,
|
||||
...baseObj.payload,
|
||||
},
|
||||
});
|
||||
|
||||
const mockJobs: ReportApiJSON[] = [
|
||||
{ id: 'k90e51pk1ieucbae0c3t8wo2', index: '.reporting-2020.04.12', migration_version: '7.15.0', attempts: 0, browser_type: 'chromium', created_at: '2020-04-14T21:01:13.064Z', created_by: 'elastic', jobtype: 'printable_pdf', max_attempts: 1, meta: { layout: 'preserve_layout', objectType: 'canvas workpad' }, payload: { browserTimezone: 'America/Phoenix', layout: { dimensions: { height: 720, width: 1080 }, id: 'preserve_layout' }, objectType: 'canvas workpad', title: 'My Canvas Workpad', version: '7.14.0' }, process_expiration: '1970-01-01T00:00:00.000Z', status: 'pending', timeout: 300000}, // prettier-ignore
|
||||
{ id: 'k90e51pk1ieucbae0c3t8wo1', index: '.reporting-2020.04.12', migration_version: '7.15.0', attempts: 1, browser_type: 'chromium', created_at: '2020-04-14T21:01:13.064Z', created_by: 'elastic', jobtype: 'printable_pdf', kibana_id: '5b2de169-2785-441b-ae8c-186a1936b17d', kibana_name: 'spicy.local', max_attempts: 1, meta: { layout: 'preserve_layout', objectType: 'canvas workpad' }, payload: { browserTimezone: 'America/Phoenix', layout: { dimensions: { height: 720, width: 1080 }, id: 'preserve_layout' }, objectType: 'canvas workpad', title: 'My Canvas Workpad', version: '7.14.0' }, process_expiration: '2020-04-14T21:06:14.526Z', started_at: '2020-04-14T21:01:14.526Z', status: 'processing', timeout: 300000 },
|
||||
{ id: 'k90cmthd1gv8cbae0c2le8bo', index: '.reporting-2020.04.12', migration_version: '7.15.0', attempts: 1, browser_type: 'chromium', completed_at: '2020-04-14T20:19:14.748Z', created_at: '2020-04-14T20:19:02.977Z', created_by: 'elastic', jobtype: 'printable_pdf', kibana_id: '5b2de169-2785-441b-ae8c-186a1936b17d', kibana_name: 'spicy.local', max_attempts: 1, meta: { layout: 'preserve_layout', objectType: 'canvas workpad' }, output: { content_type: 'application/pdf', size: 80262 }, payload: { browserTimezone: 'America/Phoenix', layout: { dimensions: { height: 720, width: 1080 }, id: 'preserve_layout' }, objectType: 'canvas workpad', title: 'My Canvas Workpad', version: '7.14.0' }, process_expiration: '2020-04-14T20:24:04.073Z', started_at: '2020-04-14T20:19:04.073Z', status: 'completed', timeout: 300000 },
|
||||
{ id: 'k906958e1d4wcbae0c9hip1a', index: '.reporting-2020.04.12', migration_version: '7.15.0', attempts: 1, browser_type: 'chromium', completed_at: '2020-04-14T17:21:08.223Z', created_at: '2020-04-14T17:20:27.326Z', created_by: 'elastic', jobtype: 'printable_pdf', kibana_id: '5b2de169-2785-441b-ae8c-186a1936b17d', kibana_name: 'spicy.local', max_attempts: 1, meta: { layout: 'preserve_layout', objectType: 'canvas workpad' }, output: { content_type: 'application/pdf', size: 49468, warnings: [ 'An error occurred when trying to read the page for visualization panel info. You may need to increase \'xpack.reporting.capture.timeouts.waitForElements\'. TimeoutError: waiting for selector "[data-shared-item],[data-shared-items-count]" failed: timeout 30000ms exceeded' ] }, payload: { browserTimezone: 'America/Phoenix', layout: { dimensions: { height: 720, width: 1080 }, id: 'preserve_layout' }, objectType: 'canvas workpad', title: 'My Canvas Workpad', version: '7.14.0' }, process_expiration: '2020-04-14T17:25:29.444Z', started_at: '2020-04-14T17:20:29.444Z', status: 'completed_with_warnings', timeout: 300000 },
|
||||
{ id: 'k9067y2a1d4wcbae0cad38n0', index: '.reporting-2020.04.12', migration_version: '7.15.0', attempts: 1, browser_type: 'chromium', completed_at: '2020-04-14T17:19:53.244Z', created_at: '2020-04-14T17:19:31.379Z', created_by: 'elastic', jobtype: 'printable_pdf', kibana_id: '5b2de169-2785-441b-ae8c-186a1936b17d', kibana_name: 'spicy.local', max_attempts: 1, meta: { layout: 'preserve_layout', objectType: 'canvas workpad' }, output: { content_type: 'application/pdf', size: 80262 }, payload: { browserTimezone: 'America/Phoenix', layout: { dimensions: { height: 720, width: 1080 }, id: 'preserve_layout' }, objectType: 'canvas workpad', title: 'My Canvas Workpad', version: '7.14.0' }, process_expiration: '2020-04-14T17:24:39.883Z', started_at: '2020-04-14T17:19:39.883Z', status: 'completed', timeout: 300000 },
|
||||
{ id: 'k9067s1m1d4wcbae0cdnvcms', index: '.reporting-2020.04.12', migration_version: '7.15.0', attempts: 1, browser_type: 'chromium', completed_at: '2020-04-14T17:19:36.822Z', created_at: '2020-04-14T17:19:23.578Z', created_by: 'elastic', jobtype: 'printable_pdf', kibana_id: '5b2de169-2785-441b-ae8c-186a1936b17d', kibana_name: 'spicy.local', max_attempts: 1, meta: { layout: 'preserve_layout', objectType: 'canvas workpad' }, output: { content_type: 'application/pdf', size: 80262 }, payload: { browserTimezone: 'America/Phoenix', layout: { dimensions: { height: 720, width: 1080 }, id: 'preserve_layout' }, objectType: 'canvas workpad', title: 'My Canvas Workpad', version: '7.14.0' }, process_expiration: '2020-04-14T17:24:25.247Z', started_at: '2020-04-14T17:19:25.247Z', status: 'completed', timeout: 300000 },
|
||||
{ id: 'k9065q3s1d4wcbae0c00fxlh', index: '.reporting-2020.04.12', migration_version: '7.15.0', attempts: 1, browser_type: 'chromium', completed_at: '2020-04-14T17:18:03.910Z', created_at: '2020-04-14T17:17:47.752Z', created_by: 'elastic', jobtype: 'printable_pdf', kibana_id: '5b2de169-2785-441b-ae8c-186a1936b17d', kibana_name: 'spicy.local', max_attempts: 1, meta: { layout: 'preserve_layout', objectType: 'canvas workpad' }, output: { content_type: 'application/pdf', size: 80262 }, payload: { browserTimezone: 'America/Phoenix', layout: { dimensions: { height: 720, width: 1080 }, id: 'preserve_layout' }, objectType: 'canvas workpad', title: 'My Canvas Workpad', version: '7.14.0' }, process_expiration: '2020-04-14T17:22:50.379Z', started_at: '2020-04-14T17:17:50.379Z', status: 'completed', timeout: 300000 },
|
||||
{ id: 'k905zdw11d34cbae0c3y6tzh', index: '.reporting-2020.04.12', migration_version: '7.15.0', attempts: 1, browser_type: 'chromium', completed_at: '2020-04-14T17:13:03.719Z', created_at: '2020-04-14T17:12:51.985Z', created_by: 'elastic', jobtype: 'printable_pdf', kibana_id: '5b2de169-2785-441b-ae8c-186a1936b17d', kibana_name: 'spicy.local', max_attempts: 1, meta: { layout: 'preserve_layout', objectType: 'canvas workpad' }, output: { content_type: 'application/pdf', size: 80262 }, payload: { browserTimezone: 'America/Phoenix', layout: { dimensions: { height: 720, width: 1080 }, id: 'preserve_layout' }, objectType: 'canvas workpad', title: 'My Canvas Workpad', version: '7.14.0' }, process_expiration: '2020-04-14T17:17:52.431Z', started_at: '2020-04-14T17:12:52.431Z', status: 'completed', timeout: 300000 },
|
||||
{ id: 'k8t4ylcb07mi9d006214ifyg', index: '.reporting-2020.04.05', migration_version: '7.15.0', attempts: 1, browser_type: 'chromium', completed_at: '2020-04-09T19:10:10.049Z', created_at: '2020-04-09T19:09:52.139Z', created_by: 'elastic', jobtype: 'PNG', kibana_id: 'f2e59b4e-f79b-4a48-8a7d-6d50a3c1d914', kibana_name: 'spicy.local', max_attempts: 1, meta: { layout: 'png', objectType: 'visualization' }, output: { content_type: 'image/png', size: 123456789 }, payload: { browserTimezone: 'America/Phoenix', layout: { dimensions: { height: 1575, width: 1423 }, id: 'png' }, objectType: 'visualization', title: 'count', version: '7.14.0' }, process_expiration: '2020-04-09T19:14:54.570Z', started_at: '2020-04-09T19:09:54.570Z', status: 'completed', timeout: 300000 },
|
||||
]; // prettier-ignore
|
||||
buildMockReport({
|
||||
id: 'k90e51pk1ieucbae0c3t8wo2',
|
||||
attempts: 0,
|
||||
created_at: '2020-04-14T21:01:13.064Z',
|
||||
jobtype: 'printable_pdf',
|
||||
meta: { layout: 'preserve_layout', objectType: 'canvas workpad' },
|
||||
payload: {
|
||||
objectType: 'canvas workpad',
|
||||
title: 'My Canvas Workpad',
|
||||
},
|
||||
status: 'pending',
|
||||
}),
|
||||
buildMockReport({
|
||||
id: 'k90e51pk1ieucbae0c3t8wo1',
|
||||
attempts: 1,
|
||||
created_at: '2020-04-14T21:01:13.064Z',
|
||||
jobtype: 'printable_pdf',
|
||||
meta: { layout: 'preserve_layout', objectType: 'canvas workpad' },
|
||||
payload: {
|
||||
objectType: 'canvas workpad',
|
||||
title: 'My Canvas Workpad',
|
||||
},
|
||||
started_at: '2020-04-14T21:01:14.526Z',
|
||||
status: 'processing',
|
||||
}),
|
||||
buildMockReport({
|
||||
id: 'k90cmthd1gv8cbae0c2le8bo',
|
||||
attempts: 1,
|
||||
completed_at: '2020-04-14T20:19:14.748Z',
|
||||
created_at: '2020-04-14T20:19:02.977Z',
|
||||
jobtype: 'printable_pdf',
|
||||
meta: { layout: 'preserve_layout', objectType: 'canvas workpad' },
|
||||
output: { content_type: 'application/pdf', size: 80262 },
|
||||
payload: {
|
||||
objectType: 'canvas workpad',
|
||||
title: 'My Canvas Workpad',
|
||||
},
|
||||
started_at: '2020-04-14T20:19:04.073Z',
|
||||
status: 'completed',
|
||||
}),
|
||||
buildMockReport({
|
||||
id: 'k906958e1d4wcbae0c9hip1a',
|
||||
attempts: 1,
|
||||
completed_at: '2020-04-14T17:21:08.223Z',
|
||||
created_at: '2020-04-14T17:20:27.326Z',
|
||||
jobtype: 'printable_pdf',
|
||||
meta: { layout: 'preserve_layout', objectType: 'canvas workpad' },
|
||||
output: {
|
||||
content_type: 'application/pdf',
|
||||
size: 49468,
|
||||
warnings: [
|
||||
'An error occurred when trying to read the page for visualization panel info. You may need to increase \'xpack.reporting.capture.timeouts.waitForElements\'. TimeoutError: waiting for selector "[data-shared-item],[data-shared-items-count]" failed: timeout 30000ms exceeded',
|
||||
],
|
||||
},
|
||||
payload: {
|
||||
objectType: 'canvas workpad',
|
||||
title: 'My Canvas Workpad',
|
||||
},
|
||||
started_at: '2020-04-14T17:20:29.444Z',
|
||||
status: 'completed_with_warnings',
|
||||
}),
|
||||
buildMockReport({
|
||||
id: 'k9067y2a1d4wcbae0cad38n0',
|
||||
attempts: 1,
|
||||
completed_at: '2020-04-14T17:19:53.244Z',
|
||||
created_at: '2020-04-14T17:19:31.379Z',
|
||||
jobtype: 'printable_pdf',
|
||||
meta: { layout: 'preserve_layout', objectType: 'canvas workpad' },
|
||||
output: { content_type: 'application/pdf', size: 80262 },
|
||||
payload: {
|
||||
objectType: 'canvas workpad',
|
||||
title: 'My Canvas Workpad',
|
||||
},
|
||||
started_at: '2020-04-14T17:19:39.883Z',
|
||||
status: 'completed',
|
||||
}),
|
||||
buildMockReport({
|
||||
id: 'k9067s1m1d4wcbae0cdnvcms',
|
||||
attempts: 1,
|
||||
completed_at: '2020-04-14T17:19:36.822Z',
|
||||
created_at: '2020-04-14T17:19:23.578Z',
|
||||
jobtype: 'printable_pdf',
|
||||
meta: { layout: 'preserve_layout', objectType: 'canvas workpad' },
|
||||
output: { content_type: 'application/pdf', size: 80262 },
|
||||
payload: {
|
||||
objectType: 'canvas workpad',
|
||||
title: 'My Canvas Workpad',
|
||||
},
|
||||
started_at: '2020-04-14T17:19:25.247Z',
|
||||
status: 'completed',
|
||||
}),
|
||||
buildMockReport({
|
||||
id: 'k9065q3s1d4wcbae0c00fxlh',
|
||||
attempts: 1,
|
||||
completed_at: '2020-04-14T17:18:03.910Z',
|
||||
created_at: '2020-04-14T17:17:47.752Z',
|
||||
jobtype: 'printable_pdf',
|
||||
meta: { layout: 'preserve_layout', objectType: 'canvas workpad' },
|
||||
output: { content_type: 'application/pdf', size: 80262 },
|
||||
payload: {
|
||||
objectType: 'canvas workpad',
|
||||
title: 'My Canvas Workpad',
|
||||
},
|
||||
started_at: '2020-04-14T17:17:50.379Z',
|
||||
status: 'completed',
|
||||
}),
|
||||
buildMockReport({
|
||||
id: 'k905zdw11d34cbae0c3y6tzh',
|
||||
attempts: 1,
|
||||
completed_at: '2020-04-14T17:13:03.719Z',
|
||||
created_at: '2020-04-14T17:12:51.985Z',
|
||||
jobtype: 'printable_pdf',
|
||||
meta: { layout: 'preserve_layout', objectType: 'canvas workpad' },
|
||||
output: { content_type: 'application/pdf', size: 80262 },
|
||||
payload: {
|
||||
objectType: 'canvas workpad',
|
||||
title: 'My Canvas Workpad',
|
||||
isDeprecated: true,
|
||||
},
|
||||
started_at: '2020-04-14T17:12:52.431Z',
|
||||
status: 'completed',
|
||||
}),
|
||||
buildMockReport({
|
||||
id: 'k8t4ylcb07mi9d006214ifyg',
|
||||
attempts: 1,
|
||||
completed_at: '2020-04-09T19:10:10.049Z',
|
||||
created_at: '2020-04-09T19:09:52.139Z',
|
||||
jobtype: 'PNG',
|
||||
meta: { layout: 'png', objectType: 'visualization' },
|
||||
output: { content_type: 'image/png', size: 123456789 },
|
||||
payload: {
|
||||
objectType: 'visualization',
|
||||
title: 'count',
|
||||
isDeprecated: true,
|
||||
},
|
||||
started_at: '2020-04-09T19:09:54.570Z',
|
||||
status: 'completed',
|
||||
}),
|
||||
];
|
||||
|
||||
const reportingAPIClient = {
|
||||
list: () => Promise.resolve(mockJobs.map((j) => new Job(j))),
|
||||
|
|
|
@ -92,7 +92,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
"actions": "",
|
||||
"createdAt": "2021-07-19 @ 10:29 PMtest_user",
|
||||
"report": "Automated reportsearch",
|
||||
"status": "Completed at 2021-07-19 @ 10:29 PM See report info for warnings.",
|
||||
"status": "Completed at 2021-07-19 @ 10:29 PM See report info for warnings. This is a deprecated export type. Automation of this report will need to be re-created for compatibility with future versions of Kibana.",
|
||||
},
|
||||
Object {
|
||||
"actions": "",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue