* CloudWatch Logs: Adjusts CloudWatch Logs timeout logic
Previously CloudWatch Logs queries would time out if,
after a number of attempts, a response was received with no additional data.
This commit changes the behavior so that a consecutive number of requests
yielding no additional data must be made before we cancel the query
* PanelInspector: Fields with overrides are formatted correct in CSV
* Refactor: adds raw format
* Refactor: changes switch to Formatted values
* Tests: adds tests for applyRawFieldOverrides and getRawDisplayProcessor
* Test: change to utc timeZone
* Refactor: changes after PR comments
* WIP: Fix null thresholds in overrides when loading
* Fix thresholds on load instead of in apply field overrides
* simplify expression
* fixed ts issue
* Updated test
* Updated another test
* Updated another test
* POC for toggling parsed fields in Explore/Loki
* fixed issues
* add clear button for toggled parsed fields
* fix test-frontend failures
* use blue eye instead of eye/eye-slash and update tooltips
* break out parseMessage
* move indicator to meta data section
* clean up LogRowMessageParsed
* better label
* clean up after making optional
* Refactor: initial commit
* wip
* Refactor: getting into a simpler model
* Refactor: adds some comments
* Refactor: renames statuses according to PR comments
* Refactor: adds more comments
* Tests: adds tests for FetchQueue
* Tests: adds tests for ResponseQueue
* Tests: adds tests for FetchQueueWorker
* Tests: simplified the tests for ResponseQueue
* Refactor: adds http2 scenario
* Refactor: using Cfg instead of global variable
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Refactor: reverted change in frontendsettings.go
* Tests: fix test mocks
* Fix: changes how cfg.Protocol gets its value
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove validation from empty playlists
* Remove redundant API call
Frontend used to call /api/playlists/:id/items directly after /api/playlists/:id but items are already included in the first response
* Update LogsDedupStrategy enum to keep consistent with radio button capitalization
* Revert "Update LogsDedupStrategy enum to keep consistent with radio button capitalization"
This reverts commit 0b05cd4e00.
* Capitalize dedup strategy in radio buttons
* Fix variable editor name-input bug
You couldn't delete an invalid character after typing it into the name-input field.
While investigating the issue turned out to be bigger, as there was a problem with
valid characters too. (See test scenarios below)
The fix seems to be, to remove an unnecessary check in the `changeVariableName`
action. There is theoretically now the possibility, that the `changeVariableName`
action is called with the same name, as the variable is already, but practically
there seems no possibility, that this could happen. A test, which checks that, had
to be removed too.
Test scenarios:
* 1st Scenario
1. Type "@"
2. Try deleting it
* 2nd Scenario
1. Type "w"
2. delete "w"
3. Try typing "w" again
Fixes#26562
* Fix bug when updating existing variable
* Fix lint error in types.ts
* Bump eslint and its deps to latest
* Add eslintignore and remove not needed eslintrcs
* Change webpack configs eslint config
* Update package.jsons and removed unused eslintrc files
* Chore yarn lint --fix 💅
* Add devenv to eslintignore
* Remove eslint disable comments for rules that are not used
* Remaining eslint fixes 💅
* Bump grafana/eslint-config 💥
* Modify package.json
No need for duplicate checks.
* Modify eslintignore to ignore data and dist folders
* Revert removing .eslintrc to make sure not to use certain packages
* Modify package.json to remove not needed command
* Use gitignore for ignoring paths
* Create sorting button and functionality
* Set up logs ordering
* Add tests
* Refactor
* Refactor
* Replace new button with old
* Move SortOrder enum to grafana/data
* Update SortOrder in test
* Update context based on sort order of logs
* Update used method for panel, update tests
* Rename prop to logsSortOrder
* Memoize resuults
* Add title too button
* Add disablinng of button for 1sec
* Update wordiing
* Update packages/grafana-data/src/utils/logs.ts
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Update packages/grafana-data/src/utils/logs.ts
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Update test by reordering logs
* Clear timers, add button flipping title
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Squash four commits and claim.
Credit to @ikkemaniac in #25034, but taking this to sign CLA and get it landed. Four commit message were:
- add 'fill' switch on Alert Tab
- add 'fill' to Alert init model. Make default value 'true' not to break current design
- use newly created alert.fill when rendering graph
- add 'line' switch on Alert tab, add 'line' to Alert init model. Set default to 'true' not to break current design. Use newly created alert.line when rendering graph
Should close feature req #7258.
* Move alert toggle to Display tab.
* Move alertThreshold to PanelModel.options.
* Fix ThresholdMapper tests by adding options to each mocked panel.
* Update documentation for the new display option.
* Update docs with review feedback.
* Handle onRender with null panel in ThresholdMapper
* Send current time range when fetching labels and values in Explore
* Pass range to Editors, in the same way as it was in Angular editors
* Remove unused imports
* Remove unused imports, props
* Update
* Update
* Update refresh condition
* Add comment
* StatPanel: Fix stat panel display name now showing when explicitly set
* StatPanel: Updarted auto mode to also take panel title into consideration
* fixed test
* Add stack trace to span detail row
* Modify accordian text not to have a whitespace
* Modify stackTrace to stackTraces
* Modify AccordianText ti get text component as prop
* Fix typecheck and test failure
* Span details text area do not wrap line
* Return valid metadata even if data is empty
* Make sure fields is not accessed when there is no data
* Meta Info should depend only on meta data
* Refactor condition for better reading
* Change data to empty array for better condition handling
* Remove unecessary checks
* Add test for showing metaData even when data is empty
* DashboardLinks: WIP fix for dashboard links issue
* Make the dashboard links update on change(hacky)
* Replace dashboard links with new array when updating/adding dash links
* Update snaps
* Deep clone dashboard links on save
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Removes "Metrics"/"Logs" mode switcher from Explore, allowing for both
metrics and logs queries at the same time.
Co-authored-by: kay delaney <kay@grafana.com>
Support storing sensitive notification settings securely/encrypted.
Move slack notifier url and api token to secure settings.
Migrating slack notifier to store token and url encrypted is currently
a manual process by saving an existing slack alert notification channel.
saving an existing slack alert notification channel will reset the stored
non-secure url and token.
Closes#25113
Ref #25967
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* BackendSrv: Observable all the way POC
* starting to unify code paths
* tests pass
* Unified error handling
* Single request path and error handling
* Fixed ts issue
* another ts issu
* Added back old requestId cancellation
* Slow progress trying to grasp the full picture of cancellation
* Updates
* refactoring
* Remove a bunch of stuff from backendSrv
* Removed another function
* Do not show error alerts for data queries
* Muu
* Updated comment
* fixed ts issue
* unify request options type
* Made query inspector subscribe to backendSrv stream instead of legacy app events
* Add back support for err.isHandled to limit scope
* never show success alerts
* Updated tests
* Fixing tests
* Minor weak
* Improved logic for the showErrorAlert and showSuccessAlert boolean flags, now they work more logically
* Fix issue
- more and more datasources are having long-running queries,
automatically triggering is becoming more of a burden than a help.
- some datasource queries might actually cost money, so running queries
should be explicit.
* FieldConfig: Remove field label for single item categories
* Update public/app/features/dashboard/components/PanelEditor/FieldConfigEditor.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* graph with new controls
* graph with new controls
* Fix categories
* fix test imports
* Chore: Fix spelling (#25905)
* grafana-ui: Make output chunks correct (#25922)
* Explore/Loki: Show results of instant queries only in table and time series only in graph (#25845)
* Show results of instant queries only in table and rest in graph
* Add type to QueryResultMeta
* Update log row hover background only if context is not open
* Revert "Update log row hover background only if context is not open"
This reverts commit 144197c954.
* Explore/Loki: Fix field type in table for instant queries (#25907)
* Update field type for instant queries to number
* Remove fieldtype as in prometheus
* Revert "Remove fieldtype as in prometheus"
This reverts commit f887ad1125.
* Chore: Disable scopelint for tests (#25923)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* grafana/ui: Fix storybook dev (#25928)
* Minimize css and js only for storybook build
* Update CodeEditor story, make it internal
* Update storybook webpack config
* TimeZonePicker: added possibility to toggle if internal time zones should be included or not. (#25934)
* made some small adjustments after feedback.
* made the flag optional.
* Docker: Upgrade to base on Alpine 3.12 (#25936)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* DataLinks: Add internal links in table and allow custom query (#25613)
* Add internal links in table and with custom query
* Add specific types for internal and external link
* Change the datalink types to be more backward compatible
* Refactor the link utils for explore
* Add internal linking to table panels
* Fix derived field condition
* Prettify
* Add and fix tests
* Prettify
* Fix imports and tests
* Remove unused type
* Update packages/grafana-data/src/types/explore.ts
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Update packages/grafana-data/src/types/explore.ts
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* CircleCI: Upgrade grabpl (#25939)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Provisioning: Use folders structure from the file system to create desired folders in dashboard provisioning. (#23117)
Fixes#12016
* Added options to customize chart data listening (#25918)
* Explore: Remove legend formatting when switching from panel to Explore (#25848)
* Remove legend formatting when switching from panel to explore
* Add test coverage
* Query history: Add search for query history and starred queries (#25747)
* Add searching functionality to Queries tab
* Implement search for starred queries
* Update tests and add test coverage for searching
* Changes based on provided feedback
* Remove redundant storing of results
* Update naming of onSearchFilterChange function in tests
* Update filterQueriesBySearchFilter function
* Update filterQueriesBySearchFilter function
* Debounce search
* Remove console.log()
* Use useDebouncedCallback
* Update tests, remove redundant props
* When in starred, search only in starred
* Add timefilter as dependency
* Remove redundant dependency, refactor
* Grafana-UI: Add FileUpload (#25835)
* Grafana UI: Setup component
* Grafana UI: DashboardFileUpload => FileUpload
* Grafana UI: Expand docs
* Grafana UI: Add className
* Grafana UI: Update import
* Grafana UI: Clarify props
* Update packages/grafana-ui/src/components/FileUpload/FileUpload.tsx
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* Grafana UI: Style icon
* Grafana UI: Show uploaded file name
* Grafana UI: Add tests
* Grafana UI: Add useStyles + useCallback
* Grafana UI: Remove stylesFactory
* Grafana UI: Revert to useTheme
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* Fix: Value mappings match against string values (#25929)
* Use standard input for value mappings value
* add test and case for matching string values
* re add number on rangemap
* remove FieldTypeNumber required
* Docs: Changelog update 7.05 & latest.json update (#25941)
* Docs: Changelog update for 7.0.5
* Update latest.json
* Fixed alignment
* Stackdriver: Rename Stackdriver to Google Cloud Monitoring (#25807)
* Update backend
* Update frontend
* Keep old plugin id
* Update docs
* Place doc images to a new directory
* Legacy support for stackdriver-auto alignment
* Consistent plugin name
* Apply suggestions from code review
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* Update docs
* Update public/app/plugins/datasource/cloud-monitoring/README.md
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Add reference to the data source formerly being named Stackdriver
* Update pkg/models/datasource.go
Co-authored-by: Carl Bergquist <carl@grafana.com>
* Fix gofmt
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: Carl Bergquist <carl@grafana.com>
* Fix strict null errors that resulted from search (#25950)
* Arrow: when exporting arrow use the calculated names (#25871)
* PanelHeader: Fixed loading icon position (#25949)
* PanelHeader: Fixed loading icon position
* revert back to text weak color
* Azure/Log Analytics: return more error information (#25937)
When there is an error message in the HTTP response, this copies that error so it is relayed to the user by being shown in the frontend.
This also makes it so when there is an error the interpolated query string (ExecutedQueryString) is returned so users can see it in the query inspector.
* Azure: Multiple dimension support for Azure Monitor Service (#25947)
Azure Monitor (metrics) support multiple dimensions instead of just one.
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Docs: Update alert-list-panel.md (#25779)
Fixed minor typo and format updates
* Docs: Update add-a-panel.md (#25780)
* Linting fixes for the provisioning package (#25690)
* Chore: whatwg-fetch version bump (#25952)
* Use latest fetch polyfill/shim
* Updated lockfile
* Monaco: option to hide line numbers (#25920)
* Docs: Reorganize reference topics (#25915)
* moved annotations.md
* Update annotations.md
* moved dashboard_folders.md
* moved dashboard_history.md
* moved playlist.md
* moved search.md
* migrations test
* docs: spelling (#24383)
* Docs: spelling
* Docs: spelling (contribute/ directory)
* Drop whats-new-in changes
* migrations test
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Richard Hartmann <RichiH@users.noreply.github.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: Maksim Nabokikh <32434187+nabokihms@users.noreply.github.com>
Co-authored-by: Steven Vachon <contact@svachon.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Carl Bergquist <carl@grafana.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
* now with suggestions
* using suggestions API
* using variable suggestions
* using variable suggestions
* show variables
* minor cleanup
* add @alpha warning
* Do not produce data variables if panel does not support queries
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Update backend
* Update frontend
* Keep old plugin id
* Update docs
* Place doc images to a new directory
* Legacy support for stackdriver-auto alignment
* Consistent plugin name
* Apply suggestions from code review
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* Update docs
* Update public/app/plugins/datasource/cloud-monitoring/README.md
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Add reference to the data source formerly being named Stackdriver
* Update pkg/models/datasource.go
Co-authored-by: Carl Bergquist <carl@grafana.com>
* Fix gofmt
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: Carl Bergquist <carl@grafana.com>
* Add searching functionality to Queries tab
* Implement search for starred queries
* Update tests and add test coverage for searching
* Changes based on provided feedback
* Remove redundant storing of results
* Update naming of onSearchFilterChange function in tests
* Update filterQueriesBySearchFilter function
* Update filterQueriesBySearchFilter function
* Debounce search
* Remove console.log()
* Use useDebouncedCallback
* Update tests, remove redundant props
* When in starred, search only in starred
* Add timefilter as dependency
* Remove redundant dependency, refactor
* Add internal links in table and with custom query
* Add specific types for internal and external link
* Change the datalink types to be more backward compatible
* Refactor the link utils for explore
* Add internal linking to table panels
* Fix derived field condition
* Prettify
* Add and fix tests
* Prettify
* Fix imports and tests
* Remove unused type
* Update packages/grafana-data/src/types/explore.ts
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Update packages/grafana-data/src/types/explore.ts
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* creating page
* add types select
* adding switches
* start with converting angular templates to json
* converting more alert channels to new format
* convert remaining channels
* typing the form
* add validation, update models
* fix default value in type select
* fix type
* fix issue with validation rule
* add missing settings
* fix type errors
* test notification
* add comments to structs
* fix selectable value and minor things on each channel
* More typings
* fix strictnull
* rename ModelValue -> PropertyName
* rename show -> showWhen
* add enums and adding comments
* fix comment
* break out channel options to component
* use try catch
* adding default case to OptionElement if element not supported
* Add TableDataOptions component
* A bit along the way
* Make transforms work
* Make it work
* Add collapsed text
* Fix transformations and overflow for QueryOperationRow
* Fix layout
* Minor fixes
* Fix feedback
* Remove unused imports
* Remove unused Container
* Horizontal layout for Switches
* Fix Swicth bug
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* draft on a unified TimeZonePicker.
* most of the data structures is in place.
* wip.
* wip.
* wip: timezone selector in progress.2
* fixed so we have proper data on all timezones.
* started to add timezone into time picker.
* addeing time zone footer.
* footer is working.
* fixed so we use the timeZone picker in shared preferences.
* Added so we can change timeZone from picker.
* did some styling changes.
* will update timezone on all places that we need to update it.
* removed console.log
* removed magic string.
* fixed border on calendar.
* ignoring eslint cache.
* cleaned up the code a bit.
* made the default selectable.
* corrected so the behaviour about default works as expected.
* excluded timezone from change tracker.
* revert so default will always be the intial value.
* default will always fallback to the one in the config.
* do the country mapping on startup.
* fixed nit.
* updated snapshots for timepicker.
* fixed build errors.
* updating so snapshot tests is in sync.
* removed Date.now from prop since it will change each run in the snapshot tests.
* fixed so e2e tests works as before.
* moved files into separate folders.
* Templating: Moves global variables from TemplateSrv to Redux
* Refactor: renamed to meta
* Tests: fixed broken tests
* Chore: reduces strict null errors
* renamed meta variabel to system variable.
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* Chore: changes null values to undefined in explore reducer
* Chore: changes sortLogsResult param type from null to undefined
* Chore: changes null values to undefined in explore reducer
* Chore: updates strict null errors count
* Revert "Chore: changes null values to undefined in explore reducer"
This reverts commit b82d841611.
* Revert "Chore: changes sortLogsResult param type from null to undefined"
This reverts commit 21073b5d30.
* Revert "Chore: changes null values to undefined in explore reducer"
This reverts commit 798559688c.
* Chore: updates ExploreItemState type
* Chore: updates initial ExploreItemState in Explore reducer
* Chore: updates strict null errors count to 699
* Chore: changed ExploreMode and Emitter type in ExploreStateItem
* Revert "Chore: changed ExploreMode and Emitter type in ExploreStateItem"
This reverts commit 7e0e2027fc.
* Table: Adds adhoc filtering
* Refactor: changes after PR comments
* Refactor: hides filtering for data sources that do not support modifyQuery in Explore
* Refactor: fixes strict null error
* Changed tooltip position to above icon
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Chore: adds query keys and refId reassignment on query row removal
* Chore: updates explore reducer tests to cover query row adding, removal, refId and key reassignment
* Chore: changes refId value in explore reducer from undefined to string to avoid introducing new strict null errors
* Chore: fixes a small nitpick with array spread in Explore reducer
* Chore: removes unnecessary dispatches in query row tests in Explore reducer test
* Refactor: initial commit
* Tests: updates tests
* Tests: updates snapshots
* Chore: updates after PR comments
* Chore: renamed initVariablesBatch
* Tests: adds transactionReducer tests
* Chore: updates after PR comments
* Refactor: renames cancelAllDataSourceRequests
* Refactor: reduces cancellation complexity
* Tests: adds tests for cancelAllInFlightRequests
* Tests: adds initVariablesTransaction tests
* Tests: adds tests for cleanUpVariables and cancelVariables
* Always cleanup dashboard on unmount, even if init is in progress. Check if init phase has changed after services init is completed
* fixed failing tests and added some more to test new scenario.
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* Updated templating code to support the $__user variable to expose the current
userid, username, email and login.
Fixed the $__org variable as it was returning the user id instead of the ordId.
Updated the documentation to match
* Updated solution to retrieving $__user variables to pull directly from user record (thereby allowing future access to properties that
might not exist in the contextSvr).
Replicated this initialisation in the variables feature
Corrected typo's in documentation.
* Repaired typecheck issues.
* Updated patch to pull entirely from contextSrv without API calls.
* ... And removed the redundant comments.
* Updated documentation.