A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/grafana/mcp-grafana/commit/c0285071538bae5157c669f4f887010eee5b6e96 below:

add the specific dashboard type as this returns folders as well (#76) · grafana/mcp-grafana@c028507 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+7

-0

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+7

-0

lines changed Original file line number Diff line number Diff line change

@@ -5,6 +5,8 @@ build/

5 5

dist/

6 6

wheels/

7 7

*.egg-info

8 +

.DS_Store

9 +

.vscode/

8 10 9 11

# Virtual environments

10 12

.venv

Original file line number Diff line number Diff line change

@@ -11,6 +11,8 @@ import (

11 11

mcpgrafana "github.com/grafana/mcp-grafana"

12 12

)

13 13 14 +

var dashboardTypeStr = "dash-db"

15 + 14 16

type SearchDashboardsParams struct {

15 17

Query string `json:"query" jsonschema:"description=The query to search for"`

16 18

}

@@ -20,6 +22,7 @@ func searchDashboards(ctx context.Context, args SearchDashboardsParams) (models.

20 22

params := search.NewSearchParamsWithContext(ctx)

21 23

if args.Query != "" {

22 24

params.SetQuery(&args.Query)

25 +

params.SetType(&dashboardTypeStr)

23 26

}

24 27

search, err := c.Search.Search(params)

25 28

if err != nil {

Original file line number Diff line number Diff line change

@@ -8,6 +8,7 @@ package tools

8 8

import (

9 9

"testing"

10 10 11 +

"github.com/grafana/grafana-openapi-client-go/models"

11 12

"github.com/stretchr/testify/assert"

12 13

"github.com/stretchr/testify/require"

13 14

)

@@ -20,5 +21,6 @@ func TestSearchTools(t *testing.T) {

20 21

})

21 22

require.NoError(t, err)

22 23

assert.Len(t, result, 1)

24 +

assert.Equal(t, models.HitType("dash-db"), result[0].Type)

23 25

})

24 26

}

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4