* modify API to get the total comments in _find + Add user action to track what user are doing + create _pushed api to know when case have been pushed
* fix rebase
* add connector name in case configuration saved object
* fix total comment in all cases
* totalComment bug on the API
* integrate user action API with UI
* fix merged issue
* integration APi to push to services with UI
* Fix bugs
* wip to show pushed service in ui
* finish the full flow with pushing to service now
* review about client discrepency
* clean up + review
* merge issue
* update error msgs to info
* add aria label + fix but on add/remove tags
* fix i18n
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
* Create Painless Playground app (#54578)
* Replace heart script with smiley face script. (#57755)
* Rename Painless Playground -> Painless Lab. (#57545)
* Fix i18n namespace.
* Improve smiley face proportions.
- Add def keyword to Painless spec.
- Temporarily fix broken highlighting.
- Add small padding to main controls.
* [Painless Lab] Minor Fixes (#58135)
* Code restructure, improve types, add plugin id, introduced hook
Moved the code execution hook to a custom hook outside of main,
also chaining off promise to avoid lower level handling of
sequencing.
* Re-instated formatting code
To improve DX the execution error response from the painless API
was massaged to a more reader friendly state, only giving non-repeating
information.
Currently it is hard to determine the line and character information from
the painless endpoint. If the user wishes to see this raw information it
will be available in the API response flyout.
* Remove leading new line in default script
* Remove registration of feature flag
* Fix types
* Restore previous auto-submit request behaviour
* Remove use of null and remove old comment
Stick with "undefined" as the designation for something not existing.
* [Painless Lab] NP migration (#59794)
* Fix sample document editor.
* [Painless Lab] Fix float -> integer coercion bug (#60201)
* Clarify data and persistence flow. Fix floating point precision bug.
* Send a string to API and ES client instead of an object.
* Rename helpers lib to format. Add tests for formatRequestPayload.
* Add query parameter to score context (#60414)
* Fix typo and i18n
* Make state init lazy
Otherwise we are needlessly reading and JSON.parse'ing on every
state update
* Support the query parameter in requests to Painless
* Fix borked i18n
* Fix i18n
* Another i18n issue
* [Painless] Minor state update model refactor (#60532)
* Fix typo and i18n
* Make state init lazy
Otherwise we are needlessly reading and JSON.parse'ing on every
state update
* Support the query parameter in requests to Painless
* WiP on state refactor
* Some cleanup after manual testing
* Fix types and i18n
* Fix i18n in context_tab
* i18n
* [Painless] Language Service (#60612)
* Added language service
* Use the correct monaco instance and add wordwise operations
* Remove plugin context initializer for now
* [Painless] Replace hard-coded links (#60603)
* Replace hard-coded links
Also remove all props from Main component
* Pass the new links object to the request flyout too
* Link directly to painless execute API's contexts
* Remove responsive stacking from tabs with icons in them.
* Resize Painless Lab bottom bar to accommodate nav drawer width (#60833)
* Validate Painless Lab index field (#60841)
* Make JSON format of parameters field more prominent. Set default parameters to provide an example to users.
* Set default document to provide an example to users.
* Simplify context's updateState interface.
* Refactor store and context file organization.
- Remove common directory, move constants and types files to root.
- Move initialState into context file, where it's being used.
* Add validation for index input.
* Create context directory.
* Fix bottom bar z-index.
* Position flyout help link so it's bottom-aligned with the title and farther from the close button.
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
* [Reporting/New Platform Migration] Use a new config service on server-side
* unit test for createConfig
* use promise.all and remove outdated comment
* design feedback to avoid handling the entire config getter
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
resolves https://github.com/elastic/kibana/issues/57143
Currently, the built-in email action requires user/password properties to be
set in it's secrets parameters. This PR changes that requirement, so they
are no longer required.
* PR base
* adds designed resolver nodes
* adjust distance between nodes
* WIP remove stroke
* WIP changes to meet mocks
* new boxes
* remove animation
* new box assets
* baby resolver running nodes complete
* cleanup defs, add running trigger cube
* added 2 more defs for process cubes
* adding switched for assets on node component
* vacuuming defs file
* adjusting types and references to new event model
* switch background to full shade for contrast
* switch background to full shade for contrast
* cube, animation and a11y changes to 25% nodes
* PR base
* adds designed resolver nodes
* adjust distance between nodes
* WIP remove stroke
* WIP changes to meet mocks
* new boxes
* remove animation
* new box assets
* baby resolver running nodes complete
* cleanup defs, add running trigger cube
* added 2 more defs for process cubes
* adding switched for assets on node component
* vacuuming defs file
* adjusting types and references to new event model
* switch background to full shade for contrast
* cube, animation and a11y changes to 25% nodes
* merge upstream
* change from Legacy to new Resolver event
* cleaning up unused styles
* fix adjacency map issues
* fix process type to cube mapping
* fix typing on selctor
* set viewport to strict
* remove unused types
* fixes ci / testing issues
* feedback from Jon Buttner
* fix index from Jon Buttner comment
* reset focus state on nodes
* Robert review: changing adjacency map property names for better semantics
* Robert Austin review: changing var name
* Robert Austin review: rearrange code for readability
* Robert Austin review: change const name
* Robert Austin review: rearranging code for readability
* Robert Austin review: adjustments to process_event_dot
* Robert Austin review: replace level getter
* Robert Austin review: removing unnecessary casting
* Robert Austin review: adjust selector
* Robert Austin review: fix setting parent map
* Robert Austin review: replace function with consts
* K Qualters review: change return type of function
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add configurable page size to monitor list.
* Add functional tests for new feature.
* Update outdated snapshots.
* Extract UI concerns for size select component to dedicated function.
* Add missing props to resolve type check errors.
* Add unit test for new UI functionality.
* Refresh snapshots after additional changes.
* Introduce new parameter to API test function.
* Update flex behavior for new UI component.
* Clean up code in functional page object file.
* Refresh snapshots that were broken by previous feedback implementation.
* Fix async error introduced to test framework by other patch.
* [Telemetry] Migration to NP
* Telemetry management advanced settings section + fix import paths + dropped support for injectVars
* Fix i18nrc paths for telemetry
* Move ui_metric mappings to NP registerType
* Fixed minor test tweaks
* Add README docs (#60443)
* Add missing translation
* Update the telemetryService config only when authenticated
* start method is not a promise anymore
* Fix mocha tests
* No need to JSON.stringify the API responses
* Catch handleOldSettings as we used to do
* Deal with the forbidden use case in the optIn API
* No need to provide the plugin name in the logger.get(). It is automatically scoped + one missing CallCluster vs. APICaller type replacement
* Add empty start method in README.md to show differences with the other approach
* Telemetry collection with X-Pack README
* Docs update
* Allow monitoring collector to send its own ES client
* All collections should provide their own ES client
* PR feedback
* i18n NITs from kibana-platform feedback
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Parsing the Authorization HTTP header to grant API keys
* Using HTTPAuthorizationHeader and BasicHTTPAuthorizationHeaderCredentials
* Adding tests for grantAPIKey
* Adding http_authentication/ folder
* Removing test route
* Using new classes to create the headers we pass to ES
* No longer .toLowerCase() when parsing the scheme from the request
* Updating snapshots
* Update x-pack/plugins/security/server/authentication/http_authentication/http_authorization_header.ts
Co-Authored-By: Aleh Zasypkin <aleh.zasypkin@gmail.com>
* Updating another inline snapshot
* Adding JSDoc
* Renaming `grant` to `grantAsInternalUser`
* Adding forgotten test. Fixing snapshot
* Fixing mock
* Apply suggestions from code review
Co-Authored-By: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com>
* Using new classes for changing password
* Removing unneeded asScoped call
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
* Fix edge case where reindex op is can falsely be seen as stale
This is for multiple Kibana workers, to ensure that an item just
coming off the queue is seen as "new" we set a "startedAt" field
which will update the reindex op and give it the full timeout
window.
* Update tests to use new api too
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* adding custom links to actions menu
* user should have at least gold license to be able to manage custom links
* replacing variable for the correspondent value
* refactoring license prompt to a shared place
* fixing query to return filters that were saved separated by comma
* refactoring license prompt to a shared place
* fixing query to return filters that were saved separated by comma
* adding unit test, splitting value by comma and removing empty ones
* adding custom links to actions menu
* UI fixes
* moving stuff to common
* changing flyout texts
* refactoring getSelectOption
* refactoring getSelectOption
* refactoring filter options name
* adding preview panel
* adding preview panel
* fixing test
* adding unit test for replace template variables
* fixing typo
* polishing preview panel
* fixing pr comments
* fixing pr comments
* adding links
* fixing unit test
* removing servicemap license prompt
Adds a settings page to the Uptime UI. The settings page values are per-space. The only current setting is heartbeatIndices.
To test this against alternate indices try changing setup.ilm.rollover_alias in heartbeat.yml to something like alt-prefix. See the ilm docs for more details.
This should be tested with read-only and write only roles. To test this in kibana try creating two users with two different roles in kibana. One roll should have read access to the Uptime space in kibana. The other should have all access. Both should have read permissions for the heartbeat-* index pattern.
This patch also splits API perms from just heartbeat to uptime-read and uptime-write.
This patch also refactors some of the header component functionality, using hooks for breadcrumbs, and making the top links optional.
Fixeselastic/uptime#43
resolves https://github.com/elastic/kibana/issues/59889
The index threshold APIs - used by both the index threshold UI and the
alert executor - were returning errors (500's from http endpoints) when
getting errors from ES.
These have been changed so that the error is logged as a warning, and the
relevant API returns an "empty" result.
Another 500 response was found while experimenting with this. Apparently
the date_range agg requires a date format to be passed in if the date format
in ES is not an ISO date. The repro on this was to select the `.security`
alias (or it's index) within the index threshold alert UI, and then select
one of it's date fields.
* Use ingest API to get endpoint datasources
* Add `application` service to `KibanaContextProvider`
* Adjust Policy list to show data available from API
* Added ingest service + refactored middleware
* handle api failures/errors
* Removed policy list fake_data generator
* Fix typing
* Rename method + added explicit return type
* move dispatch outside of try block
* Removed unnecessary action
* Added FIXME comments with link to issue
* Skip some functional tests
* added tests for ingest service
* Policy list tests - turn it all off
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* update to eui 21.0.1
* most changes needed for search bar ts changes
* Passing types
* snapshots
* jest tests
* Removed IQuery placeholder types
* Updated functional test to only look at table headers with content
* Moved 'filters' definition around in api docs
* Update types
* update snapshot
* typo
* Move DATA_FRAME_TASK_STATE enum to its own file to fix x-pack functional test config imports
* merge public api 'changes'
Co-authored-by: patrykkopycinski <patryk.kopycinski@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Remove the getCytoscapeElements function.
On the server:
* Replace `source` with `sourceData`, `destination` with `targetData`, `source.id` with `source`, and `destination.id` with `target`.
* Return a single array as an `elements` property instead of `nodes` and `connections`
* Map all of the items data to be inside of a `data` object
* Replace SERVICE_AGENT_NAME with AGENT_NAME
* Add some missing constants
On the client:
* Remove getCytoscapeElements
* Move all presentation-specific data transformation to use the original attributes in the place where they're needed
* Remove `href` since it wasn't being used
* Move BetaBadge to its own file
* Move cytoscapeDivStyle to cytoscapeOptions
* Fix storybook to work with new data formats
* First pass
* First pass
* Add new routes
* Getting closer
* Remove legacy server code, and other fixes
* Register the plugin with xpack
* Pass a legacy client to telemetry
* Suport callWithInternalUser
* Remove this
* More NP work
* Fix some tests
* Fix broken test
* Move over new telemetry changes, and fix other issues
* Fix TODO item
* Reuse the same schema as elasticsearch module
* Use a singular config definition here
* Disable this for now
* Use the right method
* Use custom config again
* Tweak the config to make this optional
* Remove these
* Remove these unnecessary files
* Fix jest test
* Fix some linting issues
* Fix type issue
* Fix localization issues
* Use the elasticsearch config
* Remove todos
* Fix this check
* Move kibana alerting over
* PR feedback
* Use new metrics core service
* Change config for xpack_api_polling_frequency_millis
* Make sure this is disabled for now
* Disable both
* Update this to the new function
* Tighten up legacy api needs
* Check for existence
* Fix jest tests
* Cleaning up the plugin definition
* Create custom type in our plugin
* Revert this change
* Fix CI issues
* Add these tests back
* Just use a different collector type
* Handle errors better
* Use custom type
* PR feedback
* Fix type issues
* PR feedback
Enables the FT that tests the View inApp functionality.
It addresses an issue that causes a race condition on CI where the ViewInApp button was thought to be enabled when it was, in fact, still disabled.
This meant that the click on the button didn't trigger the handler which, in turn, made the test fail.
* Define minimum license required for each action type (#58668)
* Add minimum required license
* Require at least gold license as a minimum license required on third party action types
* Use strings for license references
* Ensure license type is valid
* Fix some tests
* Add servicenow to gold
* Add tests
* Set license requirements on other built in action types
* Use jest.Mocked<ActionType> instead
* Change servicenow to platinum
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Make actions config mock and license state mock use factory pattern and jest mocks (#59370)
* Add license checks to action HTTP APIs (#59153)
* Initial work
* Handle errors in update action API
* Add unit tests for APIs
* Make action executor throw when action type isn't enabled
* Add test suite for basic license
* Fix ESLint errors
* Fix failing tests
* Attempt 1 to fix CI
* ESLint fixes
* Create sendResponse function on ActionTypeDisabledError
* Make disabled action types by config return 403
* Remove switch case
* Fix ESLint
* Add license checks within alerting / actions framework (#59699)
* Initial work
* Handle errors in update action API
* Add unit tests for APIs
* Verify action type before scheduling action task
* Make actions plugin.execute throw error if action type is disabled
* Bug fixes
* Make action executor throw when action type isn't enabled
* Add test suite for basic license
* Fix ESLint errors
* Stop action task from re-running when license check fails
* Fix failing tests
* Attempt 1 to fix CI
* ESLint fixes
* Create sendResponse function on ActionTypeDisabledError
* Make disabled action types by config return 403
* Remove switch case
* Fix ESLint
* Fix confusing assertion
* Add comment explaining double mock
* Log warning when alert action isn't scheduled
* Disable action types in UI when license doesn't support it (#59819)
* Initial work
* Handle errors in update action API
* Add unit tests for APIs
* Verify action type before scheduling action task
* Make actions plugin.execute throw error if action type is disabled
* Bug fixes
* Make action executor throw when action type isn't enabled
* Add test suite for basic license
* Fix ESLint errors
* Stop action task from re-running when license check fails
* Fix failing tests
* Attempt 1 to fix CI
* ESLint fixes
* Return enabledInConfig and enabledInLicense from actions get types API
* Disable cards that have invalid license in create connector flyout
* Create sendResponse function on ActionTypeDisabledError
* Make disabled action types by config return 403
* Remove switch case
* Fix ESLint
* Disable when creating alert action
* Return minimumLicenseRequired in /types API
* Disable row in connectors when action type is disabled
* Fix failing jest test
* Some refactoring
* Card in edit alert flyout
* Sort action types by name
* Add tooltips to create connector action type selector
* Add tooltips to alert flyout action type selector
* Add get more actions link in alert flyout
* Add callout when creating a connector
* Typos
* remove float right and use flexgroup
* replace pixels with eui variables
* turn on sass lint for triggers_actions_ui dir
* trying to add padding around cards
* Add callout in edit alert screen when some actions are disabled
* improve card selection for Add Connector flyout
* Fix cards for create connector
* Add tests
* ESLint issue
* Cleanup
* Cleanup pt2
* Fix type check errors
* moving to 3-columns cards for connector selection
* Change re-enable to enable terminology
* Revert "Change re-enable to enable terminology"
This reverts commit b497dfd6b6.
* Add re-enable comment
* Remove unecessary fragment
* Add type to actionTypeNodes
* Fix EuiLink to not have opacity of 0.7 when not hovered
* design cleanup in progress
* updating classNames
* using EuiIconTip
* Remove label on icon tip
* Fix failing jest test
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
* Add index to .index action type test
* PR feedback
* Add isErrorThatHandlesItsOwnResponse
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>