31 Commits

Author SHA1 Message Date
002f46736a refactor(unified-storage): move generated protos to own pkg (#105356) 2025-05-15 21:36:52 +02:00
b09d79b21c K8s/Dashboard: Promote from alpha1 to beta1 (#104009) 2025-04-23 20:54:35 +03:00
0283c98e30 K8s/Folders: Use v1beta1 and app-sdk based spec (#103975) 2025-04-14 23:20:10 +03:00
f5ad1ef69b K8s: Folders: Add v1 api (#103842) 2025-04-11 13:09:52 +01:00
08bbd7a536 fix (unified-storage): always do perm filtering in bleve by default (#102541)
* make unifiedStorageSearchPermissionFiltering default true
2025-03-21 10:06:01 -04:00
c33a53a47a K8s: Remove restore functionality; can be done with list (#102560) 2025-03-20 16:38:32 -05:00
5d2ba10113 K8s/Dashboards: Extract Dashboard APIs to an app submodule (#102029)
* Move dashboard k8s APIs to a separate app

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Copy dashboard code in Dockerfile

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Fix conversion generation

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Update OpenAPI snapshot for dashboard/v0alpha1

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
2025-03-13 11:05:01 +02:00
827da46c51 Unified Storage: Remove wildcard queries (#101441)
* WIP adding custom analyzer so we can do substring search efficiently

* Adding unit tests for title search

* formatting

* adds more title search unit tests

* organize helpers

* fixes issue caused by having two title mappings

* Removes camelcase token filter since it prevents you from searching for a substring of chars and numbers. Adds regression test.

* adds back mapping for title_phrase

* use simple analyzer for input query string so it doesn't filter out english stop words

* ran bleve tests, table snapshots updated

* ignore linter for "unused" test functions. They are very helpful for troubleshooting search. Keeping them.

* only log total hits and query cost if result not nil

* fixes failing test - one more field because there are two title mappings now

* fix test

* fixes test - only take first item when its the title

* Adds separate internal field for title ngram mapping.

When searching with a query, results are sorted by score desc.

When searching without a query, results are sorted by title desc.

Adjusts ngram max to be 10.

Text queries are a disjunction of an exact match, phrase match, and a match. Boosted to have priority in that order.

Adds more unit tests for searching.

* linter

* fix test

* ran tests - generated new test dash json

* sort by title phrase instead of title

* fix test - not relying on /apis/dashboard/search to apply title sorting anymore
2025-03-07 09:51:15 -06:00
2e0d2f3c76 fix(unified-storage): break dependency from dualwriter in resource module (#101788) 2025-03-07 15:27:31 +01:00
c1b48cc488 Dashboards: Add apiVersion to dashboard table (#100845) 2025-03-04 07:47:45 +03:00
74e621f377 fix(unified-storage): "sharedwithme" search in legacy modes returns everything (#101054)
* fix "sharedwithme" search returning everything when user does not have any shared dashboards
2025-02-20 09:53:06 -05:00
5a40c84568 DualWriter: Support managed DualWriter (#100881) 2025-02-19 17:50:39 +03:00
67be9aeed6 K8s: Search fallback: Support all sort by methods (#100776) 2025-02-18 12:30:11 -06:00
1856d47e47 Remove GetResourceClient hack from unified package. (#100636)
* Remove GetResourceClient hack from unified package.
2025-02-14 12:34:52 +01:00
c963032915 search: handle "sharedwithme" use-case in both legacy/US modes (#100286)
* handle "sharedwithme" use-case in both legacy/US modes

* display "Shared with me" as location in dashboard list

* fix missing "TotalHits" prop in mode 2
2025-02-13 15:56:29 -05:00
df84d928e2 K8s: Folders: Fix legacy search (#100393) 2025-02-11 13:14:25 -06:00
378bb6ea3f [search] folder name lookup performance (#100154)
[search] use search for folder name lookup
2025-02-07 17:19:23 -05:00
7e11e604c7 [search] fix offset param in finddashboards (#100302)
* fix offset param in finddashboards

* separate offset from page in k8s search endponit
2025-02-07 13:24:27 -05:00
1467d4b3e3 [search] Legacy search fallback support legacy query params (#99765)
* add support for deleted query param

* support tag query param in modes 2 and below

* handle dashboardIds

* hhandle dashboardUIDs

* handle folderUIDs query param

* handle page query param when hitting legacy storage

* handle sort query param

* handle type query param

* re-enable search fallback

* remove folder search workaround and fix /api/search to return both folders and dashboards when no title or type is provided

---------

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-02-06 11:30:47 -05:00
ce38eb3398 [search] fix dashboard list default sort (#99813)
[search] fix dashboard list default sort
2025-01-30 14:22:22 -05:00
be8396cafa Setup legacy search based on mode (#98908) 2025-01-27 12:32:07 -06:00
28ad61ff6c Unistore: Get Folder By ID (#99131)
* Unistore: Get Folder By ID

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-01-22 01:45:59 -03:00
d00592ffa0 Unified Storage: Make all dashboard fields searchable (#98899)
* wip. adding sprinkles fields.

* some refactoring. Works with sprinkles now.

* exclude top level dashboard hit fields from hit "fields"

* adds unit test for DecodeCell helper

* test can search for specific dashboard fields on bleve index

* adds search handler tests for the fields and tests for fields when transforming the search req to a bleve search req

* fix panic when calling fields.Set() with int32

* adds regression test

* remove unneeded method on test mock client

* fix linter issues

* updates dashboard test data for bleve tests

* remove DASHBOARD_LEGACY_ID from bleve_tests

* dont cast twice

* updates test to sort by dashboard_views_last_1_days

* declare excludedFields outside of function

* fixes sorting by dashboard fields - prepends "fields." to any dashboard fields we try to sort by

* uses map for excludedFields

* expects fields to be array-style url param

* change method name

* fixes failing tests - needed to add column type to mocks
2025-01-15 10:23:05 -06:00
01aeb56646 [search] fix browse mode to show dashboards (#98842)
[search] fix browse mode to show dashboards
2025-01-11 11:09:31 -05:00
07d3bdbe72 [search] - filter by starred (#98651)
[search] - filter by starred
2025-01-09 16:45:04 -05:00
c566e6af4e K8s: Dashboards: Fix search parsing (#98560) 2025-01-06 15:41:45 -06:00
d1d7c0850f Search: Explain scores (#98316) 2025-01-06 11:25:32 -05:00
03f7a7d89d K8s: Dashboards: Add search to dashboard service (#98395) 2025-01-02 09:39:45 -06:00
a8f347144d wire up the ui to the new search api (#97866)
wire up the ui to the new search api

Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
2024-12-19 13:21:48 -05:00
f6ccf976e5 UnifiedSearch: Use ResourceIndex from dashboards apiserver (v0alpha1 only) (#96939) 2024-11-27 07:57:53 +02:00
94262fd095 Search: expose search on dashboard apiserver (v0alpha1) (#96907) 2024-11-22 22:26:56 +02:00