19 Commits

Author SHA1 Message Date
945bc53b4c DualWrite: Manage values from KV store (not file) (#106772) 2025-06-18 10:37:44 +03:00
002f46736a refactor(unified-storage): move generated protos to own pkg (#105356) 2025-05-15 21:36:52 +02: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
64f1df69d5 Search: Rename managed object index (#101856) 2025-03-10 19:48:53 +03: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
806c043e45 UnifiedStorage: Rename Batch processing to Bulk (#101413) 2025-02-28 08:41:08 +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
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
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
20f02ec12f Unistore: refactor provisioning to work with folder service (#99473) 2025-01-29 05:19:38 +02:00
6908f91428 Search fallback: prevent for now (#99725) 2025-01-29 04:57:34 +02:00
be8396cafa Setup legacy search based on mode (#98908) 2025-01-27 12:32:07 -06:00
7da6e48036 Unified Storage: Remove history stub (#99048)
remove history stub
2025-01-16 03:05:13 +02: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