-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Implement saved queries and filters #39140
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
Merged
Merged
Changes from all commits
Commits
Show all changes
238 commits
Select commit
Hold shift + click to select a range
a3f2ca8
Adds saved query to data mappings
TinaHeiligers d934765
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs e76067c
Loading saved query in discover
Bargs 188551e
Create SavedQuery type and add it as a prop to the SearchBar
Bargs aebd5bd
adds conditional for filters and timefilters
TinaHeiligers fd297f0
Adds append to suggestions component
TinaHeiligers 9dfc92c
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 39ee55e
hard codes styling and saved query title
TinaHeiligers e960475
Pass SavedQuery down through the SearchBar components and add
Bargs a08ffec
Add ability to save current query. Needs some bug fixes and polish.
Bargs e85211b
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 0fc7a12
re-add save button
Bargs 239c446
wrap title in flex item
Bargs cab055a
Fix apparent bug in getDerviedStateFromProps. Query should only update
Bargs 3f2e95a
Move modal into its own component and use it in the SearchBar
Bargs 99194ca
Check explicitly for undefined
Bargs 9d1af7f
Move state caching to SearchBar
Bargs 0fa0a10
Close modal on query save success
Bargs 334dd10
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 62225dc
changed savedQuery type to allow for undefined
TinaHeiligers 453e8b8
preserves saved query on state after submit
TinaHeiligers 2c399eb
Display success and error messages on save
Bargs 3ce41d7
Link to saved objects management page
Bargs 4be53f7
Add ability to update an existing saved query
Bargs 5455272
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 45e03f8
Loads saved queries into suggestions
TinaHeiligers 75d240f
add description to saved query suggestion
Bargs 0dc4d90
Add ability to load saved queries from autocomplete
Bargs 32f2654
Adds save as new query functionality
TinaHeiligers 0157959
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 3f9e88f
Fix isDirty and add Save As New when not dirty
Bargs 0f13705
Add saved query management popover
Bargs 841aff0
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers f7279a1
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers afcaa35
WIP adding saved queries to the dashboard app
TinaHeiligers 2b566a1
Support saved queries in Dashboard
Bargs 5f40fbf
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs 36d1e2f
Add back changes lost in merge
Bargs 103c082
add saved query to visualize
Bargs 5bb384c
Update Discover to be consistent with Dashboard and Visualize
Bargs 8b57318
Update app permissions to include saved query access
Bargs 239f3b4
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs a8fb548
Fixes types
TinaHeiligers 2135698
Start tests for saved query service
Bargs c320f79
Adds 'undefined' as a type to SavedObjectsAttributes
TinaHeiligers f819778
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers f46c70c
Adds Error thrown test
TinaHeiligers 2af20f6
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers d3cecb3
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers b786886
Updates QueryBar and QueryBarInput snapshots
TinaHeiligers 1406c66
Fixes saved searches icon in test
TinaHeiligers 21b3d62
Replaces query-bar with search-bar
TinaHeiligers aef3d4b
Changes search icon from search to discoverApp for saved search integ…
TinaHeiligers cb43322
changes icon from search to discoverApp for saved_search integration …
TinaHeiligers c3e3504
Replaces the query-bar with the search-bar, hiding the filters from t…
TinaHeiligers 7fd8453
Merge branch 'saved_filters_maps_app' into saved_filters
TinaHeiligers 86cd42e
Changes 'search' icon to 'discoverApp' for saved searches missed before
TinaHeiligers c13f764
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 45b1cc7
removes commented out code, undoes comma deletion in kibana/index.js
TinaHeiligers 75c000d
Adds Search Bar back
TinaHeiligers 22d0273
Changes QueryBar to SearchBar in the FilterEditor, adds a customSubmi…
TinaHeiligers c4e8751
Adds saved_object type query to test expectation array
TinaHeiligers c2bdc0a
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 74aacc8
Allows Saved Queries to be saved and edited in Maps
TinaHeiligers 6b1ba4f
Deletes unused Eui component from saved_query_row
TinaHeiligers d1d563b
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers d2d62ee
Fixes maps nav bar to handle saved queries
TinaHeiligers 3e41043
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 2beb927
Loads a saved query into the layer filter query bar, allows saving ch…
TinaHeiligers 1fae81b
Layer filter query search bar closes after selecting and saving a sav…
TinaHeiligers 52a49b7
Changes QueryBar to SearchBar in maps layer_panel join_editor where_e…
TinaHeiligers 4877f48
Merge branch 'saved_filters' of github.com:TinaHeiligers/kibana into …
TinaHeiligers 361d1e2
Enables saving queries, saving changes to saved queries, using saved …
TinaHeiligers d5a152b
Enables saved queries to be used, created and modified in the where c…
TinaHeiligers 663586b
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 36b0bd3
fixes setting time filter in map_controller
TinaHeiligers ecb8925
Conditionally shows filters and time filter option in the save query …
TinaHeiligers ad667b3
fixes show filter options type
TinaHeiligers 8bd9468
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers f86b201
corrects routing to saved objects
TinaHeiligers 62da75a
typing
TinaHeiligers d16da8b
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 5218ab5
begins work on the clear saved query functionality
TinaHeiligers 9de64a6
fixes onClose type
TinaHeiligers d8ef743
updates query_bar snapshot
TinaHeiligers ba78c4b
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 448dcfa
implements close savedQuery in Discover
TinaHeiligers aecfc18
Updates query_bar snapshot
TinaHeiligers 6242426
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 703c38e
Support close button in Visualize
Bargs 47cd2f3
Support close button in Dashboard
Bargs dedca56
Support close button in Maps main search bar
Bargs 6ee50e4
Make onClearSavedQuery handler optional
Bargs 3486390
Add privileges for saved queries if user has access to maps
Bargs e1e15a5
Fix issue where watcher was overriding saved search that had just bee…
Bargs 13e4c6f
Conditionally show query saving UI based on uiCapabilities
Bargs d954da0
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers e60c63f
Adds security around saved queries to dashboard
TinaHeiligers f6707e8
Adds security aroung saved queries to visualize
TinaHeiligers 86c8f11
Adds security around saved queries to main map query bar with date pi…
TinaHeiligers 261e107
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 361e8af
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs 7856d93
Use the ID as a key if the suggestion type is savedQuery
Bargs 3f170c3
Tighten type definition for prepend prop
Bargs f65efd9
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs a3845c6
Add security functional tests for the all permissions scenario
Bargs 52dd391
Add security functional tests for the read only scenario
Bargs 1eace53
Fixes suggestions and suggestion component jest tests
TinaHeiligers 0fd4309
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers ccb0802
Adds security tests for saved queries to the dashboard functional tests
TinaHeiligers bf06d9f
Adds security tests for saved queries to the visualize functional tests
TinaHeiligers db622a9
Create saved query manager component
Bargs 51cf96e
Add Saved Query links to the management popover
Bargs e6fc105
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 309b5ad
Adds paragraph content to the saved query manager when there are no s…
TinaHeiligers d3353b5
Adds all buttons and an icon for deleting a saved query. The buttons …
TinaHeiligers ae1697a
Button grouping
TinaHeiligers 6a5abff
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs 2e1f903
Add files missed in merge commit
Bargs f972fa3
Fix infinite loop and refresh saved query list when management popover
Bargs 7ae43bb
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs 564339e
Remove saved queries from maps for now
Bargs de63765
Correct spacing between query manager buttons
Bargs c5aaa30
Hook up delete button in saved query manager
Bargs b44c416
resolved type error, adds query to expectInvalidTypeSpecified array
TinaHeiligers bc6a00e
deletes unused translations
TinaHeiligers e99bfcf
Adds jest tests for saved_query_service
TinaHeiligers ce480c6
Adds description to the saved search popover on save
TinaHeiligers 5856695
fixes unused translations
TinaHeiligers 5ed067a
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs 9685145
Remove saved query UI from autocomplete suggestions
Bargs 6e9deef
Use the same class the datepicker uses to make the prepend element the
Bargs 644c410
always show save as new when a saved query is loaded
Bargs 9aba13c
Merge remote-tracking branch 'upstream/saved_filters' into saved_filters
Bargs d20c2f8
Fix search bar jest tests
Bargs e196c8a
fix functional test
Bargs b8fff34
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs ad610ee
Include filters by default in saved queries
Bargs e41e85f
Don't allow saved queries with duplicate titles
Bargs c12d5f7
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 99df809
Adds pagination to the saved query manager
TinaHeiligers 00ecc89
changes page count to 50
TinaHeiligers c20f97f
Use overflow hidden so native scroll bar doesn't appear
Bargs 5f71f65
Add saved query deletion confirmation modal
Bargs 8634211
fix "no saved queries" copy and internationalize it
Bargs 77142c6
add aria-labeledby to saved query list so users know what the list is…
Bargs a7b4421
Add extra description of open button for screen reader
Bargs d89d75e
add aria-label to delete button
Bargs 1f2d98a
sentence case
Bargs 1785437
Add aria-label to the save as new button
Bargs dc3c7b6
add aria-label to save changes button
Bargs 1916608
Add aria-label to clear button
Bargs a2a5a14
Add aria-label to save button
Bargs dba23c0
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs 9c032e9
Translate static text
Bargs ae5ecff
translate query bar message we noticed was static
Bargs 9f7c71c
Move conditional one level up so we hide the button as well as the text
Bargs 969a49e
Remove duplicate translation ID
Bargs 3d178c6
update saved query service tests now that title is used as ID
Bargs 2e2f746
add test for deleteSavedQuery method
Bargs 4ca6e1b
Updating discover security functional tests to check popover instead of
Bargs fcfbf03
Add info icon with description of saved query
Bargs 5bc3520
don't show delete button when user doesn't have save query write perms
Bargs 0395adb
Test that delete button shows when user has saved query write perms
Bargs 2342dae
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 0e7b2a3
Adds empty query as delay for deleting a saved query test
TinaHeiligers 72753df
Adds test for loading a saved query as a discover read-only user
TinaHeiligers 95abe15
Adds test for a readonly discover user not being able to delete a sav…
TinaHeiligers 70a0783
Adds test to ensure discovery readonly user cannot save changes to a …
TinaHeiligers 750aa30
Test that clear button works as a discover readonly user
TinaHeiligers b9e7ec0
Adds saved query tests to dashboard as a dashboard & embeddable all p…
TinaHeiligers 9eea8ec
Adds saved query manager interactions tests as a dashboard read-only …
TinaHeiligers 057933c
Adds saved query manager interaction tests to visualize
TinaHeiligers 4918baa
Fixes typo in visualize security test
TinaHeiligers 2272757
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs 259370e
Fix type error
Bargs 4ec7c16
Use uiSettings for time defaults
Bargs 53e07b0
Be consistent with our variable use
Bargs 1c01c53
condense imports
Bargs 85d8fc3
use default prop values
Bargs 8a5d176
Explain why time filter is not included by default
Bargs b04108e
Get rid of our own RefreshInterval
Bargs 8c9cc22
Use the timefilter TimeRange type
Bargs 25cbeeb
Merge remote-tracking branch 'upstream/saved_filters' into saved_filters
Bargs 4478b39
Use version 8 style import
Bargs 8c69437
Reuse existing type now that it is not throwing an error
Bargs c83873d
SearchBar is already exported for the top level of the plugin
Bargs 763f350
Use removeAll
Bargs 1dc9044
Use existing type definition
Bargs ffe3a13
Give tooltip an aria-label
Bargs c605d8a
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers ba733b2
Remove unnecessary exports
Bargs f68dcc7
Rename SavedQueryManager to SavedQueryManagementComponent
Bargs fc14cca
Highlights currently selected saved query and moves it to the top of …
TinaHeiligers ab46fff
Makes a saved query bold only if it's selected
TinaHeiligers 4ce22c7
loading a saved query functional test fix WIP
TinaHeiligers d1b78b3
Removes unused EuiSpacer
TinaHeiligers 8373e06
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 2b3103d
Finds selected saved query by additional data-test-subject selector
TinaHeiligers e476338
Replaces 'manager' with 'management component' in saved queries funct…
TinaHeiligers 6bd72b8
Adds more aria labels to the saved query management component
TinaHeiligers b9bfb18
Adds tooltip to the delete button, modifies descriptions text
TinaHeiligers a7b50a7
Extract saved query list item from management component
Bargs e7b757b
Remove unused prop
Bargs 2ad5099
Combine duplicate buttons
Bargs 7c49a60
Add title conflict validation to save query form
Bargs fd487d5
inject savedObjectsClient into saved query service
Bargs 3b01d3d
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs 2708fad
Closes the SavedQueryManagementComponent after deleting a saved query…
TinaHeiligers 2fcc1eb
Fixes bug with deleting a loaded saved query
TinaHeiligers 2cc232b
reverts local changes
TinaHeiligers d57058a
deletes unused code
TinaHeiligers f411ddf
Removes accessibility duplication
TinaHeiligers f80c912
Removes unused imports
TinaHeiligers 859dce5
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers af59279
initial setup of general saved query management component functional …
TinaHeiligers fa2a0b6
Adds saved queries to OSS uiCapabilities
TinaHeiligers 382b20e
Adds general saved query management component functional tests
TinaHeiligers 1d5a766
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 08a3683
Adds changes to kbn_top_nav lost during deletion of kbn_top_nav2
TinaHeiligers 4f40b1e
Refactors tests and adds test for saving with a non-unique name
TinaHeiligers cad350f
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers e609af2
Adds back time filter test
TinaHeiligers 2cb9416
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 5f3329b
Refactors checking saving changes to a currently loaded query
TinaHeiligers bc3fdf2
Adds check to clearing a saved query to ensure the query bar has been…
TinaHeiligers 4787319
Improve saved query mappings
Bargs 1d0d1f0
remove skip firefox tag
Bargs 7b0e2af
Merge remote-tracking branch 'upstream/master' into saved_filters
Bargs f4d861c
Fix tests
Bargs 2f3f472
Merge branch 'master' of github.com:elastic/kibana into saved_filters
TinaHeiligers 458d043
Changes mappings type
TinaHeiligers ae57041
uses explicity type rather than type-casting
TinaHeiligers a922444
Uses explicit SavedQuery type over 'any'
TinaHeiligers f143236
Adds whitespace validation on a new saved query title
TinaHeiligers daaabb9
Adds whitespace validation hint text
TinaHeiligers 664804d
Trims new saved query title before save in the saved query service, m…
TinaHeiligers ee27111
Adds general functional test for whitespace name error
TinaHeiligers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| export const mappings = { | ||
| query: { | ||
| properties: { | ||
| title: { | ||
| type: 'text', | ||
| }, | ||
| description: { | ||
| type: 'text', | ||
| }, | ||
| query: { | ||
| properties: { | ||
| language: { | ||
| type: 'keyword', | ||
| }, | ||
| query: { | ||
| type: 'keyword', | ||
| index: false, | ||
| }, | ||
| }, | ||
| }, | ||
| filters: { | ||
| type: 'object', | ||
| enabled: false, | ||
| }, | ||
| timefilter: { | ||
| type: 'object', | ||
| enabled: false, | ||
| }, | ||
| }, | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ | |
|
|
||
| @import './filter/filter_bar/index'; | ||
|
|
||
| @import './search/search_bar/index'; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,7 +85,7 @@ export class DataPlugin implements Plugin<DataSetup, void, DataPluginSetupDepend | |
| indexPatterns: indexPatternsService.indexPatterns, | ||
| }), | ||
| query: this.query.setup(), | ||
| search: this.search.setup(), | ||
| search: this.search.setup(savedObjectsClient), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Other services pass in objects
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }; | ||
| } | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.