Fixes https://github.com/elastic/kibana/issues/145129
In order to make our TS setup in the repo far more efficient we needed
to make it a little more complicated than it used to be. This includes a
few rules that all tsconfig files need to follow which were currently
assumed to be true, but with this PR will now be validated:
1. No tsconfig.json files are allowed to extend the `tsconfig.json`
file. This file is used to produce types for the root of the repo, and
include the `package.json` file in a project so it can be referenced in
projects directly. Files which violate this rule were updated to point
to the root `tsconfig.base.json` file.
2. Every tsconfig.json file must extend the `tsconfig.base.json` file,
either directly or indirectly.
Changes files components (`FileUpload`, `FilePicker`) so that
their API returns the whole `fileJSON` instead of just and `id` (and
`kind`)
This is needed, for example, in image emebeddable to also get an
blurHash after uploading or picking an image without fetching the whole
file again.
## Summary
Fixes https://github.com/elastic/kibana/issues/141129
Fixes https://github.com/elastic/kibana/issues/144515
This PR introduces a new state to the guided onboarding plugin. The
state keeps track of the `creationDate` and of the overall `status` of
the plugin. The creation date allows us to detect an "active" period
during which the header button will be displayed more prominently in the
header. Currently, the active period is set to 30 days. During this
time, if the user has not started any guide, has quit a guide before
completion or skipped the guide on the landing page, the header button
will be displayed and when clicked, redirect the user to the landing
page to start/continue a guide.
Also this PR adds a check for Cloud deployments and prevents the code
from sending any API requests when not on Cloud, because guided
onboarding is disabled on prem.
#### Screenshot
<img width="298" alt="Screenshot 2022-11-10 at 18 42 18"
src="https://user-images.githubusercontent.com/6585477/201168414-391a7cd4-0709-492b-9001-1432b5bed3c8.png">
### Checklist
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* Add a flag to opt out of the partial results in the expressions
* Align the partial results flag with the expression loader
* Move the partial results throttling to the execution service
* implement copy updates
* move rename file and update empty state copy
* update title to respect multi select vs single select
* added test for single select behaviour
* implement single select behaviour
* introduce and use multiple prop, default true
* pass multiple flag to state
* pass multiple upload flag to UI
* added single select story
* update files example to still support multiple select
* uploadMultiple -> selectMultiple
* remove use of non-existent i18n
* update filepicker react component tests
* [Guided onboarding] Add a guide config for testing and update the example plugin to use it instead of search
* [Guided onboarding] Update the API tests with the test guide config
* [Guided onboarding] Address CR comments
* [Guided onboarding] Delete unneeded code in examples
* Update src/plugins/guided_onboarding/public/constants/guides_config/test_guide.ts
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
- Adds a flag for `compressResponse` and `flushFix` to the request body to be able to overrule compression settings inferred from headers.
- Updates the developer examples with a toggle to run requests with compression enabled or disabled.
- Adds support for backpressure handling for response streams.
- The backpressure update includes a fix where uncompressed streams would never start streaming to the client.
- The analysis endpoint for Explain Log Rate Spikes now includes a ping every 10 seconds to keep the stream alive.
- Integration tests were updated to test both uncompressed and compressed streaming.
* [Guided onboarding] Initial service function to check if the step is active and to complete a step
* [Guided onboarding] Added unit tests for api and helpers
* [Guided onboarding] Added jsdoc comments to the api methods
* [Guided onboarding] Smashed commit of all POC work for guided onboarding and guided onboarding example plugins
* [Guided onboarding] Fixed type errors
* [Guided onboarding] Removed guidedOnboardingExample limit
* [Guided onboarding] Fixed a functonal test for exposed configs
* [Guided onboarding] Fixed plugin limit
* [Guided onboarding] Added more information to the example plugin
* [Guided onboarding] Fixed no-console error
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* [Guided onboarding] Fixed snake case errors
* move guided_onboarding out of x-pack
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
* Add no assignees option to user profiles selectable
* Allow simultaneous selection of no users option and user profiles
* Update filters demo
* Fixing tests because of it getting split into components
* Added suggestions from code review
Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>
* [Search] Unskip ex-flaky example app test
* comment out flaky test code
* use es.transport.request to downsample the test index
* uncomment blocked test code
* remove browser refresh in beforeEach
* fix ts
* Update all usages of EuiPageTemplate to EuiPageTemplate_Deprecated
* EuiPageContent_Deprecated as EuiPageContent
* EuiPageContentBody_Deprecated as EuiPageContentBody
* EuiPageContentHeader_Deprecated as EuiPageContentHeader
* EuiPageContentHeaderSection_Deprecated as EuiPageContentHeaderSection
* EuiPageSideBar_Deprecated as EuiPageSideBar
* EuiPageContent__Deprecated to EuiPageContent_Deprecated
* Fix rogue semi-colons
* WIP: NoDataConfigPage & NoDataPage converted to new template
- `withSolutionNav` not yet handled
* WIP: KibanaPageTemplateInner converted to use new template
- Pushes existing `pageHeader` prompts onto created EuiPageTemplate.PageHeader
- Uses `isEmptyState` to push `pageHeader` props to EuiPageTemplate.EmptyPrompt instead (if `children` are not supplied)
* WIP: `withSolutionNav` now renders the sidebar content properly
- Collapsing isn’t working (minWidth isn’t updating)
* Fixing stickiness of sidebar
* [Security] Fixed SecuritySolutionTemplateWrapper’s usage
- Moved `bottomBar` to EuiPageTemplate.BottomBar (now contained in just the page contents)
- Change EuiPanel children wrapper with EuiPageTemplate.Section
* [O11y] Wrap `children` with EuiPageTemplate.Section
* Fix getting_started usage
* WIP: Fixing types
* Removing `template` pass through
* Set EUI to 63.0.0
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* More import fixes
* Sidebar component update
* Expand `KibanaPageTemplate` to all namespaced EUI counterparts
- Updated `docs/tutorials` mdx page
- Fixed SolutionNav prop types
* Updated the tutorial mdx page
* [Stack Management] Updated app layout to new template
- Some temporary props applied for BWC until all other pages can be converted
- Converted `API Keys` page’s layout (and especially prompt usags) to new paradigm
* Fix circular dep
* Fix new circular dependency
- copying and pasting types from KibanaPageTemplateProps, but ah well
* [Security Solution] Remove `template` prop - no longer a prop on Kibana/EuiPageTemplate
* [O11y] Allow customizing EuiPageTemplate.Section wrapper
- converts pageBodyProps
- fixes non-centered loading template
* [Enterprise Search] Update page templates
- fix layouts by auto-wrapping an EuiPageSection for padding, while adding a `customPageSections` prop for more custom sections/layouts
- re-center 404 errors
- update tests
* Update KibanaPageTemplate tests
* Update snapshots
* Fix FTR test with removed EUI classNames
* Fix FTR tests with changed kbn classNames
* Update failing dashboard snapshots
- drop shadow changed slightly in EUI
* Fix failing Security Cypress test
* [O11y] Fix Inventory page using deprecated CSS hooks
* [O11y][Uptime] Fix missing bottom bars
- Modifies ObservabilityPageTemplate to accept a `bottomBar` prop (a la the old EuiPageTemplate behavior)
NOTE: This opinionated page layout structure is starting to feel like it could be potentially limiting / have all the same pitfalls the previous EuiPageTemplate did. If so, consider something closer to the Enterprise Search page template conversion (`customPageSections`).
- Misc cleanup: Use `KibanaPageTemplate` over `EuiPageTemplate`
* [O11y] Fix route template typing
- Since theObservabilityPageTemplate is using the new Eui/KibanaPageTemplate, its child templates and types need to be updated accordingly
* Fix broken minWidth behavior
- was an EUI issue that required a patch release
+ update snapshots
* [Security Solution] Type fixes, restore empty state
- Fix empty state logic removed in a previous commit
- bogarts KibanaPageTemplate's `isEmptyState` prop instead of using `template="noData"`
- extend template wrappers to past ...rest to underlying Kibana/EuiPageTemplate
+ replace EuiPageTemplate with KibanaPageTemplate for consistency
* Fix failing synthetics selector
* Grab EUI v63.0.6
- for deprecation tags and section tag support
* Fix Kibana Overview plugin layout
- needs to use KibanaPageTemplate.Section to get padding back
- use `bottomBorder` prop over horizontal rules
- restore previous page color via panelled=false
* Convert Home plugin to new KibanaPageTemplate
- use KibanaPageTemplate.Section instead to preserve page width/paddings
- use `bottomBorder` instead of `EuiHorizontalRule`
- NOTE: This causes margins to decrease slightly from xxl to xl (largest padding available for EuiPageSection) - this can be restored by CSS overrides if desired
- update CSS to preserve previous looks, + convert to logical properties
* [O11y] Fix non-centered empty/loading states
* [O11y] Restore subdued background on various empty state prompts
* [O11y] Fix all instances of views that require a scrollable full-height child
+ restore comment for inventory view
* [O11y][ux] Fix broken sidebar
- The entire app was missing a wrapping EuiProvider, and as such breakpoint utils were not working, and the sidebar was missing
+ misc cleanup
- remove unnecessary fragment
- remove role="main" attr - now that EuiPageTemplate sets a `main` tag, they'll conflict
- add isEmptyState to center loading component
* [APM Cypress tests] harden flaky test
* [APM Cypress tests] Fix failing Cypress test, again
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* add showWarning to search service
* add comments
* add unit tests
* test foo
* cleanup
* add s to property name in test
* comments for api items
* use the warnings when calling showWarnings
* change showWarning to just show a single warning
* put handleWarnings on the request adapter
* comment
* simplify 1
* fix lens unit test
* remove underscoring for unused variables
* revert inspector changes, extract the response warnings in the search service
* fix bug
* remove console.log
* re-apply typescript fixes to app test code
* declutter
* add test, improve comments
* fix some unexported public api items
* include rawResponse in the warning structure
* fix lint
* tweak clean up example app
* SearchResponseWarnings and SearchResponseWarningNotification
* fix export bug
* not include shardStats if there are no warnings
* Update src/plugins/data/common/search/types.ts
* simplify SearchResponseWarnings interface
* remove array copying
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* comments for api_docs
* simplify per feedback
* Pass callback to handleResponse in showWarnings
* export more public types
* update example to make possible to show shard failure
* pr cleanup
* eslint fix
* allow example app to not show default warnings
* move extractWarning and related types to inspector plugin
* wip functional test of example app
* fix test references
* finish functional test
* relocate extractWarnings back to search/fetch
* fix test
* remove need for isTimeout, isShardFailure
* ts fix
* improve test
* Change showWarnings to accept the RequestAdapter
* use showWarnings in vis_types/timeseries
* more tests
* use handle_warning name
* fix ts
* add reason field to SearchResponseWarning
* fix component snapshot
* update comments
* test cleanup
* fix test
* ensure notification appears only once
* fix and cleanup
* fix ts
* fix response.json bug
* use top-level type, and lower-level reason.type
* cleanup
* fix shard failure warning in tsvb per feedback
cc @flash1293
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
* deletes unused utils file
* just some fix while I see it
* creating empty packages
* moving all the things
* package build success
* start fixing usages
* fix the scoped history type issue
* export internal utils
* add default for mock
* fix test import
* fix external import
* start fixing external usages
* more usages
* more usages
* more usages
* More usages
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* fix integration test imports
* fix more test types
* remove public/utils from the core bundle
* trying to import from the package
* updating README's
* remove unused test types from mock package
* cleanup test types
* use import type
* add author to packages
* more import type
* remove dead path from some config
* remove src/core/utils/index.ts (and pray)
* update tsdoc
* fix new file usage
* fix paths
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
- Errors on the application level were not correctly surfaced in the UI. This PR fixes it by combining "transport" stream errors and application errors in a callout above the analysis results table.
- This also fixes the problem where a partly populated results table would turn empty again when used with the error prop of EUI's table. We now keep the table on display an show the errors above it in the callout.
* [Data views] Add pre-configuration options to runtime field editor fly-out
* fix test
* more polish
* update example app functional test
* fix functional test
* improve comment
* fix unexported public apis
* comments for public apis
* restrict runaway metrics changes
* more comments for public api
* fix fn test
* revert updates to api_docs
* more public api comments in data_view_field_editor
* fix api comments
* add public api export
* clean up FieldFormatConfig types
* cleanup
* allow checkbox to be visually checked
* chore(NA): eslint rule for disallowing naked eslint-disable
* chore(NA): export new rule and update docs
* chore(NA): creation of rule in ts
* chore(NA): new corrected rule in ts
* refact(NA): remove old logic from older plugin
* docs(NA): update documentation
* docs(NA): update documentation
* docs(NA): update documentation
* refact(NA): include edge cases for better locating errors
* chore(NA): changed regex name
* docs(NA): correct name rule on docs
* refact(NA): use dedent in the template literals
* refact(NA): check for undefined
* fix(NA): introduces support for eslint-disable-line
* chore(NA): fix extra space
* test(NA): created more test cases
* chore(NA): rename plugin to eslint-plugin-disable
* docs(NA): update nav and operations landing page ids for eslint rule
* test(NA): use messageIds on test
* chore(NA): complete naked eslint disables with specific rules
* chore(NA): specific rules for a few naked eslint disable
* chore(NA): add focused eslint disable on big reindex_operation_with_large_error_message.ts file
* chore(NA): changes according PR feedback
* chore(NA): include specific eslint rules on latest naked eslint disable
* chore(NA): missing eslint disable specific rule
* fix(NA): remove comment for js annotator
* chore(NA): re add eslint focused disable rule to x-pack/plugins/osquery/cypress/support/coverage.ts
* chore(NA): re add eslint focused disable rule to x-pack/plugins/osquery/cypress/support/coverage.ts
* chore(NA): re add eslint focused disable rule to x-pack/plugins/osquery/cypress/support/coverage.ts
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* fix editor warning
* use UrlFormatEditorFormatParams
* remove unnecessary any
* remove any from FieldFormatEditorFactory
* remove usage of any from src/plugins/data_view_field_editor
* remove usage of any from data_views/server/fetcher
* fix ts
* fix more ts
* back off changes in src/plugins/data_views/server/fetcher/
* pretty
* remove some unknown
* pretty
* fix ts
* retain null-ability
* fix lint
* fix test
* cleanup
* fixes in FieldFormatEditorFactory
* cleanup
* fix FieldFormatEditorStart
* revert functional diff
* knock out a few small any
* fix lint
* set up generic FieldFormatParams, SerializedFieldFormat, FormatFactory
* revert comment
* fix mistake
* use FormatEditorServiceSetup, FormatEditorServiceStart
* make defaultFieldFormatEditorFactories more type safe
* simplify types
* type fixes
* roll back re-leveling of fieldFormatEditors
* review feedback item
* public api correction
Co-authored-by: Matt Kime <matt@mattki.me>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Adds a check to aiops API endpoints to only allow requests with active platinum license.
- Adds integration tests for basic license where the endpoints should return permission denied.
- Improved error handling:
- Low level errors (like a non valid argument pushed to a stream) will now be logged to Kibana server's console, because the way HTTP streams work we cannot really emit a useful error to an already running stream to the client. So the stream will just abort but Kibana server will log an error.
- Higher level errors on the application level (like when we find out an index does not exist to run the analysis) will be pushed to the stream now as an error type action and we can update the UI accordingly. Note this PR only updates the API and corresponding tests to support this, the UI doesn't make use of it yet.
* No explicit interface for `SavedObjectsClientContract`
* fix doc, do not export the client class
* fix doc more
* fix import from plugins
* fix import from plugins bis
* update generated doc
This creates a response_stream plugin in the Kibana /examples section. The plugin demonstrates API endpoints that can stream data chunks with a single request with gzip/compression support. gzip-streams get decompressed natively by browsers. The plugin demonstrates two use cases to get started: Streaming a raw string as well as a more complex example that streams Redux-like actions to the client which update React state via useReducer().