* [ftr/docs] replace leadfoot with webdriver
* [ftr/docs] more details about running tests in Firefox
* [ftr/docs] update references to ftr services
* [ftr/docs] fix links and update description
* [ftr/docs] update services information
* [ftr/docs] fix more links
* small fix
* [ftr/docs] Firefox run example
* revert link changes
* review fix
* review fixes
* add details on how to start x-pack tests
* lost fix for tags description
* Update docs/development/core/development-functional-tests.asciidoc
Co-Authored-By: Spencer <email@spalger.com>
* Update docs/development/core/development-functional-tests.asciidoc
Co-Authored-By: Spencer <email@spalger.com>
* Mocks for CoreStart, CoreSetup and PluginInitializerContext
* Public CoreStart, CoreSetup mocks
* Update api signature/docs
* Convert embaddable_api tests to new core mocks
* CR Feedback
* Introduce ui_new_platform.test.mocks and refactor embedabble tests
* Hack to get TS warnings for Core mocks
* Core mocks types cleanup & hack to get TS warnings for Server Core mocks
* Use __mocks__ new_platform
* Remove accidently commited auto-mock
* Introduce MockedKeys type for Core mocks
* Better typing/docs for UiSettings
* Revert "Use __mocks__ new_platform"
This reverts commit 2d666facc8.
* Add missing mock to test
* Cleanup UiSettings types
* crude test updates
* remove custom server typedef
* allow spaces to aquire security plugin after init
* split CoreSetup into CoreSetup and PluginsSetup
* move interfaces to new plugin
* init interceptors in legacy plugin
* fix import
* add placeholder kibana.json
* use NP Elasticsearch service instead of legacy ES Plugin
* cleanup imports
* don't destructure the es client
* introduce request facade
* document reason for getSecurity
* prefer relative imports from src/core
* fix typo in filename: inteceptors --> interceptors
* fix imports; remove stray ts-ignore
* improve typings for spaces client
* rename InterfaceExcept --> Omit
* don't use legacy config in NP
* additional comment
* shim NP config service
* fix merge from master
* revert relative imports into src/core and src/legacy
* shim capabilities modifier into new platform
* removing placeholder kibana.json
* fix prettier problem
* temporary: patch NP 'setUrl'
* migrate onRequest interceptor to NP, without tests
* fix ts error
* testing and deps cleanup for onRequestInterceptor
* replace spaces's usages of request.getBasePath with http.getBasePathFor
* add explicit timeouts for jest interceptor tests
* attempt to fix imports
* use NP logging instead of faked implementation
* revert stray yarn.lock change
* attempt to stablize and fix tests
* update jest config to include src/core/server/mocks
* fix plugin config typings
* add service tests
* fix merge
* allow spaces service to also work with legacy requests
* update interfaces to confirm to new internal/external API convention
* re-enable some post auth interceptor tests
* add explicit timeouts for tests
* prefer modifyUrl instead of manual url modification
* update logger shim to conform to PluginInitializerContext
* remove spaces ConfigClass
* don't weaken type declaration for scoped cluster client calls
* remove legacy server from SpacesCoreSetup
* remove spaces service cache
* remove legacy server as an interceptor dependency
* use modifyUrl on the raw request too
* remove unused import
* cleanup typings
* replace onRequest interceptor with new onPreAuth interceptor
* fix onPostAuth tests
* temporarily copy modifyUrl into spaces plugin
* fix mock export
* fix merge from master
* spaces scopedClient always uses updated ES client and config
* improve typings for usage collector
* rename isLegacyRequest -> isFakeRequest
* use updated NP base path API
* remove commented code
* only expose scoped spaces client
* use OptionalPlugin instead of getSecurity
* update imports of Saved Objects Service to use new src/core/server location
* update core docs
* New and Legacy platforms share http server instance.
Required to use a common security interceptor for incoming http requests
* generate docs
* remove excessive contract method
* add test for New platform compatibility
* address comments part #1
* log server running only for http server
* fix test. mutate hapi request headers for BWC with legacy
* return 503 on start
* address @eli comments
* address @joshdover comments
* Move src/legacy/server/saved_objects -> src/core/server/saved_objects
* Fix SavedObject import references after moving files to core
* First pass at SavedObjects api docs
* Expose and import all saved object types through core/server
* Don't expose SavedObjectsManagement from core and fix imports
* Improve typings for SavedObject error helpers
* Fix type errors after master merge
* Fix SavedObjectErrorHelpers tests
* Prevent exposing Hapi.Request to registerAuth.
Prevent exposing headers.authorization in KibanaRequest.
Introduce a mechanism to associate authorization headers with an
incoming request and retrieve its value to perform a request to
elasticsearch cluster.
* fix tests
* address @joshdover comments
* unify modifyUrl on client and server
* create BasePath as a separate entity on server
* use BasePath class in http server
* use BasePath a separate entity on client
* use BasePath class on Http service on the client
* switch client code to the new api
* improve setver http service mocks
* address comments #1
* address comments #2
* update docs
* add comment why we define own typings
* Allow passing in a signal to abort an Elasticsearch request using the cluster client
* Go back to using promises (which still return abort method) and update test
* Update docs
* Explicitly return Promise<any> instead of {}
* Kibana request keep a reference to raw request. used to bind hapi-cookie
* CookieSessionStorage should work with KibanaRequest
as soon as registerAuth refactored to restrict access to hapi Request, CookieSessionStorage won't work with hapi request directly
* change registerAuth public api
* adopt auth lifecycle tests
* move lifecycle auth tests from integration to unit and adopt to new api.
* mark toRawRequest as internal to prevent exposure
* generate docs
* reword test cases
* mark Request internals in tsdoc
* expose route info in KibanaRequest
* update mocks in test
* make tags readonly, getRouteInfo is private method
* add mocks for hapi internals
* mode deepFreeze to core utils level as it env agnostic
* freeze route props
* fix typo
* add tests for route options
* fix integration tests. deep_freeze was moved under core utils
* add comments, expose public types and regenerate docs
* address comment. remove unnecessary async in route handlers
* make routeSchema optional instead of union with undefined
* @skaapgif improvements
* update docs
* introduce pre-/post-auth request hooks for HttpServer (#36690)
* introduce pre-,post-auth stages
* cleanup integration_tests. now contracts available in tests
* auth per route is configurable
* Unify lifecycle results structure
* expose api to store auth state and status via http service
* update tests
* update docs
* use full name, auth should not mutate request
* move basePath functionality under namespace
* regenerate docs
* Revert "move basePath functionality under namespace"
This reverts commit 9599d32801.
* Revert "regenerate docs"
This reverts commit 1799d3b088.
* regenerate docs
* updated yarn.lock no idea why
* extract AuthStateStorage to a separate entity
* get rid of nested ifs
* describe what is the difference between hooks
* re-wording
* fix typings
* Allow interception of http requests from browser http service
* Update documentation and browser http types
* Remove async marker from fetch function
* Fix failing tests
* Attempting to fix kuery_autocomplete test
* Allow halting of http fetches from interception
* Re-use HttpInterceptHaltError
* Expose HttpInterceptor types and update docs
* Only mock calls to capabilities during browser testing
* Remove browser basePath service, move functionality into browser http service (#36611)
* Remove browser basePath service, move functionality into browser http service
* Update generated documentation for removal of browser basePath
* Fix type interface for removal of basePath
* Split IHttpService into separate setup and start interfaces
* Rename appendToBasePath to prependBasePath, rename removeFromBasePath to removeBasePath
* Fix import of http test setup
* remove LoggingConfig class
* get rid of ElasticsearchConfig class
* get rid of PluginsConfig class
* get rid of HttpConfig Class
* update ConfigService
* update LegacyService
* update testbed plugin
* update docs
This moves the core Nav APIs from `ui/chrome` into the `ChromeService` in the new platform.
- `ChromeStart` now exposes a sub-service for reading and making limited updates to navlinks. These are powered by apps registered with the `ApplicationService` and filtered by UI Capabilities before being exposed by the `ChromeService`.
- The `header-global-nav` directive now consumes navlinks from the new platform.
- The `lastSubUrl` feature utilized by legacy apps has been refactored and will remain in `ui/chrome`. This feature utilizes the limited fields that `ChromeService` exposes to updates by outside code.
This change is the main blocker to moving the Chrome UI to the new platform. This will be necessary to enable the new platform to control top-level routing.
* Introduce new convention for config definition.
We need to define a way to acquire configuration schema as a part of
plugin definition. Having schema we can split steps of
config validation and plugin instantiation.
* Discover plugins, read their schema and validate the config.
Config validation finished before core services and plugins read from it.
That allows us to fail fast and have predictable validation results.
* Instantiate plugins using DiscoveredPluginsDefinitions.
* Update tests for new API.
* test server is not created if config validation fails
* move plugin discovery to plugin service pre-setup stage.
Set validation schemes in ConfigService.preSetup stage.
* fix eslint problem
* generate docs
* address Rudolfs comments
* separate core services and plugins validation
* rename files for consistency
* address comments for root.js
* address comments #1
* useSchema everywhere for consistency. get rid of validateAll
* plugin system runs plugin config validation
* rename configDefinition
* move plugin schema registration in plugins plugins service
plugins system is not setup when kibana is run in optimizer mode,
so config keys aren't marked as applied.
* cleanup
* update docs
* address comments
* expose IncomingMessage from KibanaRequest
It's applied to identify incoming requests across New and Legacy platforms. We can rely on the value if want to attach additional information to incoming requests without mutating them.
* support attaching basePath information to incoming requests
* Support Url changing for incoming requests
* add tests
* use NP API in the legacy platform
* relax KibanaRequest typings
* check basePath cannot be set twice
* address @eli comments
* generate docs
* Bump api-extractor to fix missing warning bug
* Fix api-extractor not failing build on api changes
Workaround for upstream bug
* Don't fail build for api-extractor warnings
Warnings like forgotten exports won't fail the build. Instead these
will be added as comments to the api review files. Thus even though
the build won't break, these warnings will show up in code review and
should be fixed by the author.
This is to allow us to merge the workaround for the upstream bugs
without breaking master until we've addressed all the warnings.
* introduce start phase. setup is bloated with start functionality
* fix amp typings: server is part of start contract now
* update mock files
* root.start(): necessary to run test server
* expose setup&start server api to simplify testing
* move tests to the new API
* test servers also should call root.start()
* update docs
* update snapshots: this functionality is tested in http server
* split setup/start phases
* update docs
* expose http server if it not started
to get rid of Optional<HttpServer> type and make it Require<HttpServer>
* adopt test to exposed Http server via SetupContract
* udpate docs
* cleanup apm changees
* check legacy service setup before start
* check http server setup before start
* restrict server options mutation; unify Promise interface for setup
* introduce start pahse for plugins service for parity with client side
* Revert "introduce start pahse for plugins service for parity with client side"
This reverts commit c04fdd2e26.
* Adding readonly badge to the discover application
* Dashboard get a badge
* Visualize gets a badge
* Timelion gets a badge
* Canvas gets a badge
* Maps gets a badge
* Infra gets a badge
* Graph gets a badge
* Dev Tools gets a badge
* Index Patterns get badges
* Advanced Settings get badges
* Infra and i18n are super chill friends
* Using proper i18n prefix for xpack
* Adding badges to the uptime application
* APM gets a badge!
* Adding functional tests for the discover read-only badge
* Functional tests for everyone!
* Removing unused import
* Fixing chrome service mock
* Switching from ChromeBadge | null to ChromeBadge | undefined
* Fixing canvas badge assertst
* Fixing Logs ui capabilities
* More ChromeBrand | null to ChromeBrand | undefined related changes
* Using named badges
* Revert "Using named badges"
This reverts commit c0e341bee1.
* i18n'ing the uptime read-only badges
* Adding ChromeService tests for badges
* Starting to add tests for the legacy badge API
* Changing capitalization of "Read Only" to "Read only"
* Adjusting styles
* Adding $setupBadgeAutoClear tests
* Changing the badge tooltip
* Fixing timelion i18n prefix
* Changing where Canvas sets the breadcrumbs
* Using a read-only badge with an icon
* Update x-pack/plugins/canvas/public/angular/controllers/canvas.js
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update src/legacy/core_plugins/timelion/public/app.js
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Changing discover's read-only verbiage
* Removing tests for code that moved to an untested part of Kibana
* Fixing issues introduced with the rebase
* Fixing priv ileges snapshot
* Adding back dropped docs
* Fixing plugin plugin doc
* Ensuring iconType is set as well
* Updating badge api, angular components moved
* graph to Graph
* Fixing linter
* Switching from aria-label to data-test-badge-label for testing
The tabIndex allows screenreaders to work properly
* Fixing eslint error
* Fixing more issues introduced by the merge from master
* APM updates badge in React hook
* Applying changes suggested by Aleh