Commit Graph

81 Commits

Author SHA1 Message Date
Eric Leijonmarck
e86283e8b1
LBAC for datasources: Adds teamUID to lbac rules for terraform resource consumption (#96048)
Add teamUID to lbac rules swagger
2024-11-08 08:53:38 +00:00
Ryan McKinley
6c9afba607
Reporting: update swagger with deprecations (#96008) 2024-11-07 15:08:03 +03:00
Jo
9f43724b57
AccessControl: Use UIDs for Resource permissions frontend (#95552)
* frontend can use uids to set resource permissions

* lint

* add uids to folder acl

* Update public/app/core/components/Select/UserPicker.tsx

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* simplify conditions

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2024-10-31 16:17:13 +01:00
Jo
90d2f4659e
Users: Allow specifying user UIDs in params (#95424)
* add user ID API translation

* add uid to user frontend

* use users' UIDs in admin pages

* fix ldapSync page

* use global user search for user by UID

* remove active org filtering

* remove orgID params
2024-10-30 14:14:42 +01:00
Matheus Macabu
69f185b459
CloudMigrations: handle provisioned data source error (#95473) 2024-10-28 12:02:46 +01:00
Jo
ed1ad34f9b
ServiceAccounts: Allow use of UIDs for Service Account routes (#95401) 2024-10-28 10:49:48 +01:00
Eric Leijonmarck
cc1976693b
LBAC for datasources: Docs update HTTP API (#95392) 2024-10-25 15:20:36 +01:00
Matheus Macabu
152b83b3fb
CloudMigrations: handle more error codes from GMS backend (#95257)
* CloudMigrations: remove unnecessary if feature toggle gating

* CloudMigrations: handle new error codes from backend
2024-10-24 15:55:02 +02:00
Ezequiel Victorero
12cc312920
Chore: Update swagger docs (#94701) 2024-10-22 15:18:14 -03:00
Dana Axinte
a50507e645
CloudMigration: Interpret error code from migration resource item (#94407)
* start on loading the error code

* error code to message mapping

* use resource code type

* use defined error code

* partial updates from comments

* i18nKey gen

* fixed t

* fixed translations

* typing
2024-10-17 14:09:09 +01:00
Ieva
dca881289a
Group attribute sync: Add swagger defs for group attribute sync endpoints (#94531)
* add generated files

* add swagger def for group role endpoint

* some cleanup to make Go client nicer to use
2024-10-17 12:01:55 +01:00
Marcus Efraimsson
b28085110d
Plugins: Auto instrumentation improvements (#94193) 2024-10-15 14:02:34 +02:00
Eric Leijonmarck
d5fe9ce87f
LBAC for datasources: Fix generated swagger updates (#94587)
fix: generated swagger updates
2024-10-14 16:14:11 +01:00
Ieva
8cade5c550
Role mapping: Add new query parameter to docs (#94413)
* small doc addition

* swagger gen

* pr feedback
2024-10-08 17:53:21 +01:00
Misi
bd7850853e
Auth: Attach external session info to Grafana session (#93849)
* initial from poc changes

* wip

* Remove public external session service

* Update swagger

* Fix merge

* Cleanup

* Add backgroud service for cleanup

* Add auth_module to user_external_session

* Add tests for token revocation functions

* Add secret migration capabilities for user_external_session fields

* Cleanup, refactor to address feedback

* Fix test
2024-10-08 11:03:29 +02:00
Jo
9eea0e99fc
Chore: Use UIDs as identifiers for teams frontend (#94345)
* Team frontend now uses UIDs as identifiers. Safe to revert
2024-10-08 09:48:35 +02:00
Ezequiel Victorero
cc40211f71
Chore: Update api docs (#92616) 2024-10-07 14:49:58 -03:00
Dana Axinte
d88be2819d
CloudMigrations: Store parent folder name in cloud_migration_resource table (#94009)
* use name in fe

* store parent folder name in local db

* clean up

* tiny test

* trial react

* rename to parent name

* go lint

* generate api and ts

* go tests

* rearrange

* clean

* update with suggestions from josh

* make library elements work

* updates from comments

* global migration types

* parent name for alter table
2024-10-07 11:35:08 +01:00
Dana Axinte
1a31abe254
CloudMigrations: Limit frontend query to get latest snapshots (#93639)
* latest param to endpoint and adapt frontend query

* change to sort param

* api

* remove description
2024-10-01 09:28:25 +01:00
Matheus Macabu
14abf2dab3
CloudMigrations: add Library Element as a valid migration resource type (#93781) 2024-09-26 15:29:28 +02:00
Mihai Doarna
ebd17adecf
API keys: Return 410 Gone status from POST /auth/keys endpoint (#92965)
* return 410 Gone status from POST /auth/keys endpoint

* generate swagger

* remove postAPIkeyResponse

* re-generate swagger

* remove docs for api key creation endpoint
2024-09-05 13:10:24 +03:00
Charandas
4f024d94d8
Authn: resolve issues with setting up a nil identity (#92620) 2024-08-29 00:49:41 +03:00
Eric Leijonmarck
577ebb3444
LBAC for datasources: Update swagger documentation (#92594)
* LBAC for datasources: Update swagger documentation

* update swagger again
2024-08-28 17:04:57 +01:00
Kristina
1dd830b9f1
Correlations: Migrate config type to root (#91855)
* WIP

* Validate new field, and add value in provisioning if not defined in correct spot

* Simplify logic, use correct value

* fix tests

* Fix linter errors

* fix swagger and tests

* 😬

* Auto-generation isnt doing this..

* Fix linter

* test if nullable is the issue…

* Change structure on the frontend fields

* Try with backtick

* try programatic quoting

* Try only quote non-ints

* quoting, no backticks

* Remove debugging
2024-08-26 08:02:48 -05:00
Dave Henderson
df3d8915ba
Chore: Bump Go to 1.23.0 (#92105)
* chore: Bump Go to 1.23.0

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* update swagger files

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* chore: update .bingo/README.md formatting to satisfy prettier

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* chore(lint): Fix new lint errors found by golangci-lint 1.60.1 and Go 1.23

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* keep golden file

* update openapi

* add name to expected output

* chore(lint): rearrange imports to a sensible order

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-08-21 11:40:42 -04:00
Alexander Akhmetov
a32854549c
Alerting: Support median in reduce expressions (#91119)
* Alerting: support median in reduce expressions
2024-08-01 15:04:17 +02:00
Ezequiel Victorero
d3a75a42a0
Chore: Update swagger docs (#90154) 2024-07-12 09:08:44 -03:00
Michael Mandrus
317da43a84
CloudMigration: Provide a stats rollup in the GetSnapshot response (#90252)
* order session list descending

* add snapshot status method to store

* query stats while retrieving snapshot

* return stats in dto

* swagger

* fix tests

* commit results of bingo get

* fix swagger

* minor improvement

* fix typo

* forgot a file
2024-07-10 08:46:38 -04:00
Ezequiel Victorero
ed736eb9a0
Chore: Update swagger docs (#90065) 2024-07-04 12:01:23 -03:00
Michael Mandrus
4d69213829
CloudMigrations: Break snapshot resources out into their own table (#89575)
* create a new table for migration resources

* remove raw result bytes from db

* more snapshot resource management stuff

* integrate new table with snapshots

* pass in result limit and offset as params

* combine create and update

* set up xorm store test

* add unit tests

* save some cpu

* remove unneeded arg

* regen swagger

* fix bug with result processing

* fix update create logic so that uid isn't required for lookup

* change offset to page

* regen swagger

* revert accidental changes to file

* curl command page should be 1 indexed
2024-06-24 23:50:07 -04:00
Michael Mandrus
8a8f97b0e4
CloudMigrations: Implement snapshot management apis (#89296)
* add new apis

* add payloads

* create snapshot status type

* add some impl

* finish implementing update

* start implementing build snapshot func

* add more fake build logic

* add cancel endpoint. do some cleanup

* implement GetSnapshot

* implement upload snapshot

* merge onprem status with gms result

* get it working

* update comment

* rename list endpoint

* add query limit and offset

* add helper method to snapshot

* little bit of cleanup

* work on swagger annotations

* manual merge

* generate swagger specs

* clean up curl commands

* fix bugs found during final testing

* fix linter issue

* fix unit test
2024-06-19 09:20:52 -04:00
Ezequiel Victorero
b4c5c62f59
Chore: Update api docs reporting (#88878)
Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2024-06-18 08:16:58 -03:00
Josh Hunt
51c0644e41
RestoreDashboards: add IsDeleted and PermanentlyDeleteDate to deleted search (#89283)
RestoreDashboards: add IsDeleted and PermanentlyDeleteDate to deleted items in Search
2024-06-17 14:26:23 +01:00
Michael Mandrus
9d3a4e236d
CloudMigrations: Refactor API for async work (#89084)
* rename some stuff

* more renaming

* clean up api

* rename more functions

* rename cms -> gms

* update comment

* update swagger gen

* update endpoints

* overzealous

* final touches

* dont modify existing migrations

* break structs into domain and dtos

* add some conversion funcs

* fix build

* update frontend

* try to make swagger happy
2024-06-13 17:58:59 +00:00
Ieva
eb535e163d
Docs: Add parameter definition to swagger for RBAC debug endpoint (#89097)
add parameter definition to swagger for RBAC debug endpoint
2024-06-13 20:01:12 +03:00
Sofia Papagiannaki
d2f44816fd
TeamLBAC: add missing swagger tag (#88374) 2024-05-28 15:34:30 +03:00
Sofia Papagiannaki
39298a656a
Swagger: sync specs with enterprise (#88355) 2024-05-28 01:12:54 +03:00
Juan Cabanas
a85c1b69d5
PublicDashboards: Remove publicDashboardUid from DashboardMeta (#85126) 2024-05-23 11:21:21 -03:00
Ieva
da1a99d729
Team: Add an endpoint for bulk team membership updates (#87441)
* add an endpoint for bulk team membership updates

* update comment

* schema gen

* test fix

* add swagger parameter definition
2024-05-17 13:41:41 +03:00
Ezequiel Victorero
42d75ac737
Dashboards: Add feature restore dashboards backend (#83131)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2024-05-16 14:36:26 -03:00
Bruno
6a3ab71d77
cms: clean up model file (#87179)
* move CreateAccessTokenResponseDTO to api.go

* remove unused types

* run make swagger-clean && make openapi3-gen
2024-05-13 00:22:19 -04:00
lean.dev
0719f73f35
Cloud Migration: Remove ID migration in favor of UID (#86550)
* - Added migration to add a new collumn UID to both migration and migration_run tables.
- Added migration to set UID for records already existent in the database before adding a new column.
- Added UID field to CloudMigration and CloudMigrationRun dtos (model.go)

* Fix db migration

* Updating store and model

* Updating API to use UID

* fix typo

* update openapi specs and generated endpoints

* fix spec

* update openapi specs and generated endpoints

* Fixing db mapping

* Fix frontend

* fix migration

* remove migration uid from run fetch endpoint

* Revert "merge"

This reverts commit d654e4c530, reversing
changes made to 5fe0b483eb.

* manual merge

* rename some funcs for consistency

* make interfaces consistent

* validate uids

* update generated frontend api

* fix enterprise spec

* manually resolve api

* try again

* try yet again

* once more

---------

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
2024-05-01 12:29:25 -04:00
Julien Duchesne
8d8f19b84f
Regenerate OpenAPI spec (#87050)
Issue: https://github.com/grafana/grafana/issues/86453
The endpoints were documented in enterprise Grafana
2024-04-29 16:27:59 +01:00
Sofia Papagiannaki
3ab361abfc
Chore: Update swagger (#86523)
* Chore: Update swagger
2024-04-18 15:35:38 +00:00
Josh Hunt
5ce8b60878
E2C: Resources table refactor (#85585)
* E2C: Resources table refactor

* update swagger spec with enums

* use native resource item type, rather than our mock type

* unit tests for resources table

* update spec
2024-04-05 10:08:42 +01:00
idafurjes
b885da09da
CloudMigrations: Implement migrations API (#85348)
* Implement run migration endpoint

* Refactor RunMigration method into separate methods

* Save migration runs fix lint

* Minor changes

* Refactor how to use cms endpoint

* fix interface

* complete merge

* add individual items

* adds tracing to getMigration

* linter

* updated swagger definition with the latest changes

* CloudMigrations: Implement core API handlers for cloud migrations and migration runs (#85407)

* implement delete

* add auth token encryption

* implement token validation

* call token validation during migration creation

* implement get migration status

* implement list migration runs

* fix bug

* finish parse domain func

* fix urls

* fix typo

* fix encoding and decoding

* remove double decryption

* add missing slash

* fix id returned by create function

* inject missing services

* finish implementing (as far as I can tell right now) data migration and response handling

* comment out broken test, needs a rewrite

* add a few final touches

* get dashboard migration to work properly

* changed runMigration to a POST

* swagger

* swagger

* swagger

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com>
Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
2024-04-03 13:36:13 +02:00
Leonard Gram
4e89267603
Cloudmigration: swagger for the cloudmigration api (#85255)
* swagger for create token

* tried to fix errors

* update swagger annotations

* update swagger annotations

* update api GetMigrationList to return the *Response directly

* clean up previous commit

---------

Co-authored-by: joshhunt <josh@trtr.co>
2024-04-02 13:57:42 +02:00
Lucy Chen
351425ab3d
Reporting: Update api doc files (#84358) 2024-03-19 17:19:14 -04:00
Lucy Chen
9d4504da08
Reporting: Update api doc for deprecated old schedule (#84072)
update api doc
2024-03-15 14:46:53 +09:00
Gilles De Mey
8765c48389
Alerting: Remove legacy alerting (#83671)
Removes legacy alerting, so long and thanks for all the fish! 🐟

---------

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Co-authored-by: Sonia Aguilar <soniaAguilarPeiron@users.noreply.github.com>
Co-authored-by: Armand Grillet <armandgrillet@users.noreply.github.com>
Co-authored-by: William Wernert <rwwiv@users.noreply.github.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-03-14 15:36:35 +01:00