Skip to content

[Reporting Management] Consolidate report job warnings and add warning for deprecated types#106184

Merged
tsullivan merged 28 commits intoelastic:masterfrom
tsullivan:reporting/csv-100363
Jul 29, 2021
Merged

[Reporting Management] Consolidate report job warnings and add warning for deprecated types#106184
tsullivan merged 28 commits intoelastic:masterfrom
tsullivan:reporting/csv-100363

Conversation

@tsullivan
Copy link
Copy Markdown
Member

@tsullivan tsullivan commented Jul 19, 2021

Summary

Closes #106154
Closes #100363

Release note:

There are changes to the Reporting page under Stack Management. Any report job that has completed with warnings will now show all the warnings in a popover, same as the failure message for jobs that have failed. There is a new type of warning for "deprecated" export types. Deprecated export types of reports can only show in the list of jobs if you have an automated report that was created in an older version of Kibana, and the warning will tell you to redo the automation with a new POST URL in order for the report to keep working in future versions.

List of changes:

  • Takes the "Max size reached" message out of the report listing table.
  • Removes specific warnings in the "hover" tooltips
  • Adds EuiPopover elements that show all warnings (or the failure message) in one place
  • Adds reports with varying statuses to the reporting/archived_reports ES test archive
  • Changed the "error button" to show the error message without a call to an API
  • Removes code for a non-existent cancelled status
  • Includes various improvements for type strictness
  • Minor renaming of props/variable names ("record" -> "job") to match the TS type
  • Changes language of "Job" to "Report" in the user-facing text.
  • Fixed some user facing text that was not wrapped in a translation function

Removed API endpoint:

  • Removed the /api/reporting/output/<jobId> (private API) which was inefficiently being used to fetch the error message of a job. The same can be achieved using /api/reporting/info/<jobId> since the returned data type includes warnings, which for a failed job, is the failure message.

How to test with the updated archived reports

You can start Kibana in normal dev mode, and load the archive of various kinds of report jobs, which is being used in functional testing:

> node scripts/es_archiver.js \
  --config x-pack/test/functional/config.js \
  load x-pack/test/functional/es_archives/reporting/archived_reports \
  --es-url https://elastic:changeme@localhost:9200 \
  --es-ca config/cert-bundle/ca/ca.crt \ #  (use this example if you run Elasticsearch over HTTPS)
  --kibana-url http://elastic:changeme@localhost:5601

Sign in as test_user to see the archived reports show up in Stack Management > Reporting.

Screenshots

List of reports from the reporting/archived_reports archive:
Before/After

image
image

List of reports from the reporting/archived_reports archive showing pending and processing reports:
Before/After

image
image

Note: The UI changes to the table are to give more focus to the errors and warnings in a consistent way. There is a separate issue for redesigning the table to manage reports, which is still unstarted: #39620

Checklist

Delete any items that are not applicable to this PR.

@tsullivan tsullivan force-pushed the reporting/csv-100363 branch from d6907ba to 80a3803 Compare July 20, 2021 21:31
@tsullivan tsullivan changed the title [Reporting] Add notices to UI when export type is deprecated [Reporting Management] Consolidate report job warnings and add warning for deprecated types Jul 20, 2021
@tsullivan tsullivan force-pushed the reporting/csv-100363 branch 2 times, most recently from 4474720 to 311174e Compare July 21, 2021 04:08
@tsullivan tsullivan force-pushed the reporting/csv-100363 branch from 311174e to 45bff4f Compare July 21, 2021 04:10
@tsullivan
Copy link
Copy Markdown
Member Author

The PR still needs additional functional tests and unit tests for the tsx files, but it is ready for review

@tsullivan tsullivan marked this pull request as ready for review July 21, 2021 18:54
@tsullivan tsullivan added v7.15.0 v8.0.0 zDeprecated Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead release_note:enhancement Team:AppServices labels Jul 21, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@tsullivan tsullivan requested review from a team, dokmic and jloleysens July 21, 2021 18:55
@tsullivan tsullivan marked this pull request as ready for review July 27, 2021 21:16
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This const was only used in 1 place, so I took an opportunity to clean up this file by removing the const

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line of code was accidentally added in an earlier PR #88303

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file has taken a lot of code moved out of report_listing.tsx

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this interface shared since a lot of components that are downstream of ReportListing receive the same props as their parent.

@tsullivan tsullivan force-pushed the reporting/csv-100363 branch from 1016195 to a7bf40a Compare July 27, 2021 21:51
Copy link
Copy Markdown
Contributor

@dokmic dokmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Co-authored-by: Michael Dokolin <dokmic@gmail.com>
@tsullivan
Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
reporting 60 59 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
reporting 71.2KB 68.4KB -2.8KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
reporting 59.5KB 64.7KB +5.1KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@tsullivan
Copy link
Copy Markdown
Member Author

tsullivan commented Jul 29, 2021

I will work with @elastic/kibana-docs in a separate issue to make sure they approve the modified text before the 7.15 release. It could be easier to get that review after this is merged.

#107238

