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

Workplace Search in Kibana MVP #22

Conversation

cee-chen
Copy link
Owner

@cee-chen cee-chen commented Jul 7, 2020

Summary

This PR adds Workplace Search to the Enterprise Search in Kibana MVP

image

QA

Standard auth
For this QA, it works best to log into Enterprise Search first as we have an issue where the #'s in the URLs aren't working when logged out in Rails. Not sure if this is worth the cycles to address before 7.9

  • Workplace Search admin page renders and matches http://localhost:3002/ws#/org
  • Adding a source adds to recent activity at bottom, changes icon to checkmark in onboarding card and updates source count in Usage statistics (custom source is quickest)
  • Adding a user changes icon to checkmark in onboarding card and updates user count in Usage statistics
  • Once source has been added, user has been invited, and org name changed, the onboarding sections (sources, users, and org name) should be hidden.

Native auth
Same as Standard without the users cards

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@cee-chen cee-chen mentioned this pull request Jul 7, 2020
11 tasks
@cee-chen cee-chen force-pushed the feature/enterprise-search-plugin branch 2 times, most recently from 8d495f3 to 15a8b15 Compare July 8, 2020 08:06
@scottybollinger scottybollinger force-pushed the scottybollinger/feature/workplace-search-mvp branch 2 times, most recently from 154fe97 to 5035cd3 Compare July 8, 2020 17:08
@cee-chen cee-chen force-pushed the feature/enterprise-search-plugin branch from 054f659 to 3b715b5 Compare July 8, 2020 17:35
@scottybollinger scottybollinger force-pushed the scottybollinger/feature/workplace-search-mvp branch from 8222835 to e5180fa Compare July 8, 2020 17:59
neptunian and others added 22 commits July 8, 2020 18:49
The `currentPanelView` selector returns a value that's out of sync
with the component that uses it.
* [APM] Update ML job ID in data telemetry tasks

Use "apm-*" to match the new job IDs added in elastic#70560.

* additional fix

* Remove unused import
…eaming of files.

## Summary

* Changes the value list imports to use a streaming in model
* Adds a custom light hand spun multi-part parser for the incoming text
* Adds a buffer pause and resume which continues to buffer the incoming data if an async event such as creating a list from the attachment file needs to happen but does not emit the lines until the resume continues.
* Adds a data slicing if the buffer becomes larger than the maximum so that if we begin buffering too quickly within memory we don't blow up the limit of Elastic Search.
* Adds unit tests
 
### Checklist

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
elastic#71178)

### Summary

This PR fixes two bugs in the exceptions builder. The first was that it was not allowing you to select any of the "excluded" operators. The second was that it was not adding the "and" badge when it should on initial render. It also adds unit tests for the EntryItemComponent.
* part I to rename alerts back to detections

* part 2 to rename alerts to detections

* update imports

* fix layout container event type

* Detection Alerts

* fix type/UT/cypress
* Fix bug when you move columns rule name

* reference.url and event.url will be render as an anchor

