grafana/public/app/core/utils
Piotr Jamróz f252e89339
Query History: Implement RemoteStorage methods: get all, add new (#48330)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Simplify testing DataSourceSettings

* Update betterer results

* Ensure previous request is canceled when getting search results

* Add loading message when results are being loaded

* Show info message only if local storage is enabled

* Fix unit test

* Reuse sort order options

* Reuse sort order options

* Fix footer spacing
2022-05-17 12:59:16 +02:00
..
accessControl.ts AccessControl: Enable RBAC by default (#48813) 2022-05-16 12:45:41 +02:00
acl.ts Chore: Fix all Typescript strict null errors (#26204) 2020-07-10 12:46:59 +02:00
applyStateChanges.ts Templating: Migrates some variable types from Angular to React/Redux (#22434) 2020-03-10 08:53:41 +01:00
arrayMove.ts DashboardSettings: Migrate Link Settings to React (#31150) 2021-02-25 11:50:10 +01:00
browser.test.ts Core: Show browser not supported notification (#19904) 2019-10-23 10:30:31 +02:00
browser.ts Routing NG: Replace Angular routing with react-router (#31463) 2021-03-10 18:03:36 +01:00
CancelablePromise.ts Prettier: Upgrade to 2 (#30387) 2021-01-20 07:59:48 +01:00
colors.ts Moved colorpicker to ui/components 2019-01-11 07:03:12 +01:00
ConfigProvider.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
connectWithReduxStore.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
CorsWorker.ts Live: move centrifuge service to a web worker (#41090) 2021-11-09 21:05:01 +04:00
css_loader.ts Chore: noImplictAny no errors left (#18303) 2019-08-01 14:38:34 +02:00
dag.test.ts Prettier: Upgrade to 2 (#30387) 2021-01-20 07:59:48 +01:00
dag.ts Chore: Reduces strict errors (#33012) 2021-04-15 14:21:06 +02:00
deferred.ts Chore: Fix more strict typescript errors (#35514) 2021-06-14 15:13:48 +01:00
docsLinks.ts Transformations: Remove beta notice from transformations and field overrides (#26881) 2020-08-10 10:58:45 +02:00
errors.test.ts Tracing: Add some error handling to JaegerQueryField (#23599) 2020-04-21 14:18:56 +02:00
errors.ts Performance: Standardize lodash imports to use destructured members (#33040) 2021-04-21 09:38:00 +02:00
explore.test.ts Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
explore.ts Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
factors.ts Prettier: Upgrade to 2 (#30387) 2021-01-20 07:59:48 +01:00
fetch.test.ts Chore: Remove console.log in fetch.test.ts (#45134) 2022-02-09 14:11:30 +01:00
fetch.ts Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
flatten.ts Prettier: Upgrade to 2 (#30387) 2021-01-20 07:59:48 +01:00
kbn.test.ts Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
kbn.ts Chore: Replace deprecated String.prototype.substr() (#46763) 2022-04-04 11:08:06 +02:00
model_utils.ts Chore: noImplictAny no errors left (#18303) 2019-08-01 14:38:34 +02:00
object.test.ts Dashboard schema: strip null values from save model (#41385) 2021-11-09 16:55:42 +01:00
object.ts Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
query.test.ts Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
query.ts Alerting: Integrate alerts with folders (#45763) 2022-03-14 15:21:29 +01:00
richHistory.test.ts Query History: Move filtering to service layer (#48008) 2022-04-27 15:07:44 +02:00
richHistory.ts Query History: Move filtering to service layer (#48008) 2022-04-27 15:07:44 +02:00
richHistoryTypes.ts Query History: Implement RemoteStorage methods: get all, add new (#48330) 2022-05-17 12:59:16 +02:00
shortLinks.test.ts Shorten url: Unification across Explore and Dashboards (#28434) 2020-10-22 10:31:58 +02:00
shortLinks.ts Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
ticks.ts Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
timePicker.test.ts Refactor: move some files to @grafana/data (#17952) 2019-07-06 08:05:53 +02:00
timePicker.ts Refactor: move some files to @grafana/data (#17952) 2019-07-06 08:05:53 +02:00
tracing.ts Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
version.ts Performance: Standardize lodash imports to use destructured members (#33040) 2021-04-21 09:38:00 +02:00