@tsullivan tsullivan merged commit 191480a into elastic:master Jul 29, 2021
tsullivan added a commit to tsullivan/kibana that referenced this pull request Jul 29, 2021
…g for deprecated types (elastic#106184)

* [Reporting Management] Add warning for deprecated types

* record -> job rename

* restore previous report from archive

* more fn testing

* better testing

* use consts

* add table text test

* nicer archived reports archive

* fix test

* add comment about completed

* remove warning button

* consistent status detail message and callout buttons

* rename the deprecated report

* fix status messages

* update copy

* fix duplicated created_at reports

* fix 18n

* back out text add

* fix fn test snapshot

* [Reporting] fix binding of methods that are called via event handlers

* self review

* spot-fix more untranslated content

* Update x-pack/plugins/reporting/public/lib/job.tsx

Co-authored-by: Michael Dokolin <dokmic@gmail.com>

Co-authored-by: Michael Dokolin <dokmic@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@tsullivan tsullivan deleted the reporting/csv-100363 branch July 29, 2021 21:55
tsullivan added a commit that referenced this pull request Jul 29, 2021
…g for deprecated types (#106184) (#107243)

* [Reporting Management] Add warning for deprecated types

* record -> job rename

* restore previous report from archive

* more fn testing

* better testing

* use consts

* add table text test

* nicer archived reports archive

* fix test

* add comment about completed

* remove warning button

* consistent status detail message and callout buttons

* rename the deprecated report

* fix status messages

* update copy

* fix duplicated created_at reports

* fix 18n

* back out text add

* fix fn test snapshot

* [Reporting] fix binding of methods that are called via event handlers

* self review

* spot-fix more untranslated content

* Update x-pack/plugins/reporting/public/lib/job.tsx

Co-authored-by: Michael Dokolin <dokmic@gmail.com>

Co-authored-by: Michael Dokolin <dokmic@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Michael Dokolin <dokmic@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@gchaps gchaps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments on capitalization and ending period.

let smallMessage;
if (status === PENDING) {
smallMessage = i18n.translate('xpack.reporting.jobStatusDetail.pendingStatusReachedText', {
defaultMessage: 'Waiting for job to be processed.',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for job to process.

warnings.push(
i18n.translate('xpack.reporting.jobWarning.csvContainsFormulas', {
defaultMessage:
'Your CSV contains characters which spreadsheet applications can interpret as formulas.',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your CSV contains characters that spreadsheet applications might interpret as formulas.

{
title: this.props.intl.formatMessage({
id: 'xpack.reporting.listing.infoPanel.createdAtInfo',
defaultMessage: 'Created At',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created at

{
title: this.props.intl.formatMessage({
id: 'xpack.reporting.listing.infoPanel.tzInfo',
defaultMessage: 'Timezone',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time zone

title: 'Processed By',
title: this.props.intl.formatMessage({
id: 'xpack.reporting.listing.infoPanel.startedAtInfo',
defaultMessage: 'Started At',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Started at


let message = this.props.intl.formatMessage({
id: 'xpack.reporting.listing.table.reportInfoButtonTooltip',
defaultMessage: 'See report info',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously this text used the ending period:

  • See report info and error message.
  • See report info and warnings.

"See report info" is consistently used without the ending period.

calloutTitle: 'Unable to fetch report info',
calloutTitle: this.props.intl.formatMessage({
id: 'xpack.reporting.listing.table.reportInfoUnableToFetch',
defaultMessage: 'Unable to fetch report info',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ending period?

"actions": "",
"createdAt": "2021-07-19 @ 10:29 PMtest_user",
"report": "Automated reportsearch",
"status": "Completed at 2021-07-19 @ 10:29 PMSee report info for warnings.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space between PM and "See report info..."

if (this.max_size_reached) {
warnings.push(
i18n.translate('xpack.reporting.jobWarning.maxSizeReachedTooltip', {
defaultMessage: 'Max size reached, contains partial data.',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rewrite as something like this:

Your search reached the max size and contains partial data.

}

return i18n.translate('xpack.reporting.apiClient.unknownError', {
defaultMessage: `Report job {job} failed: Unknown error.`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Report job {job} failed. Error unknown.

streamich pushed a commit to vadimkibana/kibana that referenced this pull request Aug 8, 2021
…g for deprecated types (elastic#106184)

* [Reporting Management] Add warning for deprecated types

* record -> job rename

* restore previous report from archive

* more fn testing

* better testing

* use consts

* add table text test

* nicer archived reports archive

* fix test

* add comment about completed

* remove warning button

* consistent status detail message and callout buttons

* rename the deprecated report

* fix status messages

* update copy

* fix duplicated created_at reports

* fix 18n

* back out text add

* fix fn test snapshot

* [Reporting] fix binding of methods that are called via event handlers

* self review

* spot-fix more untranslated content

* Update x-pack/plugins/reporting/public/lib/job.tsx

Co-authored-by: Michael Dokolin <dokmic@gmail.com>

Co-authored-by: Michael Dokolin <dokmic@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:enhancement v7.15.0 v8.0.0 zDeprecated Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Reporting] Error content of failed jobs is not available [Reporting] Add guidance to users on the new CSV export type

5 participants