Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Dashboard search #22

Merged
merged 2 commits into from
Oct 28, 2015
Merged

Feature: Dashboard search #22

merged 2 commits into from
Oct 28, 2015

Conversation

stephenyeargin
Copy link
Owner

Related to #20

There is an API endpoint that accepts a query string to search available dashboards. Rather than re-invent the wheel, this adds two new calls to leverage that endpoint. This prevents a user from haivng to always use hubot graf list to get the entire list of the dashboards in order to query one of them.

  • hubot graf search <term> will translate to /api/search/?query=<term> and return dashboards that have titles that match specified term
  • hubot graf list <tag> will translate to /api/search/?tag=<tag> and return dashboards that match the specified tag

Related to #20

There is an API endpoint that accepts a query string to search available dashboards. Rather than re-invent the wheel, this adds two new calls to leverage that endpoint. This prevents a user from haivng to always use `hubot graf list` to get the entire list of the dashboards in order to query one of them.

- `hubot graf search <term>` will translate to `/api/search/?query=<term>` and return dashboards that have titles that match specified term
- `hubot graf list <tag>` will translate to `/api/search/?tag=<tag>` and return dashboards that match the specified tag
@@ -57,5 +57,7 @@ hubot>> Graphite Carbon Metrics: http://play.grafana.org/render/dashboard/solo/g
- `hubot graf db graphite-carbon-metrics now-12hr` - Get a dashboard with a window of 12 hours ago to now
- `hubot graf db graphite-carbon-metrics now-24hr now-12hr` - Get a dashboard with a window of 24 hours ago to 12 hours ago
- `hubot graf db graphite-carbon-metrics:3 now-8d now-1d` - Get only the third panel of a particular dashboard with a window of 8 days ago to yesterday
- `hubot graf db graphite-carbon-metrics host=carbon-a` - Get a templated dashboard with the `$host` parameter set to `carbon-a`
- `hubot graf db graphite-carbon-metrics host=carbon-a` - Get a templated dashboard with the `$host` parameter set to `carbon-a`j
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is that new "j" at the end of the line intentional? It looks pretty out of place to me.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah, I think I bumped it while in insert mode on Vim. Not intentional.

@stephenyeargin
Copy link
Owner Author

@Tenzer fixed up stuff in be6ccb2

stephenyeargin added a commit that referenced this pull request Oct 28, 2015
@stephenyeargin stephenyeargin merged commit c931571 into master Oct 28, 2015
@stephenyeargin stephenyeargin deleted the search-dashboards branch October 28, 2015 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants