Sven Grossmann
976568a337
Loki: Fix labels in LabelBrowser being wrongly cached ( #64482 )
...
* remove label cache from label browser
* fix spelling
Co-authored-by: Gareth Dawson <gareth.dawson@grafana.com >
---------
Co-authored-by: Gareth Dawson <gareth.dawson@grafana.com >
2023-03-09 11:36:07 +01:00
Ashley Harrison
2a34293689
Chore: more type fixes ( #62952 )
...
* fix some more any/type assertions
* more any/type assertion fixes
* implement review comments
2023-02-09 09:03:13 +00:00
Matias Chomicki
57369915f5
Loki Query Editor: Make Monaco the default editor ( #62247 )
...
* feat(loki-editor): remove slate and make Monaco the default editor
* feat(loki-editor): remove unsupported usages of onBlur
* feat(loki-editor): remove monaco feature flag
* Chore: remove unused import
2023-02-06 11:18:01 +01:00
Gareth Dawson
b2c8126e6e
Loki: Show query size approximation ( #62109 )
...
* feat: make api request to /loki/api/v1/index/stats
* fix: add /index/stats to callResource valid urls
* feat: make call to getQueryStats when the query changes
* feat: render user tooltip displaying the estimated value for processed data
* fix: add new props to component tests
* test: add tests for query size estimation
* fix: disable error message on request failure
* refactor: add suggestions from code review
* refactor: only pass required query string
2023-01-27 17:32:53 +00:00
Gareth Dawson
54fd1b634f
Loki: Show configured log line limit ( #61291 )
...
* feat: show configured line limit
* test: correct failing test
* refactor: update variable names
* fix: ui renders the wrong value given a falsy value
* refactor: use nullish coalescing operator
2023-01-17 08:45:23 +00:00
Matias Chomicki
7e505ea49c
Loki Autocomplete: Suggest only possible labels for unwrap ( #61411 )
...
* feat(loki-autocomplete): filter valid labels for unwrap autocomplete suggestions
* refactor(unwrap): reuse new function in builder
2023-01-16 13:07:02 +01:00
Gareth Dawson
93fe3faed5
Loki: Fix code editor not correctly responding to window resize ( #61061 )
...
* fix: code editor not correctly responding to window resize
* trigger build
2023-01-06 10:17:20 +00:00
Gareth Dawson
1b1f2475c2
Loki: Set custom width for modals in the loki query editor ( #59714 )
...
* set custom width for modals in the loki query editor
* convert unit from px to vw
* add media query for smaller devices
* use theme breakpoints instead of @media
2022-12-13 11:09:30 +00:00
Gareth Dawson
22736cc93b
Loki: Update feature tracking for label browser ( #59295 )
...
* update feature tracking names
* track when label browser is opened
* remove old feature tracking
* report interaction on modal close
* update
* fix type error
* revert changes to modal
* revert changes to modal
* remove close method from report interaction
* remove close type for grafana_loki_log_browser_closed
* nit pick
* add closeType to grafana_loki_label_browser_closed
2022-12-12 15:35:29 +00:00
Gareth Dawson
6b5ebf2b4b
Loki: Add improvements to loki label browser ( #59387 )
...
* improvements
* refactor label browser modal
* feat(label-browser-modal): fetch labels on modal open
* apply suggestions
* check for log labels after languageProvider start
Co-authored-by: Matias Chomicki <matyax@gmail.com >
2022-11-29 14:07:34 +00:00
renovate[bot]
e84a01e870
Update jest monorepo to v29 ( #58261 )
...
* Update jest monorepo to v29
* update snapshots + wrap test in act
* fix linting errors: jest.mocked now defaults to deep mocking
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com >
2022-11-24 14:00:41 +00:00
Gareth Dawson
a098bdef58
Loki: Make label browser accessible in query builder ( #58525 )
...
* add label browser button to query editor header
* add dynamic button label text
* add LabelBrowserModal.tsx
* toggle label browser modal on click
* pass required props to LabelBrowserModal
* add placeholder to text input
* render label browser inside of the modal
* change button based on label status
* remove label browser button from code mode
* fix element overlap in label browser
* fix undefined app in feature tracking
* remove all any types
* add tests for label browser button
* update modal component width
* update label loading function
* add tests to LabelBrowserModal
* fix broken mock datasource
* update test names
* use stack component for button spacing
* revert modal width
* update label search placeholder
* remove unused import
* add test assertion for closed modal
* remove redundant if statement
* remove unnecessary code
* update error message and fix position
* fix input placeholder text
2022-11-23 16:48:41 +00:00
Gareth Dawson
94372f5f23
Loki: Remove raw query toggle ( #59125 )
...
* set default query expression
* always show raw query
* remove raw query title
* remove test for raw query toggle
* remove raw query toggle
* remove default expression
* hide raw query preview if empty
* remove e2e test for raw query toggle
* update test name
2022-11-23 16:07:59 +00:00
Matias Chomicki
25f79ef2b9
Loki: enable Monaco Query Editor by default ( #58080 )
...
* feat(loki-monaco-editor): update tests
* chore(loki): use unified datasource mock function in tests
* chore: enable monaco feature flag in tests
* feat(loki-monaco-editor): add test case for disabled feature
* feat(loki-monaco-editor): enable by default
* Revert "feat(loki-monaco-editor): enable by default"
This reverts commit 08904f94a707a4fa32aa1e7f3f0de377575a7636.
* feat(loki-monaco-editor): enable from registry
* feat(loki-monaco-editor): make feature flag frontend only
2022-11-08 10:22:40 -05:00
Zoltán Bedi
c0b778134e
Revert: Query editor components from grafana-ui ( #57436 )
...
* Revert: QueryEditor components from grafana-ui
* Use local version of experimental
* Use experimental for query editor components
* Fix type issues in MSSQL
* point to actual version of experimental package
* point to latest version of experimental
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com >
2022-10-24 17:12:36 +02:00
Ivana Huckova
3d7439d97d
Loki: Fix input history ( #57344 )
2022-10-24 16:27:56 +02:00
Ivana Huckova
3ee450e66b
Loki: Remove unused query editors ( #57192 )
...
* Loki: Remove not used query editors
* Move Loki editor to components and rename
* Update public/app/plugins/datasource/loki/components/LokiQueryEditorByApp.test.tsx
Co-authored-by: Matias Chomicki <matyax@gmail.com >
* Fix test
Co-authored-by: Matias Chomicki <matyax@gmail.com >
2022-10-20 11:46:48 +02:00
Ivana Huckova
b997bc4200
Loki: Remove already selected options from next label filter options in builder ( #57187 )
...
* Loki: Filter out duplicated options in loki query builder label name options
* Update test
2022-10-19 11:32:01 +02:00
Gareth Dawson
fa09aef4ba
Loki: Add tests for NestedQuery.tsx ( #56538 )
...
* WIP: Testing the NestedQuery component
* Add tests for NestedQuery.jsx
* Add aria-labels to select elements
* Update aria-labels
* Create datasource using createLokiDatasource()
2022-10-11 09:22:32 +01:00
Ivana Huckova
b39d629142
Loki: Show invalid fields in label filter ( #55751 )
...
* Loki: Show invalid fields in Label filter
* Update
* Update comment
* Update comment
2022-09-29 13:32:01 +02:00
Ivana Huckova
c0ecdf6783
Loki: Redesign and improve query patterns ( #55097 )
...
* WIP
* WIP
* Query patterns: Redesign and improve feature
* Remove duplicated pattern
* Remove empty line
* Refactor
* Add tests
* Update docs and e2e test
* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts
Co-authored-by: Matias Chomicki <matyax@gmail.com >
* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts
Co-authored-by: Matias Chomicki <matyax@gmail.com >
* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts
Co-authored-by: Matias Chomicki <matyax@gmail.com >
* Use capitalize
* Refactor to use QueryPatternsCard component
* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts
Co-authored-by: Matias Chomicki <matyax@gmail.com >
* Update feature tracking for v2
* QueryPatternsCard: Remove unnecessary key
* Update naming for card
* Mock reportInteraction in tests
Co-authored-by: Matias Chomicki <matyax@gmail.com >
2022-09-26 14:03:13 +02:00
Ivana Huckova
82a6872f0f
Loki, Prometheus: Remove beta tag from query builder ( #55150 )
2022-09-16 12:31:33 +02:00
GitStart
f26babf484
Loki: Rename public/app/plugins/datasource/loki/query_utils.ts file to follow convention ( #55180 )
2022-09-16 10:16:54 +02:00
GitStart
eb7fe07401
Loki: Rename public/app/plugins/datasource/loki/language_utils.ts file to follow convention ( #55181 )
2022-09-16 08:48:37 +02:00
Ivana Huckova
926a3396ab
Query patterns: Feature tracking ( #55164 )
...
* Query patterns: Feature tracking before redesign
* Update
2022-09-14 16:52:39 +02:00
Giordano Ricci
c68d7f1e35
Correlations: Add CorrelationSettings Page ( #53821 )
...
* GrafanaUI: add option to close DeleteButton on confirm click
* add datasource readOnly info to frontend settings
* move isTruthy utility type guard
* add generic non-visualization table component
* Add correlations settings page
* add missing readOnly in mock
* Fix typo
* avoid reloading correlations after add/remove
* use DeepPartial from rhf
* validate source data source
* fix validation logic
* fix navmodel test
* add missing readonly property
* remove unused styles
* handle multiple clicks on elements
* better UX for loading states
* fix remove handler
* add glue icon
2022-08-26 11:27:28 +01:00
Ivana Huckova
fde5147d71
Loki, Prometheus: Fix passing of query with defaults to code mode ( #53646 )
2022-08-12 15:00:55 +02:00
Ivana Huckova
f34a03b2f1
Loki: Rename Labels to Label filter and update placeholders ( #53446 )
...
* Loki: Rename Labels to Label filter and update placeholders
* Update label
* Replace Label filter with Label filters based on suggestion
2022-08-12 07:38:34 -04:00
Ivana Huckova
8813cbfb62
Loki: Update copy for missing label filter error message ( #53449 )
...
* Loki: Update copy for missing label filter
* Update
2022-08-11 17:57:10 +02:00
Alex Ratner
fecf4c41ad
Dashboard: Spelling corrections in end-user visible dialogs ( #53340 )
2022-08-09 10:19:30 +02:00
Matias Chomicki
6f01930e9d
Chore: remove any from test ( #53260 )
2022-08-08 11:26:12 +02:00
Ivana Huckova
3877964470
Loki: Remove some of any assertions from tests ( #53114 )
...
* Loki: Remove some of any assertions from tests
* Remove unnecessary as assertions
2022-08-03 15:57:38 +02:00
ismail simsek
920ee16b54
Update LokiQueryCodeEditor test title ( #53181 )
...
* Update LokiQueryCodeEditor test title
* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryCodeEditor.test.tsx
2022-08-03 09:59:02 +02:00
Ivana Huckova
5009c330ca
Loki: Add tests for explain section in builder and code editor ( #53113 )
...
* Loki: Add tests for new explain section
* Update any assertions
2022-08-02 17:20:22 +02:00
Ivana Huckova
b8e4c2abeb
Loki: Move explain section to builder mode ( #52879 )
...
* Loki: Move explain to builder and code mode
* Update
* Update transition
* Fix tests
* Fix tests
* Prometheus: Move explain section to builder mode (#52935 )
* Prometheus: Move explain section to builder mode
* Show explain switch before raw query switch
* Store explain switch value in localstorage
* Make explain available for code mode too
* Introduce useFlag hook for query editor switches
* Remove Explain mode
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com >
2022-07-29 17:09:43 +02:00
Ivana Huckova
3f681114e5
Loki: Show label options for unwrap operation ( #52810 )
...
* Loki: Show options for unwrap operation
* Add comment for check
2022-07-27 10:45:30 +02:00
Scott Lepper
de956fc3d8
Core code editor/builder components ( #52421 )
...
* migrate experimental to core grafana - update refs
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com >
2022-07-20 12:50:08 -04:00
Ivana Huckova
10cb84e401
Loki: Implement hints for query builder ( #51795 )
...
* Loki: Implement hints for query builder
* Update name of file
* Update imports
* Refactor
* Remove unused import
* Unify
* Revert "Unify"
This reverts commit 78da0e27e3 .
* Unify
* Fix types
* Fix tests
* Fix type error
* Simplify
* Update test
* Add documentation
* Update comment
* Add tests for addParserToQuery
* Smaller updates
2022-07-07 15:49:31 +02:00
Ivana Huckova
66b4a9e6a1
Loki: Remove unused prop from query builder ( #51504 )
2022-06-30 16:02:27 +02:00
Ivana Huckova
60454192b7
Loki: Add e2e test for query builder ( #51314 )
...
* Loki: Add e2e test for query builder
* Update
* Update test
* Update test
* Update test
* Update test
* Add more checks in test
* Update betterer
* Update betterer
2022-06-29 11:04:27 +02:00
Ivana Huckova
0073f1b0b5
Update header ( #50787 )
2022-06-14 16:24:44 +02:00
Ivana Huckova
088a1880d8
Loki, Prometheus: Show Query patterns in all editor modes ( #50263 )
2022-06-13 09:45:01 +02:00
Gábor Farkas
c412a3b052
logs: track the usage of certain features ( #50325 )
...
* logs: track the usage of certain features
* Add report interaction for logs interactions
* mock reportInteraction in test
* mock reportInteraction
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com >
2022-06-09 15:53:23 +02:00
Ivana Huckova
9f6afb3475
Prometheus, Loki: Update run queries button ( #50005 )
...
* Prometheus, Loki: Updare run queries button
* Update docs
* Update docs
2022-06-07 09:57:56 +02:00
Andrej Ocenas
37aedd6906
Loki: Add user analytics for query editor mode ( #49619 )
...
* Add reportInteraction call
* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryEditorSelector.tsx
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com >
2022-06-06 10:38:45 +02:00
Andrej Ocenas
cc90f9bb69
Prometheus/Loki: Add raw query and syntax highlight in explain mode ( #50070 )
2022-06-02 13:50:58 +02:00
Andrej Ocenas
c63071f519
Prometheus/Loki: Show raw query by default in the builder( #50007 )
2022-06-02 13:50:10 +02:00
Andrej Ocenas
72367cf1ad
Prometheus: Cleanup annotation editor ( #49615 )
...
* Remove unused code
* Remove test
* Remove Builder mode and simplify the code
* Fix step mapping
* Fix import
* change placeholder
2022-05-31 11:50:23 +02:00
Ivana Huckova
5f6b23e45a
AutoSizeInput: Move to @grafana/ui ( #48811 )
...
* AutoSizeInput: Move to @grafana/ui
* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
* Fix linter error
* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
* Move AutoSizeInput to Input folder
* Use iconOptions in storybook
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
2022-05-30 10:46:33 +02:00
Gábor Farkas
386181cf45
Loki code editor: do not run query on blur in explore mode ( #49241 )
...
* loki code editor: do not run query on blur in explore mode
* loki: code editor: better change tracking
* fixed comment
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com >
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com >
2022-05-26 15:03:36 +02:00