* 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
* Add basic UI for custom ruler URL
* Add build info fetching for alerting data sources
* Add keeping data sources build info in the store
* Use data source build info to construct data source urls
* Remove unused code
* Add custom ruler support in prometheus api calls
* Migrate actions
* Use thunk condition to prevent multiple data source buildinfo fetches
* Unify prom and ruler rules loading
* Upgrade RuleEditor tests
* Upgrade RuleList tests
* Upgrade PanelAlertTab tests
* Upgrade actions tests
* Build info refactoring
* Get rid of lotex ruler support action
* Add prom ruler availability checking when the buildinfo is not available
* Add rulerUrlBuilder tests
* Improve prometheus data source validation, small build info refactoring
* Change prefix based on Prometheus subtype
* Use the correct path
* Revert config routing
* Add deprecation notice for /api/prom prefix
* Add tests to the datasource subtype
* Remove custom ruler support
* Remove deprecation notice
* Prevent fetching ruler rules when ruler api is not available
* Add build info tests
* Unify naming of ruler methods
* Fix test
* Change buildinfo data source validation
* Use strings for subtype params and unveil mimir
* organise imports
* frontend changes and wordsmithing
* fix test suite
* add a nicer verbose message for prometheus datasources
* detect Mimir datasource
* fix test
* fix buildinfo test for Mimir
* shrink vectors
* add some code documentation
* DRY prepareRulesFilterQueryParams
* clarify that Prometheus does not support managing rules
* Improve buildinfo error handling
Co-authored-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
* no other tab has title
* made Add service button not visable and upper right
* renaming and added space between token number
* aligned button (:css:)
* refactor: out component listitem
* unused import
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
* Next/prev buttons
* expand
* Sticky search bar
* Removed anys
* testing
* testing
* Tests for next/prev/suffix
* More tests
* Span bar row color
* Add clear to input and update search bar styles
* Update test
* PR changes
Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
* Expose option to disable help menu
* Expose option to disable profile menu
* Add Profile FeatureTogglePage
* Update public/app/features/profile/FeatureTogglePage.tsx
Uptake PR wording suggestion.
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Fix front end lint issue
* Fix back end lint issue
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Ensure TemplateService is updated with new time range on each time range change.
* Fix linting errors
* Fix explorePane.test.ts
* Reuse createDefaultInitialState
* Remove unused imports
* Add a test for left/right split
* Silence console.error in tests
* Silence console.error in tests
* Dashboard: Fixes save modal rendered ontop of save drawer
* removed commented line
* Simplified dismiss -> hideModal mapping
* Fixed issue with new dashboard
* Fixing issues
* Add history listener to update titleHref/parentHref when location changes
* Convert to functional component and use useLocation
* Wrap component in React.memo
* Add new `getUrlForPartial` method, deprecate `updateSearchParams`
* Refactor to ServiceAccounts Query
* filtering expiredtokens on backend
* WIP
* WIP
* WIP
* fix: missing that we do not cover for no service accounts
* fix: wrong link
* feat: filter able to get only service accounts with expired tokens
* refactor: naming
* Update pkg/services/serviceaccounts/models.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* goimported
* Update pkg/services/serviceaccounts/api/api.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Turned div into text button to make it accessible
* Only icon as button to avoid embedded buttons with overrides delete button
* use icon in Button directly
* Removed unused import
* moving id for labelledBy to h6 elem instead of icon
* Tweaking style, bigger caret
* Fixed aria-expanded
* Modifying and using CollapseToggle from unified alerting
* Added restOfProps to CollapseToggle
* PanelEdit: Change the meaning of default data source to be just that the default for new panels
* Added migration, and also migration for annotation datasource prop to data source refs
* fix
* Fixing tests
* Fixes to annotation
* Fixing unit test
* ServiceAccounts: Delete/Disable service account from details page
* ServiceAccounts: capitalize viewable messages from UI
* ServiceAccounts: Link new update endpoint to details page
* ServiceAccounts: reimplement service account retrieve to include is_disabled and only target service accounts
* Cleanup styles
* Fix modal show
* ServiceAccounts: simplify handler functions
* Apply suggestions from code review
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* fix multiple non-grouped groupings
* drop duplicate alerts
* add test for multiple groups without labels
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
* DashboardSrv: add saveDashboard method
* revert external changes
* use DashboardModel instead of DashboardDataDTO
* use fetch instead of request
* use getSaveModelClone in saveDashboard
* ServiceAccounts: add teams to service account DTO
* ServiceAccounts: Add team display to service accounts
* ServiceAccounts: add AC metadata to detail route
* ServiceAccounts: add role picker to detail page
* ServiceAccounts: Add role to profile DTO
* ServiceAccounts: remove wip mention of created by
* Add new transformer grouping to matrix
* Add new transformer grouping to matrix tests
* Add new transformer grouping to matrix UI
* Fix tests for grouping to matrix transformer
* Update transformer to latest interfaces
* Add field selector to form
* Make linter happier
* Replace Fields with InlineSnapshot as it was to taking units properly
* Rearrange for new transformers structure
* Expose GroupingToMatrix options as part of data package
* Increase labelWidth as suggested
* Add uniqueValues helper function and use it to extract Column and Row Values
* Add lotex group removal UI
* Connect UI to delete group action
* Add rules' refreshing after deletion of a group
* Improve confirmation message
* Add tests for RulesGroup
* Remove redundant check
* Create basic query history test
* Clean up
* Clean up
* Use run button selector
* Mock AutoSizer instead of monkey-patching
* Reset local storage after each test
* Add accessible name to Run Query button and use it in the test
* Update public/app/features/explore/spec/helper/interactions.ts
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Rename query to urlParams
* Fix linting errors
* Remove unused import
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Add mapped tags input to allow renaming tags in trace to logs settings
* Use mappedTags in createSpanLink
* Update traceToLogs docs
* Show 'add kv' button if no tags
* Update docs
* Default mappedTags to tag values
* ServiceAccounts: respect js casing and small fixes to displayed values
* ServiceAccounts: fix typos on service account
* ServiceAccounts: fix missing orgID in service account
* ServiceAccounts: Small fixes to dtos for profile
* ServiceAccounts: use result org id
* ServiceAccounts: return value is always nil
* 🚧: Mob session work 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* 🚧: Mob session work 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
* Update dependency react-hook-form to v7.27.0
* fix type errors for alerting components with new react-hook-form version (#45341)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
* fix(plugins/state): console log errors during install / uninstall
* fix(backend_srv): catch JSON parse errors
Sometimes it can happen that a backend API responses says that it's
returning with a JSON content-type, however it actually returns an invalid
JSON (e.g. an empty body) - in which case the backendSrv() request errors out.
* Trying out json formatting of azure graph err from frontend
* Added some tests wip
* Wrap text in popper tooltip
* fix conflict
* Wrap text in tooltip
* Complete tests
* Added invalid json test
* Backend changes and tests
* removed comments
* Added split of message / json and edge cases tests
* Addressed comments
* moved catch to parseErrorMessage
* log-volume: adjust request-id to avoid conflicts
* added unit test
* simplify test
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* added missing import
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Add keybindings to explore, allow override of dashboard model update for explore update
* Remove edits to Dashboard Model, add definition when url params should be updated
* Add tests
* Add and expose util function instead of bringing in unrelated library do not define explicit path to library file
* Use more generic model for TimeSrv
* Remove url utility functions, use javascript function instead
* Break out TimeModel into new type and bring it in
* condense object creation
* filter teams for editors to only show the teams that they are members of
* frontend changes to only allow clicking on teams that the user can edit
* update frontend test snapshots
* extend docs
* reword
* remove the comment for now
* Update backend tests
* reword the warning, and add it back in
* docs feedback
Co-authored-by: gamab <gabi.mabs@gmail.com>
* AccessControl: Add endpoint to get user permissions
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Fix SA tests
* Linter is wrong :p
* Wait I was wrong
* Adding the route for teams:creator too
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* show teams page for user who can't list teams but can create teams
* Fixing buttons and routes
* Small refactor
Co-authored-by: gamab <gabi.mabs@gmail.com>
* chore(tsconfig): update grafana/tsconfig to 1.2.0 for outputting es6
* rewrote the unsubscription part to use first().
* test: update failing tests to work with es6 output
* removed bug where we dispatch a promise instead of an array of ritch history.
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* Remove unused properties
* Fix unit tests
* Fix unit tests
* Split data models
* Simplify updating items in rich history
* Update tests
* Fix starring an item and add a unit test
* Move the converter to a separate file and add unit tests
* Convert a private function to an inline function
* Add more docs and clean up the code
* Update public/app/core/history/localStorageConverter.ts
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Update public/app/core/utils/richHistory.test.ts
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Use template literals over explicit casting
* Split updateRichHistory to three separate functions
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Initial token creation dialog
* Use date picker for expiration date
* Reset state after closing modal
* Create token flow
* Move modal to separate component
* Minor refactor
* Apply suggestions from code review
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* add SQL migrations
* dashboard previews from sql: poc
* added todos
* refactor: use the same enums where possible
* use useEffect, always return json
* added todo
* refactor + delete files after use
* refactor + fix manual thumbnail upload
* refactor: move all interactions with sqlStore to thumbnail repo
* refactor: remove file operations in thumb crawler/service
* refactor: fix dashboard_thumbs sql store
* refactor: extracted thumbnail fetching/updating to a hook
* refactor: store thumbnails in redux store
* refactor: store thumbnails in redux store
* refactor: private'd repo methods
* removed redux storage, saving images as blobs
* allow for configurable rendering timeouts
* added 1) query for dashboards with stale thumbnails, 2) command for marking thumbnails as stale
* use sql-based queue in crawler
* ui for marking thumbnails as stale
* replaced `stale` boolean prop with `state` enum
* introduce rendering session
* compilation errors
* fix crawler stop button
* rename thumbnail state frozen to locked
* #44449: fix merge conflicts
* #44449: remove thumb methods from `Store` interface
* #44449: clean filepath, defer file closing
* #44449: fix rendering.Theme cyclic import
* #44449: linting
* #44449: linting
* #44449: mutex'd crawlerStatus access
* #44449: added integration tests for `sqlstore.dashboard_thumbs`
* #44449: added comments to explain the `ThumbnailState` enum
* #44449: use os.ReadFile rather then os.Open
* #44449: always enable dashboardPreviews feature during integration tests
* #44449: remove sleep time, adjust number of threads
* #44449: review fix: add `orgId` to `DashboardThumbnailMeta`
* #44449: review fix: automatic parsing of thumbnailState
* #44449: lint fixes
* #44449: review fix: prefer `WithDbSession` over `WithTransactionalDbSession`
* #44449: review fix: add a comment explaining source of the filepath
* #44449: review fix: added filepath validation
* #44449: review fixes https://github.com/grafana/grafana/pull/45063/files @fzambia
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
* Tooltips: Make tooltips non interactive by default
* More updates and cleanup
* Update
* Make time range picker tooltip interactive
* Fix issue
* Trying to make Receivers test faster
* Make JSONCell tooltip interactive
* feat: add serviceaccountDTO
* WIP
* feat: listing number of tokens for a given service account
* nit: removed fmt
* Update pkg/services/serviceaccounts/database/database.go
* Update public/app/features/serviceaccounts/ServiceAccountsListPage.tsx
* fixes
* align DTOProfile data to the frontend
* reviewed myself fixes
* fix: tests fix
* fix SA creation scope
* add writer action to SA fixed role
* ServiceAccounts: Add token table to SA detail page
* ServiceAccounts: Allow deletion of tokens from token table
* refactor service account page
* avoid using store for delete
* Narrow Variable editor state using selector functions
- Explicitly type "extended" editor state in editor/reducter.ts using a union
- Create selectors to narrow the types, using unique properties from each extended state to discriminate the union
- Update DataSourceVariableEditor to use new style of redux connector
- Update variable editor components to use new selectors
* fix tests
* Make adhoc variable infoText optional, because it is!
* Add AdHocVariableEditor tests
* DataSourceVariableEditor tests
* comment
* reset
* Wrote tests for selectors \(that actually caught a bug, whodathunkit)
* fix stray types and lint issues
* Rename selector functions
* Add tabIndex={-1} to places using focusScope to allow for text highlighting
* use useDialog
* don't need explicit tabIndex anymore
* remove duplicate spreading of props
* Suppress "not wrapped in act()" warning in UserPicker test
* Add menuShouldPortal to AmRoutesExpandedForm to suppress deprecation warning
* use forwardRef in alerting ActionIcon to suppress ref warning
* Add menuShouldPortal to alerting GroupBy to suppress deprecation warning
* AccessControl: Change teams permissions page when frontend is hit
* Implement frontend changes for group sync
* Changing the org/teams/edit permissions
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
* Fixing routes
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
* Use props straight away no need to go through the state
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/teams/TeamPages.tsx
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* first things
* show affected rules when creating silence
* revert typescript bump
* fix yarn lock
* fix import order
* fixing tests
* some layout for affected alerts
* fix test
* add default description
* review part 1
* Add a badge for number of affected alerts
* fix test
* remove blank space
* Prevent rule deletion when creation in a new folder fails
* Fix handling duplication of rules when moving between folders
* Add unit test for unique name generator
* Fix typo
* Add filtering by matching label
* Add label and contact based filters to Notification policies
* Improve filters UI, add clear filters option
* Add clearing of filters before switching to adding mode
* Move filtering code to the AmRoutesTable component
* Fix the clearing of silences filter
* Remove key-based input resetting
* Use uniqueId for input key generation
* Add tests for notification policies filtering
* refactor: use server admin listing serviceaccounts
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* setup route for specifc service account
* add routes to index
* main issue with spelling mistakes
* feat: make routes /serviceacconts/id for navModel
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Update pkg/services/serviceaccounts/manager/service.go
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* add tests
* fix up
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* Mark up User profile page for translation
* Extract new messages
* updated selectors
* update selectors
* wip TestProvider
* update tests
* fix field labels
* extract new messages
* don't store date objects in redux state
* don't store date objects in redux state
* Refactor: move fetching from role picker to parent component
* Make built in role props optional
* Initial team role picker
* Add role picker to the teams list
* Optimize fetching roles
* Add pagination for the teams page
* Fix tests
* Hide roles if access control not enabled
* Fix test snapshots
* Refactor: use useAsync() hook
* Refactor: simplify input component
* Move api calls to separate file
* Refactor: use useAsync() hook for user role picker
* Tweak role picker input width
* Fix pagination
* Update test snapshots
* Use loading state from useAsync() hook
* Fix roles label if no roles assigned
* Chore: move constants to own file
* Chore: moves safe* functions to grafana/data
* Chore: moves safe* functions to grafana/data
* Chore: adds VariableQueryEditorProps and deprecates VariableQueryProps
* Chore: remove getDefaultVariableAdapters function
* Chore: moves transaction status to types
* Chore: fix tests that do not initialise TemplateSrv
* Chore: change space when stringifying
* Chore: revert safe* func move
* Chore: remove circular dependency in Explore utils
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>>
* Split silence matchers parameter into a separate entry for each label
* Unify the silence link creation
* Remove duplicated matchers when parsing to/from query params
* Add tests for matchers
* Add a comment with a duplication removal explanation
* Improve label duplication comment
* Remove redundant code
* Use uniqBy to simplify the code. Rename matchers parameter
* Fix Silence test data