Commit Graph

42 Commits

Author SHA1 Message Date
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
Arve Knudsen
5070f7a75b
Chore: Start harmonizing linting with plugin SDK (#25854)
* Chore: Harmonize linting with plugin SDK

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-29 14:08:32 +02:00
Emil Tullstedt
55c306eb6d
Refactor search (#23550)
Co-Authored-By: Arve Knudsen <arve.knudsen@grafana.com>
Co-Authored-By: Leonard Gram <leonard.gram@grafana.com>
2020-04-20 16:20:45 +02:00
Carl Bergquist
3fdd2648b1
Chore: Avoid aliasing importing models in api package (#22492) 2020-03-04 12:57:20 +01:00
Oleg Gaidarenko
75fa1f0207 Metrics: use consistent naming for exported variables (#18134)
* Metrics: remove unused metrics

Metric `M_Grafana_Version` is not used anywhere, nor the mentioned
`M_Grafana_Build_Version`. Seems to be an artefact?

* Metrics: make the naming consistent

* Metrics: add comments to exported vars

* Metrics: use proper naming

Fixes #18110
2019-07-16 16:58:46 +02:00
Torkel Ödegaard
8b0dd4244b
Search: Fixes search limits and adds a page parameter (#16458)
* Search: Fixes search limits and adds a page parameter

This adds a page parameter to search api without adding
any major breaking change.

It does at an api validation error when trying to use
a limit beyond 5000. This is a breaking change. We could
remove this and have it only in the docs and describe that this
is a limit that grafana will apply silently.

Fixes #16049

* Fix: Corrected wrong array slice change

* Docs: minor docs fix

* Search: fixed folder tests

* Fixed: Moved limit to correct inner query

* Search: moving limit check and page check

* Search: limit in handler is no longer needed
2019-04-17 13:07:50 +02:00
bergquist
8a3a3cccc3 moves metric package to /infra
ref #14679
2019-02-24 21:12:51 +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
Torkel Ödegaard
8e8f3c4332 dashboard and folder search with permissions 2018-02-08 17:11:01 +01:00
Torkel Ödegaard
fc1d8416a7 working on dashboard search 2017-11-20 12:47:03 +01:00
Torkel Ödegaard
3066280216 added code from #8504, and #8021 2017-06-23 17:13:58 -04:00
Daniel Lee
5cf40cbd12 WIP: move guardian logic for search into the sql query 2017-06-17 02:34:05 +02:00
Daniel Lee
c602afb9c6 WIP: dashboard search by folder + toggle for list or tree mode 2017-06-12 15:49:09 +02:00
Daniel Lee
68b9342de3 WIP: dashboard search by type (folder or dash) 2017-06-12 15:49:09 +02:00
Daniel Lee
53d11d50fc WIP: remove browse mode for dashboard search
Dashboard folders included in all searches. If a dashboard matches
a search and has a parent folder then the parent folder is appended
to the search result. A hierarchy is then returned in the result
with child dashboards under their parent folders.
2017-06-12 15:49:09 +02:00
Daniel Lee
1248728d7f WIP: rough prototype of dashboard folders
Breaks some stuff like selected dash in the search result.
In dashboard search, if the user is not searching then the result is
returned as a tree structure. No ACL's or user group ux yet.
2017-06-12 15:49:09 +02:00
Torkel Ödegaard
35a7a3a52b feat(instrumentation): added some more timers 2016-06-03 17:00:39 +02:00
Torkel Ödegaard
fbd94fc6ce feat(websockets): inital work on websockets, #4355 2016-03-14 11:59:51 +01:00
Torkel Ödegaard
5b6754ce6c Merge branch 'master' into websocket 2016-03-14 10:33:11 +01:00
bergquist
dd7e215e78 feat(dashslist): make sure dashbords exists in recently viewd dashboards
closes #4249
2016-03-05 12:27:37 +01:00
Torkel Ödegaard
fc877ae0f4 poc(websockets): websocket poc 2016-03-03 23:05:08 +01:00
Torkel Ödegaard
c709a28f02 More work on email and notification infra #1456 2015-06-05 08:15:38 +02:00
Torkel Ödegaard
50a1feb90a Dashboard list panel: Now supports search by multiple tags, Closes #2096 2015-06-02 11:04:06 +02:00
Torkel Ödegaard
dc607b8e8a Dashboard search now supports filtering by multiple dashboard tags, Closes #2095 2015-06-02 10:24:20 +02:00
Torkel Ödegaard
448a8b8d1c Major refactorings around searching, moved to seperate package, trying to move stuff out of models package, extend search support searching different types of entities and different types of dashboards, #960 2015-05-13 13:36:24 +02:00
Torkel Ödegaard
bb7d79e6d2 Refactoring search to support more than just db dashboards 2015-05-13 10:45:53 +02:00
Torkel Ödegaard
a40299b4dc Progress on json file index and search #960 2015-05-12 12:20:03 +02:00
Torkel Ödegaard
1a9f630710 Began work on adding json files to search, #960 2015-05-11 20:04:03 +02:00
Torkel Ödegaard
26e4809e2e Big Backend Refatoring: Renamed Account -> Org 2015-02-23 20:07:49 +01:00
Torkel Ödegaard
26eb6e559e Removed use of absolute urls in dashboard search and dashlist, root_url option is now not required, it is required if you use oauth or proxy grafana under suburl, #1483 2015-02-17 18:43:37 +01:00
Torkel Ödegaard
9818f81c5f Completed search makover 2015-02-07 16:12:29 +01:00
Torkel Ödegaard
397dfc54cd Fixed bug in png rendering when having changed public url 2015-02-06 14:17:40 +01:00
Torkel Ödegaard
8e1b753664 Added limit to dashboard list panel and search 2015-02-05 11:10:56 +01:00
Torkel Ödegaard
10820f31c2 Changed go package path 2015-02-05 10:37:13 +01:00
Torkel Ödegaard
076905d14e Added isStarred to search result hit, very inefficient loading right now but can be cached later on 2015-02-05 09:49:00 +01:00
Torkel Ödegaard
60541a455f Worked on search filter flag IsStarred, and updated frontend with new dashboard list panel 2015-02-04 11:35:59 +01:00
Torkel Ödegaard
4ea5d80099 Various fixes to data access 2015-01-20 15:23:14 +01:00
Torkel Ödegaard
90925273a0 User / Account model split, User and account now seperate entities, collaborators are now AccountUsers 2015-01-19 18:01:04 +01:00
Torkel Ödegaard
22156fe309 Big refactoring for context.User, and how current user info is fetching, now included collaborator role 2015-01-16 14:32:18 +01:00
Torkel Ödegaard
3226a3a58e Fixed hashing of passwords, Closes #3 2015-01-08 09:00:00 +01:00