sensu / sensu-dashboard

A dashboard for Sensu, for displaying & managing events & clients.
http://sensuapp.org
MIT License
96 stars 44 forks source link

Add check requests #154

Open Fizzadar opened 10 years ago

Fizzadar commented 10 years ago

This adds the ability to manually run check requests via the dashboard. Will only work with Sensu version '0.11.0' as the API appears to have changed in 0.12.0 and I can't find any documentation on it (assume WIP as the default version Apt installs is 0.11.0).

Apologies for the code, learning Ruby & Coffee on the fly here - will not be offended if this request is deleted/not-merged!

nstielau commented 10 years ago

Awesome stuff. Do you think requesting many checks is a common use-case? What do you think about a modal with a "Request" button for UX instead?

A modal might be nice additionally so we can truncate the check command line, but show the full value in the modal (since some checks like graphite URLs get really wide).

Fizzadar commented 10 years ago

100% agree with you, requesting multiple checks is unlikely to ever be used, I just followed the checkbox system from the other pages. A modal would be nicer, and also solve the problem with extra long command lines. I'm pretty busy at the moment but will definitely work on switching to the modal when I get a chance!

amdprophet commented 10 years ago

Most of the code looks great. Take a look at a few of the other models; writing jQuery AJAX requests shouldn't be necessary with Backbone JS (with the exception of the call in the bootstrapper code).

nstielau commented 10 years ago

This looks close enough to merge for me. I like the modal idea, but don't need to block this functionality if others like it. Thoughts @joemiller?

joemiller commented 10 years ago

I would like to see a run-check button in the individual event modal someday but I don't think we should block adding it to the Checkbox/Actions drop-down.

portertech commented 10 years ago

@Fizzadar @amdprophet can we resurrect this discussion?

amdprophet commented 10 years ago

I'll merge this in once I get a chance to test it.