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

[File data visualizer] Disabling create data view based on capabilities #117347

Conversation

jgowdyelastic
Copy link
Member

@jgowdyelastic jgowdyelastic commented Nov 3, 2021

If the user does not have permission to create index patterns, we should disable the option in the UI.

image

Also removes the link to manage data views if the user does not have permission.
Also removes link to the index data visualizer if the index pattern hasn't been created. (ML only)

@jgowdyelastic jgowdyelastic added review non-issue Indicates to automation that a pull request should not appear in the release notes :ml v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:File and Index Data Viz ML file and index data visualizer auto-backport Deprecated - use backport:version if exact versions are needed v8.1.0 labels Nov 3, 2021
@jgowdyelastic jgowdyelastic self-assigned this Nov 3, 2021
@jgowdyelastic jgowdyelastic requested a review from a team as a code owner November 3, 2021 15:27
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

showTooltip ? (
<FormattedMessage
id="xpack.dataVisualizer.file.cannotCreateDataView.tooltip"
defaultMessage="You require permission to create data views"
Copy link
Contributor

@szabosteve szabosteve Nov 3, 2021

Choose a reason for hiding this comment

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

Minor suggestion

Suggested change
defaultMessage="You require permission to create data views"
defaultMessage="You need permission to create data views"

Copy link
Member Author

@jgowdyelastic jgowdyelastic Nov 3, 2021

Choose a reason for hiding this comment

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

Updated in 93f540c

Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

Tested and LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dataVisualizer 310 311 +1

Async chunks

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

id before after diff
dataVisualizer 521.2KB 522.0KB +767.0B
ml 3.5MB 3.5MB +22.0B
total +789.0B

History

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

cc @jgowdyelastic

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

Code LGTM

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

LGTM

As discussed, would be good to apply this same check in the data frame analytics and transform wizards, to disable the 'Create data view' controls there too, but can be done in separate PR(s).

@jgowdyelastic jgowdyelastic merged commit faba435 into elastic:main Nov 4, 2021
@jgowdyelastic jgowdyelastic deleted the disabling-create-data-view-based-on-capabilities branch November 4, 2021 13:53
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 4, 2021
…es (elastic#117347)

* [File data visualizer] Disabling create data view based on capabilities

* removing data view management card based on permissions

* fixing reset button and index data viz link
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Nov 4, 2021
…es (#117347) (#117520)

* [File data visualizer] Disabling create data view based on capabilities

* removing data view management card based on permissions

* fixing reset button and index data viz link

Co-authored-by: James Gowdy <jgowdy@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:File and Index Data Viz ML file and index data visualizer :ml non-issue Indicates to automation that a pull request should not appear in the release notes release_note:skip Skip the PR/issue when compiling release notes review v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants