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 upload] document file upload privileges and provide actionable UI when failures occur #95883

Merged
merged 18 commits into from
Apr 5, 2021

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Mar 31, 2021

Fixes #90235, #41885, and #41928

This PR documents the required privileges for geospatial file uploading.

To test, create a user that does not have all of the required privileges mentioned in the documentation.

View when user fails permissions check. Links to docs explaining the required permissions
Screen Shot 2021-03-30 at 4 55 13 PM

View when index calls fail. Provides elasticsearch error reason to help user's understand why indexing failed.
Screen Shot 2021-03-30 at 1 59 50 PM

Success view.
Screen Shot 2021-03-30 at 2 00 14 PM

@nreese nreese added release_note:fix [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.13.0 labels Mar 31, 2021
@nreese nreese requested review from kindsun and gchaps March 31, 2021 00:07
@nreese nreese requested a review from a team as a code owner March 31, 2021 00:07
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-docs (Team:Docs)

docs/maps/import-geospatial-data.asciidoc Outdated Show resolved Hide resolved
docs/maps/import-geospatial-data.asciidoc Outdated Show resolved Hide resolved
docs/maps/import-geospatial-data.asciidoc Outdated Show resolved Hide resolved
docs/maps/import-geospatial-data.asciidoc Outdated Show resolved Hide resolved
docs/maps/import-geospatial-data.asciidoc Outdated Show resolved Hide resolved
docs/maps/import-geospatial-data.asciidoc Outdated Show resolved Hide resolved
nreese and others added 5 commits March 31, 2021 16:00
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
@nreese nreese requested a review from gchaps March 31, 2021 22:13
@nreese
Copy link
Contributor Author

nreese commented Apr 1, 2021

@elasticmachine merge upstream

//
// check permissions
//
const canImport = await hasImportPermission({
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we short-circuit this if this.state.indexName isn't defined? Looks like it will still do the endpoint roundtrip even if it's an empty string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The button triggering import is only enabled when indexName is set so no need to check for empty string. Logic ensuring this is in _onIndexNameChange

@nreese nreese requested a review from kindsun April 1, 2021 18:25
docs/maps/import-geospatial-data.asciidoc Outdated Show resolved Hide resolved
docs/maps/import-geospatial-data.asciidoc Outdated Show resolved Hide resolved
docs/maps/import-geospatial-data.asciidoc Outdated Show resolved Hide resolved
docs/maps/import-geospatial-data.asciidoc Outdated Show resolved Hide resolved
docs/maps/import-geospatial-data.asciidoc Outdated Show resolved Hide resolved
@nreese
Copy link
Contributor Author

nreese commented Apr 5, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
fileUpload 786.5KB 788.7KB +2.2KB

Page load bundle

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

id before after diff
core 375.2KB 375.4KB +144.0B
fileUpload 13.0KB 13.8KB +813.0B
total +957.0B

History

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

Copy link
Contributor

@kindsun kindsun left a comment

Choose a reason for hiding this comment

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

lgtm! 🙇

  • code review

@nreese nreese merged commit 2eae096 into elastic:master Apr 5, 2021
nreese added a commit to nreese/kibana that referenced this pull request Apr 5, 2021
…UI when failures occur (elastic#95883)

* [file upload] document file upload privileges and provide actionable UI when failures occur

* doc link

* call hasImportPermission

* docs tweeks

* tslint

* Update docs/maps/import-geospatial-data.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/import-geospatial-data.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/import-geospatial-data.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/import-geospatial-data.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* review feedback

* fix bullet list format

* clean-up i18n ids

* Update docs/maps/import-geospatial-data.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* documenation review feedback

* add period to last privilege bullet item

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Apr 6, 2021
…-nav

* 'master' of github.com:elastic/kibana: (106 commits)
  [Lens] don't use eui variables for zindex (elastic#96117)
  Remove /src/legacy (elastic#95510)
  skip flaky suite (elastic#95899)
  [Dashboard] Fix Lens and TSVB chart tooltip positioning relative to global headers (elastic#94247)
  fixes a skipped management x-pack test (elastic#96178)
  [App Search] API logs: Add log detail flyout (elastic#96162)
  [tech-debt] Remove defunct opacity parameters from EUI shadow functions (elastic#96191)
  Add Input Controls project configuration (elastic#96238)
  [file upload] document file upload privileges and provide actionable UI when failures occur (elastic#95883)
  Revert "TS Incremental build exclude test files (elastic#95610)" (elastic#96223)
  [App Search] Added Sample Response section to Result Settings (elastic#95971)
  [Maps] Safe-erase text-field (elastic#94873)
  [RAC][Alert Triage][TGrid] Update the Alerts Table (TGrid) API to implement `renderCellValue` (elastic#96098)
  [Maps] Enable all zoom levels for all users (elastic#96093)
  Use plugin version in its publicPath (elastic#95945)
  [Enterprise Search] Expose core.chrome.setIsVisible for use in Workplace Search (elastic#95984)
  [Workplace Search] Add sub nav and fix rendering bugs in Personal dashboard (elastic#96100)
  [OBS]home page is showing incorrect value of APM throughput (tpm) (elastic#95991)
  [Observability] Exploratory View initial skeleton (elastic#94426)
  [KQL] Fixed styles of KQL textarea for the K8 theme (elastic#96190)
  ...

# Conflicts:
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/restore_snapshot.helpers.ts
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Apr 7, 2021
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

1 similar comment
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Apr 8, 2021
nreese added a commit that referenced this pull request Apr 8, 2021
…nable UI when failures occur (#95883) (#96252)

* [file upload] document file upload privileges and provide actionable UI when failures occur (#95883)

* [file upload] document file upload privileges and provide actionable UI when failures occur

* doc link

* call hasImportPermission

* docs tweeks

* tslint

* Update docs/maps/import-geospatial-data.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/import-geospatial-data.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/import-geospatial-data.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/import-geospatial-data.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* review feedback

* fix bullet list format

* clean-up i18n ids

* Update docs/maps/import-geospatial-data.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* documenation review feedback

* add period to last privilege bullet item

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* Update docs/maps/import-geospatial-data.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maps app needs to tell the user about access control and privileges to upload a geoJSON file
6 participants