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

Add check requests #154

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

Add check requests #154

wants to merge 10 commits into from

Conversation

Fizzadar
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor Author

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!

@@ -9,3 +9,22 @@ namespace "SensuDashboard.Models", (exports) ->
interval: 60

idAttribute: "name"

request: (options = {}) =>
Copy link
Member

Choose a reason for hiding this comment

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

Is this needed? You should be able to save the model and Backbone JS should take care of the rest.

@amdprophet
Copy link
Member

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
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

@Fizzadar @amdprophet can we resurrect this discussion?

@selectNone()
error: (model) =>
@errorCallback.call(this, model) if @errorCallback
@selectNone()
Copy link
Member

Choose a reason for hiding this comment

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

Missing newline.

@amdprophet
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants