* 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: scoping for service accoutns
* fix: scoping for service accoutns
* Update pkg/services/serviceaccounts/api/api.go
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* API: Using go-swagger for extracting OpenAPI specification from source code
* Merge Grafana Alerting spec
* Include enterprise endpoints (if enabled)
* Serve SwaggerUI under feature flag
* Fix building dev docker images
* Configure swaggerUI
* Add missing json tags
Co-authored-by: Ying WANG <ying.wang@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* 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
* fix(detect-breaking-changes): use the base.ref for backport compatibility
* chore(check-breaking-changes): update path to previous package dist directory
We would like this to have a bit better chance for helping out with
breaking changes in the beginning and also to have a historical overview
of what happened.
* Remove UpgradeBox from report nav
* Add children prop
* Update icon
* Update styles
* Update text
* Add pro badge to main nav
* Remove redundant span
* Update secondaryAction
* 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
Fixing a couple bugs, adds some tests and hopefully decrease
lock contention when logging.
Switching from using sync.RWMutex to go-kit SwapLogger.
Fixes bug when creating a new logger from an existing one that
screwed up the keyvals and/or lost the logger name.
Ref #44681
* Prometheus: Add multi-word search and higlight to metric selector
* Remove redundant test
* Remove redundant test id
* Update PromQueryBuilder test
* Match only words split with space
* ServiceAccounts: move token handlers to specific file
* ServiceAccounts: move Add API key to Service account
* APIKeys: api keys can still be used even when service accounts are enabled
* APIKeys: legacy endpoint can't be used to add SA tokens
* ServiceAccount: add tests for creation with nil and non-nil service account ids
* ServiceAccounts: fix unnasigned cfg and AC typo
* Test: test service account token adding
* fix linting error
* ServiceAccounts: Handle Token deletion
* rename token funcs
* rename token funcs and api wrapping
* add token deletion tests
* review
Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
* remove bus
* Update pkg/api/apikey.go
Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
* Prometheus: Query builder legend format, first working state
* Added format option
* Working options section
* Wrapping stuff up removing old stuff
* Fixed ts issues
* Review fixes
* Added unit tests for preview toggle