* [Enterprise Search] Add owner and description properties to kibana.json
Adds owner and description properties to kibana.json
* Reorder to match other plugins
Both others have the props at the end of the file:
https://github.com/elastic/kibana/blob/master/src/plugins/bfetch/kibana.json
Also removes redundant prefix from description
* Copy change
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Add shared actions component
Both tables use the same actions
* Refactor RoleMappingsTable to use EuiInMemoryTable
This is way better than the bespoke one I wrote and it comes with pagination for free
- Also fixes a typo in the i18n id
* Create AssignmentSelectors
These components will be used in both the Role Mapping and User flyouts to create and edit role mappings and users, respectively
* Implement AssignmentSelectors in components
* Copy lazy_wrapper and suspense_error_boundary from Spaces plugin
These components are needed to enable async loading of Security components into Enterprise Search.
The components are copied without any changes except for i18n ids, so it's easier to DRY out in the future if needed.
* Create async versions of personal_info and change_password components
* Create ui_api that allows to load Security components asuncronously
The patterns were mostly copied from Spaces plugin
* Make ui_api available through Security components's lifecycle methods
* Import Security plugin into Enterprise Search
* Add Security plugin and Notifications service to Kibana Logic file
* Export the required components from the Security plugin and
use them in the new AccountSettings component
* Update link to the Account Settings page
* Move getUiApi call to security start and pass core instead of getStartServices
* Simplify import of change_password_async component by providing...
... `notifications` and `userAPIClient` props in the security plugin
* Remove UserAPIClient from ui_api
It's not needed anymore since the components are initiated with this prop already passed
* Export ChangePasswordProps and PersonalInfoProps from account_management/index.ts
This makes it easier to import these props from outside the account_management folder
* Remove notifications service from kibana_logic
It is not needed anymore since we're initializing security components with notifications already provided
* Add UiApi to SecurityPluginStart interface
* Utilize index files for exporting Props types
* Replace Pick<...> with two separate interfaces as it doesn't work well with our docs
* Add a comment explaining why we're not loading async components through index file
* Move enzyme & misc test helpers out of __mocks__/ and into new test_helpers/
They're not technically mocks since nothing is being mocked, so we should move them into a test_helpers folder for specificity & organization
* Move React Router mocks into its own separate folder/import
This was part of the initial feedback, that it was unclear why importing something for Kea in __mocks__/index.ts was mocking react router along for the ride. Separating this out makes things clearer and imports more explicit
+ add some handy new mock useX jest.fn()s helpers, so we're not doing `useParams() as jest.Mock` errywhere
* Move Kea & logic mocks/helpers into kea_logic subfolder
- for organization
NOTE: It can't be a plain kea/ folder because then Jest automatically mocks the `kea` module itself kea 🤦
* Fix type failures
- Caused by switch from any to unknown (changed back to any + added a .test_helper suffix exclusion for any)
* Fix Enterprise Search tests/imports
- I checked all application folders but this one, whoops
* PR feedback: comment copy
* Update tests/files added since PR open with new import locations
* Fix misc react router typing
- null not being type-able as a boolean
- forgot to remove various useParam imports after adding mockUseParams
+ misc unused kea import, probably added while debugging kea mocks
* Add constants and type
* Add RoleMappingsHeading component
I toyed with trying to make a shared component between the Role mappings and Users sections since they both have the same layout, but the need to have all of the conditional copy and button text just seemed too messy, so I opted to share this component between the two products and will make a UsersHeading component in a future PR
* Remove action from table
This is now in the RoleMappingsHeading component from the previous commit
* Remove empty states
Also removed the add mapping button since it is in the heading component
* Remove page headings in favor of table headings
* Remove a bunch of constants and translations
* Update placeholder to match mockup
* Add invalidation to Attribute Value field when empty
Also added some missed i18n strings for the form row labels
* Disable forms if attribute value is invalid
* Move error from saving role mapping to inline form error
Flash message was rendering behind flyover.
*Best to view this commit with whitespace changes hidden
* Fix i18n
Copy/Paste FTW
* Attempt at fixing lint issue
My local linter seems to be broken
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add RoleOptionLabel component
* Refactor RoleSelector to use EuiRadioGroup
Previously, we used individual radio buttons in a map in the component. However the new designs have a shared label and work best in the EuiRadioGroup component.
* Add reducer and actions to logic file for flyout visibility
* Remove redirects in favor of refreshing lists
With the existing multi-page view, we redirect after creating, editing or deleting a mapping. We now simply refresh the list after the action.
Also as a part of this commit, we show a hard-coded error message if a user tries to navigate to a non-existant mapping, instead of redirecting to a 404 page
* Add RoleMappingFlyout component
* Refactor AttributeSelector
No longer uses a panel or has the need for flex groups
- Also added a test for 100% coverage
* Refactor RoleMappingsTable
- Use EuiButtonIcons instead of Link
- Manage button now triggers flyout instead of linking to route
* Remove AddRoleMappingButton
We can just use an EuiButton to trigger the flyout
* Convert to use RoleSelector syntax
- Passes the entire array to the component instead of mapping.
- Uses ‘id’ instead of ‘type’ to match EUI component
- For App Search, as per design and PM direction, dropping labels for advanced and standard roles and showing them all in the same list.
- Removed unused constant and i18ns
* Move constants to shared
Will do a lot more of this in a future PR
* Remove DeleteMappingCallout
- This now an action in the row
- Also added tests for correct titles for 100% test coverage
* Remove routers and routes
- SPA FTW
* No longer pass isNew as prop
- Determine based on existence of Role Mapping instead
* No longer need to initialze role mapping in the component
This will become a flyout and the intialization will be triggered when the button in the table is clicked.
* Remove flash messages
This will be handled globally in the main component.
* Wrap components with flyout
Also add to main RoleMappings views
* Add form row validation for App Search
* Remove unnecessary layout components
- Don’t need the panel, headings, spacer, and Flex components
- Also removed constants and i18n from unused headings
* Wire up handleDeleteMapping to take ID param
The method now passes the ID directly from the table row action item
* Add EuiPortal wrapper for flyout
Without this, the flyout was was under the overlay. Hide whitespace changes on this commit
* Add spacer to better match design
* Update constants for new copy from design
* Replace all engines/groups radio and group/engine selectors
- The designs call for a radio group and a combo box, instead of separate radios and a list of checkboxes
- Also added a spacer to each layout
* Remove util that is no longer needed
- This was used for generating routes that are no longer there
- Also removed unused test file from a component deleted in an earlier PR
- Fix test since spacer was added
* Add missing i18n constant
* Add back missing scoped engine check
* Rename roleId -> roleMappingId
* Use shared constant for “Cancel”
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* New CrawlerOverview component
* CrawlerRouter should use CrawlerOverview in dev mode
* New CrawlerOverviewLogic
* New crawler route
* Display domains data for CrawlerOverview in EuiCode
* Update types
* Clean up tests for Crawler utils
* Better todo commenting for CrawlerOverview tests
* Remove unused div from CrawlerOverview
* Rename CrawlerOverviewLogic.actios.setCrawlerData to onFetchCrawlerData
* Cleaning up CrawlerOverviewLogic
* Cleaning up CrawlerOverviewLogic tests
* Fix CrawlerPolicies capitalization
* Add Loading UX
* Cleaning up afterEachs across Crawler tests
Introduce a new set of SSL configuration settings for Enterprise Search plugin,
allowing users to configure a set of custom certificate authorities and to
control TLS validation mode used for all requests to Enterprise Search.
Co-authored-by: Byron Hulcher <byronhulcher@gmail.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
* New bulk create route for meta engine source engines
* New delete route for meta engine source engines
* Add removeSourceEngine and onSourceEngineRemove to SourceEnginesLogicActions
* New SourceEnginesTable component
* Use new SourceEnginesTable component in SourceEngines view
* Added closeAddSourceEnginesModal and openAddSourceEnginesModal to SourceEnginesLogic
* New AddSourceEnginesModal component
* New AddSourceEnginesButton component
* Add AddSourceEnginesButton and AddSourceEnginesModal to SourceEngines view
* Allow user to select source engines to add
* Add addSourceEngines and onSourceEnginesAdd to SourceEnginesLogic
* Submit new source engines when user saves from inside AddSourceEnginesModal
* Fix failing tests
* fix i18n
* Fix imports
* Use body instead of query params for source engines bulk create endpoint
* Tests for SouceEnginesLogic actions setIndexedEngines and fetchIndexedEngines
* Re-enabling two skipped tests
* Feedback: move source engine APIs to own file
- We generally organize routes/logic etc. by view, and since this is its own view, it can get its own file
* Misc UI polish
Table:
- Add EuiPageContent bordered panel (matches Curations & API logs which is a table in a panel)
- Remove bolding on engine name (matches rest of Kibana UI)
- Remove responsive false (we do want responsive tables in Kibana)
Modal:
- Remove EuiOverlayMask - per recent EUI changes, this now comes baked in with EuiModal
- Change description text to subdued to match other modals (e.g. Curations queries) in Kibana
* Misc i18n/copy tweaks
Modal:
- Add combobox placeholder text
- i18n cancel/save buttons
- inline i18n and change title casing to sentence casing
* Table refactors
- DRY out table columns shared with the main engines tables (title & formatting change slightly from the standalone UI, but this is fine / we should prefer Kibana standardization moving forward)
- Actions column changes
- Give it a name - axe will throw issues for table column missing headings
- Do not make actions a conditional empty array - we should opt to remove the column totally if there is no content present, otherwise screen readers will read out blank cells unnecessarily
- Switch to icons w/ description tooltips to match the other Kibana tables
- Remove unnecessary sorting props (we don't have sorting enabled on any columns)
Tests
- Add describe block for organization
- Add missing coverage for window confirm branch and canManageMetaEngineSourceEngines branch
* Modal test fixes
- Remove unnecessary type casting
- Remove commented out line
- Fix missing onChange function coverage
* Modal: move unmemoized array iterations to Kea selectors
- more performant: kea selectors are memoized
- cleaner/less logic in views
- easier to write unit tests for
+ rename setSelectedEngineNamesToAdd to onAddEnginesSelection
+ remove unused selectors test code
* Modal: Add isLoading UX to submit button + value renames
- isLoading prevents double clicks/dupe events, and also provides a responsive UX hint that something is happening
- Var renames: there's only one modal on the page, being extra specific with the name isn't really necessary. If we ever add more than one to this view it would probably make sense to split up the logic files or do something else. Verbose modal names/states shouldn't necessarily be the answer
* Source Engines view test fixes
- Remove unused mock values/actions
- Move constants to within main describe
- Remove unhappy vs happy path describes - there aren't enough of either scenario to warrant the distinction
- add page actions describe block and fix skipped/mounted test by shallow diving into EuiPageHeader
* [Misc] Single components/index.ts export
For easier group importing
* Move all copy consts/strings to their own i18n constants file
* Refactor recursive fetchEngines fn to shared util
+ update MetaEnginesTableLogic to use new helper/DRY out code
+ write unit tests for just that helper
+ simplify other previous logic checks to just check that the fn was called + add mock
* Tests cleanup
- Move consts into top of describe blocks to match rest of codebase
- Remove logic comments for files that are only sourcing 1 logic file
- Modal:
- shallow is fairly cheap and it's easier / more consistent w/ other tests to start a new wrapper every test
- Logic:
- Remove unnecessarily EnginesLogic mocks
- Remove mount() in beforeEach - it doesn't save us that many extra lines / better to be more consistent when starting tests that mount with values vs not
- mock clearing in beforeEach to match rest of codebase
- describe blocks: split up actions vs listeners, move selectors between the two
- actions: fix tests that are in a describe() but not an it() (incorrect syntax)
- Reducer/value checks: check against entire values obj to check for regressions or untested reducers & be consistent rest of codebase
- listeners - DRY out beforeEach of success vs error paths, combine some tests that are a bit repetitive vs just having multiple assertions
- Logic comments:
- Remove unnecessary comments (if we're not setting a response, it seems clear we're not using it)
- Add extra business logic context explanation as to why we call re-initialize the engine
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
* Set up TruncatedEnginesList component
- Used for listing source engines
- New in Kibana: now links to source engine schema pages for easier schema fixes!
* Add meta engines schema active fields table
* Render meta engine schema conflicts table & warning callout
* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/truncated_engines_list.tsx
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
The unmount callback should have never been in the useEffect keyed off of the pathname. Another issue appeared earlier and I tried to fix it with the now removed conditional, but it should have been removed into it’s own useEffect that only runs when the component is unmounted, not on every route change.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Update SchemaFieldTypeSelect to allow passing any aria props
- We'll specifically be using aria-labelledby in this PR, but theoretically any aria prop should be fine.
* Update AS & WS schema tables to use the type table column heading as an aria-labelledby ID
* Add schema add field modal to page
* Add SchemaCallouts component
* Add empty state
* Add SchemaTable component
- Main update functionality is covered by the shared SchemaFieldTypeSelect component
+ Readd 'Recently added' i18n strings removed in d93e31dd41 (r624038044)
squash with table
* Add final update types button behavior
+ expand tests more explicitly & cleanly
* Fix i18n
just throw my body in the trash
* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.test.tsx
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
* [Misc] Add missing SchemaBaseLogic state check
- Missed this in https://github.com/elastic/kibana/pull/99548
* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/empty_state.tsx
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
* Add hasSchemaErrors selector
* [Cleanup] Remove now-unused setIndexingStatus action
- Was previous used onSuccess after schema was manually updated in the UI, but we now re-fetch all engine detail data instead (to get additional document/boost/relevance tuning info) and no longer need that specific setter
* Add red alert/warning icon to Schema nav link
* [Polish] Fix mobile UI when nav icons are present
* Set up server API routes
* Set up types
* Set up shared/base Schema logic file
- values & actions shared between both default source engine & meta engine pages
* Add default/indexed engine SchemaLogic
* Add MetaEnginesSchemaLogic
- significantly different actions (no updating) & API response from source engines, hence the separate files
+ fix typing issue - without Partial<>, all 4 enum types are expected instead of 1-4
- for some reason this causes an error in a separate a util file, not sure why (Typescript issue?)
* Update Schema & MetaEngineSchema views with loaders
* PR feedback: comment nit
* PR feedback: Remove unnecessary async/awaits
* PR feedback: Simplify loadSchema to be shared by base logic
Much clean, such simple
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Move toolTip type to shared
This is used by Workplace Search as well
* Remove reset mappings button
Will not be used as a part of the User transition
* Remove server route
* Remove unused import
* Remove unused translations
* Move toolTip type to shared
This is used by Workplace Search as well
* Remove reset mappings button
Will not be used as a part of the User transition
* Remove server route
* Remove unused import
* Remove incorrect external icon indicator
davey pls
* Add isLoading state to the Create Engine button
* Add isLoading state to the Create Meta Engine button
* Reorder methods
* Reorder actions interface
* Reorder values interface
* Reorder server details interface
* Add path
* Refactor handleDeleteMapping logic
* REorder and refactor actions
Also changes functions with no return values to properties to match app search
// Before:
foo: () => true
// After
foo: true
* Reorder reducers
* Reorder JSON body props
* Change JSON order in test
Passes locally but fails on CI
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add isTrial selector to LicensingLogic
* Add LicenseCallout component
In order to match the existing design, I opted to use an extra EuiFlexItem for the gap between the button, instead of adding a stylesheet with padding, like the legacy version had. Verified it looks good on mobile as well.
* Add TrialCallout component
* Wire up new callouts
- Only render when the host is set, otherwise, fall back to the Setup Guide callout
- Add some extra padding with a larger spacer to beter match legacy UI
* Refactor for a better test
* Use isEmptyRender API instead of checking for length
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* DRY out callout heading
* Remove grow prop to align button to right
* Update button copy
* Replace EuiButton with EuiButtonTo
* Remove EuiText wrapper on link text
* Better test organization
* Remove unnecessarydivs
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Refactor i18n for link
Also changes link style to underline
* Center-align trial callout
* Rename i18n ID
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Add back and rename translations
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Move SchemaErrorsAccordion to its own folder
+ give it its own export
* Move errors-specific copy to its own file
+ Capitalize ID heading
* [UI polish] Accordion header tweaks
- Fix responsive behavior
- Make Review button more accessible (a within a button is not semantically correct)
- Add <code> markup for field type
* [UI polish] CSS tweaks
- use OOTB EUI CSS classes for borders (see https://elastic.github.io/eui/#/layout/accordion#styled-for-forms)
- tweak spacing
- misc fixes
* [Code polish] Misc cleanup
- Simplify / DRY out props types
- Prefer unique IDs/names over map indexes for React keys
- Improve var names
* Simplify conditional "view" column + misc fixes
- Rename prop to match AS's generateSomePath helpers
- Remove need for itemId - AS should be able to generate its own URL route without it
- Fix accessibility for view column - should be totally hidden to screen readers if not present
- Fix semantics of view link - should be an <a> link not a button
* Update WS's use of SchemaErrorsAccordion
* Move SchemaAddFieldModal to its own folder
+ misc test cleanup - remove unnecessary jest.spyOn in individual tests, it's already in the beforeEach
* i18n fixes
- Move constants to subfolder
- Fix various i18n IDs/var names - modal titles is not a fieldNote title
- Fix an i18n string that should be a FormattedMessage (could have grammar issues otherwise)
- Add missing i18n strings - labels (shared, AS will also use these as column headers) & placeholder
- Import order
* Move formatFieldName util to its own file
- simplify leading/trailing trimming regex
- add unit tests - primarily for documenting regexes & providing examples
* Refactor modal form submission
- See https://elastic.github.io/eui/#/layout/modal#forms-in-a-modal for documentation - form should be submitted via ID & EuiModalFooter form={id}
* Misc props cleanup
- Move optional props to bottom of type list
- Remove unnecessary props (default EUI behavior)
- Data test subj cleanup
- Add missing `disabled` passed prop, add unit test for disableForm prop
* Create new SchemaErrorsCallout component
- will replace IndexingStatus and IndexingStatusErrors
- The concept of "indexing status"/loading no longer really exists, now that schema updates instantly
* Update views to use new SchemaErrorsCallout
- instead of IndexingStatus component
* Remove remaining concepts of an indexing job/loading progress
+ remove /status reindex_job routes, since we no longer need to poll for indexing status
* Remove IndexingStatus components
* Update i18n
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Refactor SchemaExistingField to just the select component
- Removes unnecessary CSS, conditionals, etc. (letting AS & WS manage their own table/row views & styling)
+ Move to its own component folder for organization
* Update WS to use new SchemaFieldTypeSelect component
* Update SchemaAddFieldModal to dogfood SchemaFieldTypeSelect component
- DRY's out fieldTypeSelectOptions to only having to exist within SchemaFieldTypeSelect
* i18n cleanup
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Set up basic Schema skeleton views+router
* Update engine router + nav with new schema routes
* Breadcrumbs
* PR feedback: derpin
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
* reindexJobId pls
* my life is in shambles
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
* Move schema-specific shared types to shared/schema folder
- This helps provide more context when people are reaching into shared types grab items, and keeps concepts/components together
+ minor comment updates
* Convert interfaces to Records where applicable
- see https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeystype
* [Opinionated] Change schema types to enums and DRY out field_types constants
- in favor of using SchemaType enum keys and iterating
- Not 100% sure about this as the internet seems to think string unions are still pretty good, but since we're using const references for the types anyway, it seems like the use case fits
* Update files to use new schema type enum
* Update all remaining files (basic imports)
* [Misc] DRY out FieldCoercionErrors type
+ change to record
- AS will also use this type
* Add SynonymsLogic create/update/delete actions & modal state
* [Setup] Update MultiInputRows to work with a ModalFooter submit + allow hiding submit button
* Add SynonymModal component
* Update existing views with modal behavior
* PR feedback: Fix MultiInputRows to not render a form component for Relevance Tuning / onChange-only components
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Remove references to `/alpha` route
* Delete all files and references to them for the existing MVP
* Remove conditional MVP Personal dashboard link
* Remove extra Route component
* Wrap header actions in EuiHeaderLinks for mobile
This is an add-on and should be reviewed with white space changes hidden.
* Various route URL updates
- Snake case Kibana routes
- Remove unnecessary extra subdirectory pathing
* Fix missing ability check
- There isn't currently a role that would fail the check, but since the nav link is wrapped in the role, we might as well copy it and look at our role checks in the 8.0 refactor
* fix test
* Add route to get source engines for meta engines
* New empty SourceEngines component
* Add SourceEngines to EngineRouter
* New SourceEnginesLogic file
* Hook up SourceEngines component to SourceEnginesLogic
* Update EngineNav link to manage source engines to point internally
* PR Feedback:
- Copy fixes
- Markup improvements
- Spleling erors
- Test improvements
* Move EnginesAPIResponse to shared types file
* Use existing mock for EngineLogic
* setSourceEngines -> onSourceEnginesFetch
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix ErrorConnecting state to be caught/returned earlier
- This fixes AppSearch crashing when in an error connecting state and missing props required for AppSearchConfigured
- This also fixes the error connecting page not showing up for engine routes
- The SetupGuide route was moved to a top-level route, so that all views always have access to it no matter what
* [Extra] Simplify engine route/path
- Move engine/route path under the main <Layout>
- Change <AppSearchNav> behavior to pass subNavs based on route matches, rather than requiring a prop passed to it
+ add useRouteMatch mock
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Workplace Search] Redirect to correct route for form created sources
* Remove unnecessary passing of query params
This is no longer needed with the new route
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Empty State in Curations
* Adds Empty State to Documents View
* Updates Empty State in Engines Overview
* Updates Relevance Tuning empty state
* Updates the Result Settings empty state
* Updating test files.
* Display the empty state in the table only
* Copy changes
Small copy changes to bring it more inline with Elastic guidelines
* Update api_logs_table test
* Copy adjustments
* Fixing failing type check
* Copy adjustments on credentials empty state
* Copy changes on meta engines table
* Removes emptyState__prompt class
* Removes emptyState__prompt class
Forgot to save a file
* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/components/empty_state.tsx
* Adding the popout icon to docs links
* Removes the need for the engineIcon class
Also allows EuiIcon props to be passed to metaEngineIcon
* Updates meta engine empty state button to docs link
* Adds a separate constant for the empty meta engine button
* Meta Engines empty state refactor
- pull it out to its own component
- simplify tests
- simplify constants, they're only in 1 location so prob don't need to be in DRY'd out
- fix some i18n IDs
* Curations refactor
* Documents empty state refactor
- create components/ folder, move document creation button to there (feels like it belongs)
- move empty state there
- remove other empty state prompt from SearchExperienceContent??? Not sure why that wasn't showing up, but fixed tests/returns
* Relevance Tuning refactor
- create components/ folder
- move empty state + shared boost icon & value badge to it
- write test for missing value badge coverage
MISC
- Fix loading screen to an early return (matches UI of all other views)
- Remove extra EuiSpacer in layout (matches UI of all other views)
Sorry for the extra noise in your PR Davey!
* Result Settings refactor
- move empty state to its own component
- fix broken .html.html link
* Fix missing popout icon on documentation button link
* EnginesOverview cleanup
- Remove unnecessary CSS
- fix responsive behavior of icons
- standardize responsive behavior of create button actions
- standardize spacing between content headers & tables
- Tweak gap between 2 tables
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
* Refactor main component
* Refactor faux view button
The original design called for a button-looking component on the accordion header so it looks clickable to reveal the error underneath. Using a button element caused the console to error because the entire header is a button and this is a child. Adding an href fixes the error and allows for styling as a button
* Use empty button rather than styles components for view button
* Remove extra classNames and fix layout to stretch cells
* Add stylesheet
Without the width: 100% on .euiIEFlexWrapFix, the header table does not stretch across the screen. Couldn’t find another way around this and happy to take suggestions of a better idea.
* Add prop to prevent line break on IDs
Existing implementation was causing multi-character IDs to break to a new line. So for 12, its was:
1
2
* Render flash message when server sends back an error
* Fetch data on all route changes
This produced a bug where the nav and loading states were triggered between route changes. Added conditional to prevent resetting between in-source changes
* Remove unknown allows from enterprisesearch routes
It is a best practice to avoid `unknowns: allow` in request
body validations.
Usage of `unknowns: allow` in the App Search plugin has primarily
been to avoid creating full validation schemas, as they can often
be complex.
Rather than have a half-baked validation that uses `unknowns: allow`,
we have the option to skip parsing and validating a JSON body entirely,
and simply pass it through "as-is" to the enterprise_search server
for validation.
* Move to helper
* Swap comment block style
* PR feedback
* Update x-pack/plugins/enterprise_search/server/lib/route_config_helpers.test.ts
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Update x-pack/plugins/enterprise_search/server/lib/route_config_helpers.test.ts
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Update x-pack/plugins/enterprise_search/server/lib/route_config_helpers.ts
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Update x-pack/plugins/enterprise_search/server/lib/enterprise_search_request_handler.ts
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Better TS
* Change to TS validations
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Add barebones Synonyms view
* Update Synonyms route+nav link
* Add server API routes
- will be used in upcoming PRs, may change
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix private source docs link
* Add a whole bunch of missed shadow/background changes to panels
* Add success messages to Role mappings
* Fix bug where sourceId still in memory
If you were on an org source and then clicked to view your Personal dashboard, the subnav was visible because the source Id was still in the logic file. This resets it on unmount.
As a part of this fix, dataLoading was set to true on reset. Because of this, some places that were resettings state, but not fetching new data, were left in a loading state. This commit also removes the redundant `resetSourceState` calls around the components that don’t fetch a fresh copy of the source data
* Add new reusable MultiInputRows component
- basically the CurationQuery component, but with a generic values var & allows passing in custom text for every string
* Update CurationQueries with MultiInputRows
* Update MultiInputRows to support on change behavior
- for upcoming Relevance Tuning usage
* Update Relevance Tuning value boost form to use new component
- relevance_tuning_form.test.tsx fix: was getting test errors with mount(), so I switched to shallow()
* Change submitOnChange to onChange fn
- more flexible - allows for either an onSubmit or onChange, or even potentially both
* Convert MultiInputRowsLogic to keyed Kea logic
- so that we can have multiple instances on the same page - primarily the value boosts use case
* Update LogicMounter helper & tests to handle keyed logic w/ props
* [Misc] LogicMounter helper - fix typing, perf
- Use Kea's types instead of trying to rewrite my own LogicFile
- Add an early return for tests that pass `{}` to values as well for performance
* PR feedback: Change values prop to initialValues
+ bonus - add a fallback for initially empty components
+ add a test to check that the logic was mounted correctly
* PR feedback: Remove useRef/on mount onChange catch for now
- We don't currently need the extra catch for any live components, and it's confusing
* Move redirect logic into logic file
* Add logic to prevent prompt from triggering when changing tabs
The idea here is to set a boolean flag that sends false for unsavedChanges when switching between tabs and then sets it back after a successful tab change
* Keep sidebar nav item active for both tabs
* Add tests
* Update Workplace Search nav to align with App Search
* Add constants to shared
* [App Search] Use shared constants
* [Workplace Search] Add breadcrumbs to Role mappings
* Enable shouldShowActiveForSubroutes
* Pull out columns to be re-used for MetaEnginesTable
* Add route to get source engines for meta engines
* New MetaEnginesTableLogic
* New MetaEnginesTable component
* Remove isMeta prop from EnginesTable
* Swap EnginesTable with MetaEnginesTable in EnginesOverview for meta engines
* Missing test for MetaEnginesTableNameColumnContent
* Created new /app_search/components/engines/components/tables directory
* Moving columns to shared_columns.tsx file
* Updates to MetaEnginesTableExpandedRow and MetaEnginesTableNameColumnContent
* Fixes to EnginesTable, MetaEnginesTable, MetaEnginesTableLogic
* Remove flatten import
* Fix i18n
* PR Feedback
* DRY out shared engine link helpers
* DRY out shared ACTIONS_COLUMN
* Tests: DRY out shared columns/props tests
+ update to account for 2 previous DRY commits (e.g. deleteEngine mock)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
* Update shared button color and panel shading
* Vertically align table cells to top
* [App Search] Update panels to have backgrounds not borders
* [Workplace Search] Update panels to have backgrounds not borders
* re-align last cell to right
Accidentally deleted it refactoring
* Conditionally have border for App Search
Requested to remove for empty state
* Add missing i18n
Oops
* Change button color
* Fix custom source created screen
* Add better empty state to groups
* Align toggle to right side of table
* Update design for security page
* Update ‘How to add’ view
* Update config completed view
* Update add source connect page
* Remove padding on how to add card
Original had no padding.
* CSS cleanup
* Refactor ResultActions component + DRY out link behavior
- Create new separate ResultActions component
- Pass actions array through to header and have haeder in charge of conditional visibility / FlexItem wrapper (this matches the other header items)
- shouldLinkToDetailPage: instead of generating custom JSX, just have it be a standard action and append it to the actions array
Link behavior:
- ResultHeaderItem - switch to EuiLinkTo, no need for extra wrapper
- ResultHeader - DRY out unnecessary extra path generation - instead pass down a conditional documentLink instead of a bool
* PR feedback: Fix test name
* PR feedback: unshift
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Workplace Search: Remove redundant Overview breadcrumb from Sources
There is "Source name" breadcrumb that is used for Overview page
* App Search: remove "Overview" breadcrumb from Engine page
So instead of `engines / national-parks-demo / overview (greyed)`
we will have just
`engines / national-parks-demo (greyed)`
* App Search: Add "Engines" breadcrumb to the main App Search page
This needs to be added to 3 states of the page: Normal, Empty and Loading
* Fix failing WS test
* App Search: DRY out SetPageChrome declaration by putting it in header
* Fix failed test "ShallowWrapper::dive() can only be called on components"
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Update our EUI breadcrumb helper to skip generating links for the last breadcrumb in the list
* Fix useEuiBreadcrumbs tests
- add a describe block to make it clear we're testing link behavior in non-last breadcrumbs
- add a helper that automatically adds a last breadcrumb so that link generation still works
* Add comment/note as to why I didn't add last-breadcrumb-specific logic to useGenerateBreadcrumbs
* Revert change to wrap setContext in useEffect
A recommendation was made to wrap the setContext call in a previous PR, which lets the app know if the context is org or account, in a useEffect call, for potential performance reasons. Unfortunately, this causes the lifecycle to change so that changing routes from org to personal dashboard does not register the change in time. This commit changes it back to a working state.
* Add constants and routes for Account nav
* Add AccountHeader component
* Add header to layout and fix height
The main layout stylesheet, https://github.com/elastic/kibana/blob/master/x-pack/plugins/enterprise_search/public/applications/shared/layout/layout.scss gives a static height that includes the main Kibana navigation. The height with the account nav only is added to the existing privateSourcesLayout css class
* Refactor test
For both OneDrive and SharePoint we define a service_type that has an
underscore in the middle (one_drive and share_point). This fixes the
route definitions so sources of these connector types can be
reauthenticated.
* Set up helper for showing JSON request/response bodies
* Set up mock API log obj for tests to use
* Add ApiLogLogic file for flyout handling
* Add ApiLogFlyout component
* Update views to load flyout
* Update table to open flyout
* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/api_logs/utils.ts
* PR feedback: comments
Co-authored-by: Byron Hulcher <byronhulcher@gmail.com>
Co-authored-by: Byron Hulcher <byronhulcher@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Hide chrome for Workplace Search by default
The Workplace Search Personal dashboard needs the chrome hidden. We hide it globally here first to prevent a flash of chrome on the Personal dashboard and unhide it for admin routes, which will be in a future commit
* Add core.chrome.setIsVisible to KibanaLogic
* Toggle chrome visibility for Workplace Search
* Add test
* Refactor to set context and chrome when pathname changes
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix route for private deferated source summary
* Make schema types nullable
Federated sources don’t have counts and the server returns null so our routes have to expect that sometimes these values will be null
* Add SourceSubNav to Personal dashboard
We are able to leverage the existing component with a couple a small change; the existing componet is a subnav in the larger Enterprise Search shared navigation component and does not include its styles. This caused the list items to render with bullet points next to them. Adding this class and displaying the nav items as block elements fixes this issue.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This was causing console errors.
I factored out the column headers to their own component, and moved
all table rows to be under a tbody. This alleviates the console
warnings.
* Add toasts to FlashMessagesLogic
+ Tests cleanup:
- Group actions by their reducer blocks (since flashMessages has such specific logic) - recommend viewing with whitespace changes off for this
- Do not reset context between each test, but instead by mount(), which allows tests to maintain state between adding/removing/resetting
- Remove '()' from test names (feedback from previous PRs)
* Add toast message helpers
+ refactor FLASH_MESSAGE_TYPES to constants, so that both callouts & toasts can use it effectively
* Update FlashMessages to display toasts as well as callouts
- This means we can automatically use toasts alongside callouts in all views that already have FlashMessages
+ a11y enhancement! update callouts to also announce new messages to screenreaders
* [Example] Update ApiLogsLogic to flash an error toast on poll
+ update copy to better match EUI guidelines (shorter)
* Fix test caused by new FlashMessages structure
* PR suggestion - destructure
Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
* PR feedback: implicit return
* Fix color types
- adding our own string enum fixes the typescript errors that both EuiCallout & EuiToast emit when passing color props to the base EUI types
* PR feedback: Update flashToast API to match callout helper API
- accepts a string title with optional args, creates a unique ID automatically if missing
Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
* Remove kebabCase
Kibana routes are snake case, which matches the existing serviceType, so this is no longer needed
* Fix route segment
The word reauthenticate is not hyphenated
* Fix all misspelling of reauthenticate
Renames files too
* Enterprise Search eslint import order rule fix
- mocks in current folder should be grouped with mocks from parent folders
* Run --fix/update instances of importing ./__mocks__
* Add hasBorder to all EuiPageContent panels
* EngineCreation: switch EuiPageBody to EuiPageContent
+ add hasBorder
* Credentials: update EuiPanels w/ hasBorder
* ApiCodeExample: switch to hasBorder
* DataPanel: update to take & pass hasBorder prop
* Analytics & EngineOverview: use hasBorder
* Relevance Tuning: update EuiPanels
- switch to hasBorder for top level panels
- switch to color="subdued" for boost accordion
- tweak padding of boost panel
- CSS cleanup
* Role Mappings: switch to hasBorder
+ remove unused class - `euiPanel--disabled` was not applying any styles
+ remove random 'export' string
* Sample engine CTA: switch to subdued panel
+ fix sizing - when loading button pops in, it was causing text to overflow
* add base config for all the TS projects
* all the project use new tsconfig.project.json
* compile test files in the high-level tsconfig.json
* fix TS error in maps plugin
* fix TS error in infra plugin
* exclude mote test and test until folders
* uptime. do not import test code within prod code
* expressions. do not import test code within prod code
* data: export mocks from high level folder
* task_manager: comply with es client typings
* infra: remove unused enzyme_helpers
* check_ts_project requires "include" key
* ts_check should handle parent configs
* all ts configs should extend base one
* exclude test folders from plugins
* update patterns to fix ts_check errors
* Apply suggestions from code review
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* uptime: MountWithReduxProvider to test helpers
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Set up API route
* Set up API types
* Set up date util needed by filters dates
* Add ApiLogsLogic
* Update ApiLogs and EngineOverview views with polling behavior
* Add API type notes - maybe serves as a TODO to clean up our API data some day
* Added new onboarding complete route for App Search
* Allow responses without JSON bodies in Enterprise Search
* New SampleEngineCreationCtaLogic
* New SampleEngineCreationCta component
* Add SampleEngineCreationCTA to engines EmptyState
* Improve SampleEngineCreationCta
* Fix spelling error in Enterprise Search request handler test
* Improve SampleEngineCreationCtaLogic
* Fix types
* Fix tests after origin/master merge
* Turns out I 'fixed' my tests by removing this test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add interface
The component was already passing the props the logic file needed, they just aren’t listed in the interface
* Pass props to logic file
Also destructures from props to prevent collision with the local logic values that are repopulated when data is fetched.
* Update logic file to use props for default values
* Fix test and use spy
* Remove resetContext
No longer needed!
* DRY out repeated button/table/modal actions copy to a shared file
* DRY out 'Edit' copy
* DRY out 'Delete' copy
* DRY out 'Save' copy
* DRY out 'Cancel' copy
* DRY out 'Continue' copy
* DRY out 'Close' copy
* DRY out 'Manage' copy
* DRY out 'Update' copy
* [WS] DRY repeated 'Update'/'Save'/'Cancel' copy
* [AS] DRY out 'Restore defaults' button
- used on 2 pages so far, and will also be used on result settings
* PR feedback: Add _BUTTON_LABEL specificity
* Rework panels to subdued style
* Fix button when source has been onboarded
* Update content_section test for EuiSpacer
* Update content_section test for EuiSpacer Length
* Lint fix for onboarding_card
* Remove spacer size due to default
Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
* Remove test line for Spacer now that size=default
Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Update EuiPageHeaders with basic titles
* Update engine creation views
- meta engine - move to description
+ misc fix - non-heading EuiTitles that do not match the standalone UI
* Update EuiPageHeaders with simpler actions
* Update Documents page header
+ test reorg - move DocumentCreationButton tests to its own test block
* Update EnginesOverviewHeader (+ refactors)
- Switch from FormattedMessage to i18n to match rest of repo
- Switch to eslint-disbable instead of doing a buttonProps workaround (this will get deleted anyway post-migration)
* whoops
Currently we instantiate the Workplace Search app with server props passed in from the server on initial page load. This data includes the organization name. In our settings section, we poll the server to get update information, but once the data is change, the global state does not get updated on a route change. This is only a problem in the case where a user has changed their org name and returns to the overview page before reloading the page. When this happens, the onboarding step asking the user to change thier org name is still visible.
* Fix typo
This was mis-copied from ent-search
* No longer store preContentSourceId in query param
In ent-search, we had the Rails server redirect with this param. Now, it is contained in the server response as JSON and is persisted in the logic file
* Pass query params to SourceAdded component
The entire state is stored in query params now and must be passed when doing a manual redirect
* Redirect to config view if config needed
* Don’t redirect if the config has already been completed
This was really tricky and could use a refactor in the future, perhaps. The issue is that the persisted query params will contain the `preContentSourceId` even after the config has been completed. This caused the UI to attempt to navigate back to the config screen after it had been completed. This sets a prop once that has been completed and bypasses the redirect.
* Use correct key to determine if config needed
* Update tests
* LogRetentionCallout - add ability check to API call
- on non-admin users, we're otherwise getting a forbidden error
- remove now-unnecessary canManageLogSettings wrapping check around the link CTA, since the entire callout is now essentially gated behind the check
* LogRententionTooltip - add ability check to API call
- on non-admin users, we're otherwise getting a forbidden error
- tests now require a ...values spread for myRole
* [MISC] Refactor previous isLogRetentionUpdating check in favor of a Kea breakpoint
- both dedupe calls for the commented use case, but breakpoint feels simpler & more Kea-y
* PR feedback: Increase breakpoint speed
* [Misc] Update trash icon color
- should be danger/red to match other tables in Kibana
* Engine table - fix incorrect conditional around when users can delete engines
- The check for that should be around Dev/Editor/Analyst roles, not around whether the account has a platinum license
- Tests - DRY out reset mock
- ideally would be in a beforeEach, but mount/beforeAll perf makes that difficult
* Create engine button - wrap with canManageEngines check
- prevents Dev/Editor/Analyst roles from hitting a 404 page
- test cleanup - use describe blocks to convey conditional branching, combine 2 tests into 1
* Empty engines prompt - add canManageEngines check
+ switch from FormattedMessage to i18n (this view was created a long time ago before we settled on generally preferring i18n)
+ provide a more helpful body text when the user cannot create engines
* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.test.tsx
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
* Move source added route to top-level index component
* Use state passed back from oAuth app to determine context
The previous tests weren’t actually using this state so they have been updated with actual state data for proper testing
* Remove validaition of ID property in route body
The ID is inferred from the param in the URL. This was fixed in the logic file but the server route was never updated
* Add RoleMappings component
- ROLE_MAPPINGS_TITLE was moved to a shared constant in an earlier PR
- Also removing redundant exports of interface
* Add RoleMapping component
- Also removing redundant export of interface from AppLogic
* Add RoleMappingsRouter
ROLE_MAPPINGS_TITLE was moved to a shared constant in an earlier PR
# Conflicts:
# x-pack/plugins/enterprise_search/public/applications/app_search/components/role_mappings/index.ts
* Add route and update link in navigation
* Remove unused translations
* Change casing
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Change casing
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Change casing
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Add ability test
* Refactor conditional constants
* Refactor role type constants
* Remove EuiPageContent
* Refactor action mocks
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
A recent refactor of content source jobs models unintentionally
changed this API. This change restores the functionality of the
re-authentication "Fix" link.
* Set up curation search server route
- not really sure which API endpoint to use, hedging my bets
* Set up AddResultLogic
- fairly simple, mostly concerned with flyout behavior & search query
- could likely be reused (or replaced with??) query tester logic in the future
* Add main AddResultFlyout component
- with custom isPromoted / isHidden logic & actions
* Update AddResultButton to open flyout
* Update Curation page to render the flyout
* PR feedback: reset search query on flyout re-open
* Set up promoted & hidden documents logic
* Set up result utility for converting CurationResult to Result
* Set up AddResultButton in documents sections
- not hooked up to anything right now, but will be in the next PR
* Add HiddenDocuments section
* Add PromotedDocuments section w/ draggable results
* Update OrganicDocuments results with promote/hide actions
* Add the Restore Defaults button+logic
* PR feedback: key ID
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This PR addresses an issue where the confirmation modal when removing a content source connector was brokedn. The issue was that the component was not passed the props to render correctly
* Replace custom margin style with EuiFlexGroup gutter
* Replace custom padding style with EuiFlexGroup gutter
* Remove custom wrapper around Loading on Overview page (alpha)
* Replace custom range value output with EuiRange's showInput prop
* Remove custom style
I'll refer the correct handling of this to design pass
* Remove "euiPanel--inset" className, as it doesn't do anything in Amsterdam theme
* Remove unused className `euiPanel--noShadow`
We're already using hasShadow={false} prop that does the same
* Remove `euiPanel--outline` className, as it doesn't do anything in Amsterdam theme
* Inline classNames declaration with the goal to remove them later
They don't do anything in Amsterdam theme, but I'm not removing them to keep context for design pass.
* Remove `eui-textNoWrap` className from buttons, as it's already included in button styles
* Remove classNames with no styles attached
* Replace custom padding in content_section with EuiSpacer
* Remove source-row styles
Most of the classNames were redundant and not needed anymore. The ones that were actually used were either replaced with EUI props or deleted, so we could apply EUI styles during design pass.
* Replace source_icon styles with EUI components and props
* Replace source-card icon styles with EUI prop
* Remove className declarations with no styles attached to classes
* Fix tests
* Increase space between source overview panels
* Use smaller icons on source prioritization and connectors pages
* Invert SourceIcon default size and size provided via props
The default size was "xxl", now it's "m". "m" size is default in EUI, so it's more consistent.
* Get rid of as horizontal spacer
* Add engines mock and fix mock role mapping
The original asRoleMapping was merely for a smoke test in the shared component. Refactored to work better in App Search component
* Add RoleMappingsLogic
* Fix test description
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
* Fix test description
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
* Add flash messages when creating, updating or deleting
* Add path and resetState calls
Refactoring the tests showed me that some parts of the state weren’t being reset.
* Refactor handleAuthProviderChange logic
I some how got the test coverage at 100% with my wrong way of doing tests before (scary). When I fixed it I noticed that noting I could do would trigger the fallback of just returning the `[ANY_AUTH_PROVIDER]` array. After talking with Constance, we could not come up with a way to trigger it either, given the conditions.
She had suggested removing the first return statement but that caused an empty array being returned sometimes.
Ultimately, I was able to get it working and covered with these changes.
* Refactor tests per PR feedback
The places where `role: 'superuser’` was deleted in the listeners was a side effect of using `setRoleMappingData` and not `mount`
* Add back deleted assertion
* Copy nit
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Update Result component to render a custom drag handle
* Update Result library with a draggable example
- note: this doesn't actually handle reorder logic, it's purely a UI/UX example
* Update CurationResult to pass dragHandleProps through to Result
* Fix incorrect copy
* Fix incorrect copy
* Update Box icon to match other icon sizes
* Add missing spacer on connector configuration screen
* Add missing spacer to Manage Source modal on Group page
* Remove shadows on Security page
* Align the last column content in tables to the right
* Fix colors on save custom source page
"Secondary" is greenish in new version is EUI, we need "subdued"
* Fix link to personal dashboard
* Add missing breadcrumbs to Security and Settings pages
* Deduplicate Security tests on Basic and Platinum licenses
* Prevent range slider from shifting to left when priority is 10
When priority is 10, the number become wider and it pushes the range slider to the left. This commit is a quick fix for that. We could improve it later by adding a proper input.
* Fix i18n duplicate ID
* Revert "Fix link to personal dashboard"
This reverts commit 5fc3ad2937.
* Update CurationLogic to handle queries management
- updating the active query
- adding queriesLoading and organicDocumentsLoading state
- clean up / refactor updateCurations slightly - instead of taking a {queries} param, we should opt for a separate updateQueries action and storing a queries state
- this allows us to more granularly hook into activeQuery when queries is updated without the current activeQuery and correct for that
* Add ActiveQuerySelect component
- used for switching the currently active query
* Add ManageQueriesModal component
- used for editing/adding/removing the queries a curation manages
- primarily a light wrapper around the existing reusable CurationQueries component (also used in the create new curation view)
* Add OrganicDocuments and CurationResult components
* Update Curation view with new components
+ update breadcrumb to pull from queries instead of curation.queries, mostly for consistency w/ other usages & slightly faster responsiveness when updating queries
* Fix unnecessary import
* Meeting feedback: organic documents title copy tweak
* PR feedback - test assertion
* Add server side API routes & update types expected from server
* Create CurationLogic with GET and PUT listeners
- PUT is mostly placeholder for now, we'll actually use it later in future Curation PRs
* Create Curation view component & page load effect
* Update CurationsRouter to use new view + remove add_result route
- Per design discussion w/ Davey, we'll be removing the standalone add result route in favor of an in-page flyout
* Add custom actions prop to Result component
- will be used by upcoming Curations work to promote and hide documents
* Add Result custom actions to library
+ [misc] export main Result component from index
* Fix test suite name
https://github.com/elastic/kibana/pull/94038/files#r590545670
* Move types out of AttributeSelector component to shared types
* Fix random typo
* Add routes and path generator util
* Move constants to shared
* Fix types in mock
* Fix routes
* Fix failing tests