Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting] Add link to Kibana app from Reporting management UI + Design update #111412

Merged
merged 82 commits into from
Nov 15, 2021

Conversation

jloleysens
Copy link
Contributor

@jloleysens jloleysens commented Sep 7, 2021

Summary

Close #108498
Close #39620

This PR enhances the reporting management UI with the ability to link to different places in Kibana based on where a report was requested from. This will enable users to "debug" the places in Kibana that reporting will navigate to in their own browser since we no longer report the full URL in the server logs. Additionally, this grants the ability to view reporting as "snapshots" of different parts of Kibana UI. Users can navigate back to those states, update them and request a new report after they have navigated away from the UI.

How to test

  1. Start Kibana + ES on basic
  2. Load some sample data into the cluster to get index patterns and at least one dashboard
  3. Navigate to dashboard and generate a dashboard report
  4. Go to reporting (check that there is a report in progress)
  5. Attempt to download the report by clicking on the link once it is done
  6. Navigate back to the Dashboard where you generated the report by clicking on the new action that links back to a Kibana app

Additional changes

  • Updated the Reporting management UI to be more in line with other similar management UIs
    • Refactored columns in table
    • Added a more mobile-friendly table
    • Refactored report names to be download links
    • Refactored actions in "Actions" column to be either link to place in Kibana or pre-existing information view
    • Action icons now only show the "i" icon, we use the "alert" icon to signal deprecations only
  • Removed use of injected intl and rather use @kbn/i18n on various components
  • Slight restructure of UI components folder - added new components folder to give a better indication of hierarchy of components
  • Removed an instance of a user of Boom (related [Reporting]: Clean up remaining use of Boom #105740)
  • Moved the reporting redirect app to it's own top-level application. This means we have more control over what elements exactly will be rendered when navigating to the app so we can optimize and ensure a good UX when linking to a Kibana app.
  • Removed a big-ass Jest snapshot in favour of a test that is more explicitly checking that jobs are present and ready to be downloaded

Screenshots

Before/current for reference

Screenshot 2021-09-07 at 17 19 10

New table

Screenshot 2021-10-19 at 18 37 58

Screenshot 2021-09-15 at 11 58 01

Screenshot 2021-09-15 at 12 14 30

Mobile-friendly view

Screenshot 2021-09-07 at 17 43 29

Interstitial redirect page for reporting (now that users will possibly see it)

If an error occurs while navigating

Screenshot 2021-10-19 at 18 32 12

Release note

We updated the reporting management UI to place emphasis on report status and downloads. We also added a new capability to the report management UI: navigating back to the place a report was generated with the full state of the application at the time the report was requested. This is similar to the behaviour in the "Saved Objects" management UI.

Screenshot 2021-11-11 at 17 21 11

Checklist

  • Unit or functional tests were updated or added to match the most common scenarios
    • Added a functional test for the new "navigate to Kibana app behaviour"
    • Added a Jest test to ensure that clicking the link is space aware

Future work

It would be really nice to refactor the test file x-pack/plugins/reporting/public/management/report_listing.test.tsx since it has grown a bit large and a lot of the logic is setup of test data and the test harness.

@jloleysens jloleysens added release_note:enhancement enhancement New value added to drive a business result (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead v8.0.0 Team:AppServices v7.16.0 labels Sep 7, 2021
 - make test more specific and remove snapshot
 - added use of isMounted() to not run set state when component
   is not mounted
…-link-to-kibana-app

* 'master' of github.com:elastic/kibana: (61 commits)
  [Logs UI] Fix alert previews for thresholds of `0` (elastic#111150)
  [Archive Migration][Partial] discover apps-discover (elastic#110437)
  [APM] Set start date of APM ML job to -4 weeks (elastic#111375)
  [ML] APM Latency Correlations: Code consolidation. (elastic#110790)
  [Discover] Fix indices permission for multiline test (elastic#111284)
  [Detection Rules] Add 7.15 rules (elastic#111464)
  [Security Solution][Endpoint][Host Isolation] Hide isolate host option in alert details rather than disabling (elastic#111064)
  React version of angular license view (elastic#111317)
  [APM] Fix link in readme (elastic#111362)
  [Security Solution] add agent field to generator (elastic#111428)
  [Dashboard] Retain Tags on Quicksave (elastic#111015)
  Reorder App Search ingestion methods (elastic#111361)
  Port performance docs to new docs system. (elastic#111063)
  [Security Solution][RAC] Fixes updatedAt loading bug (elastic#111010)
  [sample data] update web log geo.src field to match country code of geo.coordinates (elastic#110885)
  [Security solution] [Endpoint] Fix bad artifact migration (elastic#111294)
  Fix copy typo. (elastic#111203)
  [build] Remove empty optimize directory (elastic#111393)
  [Maps] fix term join not updating when editing right field (elastic#111030)
  [Fleet] Set default settings in component template instead of the index template (elastic#111197)
  ...

# Conflicts:
#	x-pack/plugins/reporting/public/management/__snapshots__/report_listing.test.tsx.snap
#	x-pack/plugins/reporting/public/management/report_listing.test.tsx
@jloleysens
Copy link
Contributor Author

@tsullivan I think I've addressed your feedback, would you mind taking another look?

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

LGTM!

@tsullivan
Copy link
Member

@elasticmachine merge upstream

@elastic elastic deleted a comment from kibanamachine Nov 12, 2021
@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
reporting 68 83 +15

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
reporting 160 162 +2

Async chunks

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

id before after diff
reporting 45.5KB 56.3KB +10.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 40.6KB 42.0KB +1.4KB
Unknown metric groups

API count

id before after diff
reporting 163 165 +2

History

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

@jloleysens jloleysens merged commit f8e7cd4 into elastic:main Nov 15, 2021
@jloleysens jloleysens deleted the reporting/add-link-to-kibana-app branch November 15, 2021 13:19
jloleysens added a commit to jloleysens/kibana that referenced this pull request Nov 15, 2021
…ign update (elastic#111412)

* moved components to nested components dir

* added health status indicator

* download button -> download link

* updated poblic Job API, remove some of the "rendering" behaviour

* restructure list table contents and clean up use of i18n

* set table column widths

* slight update to table column widths

* actually use action width 🤦

* added view in app link component and included space id in public side Job

* server side changes so that we can get the job payload containing the locator

* initial round of public-side changes to make the link to Kibana app work

* added tooltip to view action

* remove unused import and do not show chrome

* removed use of fp-ts

* added type column and updated mobile look

* remove unused imports

* take a different approach to job query factory -> added new function called "getReport" and leave "get" as is

* update i18n

* code simplifications, also ensure that "PROCESSING" status is being handled by health indicator

* do not hide chrome

* refactor jest test:
 - make test more specific and remove snapshot
 - added use of isMounted() to not run set state when component
   is not mounted

* surface deprecation warning in a special way

* updated one functional test

* updated other functional test

* Several updates to bring table more in line with design
 * Removed "created by" column
 * Added app icons instead of names
 * Added content type indication (PDF, CSV or PNG)
 * Updated the "info" button to have no colors
 * Updated the status to have a timestamp and show "yellow" if
   we detect any issues and guide users to view the report info.

* a lot of changes to bring this more in line with defazio designs

* fix lint

* -wip- [skip-ci]

* some very basic house keeping [skip-ci]

* get to a point where the linking behaviour is working as expected

* further house-keeping, remove unecessary components

* clean up imports

* move hasIssues check into status indicator

* refactored report status indicator

* hide open kibana app button when not available

* remove unused import

* fix jest tests

* created a new redirect plugin to avoid page flicker

* remove unused report info button

* removed unused translations

* fix jest tests after changing the redirect app path

* added reportingRedirect to applicationUsageSchema

* added column width for type

* update test for extracting first row title

* update functional test snapshot

* updated plugins schema

* removed the interstitial page so that we do not conflict with future work planned for the share service

* remove unused i18n

* small, but center-ish type icons

* elastic@ email address

* add i18n, update import with forward slash and added missing ":" to TODO

* move non-type export to own import line and "type" to only-type imports

* remove unecessary export

* refactor payload endpoint to locatorParams endpoint and document query function

* finish refactoring client side to work with new locatorParams endpoint

* remove unused import

* use info endpoint because it contains payload!

* added functional test to ensure that we can navigate back to report

* added jest test for checking that link navigated to is spaces aware

* fix type issue and remove unused import

Co-authored-by: Kibana Machine <[email protected]>
@jloleysens jloleysens removed the v8.0.0 label Nov 15, 2021
jloleysens added a commit that referenced this pull request Nov 15, 2021
…ign update (#111412) (#118524)

* moved components to nested components dir

* added health status indicator

* download button -> download link

* updated poblic Job API, remove some of the "rendering" behaviour

* restructure list table contents and clean up use of i18n

* set table column widths

* slight update to table column widths

* actually use action width 🤦

* added view in app link component and included space id in public side Job

* server side changes so that we can get the job payload containing the locator

* initial round of public-side changes to make the link to Kibana app work

* added tooltip to view action

* remove unused import and do not show chrome

* removed use of fp-ts

* added type column and updated mobile look

* remove unused imports

* take a different approach to job query factory -> added new function called "getReport" and leave "get" as is

* update i18n

* code simplifications, also ensure that "PROCESSING" status is being handled by health indicator

* do not hide chrome

* refactor jest test:
 - make test more specific and remove snapshot
 - added use of isMounted() to not run set state when component
   is not mounted

* surface deprecation warning in a special way

* updated one functional test

* updated other functional test

* Several updates to bring table more in line with design
 * Removed "created by" column
 * Added app icons instead of names
 * Added content type indication (PDF, CSV or PNG)
 * Updated the "info" button to have no colors
 * Updated the status to have a timestamp and show "yellow" if
   we detect any issues and guide users to view the report info.

* a lot of changes to bring this more in line with defazio designs

* fix lint

* -wip- [skip-ci]

* some very basic house keeping [skip-ci]

* get to a point where the linking behaviour is working as expected

* further house-keeping, remove unecessary components

* clean up imports

* move hasIssues check into status indicator

* refactored report status indicator

* hide open kibana app button when not available

* remove unused import

* fix jest tests

* created a new redirect plugin to avoid page flicker

* remove unused report info button

* removed unused translations

* fix jest tests after changing the redirect app path

* added reportingRedirect to applicationUsageSchema

* added column width for type

* update test for extracting first row title

* update functional test snapshot

* updated plugins schema

* removed the interstitial page so that we do not conflict with future work planned for the share service

* remove unused i18n

* small, but center-ish type icons

* elastic@ email address

* add i18n, update import with forward slash and added missing ":" to TODO

* move non-type export to own import line and "type" to only-type imports

* remove unecessary export

* refactor payload endpoint to locatorParams endpoint and document query function

* finish refactoring client side to work with new locatorParams endpoint

* remove unused import

* use info endpoint because it contains payload!

* added functional test to ensure that we can navigate back to report

* added jest test for checking that link navigated to is spaces aware

* fix type issue and remove unused import

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Nov 17, 2021
…ign update (elastic#111412)

* moved components to nested components dir

* added health status indicator

* download button -> download link

* updated poblic Job API, remove some of the "rendering" behaviour

* restructure list table contents and clean up use of i18n

* set table column widths

* slight update to table column widths

* actually use action width 🤦

* added view in app link component and included space id in public side Job

* server side changes so that we can get the job payload containing the locator

* initial round of public-side changes to make the link to Kibana app work

* added tooltip to view action

* remove unused import and do not show chrome

* removed use of fp-ts

* added type column and updated mobile look

* remove unused imports

* take a different approach to job query factory -> added new function called "getReport" and leave "get" as is

* update i18n

* code simplifications, also ensure that "PROCESSING" status is being handled by health indicator

* do not hide chrome

* refactor jest test:
 - make test more specific and remove snapshot
 - added use of isMounted() to not run set state when component
   is not mounted

* surface deprecation warning in a special way

* updated one functional test

* updated other functional test

* Several updates to bring table more in line with design
 * Removed "created by" column
 * Added app icons instead of names
 * Added content type indication (PDF, CSV or PNG)
 * Updated the "info" button to have no colors
 * Updated the status to have a timestamp and show "yellow" if
   we detect any issues and guide users to view the report info.

* a lot of changes to bring this more in line with defazio designs

* fix lint

* -wip- [skip-ci]

* some very basic house keeping [skip-ci]

* get to a point where the linking behaviour is working as expected

* further house-keeping, remove unecessary components

* clean up imports

* move hasIssues check into status indicator

* refactored report status indicator

* hide open kibana app button when not available

* remove unused import

* fix jest tests

* created a new redirect plugin to avoid page flicker

* remove unused report info button

* removed unused translations

* fix jest tests after changing the redirect app path

* added reportingRedirect to applicationUsageSchema

* added column width for type

* update test for extracting first row title

* update functional test snapshot

* updated plugins schema

* removed the interstitial page so that we do not conflict with future work planned for the share service

* remove unused i18n

* small, but center-ish type icons

* elastic@ email address

* add i18n, update import with forward slash and added missing ":" to TODO

* move non-type export to own import line and "type" to only-type imports

* remove unecessary export

* refactor payload endpoint to locatorParams endpoint and document query function

* finish refactoring client side to work with new locatorParams endpoint

* remove unused import

* use info endpoint because it contains payload!

* added functional test to ensure that we can navigate back to report

* added jest test for checking that link navigated to is spaces aware

* fix type issue and remove unused import

Co-authored-by: Kibana Machine <[email protected]>
mbondyra pushed a commit to mbondyra/kibana that referenced this pull request Nov 19, 2021
…ign update (elastic#111412)

* moved components to nested components dir

* added health status indicator

* download button -> download link

* updated poblic Job API, remove some of the "rendering" behaviour

* restructure list table contents and clean up use of i18n

* set table column widths

* slight update to table column widths

* actually use action width 🤦

* added view in app link component and included space id in public side Job

* server side changes so that we can get the job payload containing the locator

* initial round of public-side changes to make the link to Kibana app work

* added tooltip to view action

* remove unused import and do not show chrome

* removed use of fp-ts

* added type column and updated mobile look

* remove unused imports

* take a different approach to job query factory -> added new function called "getReport" and leave "get" as is

* update i18n

* code simplifications, also ensure that "PROCESSING" status is being handled by health indicator

* do not hide chrome

* refactor jest test:
 - make test more specific and remove snapshot
 - added use of isMounted() to not run set state when component
   is not mounted

* surface deprecation warning in a special way

* updated one functional test

* updated other functional test

* Several updates to bring table more in line with design
 * Removed "created by" column
 * Added app icons instead of names
 * Added content type indication (PDF, CSV or PNG)
 * Updated the "info" button to have no colors
 * Updated the status to have a timestamp and show "yellow" if
   we detect any issues and guide users to view the report info.

* a lot of changes to bring this more in line with defazio designs

* fix lint

* -wip- [skip-ci]

* some very basic house keeping [skip-ci]

* get to a point where the linking behaviour is working as expected

* further house-keeping, remove unecessary components

* clean up imports

* move hasIssues check into status indicator

* refactored report status indicator

* hide open kibana app button when not available

* remove unused import

* fix jest tests

* created a new redirect plugin to avoid page flicker

* remove unused report info button

* removed unused translations

* fix jest tests after changing the redirect app path

* added reportingRedirect to applicationUsageSchema

* added column width for type

* update test for extracting first row title

* update functional test snapshot

* updated plugins schema

* removed the interstitial page so that we do not conflict with future work planned for the share service

* remove unused i18n

* small, but center-ish type icons

* elastic@ email address

* add i18n, update import with forward slash and added missing ":" to TODO

* move non-type export to own import line and "type" to only-type imports

* remove unecessary export

* refactor payload endpoint to locatorParams endpoint and document query function

* finish refactoring client side to work with new locatorParams endpoint

* remove unused import

* use info endpoint because it contains payload!

* added functional test to ensure that we can navigate back to report

* added jest test for checking that link navigated to is spaces aware

* fix type issue and remove unused import

Co-authored-by: Kibana Machine <[email protected]>
dmlemeshko pushed a commit that referenced this pull request Nov 29, 2021
…ign update (#111412)

* moved components to nested components dir

* added health status indicator

* download button -> download link

* updated poblic Job API, remove some of the "rendering" behaviour

* restructure list table contents and clean up use of i18n

* set table column widths

* slight update to table column widths

* actually use action width 🤦

* added view in app link component and included space id in public side Job

* server side changes so that we can get the job payload containing the locator

* initial round of public-side changes to make the link to Kibana app work

* added tooltip to view action

* remove unused import and do not show chrome

* removed use of fp-ts

* added type column and updated mobile look

* remove unused imports

* take a different approach to job query factory -> added new function called "getReport" and leave "get" as is

* update i18n

* code simplifications, also ensure that "PROCESSING" status is being handled by health indicator

* do not hide chrome

* refactor jest test:
 - make test more specific and remove snapshot
 - added use of isMounted() to not run set state when component
   is not mounted

* surface deprecation warning in a special way

* updated one functional test

* updated other functional test

* Several updates to bring table more in line with design
 * Removed "created by" column
 * Added app icons instead of names
 * Added content type indication (PDF, CSV or PNG)
 * Updated the "info" button to have no colors
 * Updated the status to have a timestamp and show "yellow" if
   we detect any issues and guide users to view the report info.

* a lot of changes to bring this more in line with defazio designs

* fix lint

* -wip- [skip-ci]

* some very basic house keeping [skip-ci]

* get to a point where the linking behaviour is working as expected

* further house-keeping, remove unecessary components

* clean up imports

* move hasIssues check into status indicator

* refactored report status indicator

* hide open kibana app button when not available

* remove unused import

* fix jest tests

* created a new redirect plugin to avoid page flicker

* remove unused report info button

* removed unused translations

* fix jest tests after changing the redirect app path

* added reportingRedirect to applicationUsageSchema

* added column width for type

* update test for extracting first row title

* update functional test snapshot

* updated plugins schema

* removed the interstitial page so that we do not conflict with future work planned for the share service

* remove unused i18n

* small, but center-ish type icons

* elastic@ email address

* add i18n, update import with forward slash and added missing ":" to TODO

* move non-type export to own import line and "type" to only-type imports

* remove unecessary export

* refactor payload endpoint to locatorParams endpoint and document query function

* finish refactoring client side to work with new locatorParams endpoint

* remove unused import

* use info endpoint because it contains payload!

* added functional test to ensure that we can navigate back to report

* added jest test for checking that link navigated to is spaces aware

* fix type issue and remove unused import

Co-authored-by: Kibana Machine <[email protected]>
roeehub pushed a commit to build-security/kibana that referenced this pull request Dec 16, 2021
…ign update (elastic#111412)

* moved components to nested components dir

* added health status indicator

* download button -> download link

* updated poblic Job API, remove some of the "rendering" behaviour

* restructure list table contents and clean up use of i18n

* set table column widths

* slight update to table column widths

* actually use action width 🤦

* added view in app link component and included space id in public side Job

* server side changes so that we can get the job payload containing the locator

* initial round of public-side changes to make the link to Kibana app work

* added tooltip to view action

* remove unused import and do not show chrome

* removed use of fp-ts

* added type column and updated mobile look

* remove unused imports

* take a different approach to job query factory -> added new function called "getReport" and leave "get" as is

* update i18n

* code simplifications, also ensure that "PROCESSING" status is being handled by health indicator

* do not hide chrome

* refactor jest test:
 - make test more specific and remove snapshot
 - added use of isMounted() to not run set state when component
   is not mounted

* surface deprecation warning in a special way

* updated one functional test

* updated other functional test

* Several updates to bring table more in line with design
 * Removed "created by" column
 * Added app icons instead of names
 * Added content type indication (PDF, CSV or PNG)
 * Updated the "info" button to have no colors
 * Updated the status to have a timestamp and show "yellow" if
   we detect any issues and guide users to view the report info.

* a lot of changes to bring this more in line with defazio designs

* fix lint

* -wip- [skip-ci]

* some very basic house keeping [skip-ci]

* get to a point where the linking behaviour is working as expected

* further house-keeping, remove unecessary components

* clean up imports

* move hasIssues check into status indicator

* refactored report status indicator

* hide open kibana app button when not available

* remove unused import

* fix jest tests

* created a new redirect plugin to avoid page flicker

* remove unused report info button

* removed unused translations

* fix jest tests after changing the redirect app path

* added reportingRedirect to applicationUsageSchema

* added column width for type

* update test for extracting first row title

* update functional test snapshot

* updated plugins schema

* removed the interstitial page so that we do not conflict with future work planned for the share service

* remove unused i18n

* small, but center-ish type icons

* elastic@ email address

* add i18n, update import with forward slash and added missing ":" to TODO

* move non-type export to own import line and "type" to only-type imports

* remove unecessary export

* refactor payload endpoint to locatorParams endpoint and document query function

* finish refactoring client side to work with new locatorParams endpoint

* remove unused import

* use info endpoint because it contains payload!

* added functional test to ensure that we can navigate back to report

* added jest test for checking that link navigated to is spaces aware

* fix type issue and remove unused import

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead enhancement New value added to drive a business result release_note:enhancement v8.0.0 v8.1.0
Projects
None yet
8 participants