Commit Graph

49 Commits

Author SHA1 Message Date
김은빈
96dfb385ca
Grafana: Replace magic number with a constant variable in response status (#80132)
* Chore: Replace response status with const var

* Apply suggestions from code review

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Add net/http import

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2024-02-27 18:39:51 +02:00
Todd Treece
67b6be5515
K8s: Refactor config/options for aggregation (#81739) 2024-02-01 17:27:30 -05:00
Ryan McKinley
f69516bf47
K8s: Add resource type helper to avoid so many hardcoded names (#79344) 2023-12-11 22:03:48 +02:00
Ryan McKinley
f69fd3726b
FeatureToggles: Add context and and an explicit global check (#78081) 2023-11-14 12:50:27 -08:00
Ryan McKinley
4b5310dae7
Playlists: Merge the frontend vs backend k8s feature flags (#77875) 2023-11-08 21:14:05 +02:00
Ryan McKinley
549787d4f9
Playlist: Implement the entire API with k8s client (#77596) 2023-11-03 09:25:29 -07:00
Ryan McKinley
dd654fdc87
K8s/Playlist: Refactor apis packages so the types and registry are in different packages (#77586) 2023-11-03 08:07:55 -07:00
Todd Treece
384f5ccdc6
Playlist: Add internal API version (#77318) 2023-11-01 09:44:04 -04:00
Ryan McKinley
dd773e74f1
K8s: Implement playlist api with k8s client (#77405) 2023-10-31 10:26:39 -07:00
Jo
729dafaff9
Auth: Unfurl OrgID in pkg/api to allow using identity.Requester interface (#76108)
Unfurl OrgID in pkg/api to allow using identity.Requester interface
2023-10-06 11:34:36 +02:00
Ryan McKinley
bbdd1fc3b1
Playlist: Remove unused/deprecated api and unused wrapper (#75503) 2023-09-27 15:28:16 +00:00
idafurjes
6c5a573772
Chore: Move ReqContext to contexthandler service (#62102)
* Chore: Move ReqContext to contexthandler service

* Rename package to contextmodel

* Generate ngalert files

* Remove unused imports
2023-01-27 08:50:36 +01:00
Ryan McKinley
3b1a8d45ed
Playlist: update service so it supports both read+write (#55959) 2022-10-04 11:11:18 -04:00
sam boyer
9ec7b202b6
playlist: introduce coremodel schema, swap in for backend DTO types (#56048)
* Add simplest possible playlist schema

* Add @grafana(decisionNeeded) attributes

* playlistid, not playlist_id
2022-09-30 06:33:11 -04:00
idafurjes
a14621fff6
Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343)
* Chore: Add user service method SetUsingOrg

* Chore: Add user service method GetSignedInUserWithCacheCtx

* Use method GetSignedInUserWithCacheCtx from user service

* Fix lint after rebase

* Fix lint

* Fix lint error

* roll back some changes

* Roll back changes in api and middleware

* Add xorm tags to SignedInUser ID fields
2022-08-11 13:28:55 +02:00
Sofia Papagiannaki
7ba076de10
Chore: Move swagger definitions to the handlers (#52643) 2022-07-27 09:54:37 -04:00
Sofia Papagiannaki
fb379ae436
Chore: Introduce playlist service (#52252)
* Store: Introduce playlist service

* Integrate playlist service

* Update swagger
2022-07-18 05:26:35 -04:00
Kristin Laemmert
a33a023629
backend: add PlaylistUIDs to Playlist; remove playlist IDs from API (#49609)
* backend/api: refactor PlaylistId to PlaylistUid
* Add org_id to Get and Update playlist functions
Fix migration - no longer pad the uid; fix mysql syntax

The relevant tests are passing using postgres, mysql and the default sqllite backends, but there are a number of other failing tests when using postgres and myself so I'm not entirely confident with those results.

* fix bad query in GetPlaylistItem and add a test that would have caught the mistake in the first place. Reverted the playlist_uid column addition in playlist_item; it became unnecessary after this PR.

Added default value to the new UID column based on PR feedback.

* break this PRs migration into its own function

* Playlists: Update UI to use the updated API

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-06-14 15:32:52 -04:00
ying-jeanne
7ddae870e7
fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
idafurjes
82892331c1
Chore: Remove bus from signup and playlist api (#44485)
* Remove bus from signup and playlist api

* Remove bus from playlist play
2022-01-27 10:33:02 +01:00
ying-jeanne
7422789ec7
Remove Macaron ParamsInt64 function from code base (#43810)
* draft commit

* change all calls

* Compilation errors
2022-01-15 00:55:57 +08:00
idafurjes
8e6d6af744
Rename DispatchCtx to Dispatch (#43563) 2021-12-28 17:36:22 +01:00
Serge Zaitsev
d9cdcb550e
Chore: Refactor api handlers to use web.Bind (#42199)
* Chore: Refactor api handlers to use web.Bind

* fix comments

* fix comment

* trying to fix most of the tests and force routing.Wrap type check

* fix library panels tests

* fix frontend logging tests

* allow passing nil as a response to skip writing

* return nil instead of the response

* rewrite login handler function types

* remove handlerFuncCtx

* make linter happy

* remove old bindings from the libraryelements

* restore comments
2021-11-29 10:18:01 +01:00
idafurjes
87f148aa27
Chore: Add context to playlist (#41337)
* Add context to playlist

* Add AddEventListenerCtx and more context

* Update pkg/services/sqlstore/playlist.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update pkg/services/sqlstore/playlist.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update pkg/services/sqlstore/playlist.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Fix lint

* Rename listener help function

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-11-19 14:32:14 +01:00
Marcus Efraimsson
2d2f7afbde
Chore: Propagate context for search (#41010)
Propagate context for search.Query, FindPersistedDashboardsQuery, 
GetUserStarsQuery. Followup on context.TODO added by #40810.

Ref #36734
2021-10-28 11:29:07 +02:00
Hugo Häggmark
3d41267fc4
Chore: Moves common and response into separate packages (#30298)
* Chore: moves common and response into separate packages

* Chore: moves common and response into separate packages

* Update pkg/api/utils/common.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: changes after PR comments

* Chore: move wrap to routing package

* Chore: move functions in common to response package

* Chore: move functions in common to response package

* Chore: formats imports

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-01-15 14:43:20 +01:00
Sofia Papagiannaki
7ad1e3663c
Playlists: Remove API validation for empty playlists and remove redundant API call (#26982)
* 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
2020-08-14 11:59:50 +03:00
Carl Bergquist
3fdd2648b1
Chore: Avoid aliasing importing models in api package (#22492) 2020-03-04 12:57:20 +01:00
Mario Trangoni
ab4e1526b3 Codestyle: Fix some goconst issues (#17530)
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2019-06-12 07:27:47 +02:00
zhulongcheng
2fff8f77dc move log package to /infra (#17023)
ref #14679

Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
2019-05-13 08:45:54 +02:00
Augustin
05e060dee0 HTTP API documentation +fix when updating a playlist (#12612)
* get id from path param when updating a playlist

* add playlist http api documentation

* remove required condition for the id in update cmd
2018-07-17 07:45:38 -07:00
Kim Christensen
7534f0bff6 Support deleting empty playlist 2018-04-15 21:37:34 +02:00
Julian Kornberger
0a415c50d0 Make golint happier 2018-03-22 22:38:44 +01:00
Julian Kornberger
7aab6a8887 Make golint happier 2018-03-22 12:40:21 +01:00
Dan Cech
c0ecdee375
rename Context to ReqContext 2018-03-07 11:54:50 -05:00
Dan Cech
338655dd37
move Context and session out of middleware 2018-03-06 18:16:49 -05:00
Daniel Lee
5cf40cbd12 WIP: move guardian logic for search into the sql query 2017-06-17 02:34:05 +02:00
utkarshcmu
c737704eeb Removed playlist item when dashboard is deleted 2016-11-06 01:49:43 -08:00
bergquist
00dc078311 feat(playlist): render playlists if playlist id is invalid
close #4209
2016-03-01 13:50:55 +01:00
bergquist
d66932a8a2 chore(playlist): extract playlist start into new file 2016-01-28 23:56:56 +01:00
Torkel Ödegaard
6fc972ab1e feat(playlists): merge sync with RP 2016-01-18 16:05:38 +01:00
Torkel Ödegaard
66eebd1ac3 refactor(playlist): refactor of playlist feature, and PR #3776 2016-01-18 16:01:14 +01:00
bergquist
458d15063d fix(playlist): remove invalid logging 2016-01-12 14:28:19 +01:00
bergquist
e8786b0747 feat(playlist): renames timespan to interval 2016-01-12 13:56:47 +01:00
bergquist
b79f04493d style(playlist): abstract DTO creation 2016-01-12 08:36:25 +01:00
bergquist
8a38991270 feat(playlist): changes to relation table
Also introduces an abstraction between playlist and dashboard.
This will make it possible to att search, and tag filtering to
playlists without any major refactoring
2016-01-12 08:17:44 +01:00
bergquist
0918063c55 fix(playlist): move dashboard uri cration to Backend 2016-01-08 16:13:49 +01:00
bergquist
22c001c8a6 fix(playlist): implement api according to new standard 2016-01-08 14:21:30 +01:00
utkarshcmu
bcaaedf2ff Resurrected nikita-graf's work and added playlistType for future use 2015-12-22 02:07:15 -08:00