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

Fixes #8011 - When displaying Reports for a host, eventful=true should b... #1895

Closed
wants to merge 2 commits into from

Conversation

yebeloved
Copy link

Description of problem:
When accessing a hosts report (via Dashboard-> Select hostname), the user is presented with a great deal of reports, many of which have no eventful information. This RFE requests setting 'eventful=true' so that the end user doesn't have to wade through a large number of reports to get to the information they desire.

Version-Release number of selected component (if applicable):
foreman-1.6.0.46-1.el6sat.noarch

Dominic wrote,"Bit of a matter of opinion really, given there's a filter already there. I think when I'm using it, I'm perfectly happy to see non-eventful reports. Maybe a one-click way to add/remove eventful = true to the search would be very useful."

So I add two bookmarks, "eventful = true" and "eventful = false". If the input is "host = test" and "eventful = true" is clicked, the search condition will be set as "host = test and eventful = true". And if the input is "host = test" and "eventful = false" is clicked, the search condition will be set as "host = test and eventful = false".

@mmoll
Copy link
Contributor

mmoll commented Nov 1, 2014

[test]

@mmoll
Copy link
Contributor

mmoll commented Nov 1, 2014

thanks, but now I have three entries in the menu:

  • eventful
  • eventful = false
  • eventful = true
    Something like "eventful / eventless" would be nice.

@mmoll
Copy link
Contributor

mmoll commented Nov 3, 2014

[test]

@@ -11,7 +11,17 @@
<ul class="dropdown-menu pull-right">
<% bookmarks = Bookmark.my_bookmarks.controller(controller_name) %>
<% bookmarks.each do |bookmark| %>
<li><%= link_to_if_authorized bookmark.name, send("hash_for_#{bookmark.controller}_path").merge(:search => bookmark.query) %></li>
<% if bookmark.name == "eventful" or bookmark.name == "eventless" %>
Copy link
Member

Choose a reason for hiding this comment

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

http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/

In any case if you're checking if a variable is one of several values, this is a little more idiomatic:

['eventful', 'eventless'].include? bookmark.name

@dLobatog
Copy link
Member

dLobatog commented Nov 4, 2014

@yebeloved Thanks for the contribution! If you check the issue, I think we would favor more offering the user an easy way to display eventful/eventless/both reports. Defaulting to eventful would likely result in confusion by many of our existing users.

Could you change this PR to do that? If the data (eventful/eventless reports) could load via AJAX after clicking a button or ticking something, it'd be really great, but if you're not comfortable with that do it through reusing the index action in the controller with search parameters.

@yebeloved
Copy link
Author

@elobato Thank you for your advise. I'll make the change.

@tbrisker
Copy link
Member

@yebeloved,
Thank you very much for your efforts!
This PR has been open for a very long time with no activity.
Please indicate if you plan to continue working on it or not; if not, feel free to close it.
If you do not respond either way within a couple of weeks, I will assume this PR is abandoned and will go ahead and close it for you.

@tbrisker
Copy link
Member

tbrisker commented Apr 5, 2016

Dear @yebeloved ,
It has been 20 days since my last comment with no replies.
I am assuming this pull request has been abandoned and closing it.
If you wish to continue working on this in the future, feel free to reopen.
On behalf of the entire Foreman team, I wish to thank you for your efforts here and hope to see more contributions from you in the future.

@tbrisker tbrisker closed this Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants