Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Add search folder by UID #22

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

overdrive3000
Copy link

Allow to search a folder in grafana by using UID

@jleeh
Copy link
Contributor

jleeh commented Sep 16, 2019

Implemented a light weight version of this in #25. Any movement on getting any of this or my PR merged @mlclmj?

Comment on lines +40 to +41
ID int64 `json:"id"`
UID string `json:"uid"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Comment on lines +46 to +47
FolderID int64 `json:"folderId"`
FolderUID string `json:"folderUid"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Id int64 `json:"id"`
Uid string `json:"uid"`
ID int64 `json:"id"`
UID string `json:"uid"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a great idea to be renaming these, as we tend to follow the Id and Uid convention for these fields. Would you be alright keeping these as-is?

func (c *Client) DeleteDashboard(slug string) error {
path := fmt.Sprintf("/api/dashboards/db/%s", slug)
// DeleteDashboard deletes a grafana dashoboard
func (c *Client) DeleteDashboard(uid string) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a DeleteDashboardByUid function and mark the existing one as deprecated?

@@ -31,6 +35,24 @@ type Dashboard struct {
Overwrite bool `json:overwrite`
}

// Dashboards represent json returned by search API
type Dashboards struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is specific to the search endpoint can we name it something more along the lines of DashboardSearchResponse?

@mlclmj mlclmj added enhancement size/L Denotes a PR that changes 100-499 lines labels Oct 17, 2019
@tonglil tonglil added the waiting response Waiting for a response from the author label Jun 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement size/L Denotes a PR that changes 100-499 lines waiting response Waiting for a response from the author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants