Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1655508 - Search filters not working as expected on Satellite Dashboard.
Summary: Search filters not working as expected on Satellite Dashboard.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Dashboard
Version: 6.4
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: 6.6.0
Assignee: satellite6-bugs
QA Contact: Radovan Drazny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-03 10:35 UTC by maneesh verma
Modified: 2022-03-13 16:18 UTC (History)
8 users (show)

Fixed In Version: foreman-1.22.0-0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-22 19:48:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3728781 0 None None None 2018-12-18 02:49:47 UTC

Description maneesh verma 2018-12-03 10:35:09 UTC
Description of problem:

The two reports in Host COnfiguration status widget of Dashboard are not working fine.

1- Last seen reports.
2- Hosts with Alert disabled

How reproducible:

Every time we click on Host COnfiguration Status for Puppet and Ansible Widget.

Report names- Host with no reports and Hosts with alerts disabled.

Steps to Reproduce:
1. Click on the widget shows Hosts with No reports.

It will search with Query- origin = Puppet and last_report > "35 minutes ago" and not has last_report and status.enabled = true

2. Click on the Widget Hosts with alert disabled.

it will search with query - last_report > "30 minutes ago" and status.enabled = false


Actual results:

The query fails to get the proper results and shows no hostnames.

If we remote the time interval the search works fine.


Expected results:

The search should show the correct result.




Additional info:

Impacted code.

/usr/share/foreman/app/helpers/dashboard_helper.rb:
  def search_filter_with_origin(filter, origin, within_interval = false)
    interval_setting = report_origin_interval_setting(origin)
    additional_filters = []
    additional_filters << "origin = #{origin}" if origin
    additional_filters << "last_report #{within_interval ? '<' : '>'} \"#{interval_setting} minutes ago\"" if out_of_sync_enabled?(origin)
    (additional_filters + [filter]).join(' and ')
  end

Comment 8 Radovan Drazny 2019-07-17 11:23:04 UTC
Verified on Sat 6.6 Snap 11. Dasboard widgets for Ansible, Puppet and All Hosts contain following queries:

Ansible
Hosts with no reports: origin = Ansible and not has last_report and status.enabled = true
Hosts with alerts disabled: origin = Ansible and status.enabled = false

Puppet
Hosts with no reports: origin = Puppet and not has last_report and status.enabled = true
Hosts with alerts disabled: origin = Puppet and status.enabled = false

All
Hosts with no reports: not has last_report and status.enabled = true
Hosts with alerts disabled: status.enabled = false

Comment 9 Bryan Kearney 2019-10-22 19:48:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3172


Note You need to log in before you can comment on or make changes to this bug.