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

[Canvas] Persist embeddable input #107330

Conversation

cqliu1
Copy link
Contributor

@cqliu1 cqliu1 commented Jul 30, 2021

Summary

Blocked by 104499.
Related to #81812.
Related to #101633.

This adds input to the workpad element schema, and stores the embeddable input as a base64 encoded string. It operates the same way filters currently do in Canvas.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@cqliu1 cqliu1 added WIP Work in progress Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:large Large Level of Effort v8.0.0 release_note:skip Skip the PR/issue when compiling release notes impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Feature:Canvas v7.15.0 labels Jul 30, 2021
ravikesarwani and others added 13 commits August 3, 2021 10:30
Update stack monitoring doc to account for alert notification now being send for each node, index, or cluster based on the rule type, instead of always per cluster (PR# 102544)
)

* feat: fall back to simple search on parse error

* fix: simplify query

* lint: fix docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…ing their children. (elastic#107236)

* Fix the bug and update tests

* update api docs

* Fix tests
* Remove references to legacy elasticsearch types

* Fix types

* Fix more types
…r settings (elastic#107481)

Adds the cloud icon to `xpack.actions.customHostSettings[n].ssl.verificationMode` and removes it from `xpack.actions.customHostSettings[n].ssl.rejectUnauthorized`, in the actions configuration documentation.  The doc was written before `verificationMode` was added and `rejectUnauthorized` was deprecated.
…ins Table empty state (elastic#107436)

* New CrawlRequest type

* Add crawlRequests value to CrawlerOverviewLogic

* New CrawlRequestsTable component

* Added CrawlRequestsTable to CrawlerOverview

* Hide the CrawlRequest table when there are no domains or crawl requests for an engine

* Add an empty state for CrawlerOverview when there are no domains

* Remove unused import

* Fix AddDomainLogic tests

* Apply suggestions from code review

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Fix capitalization

* Clarify test expectations

* Use noItemsMessage prop for CrawlRequestsTable empty state

* Refactor crawl requests logic

* Fix heading sizes

* Remove unused variable

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Improve Index Management ts-expect-error annotations.
* Add steps for testing legacy index template mappings types to Index Management README.
* Rename component template API route handler files to follow pattern used elsewhere.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* injects bulkCreate and wrapHits to individual rule executors

* WIP create_security_rule_type_factory based on Marshall's work in #d3076ca54526ea0e61a9a99e1c1bce854806977e

* removes ruleStatusService from old rule executors, fixes executor unit tests

* fixes rebase

* Rename reference_rules to rule_types

* Fix type errors

* Fix type errors in base security rule factory

* Additional improvements to types and interfaces

* More type alignment

* Fix remaining type errors in query rule

* Add validation / inject lists plugin

* Formatting

* Improvements to typing

* Static typing on executors

* cleanup

* Hook up params for query/threshold rules... includes exceptionsList and daterange tuple

* Scaffolding for wrapHits and bulkCreate

* Add error handling / status reporting

* Fixup alert type state

* Begin threshold

* Begin work on threshold state

* Organize rule types

* Export base security rule types

* Fixup lifecycle static typing

* WrapHits / bulk changes

* Field mappings (partial)

* whoops

* Remove redundant params

* More flexibile implementation of bulkCreateFactory

* Add mappings

* Finish query rule

* Revert "Remove redundant params"

This reverts commit 87aff9c.

* Revert "whoops"

This reverts commit a7771bd.

* Fixup return types

* Use alertWithPersistence

* Fix import

* End-to-end rule mostly working

* Fix bulkCreate

* Bug fixes

* Bug fixes and mapping changes

* Fix indexing

* cleanup

* Fix type errors

* Test fixes

* Fix query tests

* cleanup / rename kibana.rac to kibana

* Remove eql/threshold (for now)

* Move technical fields to package

* Add indexAlias and buildRuleMessageFactory

* imports

* type errors

* Change 'kibana.rac.*' to 'kibana.*'

* Fix lifecycle tests

* Single alert instance

* fix import

* Fix type error

* Fix more type errors

* Fix query rule type test

* revert to previous ts-expect-error

* type errors again

* types / linting

* General readability improvements

* Add invariant function from Dmitrii's branch

* Use invariant and constants

* Improvements to field mappings

* More test failure fixes

* Add refresh param for bulk create

* Update more field refs

* Actually use refresh param

* cleanup

* test fixes

* changes to rule creation script

* Fix created signals count

* Use ruleId

* Updates to bulk indexing

* Mapping updates

* Cannot use 'strict' for dynamic setting

Co-authored-by: Marshall Main <marshall.main@elastic.co>
Co-authored-by: Ece Ozalp <ozale272@newschool.edu>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [maps] deprecate xpack.maps.showMapVisualizationTypes in upgrade assistent

* use custom function instead of unusedFromRoot so config does not get removed

* fix i18n ids and align deprecation message

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [APM] Add and link to service dependencies page

* Update labels
@cqliu1 cqliu1 changed the base branch from master to canvas/by-value-embeddables August 3, 2021 17:03
semd and others added 2 commits August 3, 2021 14:02
* tGrid EuiDataGrid toolbar replace utilityBar

* tgrid new prop in observability

* types and translations fixes

* bulkActions props and encapsulation

* update limits

* code cleaning

* load lazy and remove export from public

* add memoization to bulk_actions

* icon change and test fixed

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…time comparison to the Transactions page (elastic#107299)

* adding comparison to transactions pages

* adding new transactions table

* adding throughput

* refactoring transacon group api

* adding missing filter

* fixing i18n

* fixing tests

* addressing PR comments

* moving table to shared folder

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@cqliu1 cqliu1 force-pushed the canvas/store-embeddable-input branch 3 times, most recently from ae9fefa to 08b89f0 Compare August 3, 2021 18:56
@cqliu1 cqliu1 force-pushed the canvas/store-embeddable-input branch from 08b89f0 to 81aaeb6 Compare August 3, 2021 20:02
… in empty layers for 3+ (elastic#107442)

* [maps] fix More than 2 maps embeddables with geo-shape layers results in empty layers for 3+

* comment

* add unit test

* eslint
lcawl and others added 27 commits August 4, 2021 08:29
* [Reporting] revive "existing indices" functional test

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

* fix test service

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* add investigate in timeline action to flyout

* close context menu on item clicked

* add investigate in timeline

* add investigat in timeline button

* fix failing tests

* add alerts status actions

* update unit test

* export alerts actions from hook

* add disable props

* add case action items

* clean up

* split alert status hook and hide add to case action

* add useHoseIsolationAction hook

* move out take action dropdown

* refeactor hooks to only manage one thing

* apply hooks to alerts table

* clean up

* fix unit tests

* replace euiCodeBlock

* take actions from case

* fetch ecs in flyout footer

* move fetch alert ecs to container

* add AddExceptionModalWrapperData interface

* fix cypress tests

* update snapshot for json view

* fix cypress test

* update AddEndpointExceptionComponent

* fix data retrieved from event details

* fix host isolation action

* use endpointAlertCheck

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
* Add duplex content stream
* Add content stream factory
* Move report contents gathering and writing to the content stream
* Update jobs executors to use content stream instead of returning report contents
* First draft migrate timelion to elastic-charts

* Some refactoring. Added brush event.

* Added title. Some refactoring

* Fixed some type problems. Added logic for yaxes function

* Fixed some types, added missing functionality for yaxes

* Fixed some types, added missing functionality for stack property

* Fixed unit test

* Removed unneeded code

* Some refactoring

* Some refactoring

* Fixed some remarks.

* Fixed some styles

* Added themes. Removed unneeded styles in BarSeries

* removed unneeded code.

* Fixed some comments

* Fixed vertical cursor across Timelion visualizations of a dashboad

* Fix some problems with styles

* Use RxJS instead of jQuery

* Remove unneeded code

* Fixed some problems

* Fixed unit test

* Fix CI

* Fix eslint

* Fix some gaps

* Fix legend columns

* Some fixes

* add 2 versions of Timeline app

* fix CI

* cleanup code

* fix CI

* fix legend position

* fix some cases

* fix some cases

* remove extra casting

* cleanup code

* fix issue with static

* fix header formatter

* fix points

* fix ts error

* Fix yaxis behavior

* Fix some case with yaxis

* Add deprecation message and update asciidoc

* Fix title

* some text improvements

* [Timelion Viz] Add functional tests

* Add more complex cases for _timelion

* Update test expected data

Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
…zations in a dashboard (elastic#106845)

* [Lens] Synchronize cursor position for X-axis across all Lens visualizations in a dashboard

Closes: elastic#77530

* add mocks for active_cursor service

* fix jest tests

* fix jest tests

* apply PR comments

* fix cursor style

* update heatmap, jest

* add tests

* fix wrong import

* replace cursor for timelion

* update tsvb_dashboard baseline

* fix CI

* update baseline

* Update active_cursor_utils.ts

* add debounce

* remove cursor from heatmap and pie

* add tests for debounce

* return theme order back

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
The heuristic to select provider name `cloud-basic` breaks the CCS
integration tests, where protocol is https, and actually is not needed in
any of the automated tests.

For a better solution we need @MadameSheema to be back from PTO.

This partially reverts commit 9f2d9d4.
…#107679)

gsutil requires a directory to exist before copying artifacts in.
Prior to elastic#107217, a
.bootstrap-cache file was written, providing the directory for these
writes.  Now that we're no longer writing this file, we need to ensure
it exists.
…ocessed on the server side. (elastic#107272)

* [Alerting UI] Added visual indicator when enable switched click is processed on the server side.

* fixed rule details

* fixed functional tests

* fixed unit tests

* fixed due to comments

* fixed due to comments
…lastic#107250)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…lastic#107571)

* chore(NA): moving @kbn/server-route-repository to babel transpiler

* chore(NA): update types
* incremental changes

* No more type errors

* Type guards

* Begin adding tests

* Flatten

* Reduce scope of branch

* Remove extraneous argument to filter_duplicate_signals
* [Archive Migration] x-pack..discover/default

* Fix load to unload in after hook.
… name (elastic#106710)

* Allow users select policies from a dropdown

* Policy filters are passed throguh the API call and the results are now filtered by policy

* Moved policies selector inside search component and triggers search only when refresh button is clicked

* Fixes tests

* Triggers policy filter when policy is selected. Also fix unit test because now policies are loaded at the trusted apps list

* Renamed components and added an index.ts for the exports

* Adds unit tests for policies selector component

* Fix unit tests and changed camelcase by snack case for url params

* adds multilang

* Fixes i18n keys

* Move mock resonse to the mocks file

* Use string templating in test

* remove === true from boolean comparison

* Set function in useCallback. Renames some variables and types. Use reourceState helper function to get the prev state. Use generated data for policies in tests

* Fix ts errors

* Removes unused type and fix type name for Item

* Puts exclude clause on policy dropdown behind a feature flag

* Adds missing feature flags in some tests and in global reducer

* Fix test adding useExperimentalValua mock for FF

* Wrapp handlers in a useCallback in order to prevent useless rerenders

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…lastic#107183)

* [ML] enable test selection

* [ML] executor update for annotations

* [ML] update unit tests

* [ML] fix i18n

* [ML] update schema

* [ML] fix ts

* [ML] account for docs count, update unit tests

* [ML] update translation strings

* [ML] add types

* [ML] fetch the latest annotation sorted by modified_time

* [ML] getDelayedDataAnnotations

* [ML] update unit tests

* [ML] set default number of docs to 1, update schema validation

* [ML] getDelayedDataLookbackTimestamp

* [ML] filter null values, update unit tests

* [ML] account for query delay, refactor with memoize

* [ML] update unit test

* [ML] remove previousStartedAt

* [ML] filter based on the job config

* [ML] fix tests

* [ML] add maps

* [ML] combine filters

* [ML] move range query inside of a filter

* [ML] filter out jobs with missing datafeed

* [ML] resolveLookbackInterval only from jobs with datafeeds

* [ML] do not show an error on empty time interval

* [ML] add help tooltips

* [ML] update description for the datafeed check
    Fixed telemetry

    Updates expression on input change

    Fixed ts errors
@cqliu1 cqliu1 force-pushed the canvas/store-embeddable-input branch from 81aaeb6 to 482180a Compare August 5, 2021 17:55
@cqliu1 cqliu1 closed this Aug 9, 2021
@kibanamachine
Copy link
Contributor

kibanamachine commented Aug 9, 2021

💔 Build Failed

Failed CI Steps

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Canvas impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:large Large Level of Effort release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.15.0 v8.0.0 WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.