* no need to fake index just return null
…ssion (elastic#70759)

* Stateless exception list translation with improved runtime checks

* use flatMap and reduce to simplify logic

* Update to new manifest format

* Fix test fixture SO data type

* Fix another test fixture data type

* Fix sha256 reference in artifact_client

* Refactor to remove usages of 'then' and tidy up a bit

* Zlib compression

* prefer byteLength to length

* Make ingestManager optional for security-solution startup

* Fix download functionality

* Use eql for deep equality check

* Fix base64 download bug

* Add test for artifact download

* Add more tests to ensure cached versions of artifacts are correct

* Convert to new format

* Deflate

* missed some refs

* partial fix to wrapper format

* update fixtures and integration test

* Fixing unit tests

* small bug fixes

* artifact and manifest versioning changes

* Remove access tag from download endpoint

* Adding decompression to integration test

* Removing tag from route

* add try/catch in ingest callback handler

* Fixing

* Removing last expect from unit test for tag

* type fixes

* Add compression type to manifest

* Reverting ingestManager back to being required for now

Co-authored-by: Alex Kahan <alexander.kahan@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Migrated vislib tests to the NP

* fixed tests

* Fixed tests

* Fixed test
…tic#70936)

* Fix bug elastic#7189

* typo

* Test adjustments

* wait for load complete

* Fine tune test

* Update src/plugins/data/public/query/filter_manager/lib/generate_filters.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Fix filtering by an array of nulls
Allow filtering by a non existing field in the doc
simplify flatten hit logic

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Clone role button going to edit page

* Added unit tests

* Fixed types
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Allow disabled: false SO field mappings

* Disable fields for unknown SO types

* Update everyone else's docs ;)

* Address review comments

* Add unit tests for disableUnknownTypeMappingFields()
…tic#70932)

* Closes elastic#69480 & elastic#70419.
- Adds anomaly detection integration to service maps backed by apm ML jobs per environment
- Loads transaction stats and anomalies for each transaction types
- Renders a selector in the popop to choose a transaction type to view stats

* - implements original anomaly detection integration design for service maps popover
- only aggregates transaction KPIs and anomaly scores for transaction.type = "request" or "page-load"
- supports environment filter 'All' option to display data from all APM anomaly detection jobs
- handle case where popover metrics don't exist for services outside the current environment filter

* fixes some CI errors

* Simplified messaging for service popop with not data in the current environment

* PR feedback, renamed max anomalies -> service anomalies including the file name

* - defines custom_settings.job_tags.apm_ml_version in ML job creation,
  then filters for it when returing valid APM ML jobs

* changes shape of of service anomalies from an array to a object keyed by serviceName

* removes the url encoding from ML job link href to how it was previously.

* PR feedback

* Popover no data state simplified:
- renders the "no data" message as plain text instead of in a callout
- hides the 'Anomaly detection' section if there is not anomaly data.

* Fixes filtering bug when user selects 'Environment: Not defined'. Now
filters properly by filtering for docs where service.environment does
not exist

* filters jobs fetched in the settings page by `job.custom_settings.job_tags.apm_ml_version`

* Fixed bad import from last upstream merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
scottybollinger and others added 26 commits July 9, 2020 13:49
This is the functional MVP for Workplace Search
- Remove saved objects indexing
- add schema definition
- remove no_ws_account
- minor cleanup
- Still not working but fixed the syntax nonetheless
- Was unable to get the `FormattedMessage` to work using the syntax in the docs. Always added ‘more’, even when there were zero (or one for users). This commit uses an alternative approach that works
Because of a change in the Workplace Search rails code, we can now use non-hash routes that will be redirected by rails so that we don’t have users stuck on the overview page in Workplace Search when logging in
Previously the dashboard in legacy Workplace Search linked to the sources page and this was replicated in the Kibana MVP. This PR aligns with the legacy dashboard directly linking to the source details

elastic/ent-search#1688
Smallest commit ever.
@cee-chen cee-chen force-pushed the scottybollinger/feature/workplace-search-mvp branch from d1f4945 to 30b0e9e Compare July 9, 2020 20:52
@cee-chen cee-chen closed this Jul 10, 2020
cee-chen pushed a commit that referenced this pull request Jun 10, 2021
* 💄 Hack to fix suggestion box

* 🐛 Fix validation messages

* 🐛 Relax operations check for managedReferences

* Change completion params

* 🏷️ Fix missing arg issue

* ✨ Add more tinymath fns

* 🐛 Improved validation around math operations + multiple named arguments

* 🐛 Use new onError feature in math expression

* ♻️ Refactor namedArguments validation

* 🐛 Fix circular dependency issue in tests + minor fixes

* Move formula into a tab

* 🔥 Leftovers from previous merge

* ✨ Move over namedArgs from previous function

* ✅ Add tests for transferable scenarios

* ✅ Fixed broken test

* ✨ Use custom label for axis

* Allow switching back and forth to formula tab

* Add a section for the function reference

* Add modal editor and markdown docs

* Change the way math nodes are validated

* Use custom portal to fix monaco positioning

* Fix model sharing issues

* Provide signature help

* 🐛 Fix small test issue

* 🐛 Mark pow arguments as required

* 🐛 validate on first render only if a formula is present

* 🔥 Remove log10 fn for now

* ✨ Improved math validation + add tests for math functions

* Fix mount/unmount issues with Monaco

* [Lens] Fully unmount React when flyout closes

* Fix bug with editor frame unmounting

* Fix type

* Add tests for monaco providers, add hover provider

* Add test for last_value

* Usability improvements

* Add KQL and Lucene named parameters

* Add kql, lucene completion and validation

* Fix autocomplete on weird characters and properly connect KQL

* Highlight functions that have additional requirements after validating

* Fix type error and move help text to popover

* Fix escape characters inside KQL

* 🐛 Fix dataType issue when moving over to Formula

* Automatically insert single quotes on every named param

* Only insert single quotes when typing kql= or lucene=

* Reorganize help popover

* Fix merge issues

* Update grammar for formulas

* Fix bad merge

* Rough fullscreen mode

* Type updates

* Pass through fullscreen state

* Remove more chrome from full screen mode

* Fix minor bugs in formula typing

* 🐛 Decouple column order of references and output

* 🔧 Fix tests and types

* ✅ Add first functional test

* Fix copying formulas and empty formula

* Trigger suggestion prompt when hitting enter on function or typing kql=

* 🐛 Prevent flyout from closing while interacting with monaco

* refactoring

* move main column generation into parse module

* fix tests

* refactor small formula styles and markup

* documentation

* adjustments in formula footer

* Formula refactoring (#12)

* refactoring

* move main column generation into parse module

* fix tests

* more style and markup tweak for custom formula

* Fix tests

* [Expressions] Use table column ID instead of name when set

* [Lens] Create managedReference type for formulas

* Fix test failures

* Fix i18n types

* fix fullscreen flex issues

* Delete managedReference when replacing

* refactor css and markup; add button placeholders

* [Lens] Formulas

* Tests for formula

Co-authored-by: Marco Liberati <marco.liberati@elastic.co>

* added error count placeholder

* Add tooltips

* Refactoring from code review

* Fix some editor issues

* Update ID matching to match by name sometimes

* Improve performance of Monaco, fix formulas with 0, update labels

* Improve performance of full screen toggle

* Fix formula tests

* fix stuff

* Add an extra case to prevent insertion of duplicate column

* Simplify logic and add test for output ID

* add telemetry for Lens formula (#15)

* Respond to review comments

* ✨ Improve the signatures with better documentation and examples

* adjust border styles to account for docs collapse

* refactor docs markup; restructure docs obj; styles

* Fix formula auto reordering (#18)

* fix formula auto reordering

* add unit test

* Fix and improve suggestion experience in Formula (#19)

* ✨ Revisit documentation and suggestions

* 👌 Integrated feedback

* ✨ Add query validation for quotes

* Usability updates & type fixes

* add search to formula

* fix form styles to match designs

* fix text styles; revert to Markdown for control

* 👌 Integrated more feedback

* improve search

* improve suggestions

* improve suggestions even more

* 🐛 Fix i18n issues (#22)

* Persist formula on leave, fix fullscreen and popovers

* Fix documentation tests

* 🏷️ fix type issue

* 🐛 Remove hidden operations from valid functions list

* 🐛 Fix empty string query edge case

* 🐛 Enable more suggestions + extends validation

* Fix tests that depended on setState being called without function

* Error state and text wrapping updates

* ✨ Add new module to CodeEditor for brackets matching (#25)

* Fix type

* show warning

* keep current quick function

* ✨ Improve suggestions within kql query

* 📷 Fix snapshot editor test

* 🐛 Improved suggestion for single quote and refactored debounce

* Fix lodash usage

* Fix tests

* Revert "keep current quick function"

This reverts commit ed47705.

* Improve performance of dispatch by using timeout

* Improve memoization of datapanel

* Fix escape characters

* fix reduced suggestions

* fix responsiveness

* fix unit test

* Fix autocomplete on nested math

* Show errors and warnings on first render

* fix transposing column crash

* Update comment

* 🐛 Fix field error message

* fix test types

* 📝 Fix i18n name

* 💄 Manage wordwrap via react component

* Fix selector for palettes that interferes with quick functions

* Use word wrapping by default

* Errors for managed references are handled at the top level

* 🐛 Move the cursor just next to new inserted text

* ⚗️ First pass for performance

* 🐛 Fix unwanted change

* ⚡ Memoize as many combobox props as possible

* ⚡ More memoization

* Show errors in hover

* Use temporary invalid state when moving away from formula

* Remove setActiveDimension and shouldClose, fixed by async setters

* Fix test dependency

* do not show quick functions tab

* increase documentation popover width

* fix functional test

* Call setActiveDimension when updating visualization

* Simplify handling of flyout with incomplete columns

* Fix test issues

* add description to formula telemetry

* fix schema

* Update from design feedback

* More review comments

* Hide callout border from v7 theme

Co-authored-by: dej611 <dej611@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co>
Co-authored-by: Joe Reuter <email@johannes-reuter.de>
Co-authored-by: Marco Liberati <marco.liberati@elastic.co>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
cee-chen pushed a commit that referenced this pull request Jul 20, 2023
… and spaces enabled - rule execution logic Non ECS fields in alert document source should fail creating alert when ECS field mapping is geo_point (elastic#162247)

## Summary

Failing tests ticket: elastic#154277

This PR fixes the non ECS fields in alert document source failing tests.

There are two failing tests:
1. `should remove source array of keywords field from alert if ECS field
mapping is nested` was filing due to wrong key path format passed to
jest's `toHaveProperty`. When the field name has dot notation we should
be using array format as a key path. See discussion
[here](jestjs/jest#5653) and usage examples
[here](https://github.com/jestjs/jest/blob/main/docs/ExpectAPI.md#tohavepropertykeypath-value).
2. `should fail creating alert when ECS field mapping is geo_point` was
failing due to changed error message format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.