Plugins: Add fuzzy search to plugins catalogue (#81001)

* WIP add fuzzysearch to plugins catalog

* Add keywords to the plugins listing output

* add fuzzy search to plugin catalog, add keywords to plugins at frontend side

* refactor fuzzysearch function after review

* review changes

* change the version of uFuzzy library

* change reduce result object in getPluginDetailsForFuzzySearch

* fix yarn lock error

* fix helpers tests

* fix frontend searching test

* fix frontend linting issues

* fix tests

---------

Co-authored-by: Esteban Beltran <esteban@academo.me>
Co-authored-by: Giuseppe Guerra <giuseppe@guerra.in>
This commit is contained in:
Yulia Shanyrova
2024-02-14 14:30:24 +01:00
committed by GitHub
parent cf65d91ee9
commit 9dcb7800de
19 changed files with 314 additions and 164 deletions

View File

@ -49,7 +49,8 @@ func Test_ReadPluginJSON(t *testing.T) {
{Path: "img/screenshot1.png", Name: "img1"},
{Path: "img/screenshot2.png", Name: "img2"},
},
Updated: "2015-02-10",
Updated: "2015-02-10",
Keywords: []string{"test"},
},
Dependencies: Dependencies{
GrafanaVersion: "3.x.x",
@ -107,7 +108,7 @@ func Test_ReadPluginJSON(t *testing.T) {
pluginJSON: func(t *testing.T) io.ReadCloser {
pJSON := `{
"id": "grafana-pyroscope-datasource",
"type": "datasource",
"type": "datasource",
"aliasIDs": ["phlare"]
}`
return io.NopCloser(strings.NewReader(pJSON))