Bug 1604457

Summary: [RFE] Content_Hosts export button does not export correct information
Product: Red Hat Satellite Reporter: Dylan Gross <dgross>
Component: HostsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Jan Hutař <jhutar>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.4CC: bbuckingham, inecas, pmoravec, tbrisker
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-10 20:56:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dylan Gross 2018-07-19 22:47:54 UTC
Description of problem:

   Export button exports table header information but no data from list on /content_hosts/ when arriving there from clicking on consumers of a subscription on the subscription page.   And when navigating straight to the page via "Hosts" -> "Content Hosts", the export will export everything regardless of what is shown on the page as a result of the search.

Version-Release number of selected component (if applicable):

   Installed from RHEL 6.4.0 snap 9.0

How reproducible:   Always (in my limited lab setup)


Steps to Reproduce:
1.  WebUI -> "Content” 
      -> “Subscriptions” 
        -> Select a subscription with at least 1 consumer 
           -> Click the number next to “Content Hosts”

2.  Click the "Export" button on the resulting page and open in LibreOffice

Actual results:

 Only the header info from the Content Host table is populated into the csv


Expected results:

 The data from the table is populated in the CSV.


Additional info:


  The page in question is the /content_hosts/ page which DOES work exporting when just going to "Hosts" -> "Content Hosts".

  If I do the steps in the reproduction, I get the following URL:
https://satellite.example.com/content_hosts?search=subscription_id%3D4&page=1&per_page=20&sortBy=name&sortOrder=ASC

  (Note:  In my example, the content_host is using subscription_id=4)

   If I just navigate to "Hosts" -> "Content Hosts" -> and search on anything whatsoever, the export still exports all values regardless of whether they are returned by the search or not.

// When Navigating just to "Hosts" -> "Content Hosts"
  example search 1: "subscription_id=4" returns the expected host on the page, and the export CSV exports the headers and the Content Hosts.

  example search 2: "subscription_id=3" returns zero hosts as expected, but the export button still exports the unseen hosts to CSV.

Comment 1 Brad Buckingham 2018-07-24 15:25:04 UTC
The behavior observed is working as designed.  The CSV export feature exports all records and not just those selected or on the current page.

Converting this bugzilla to an RFE for consideration.

Comment 2 Pavel Moravec 2019-03-27 13:15:02 UTC
(In reply to Brad Buckingham from comment #1)
> The behavior observed is working as designed.  The CSV export feature
> exports all records and not just those selected or on the current page.
> 
> Converting this bugzilla to an RFE for consideration.

But this is quite confusing, then. Since:

- go to Hosts page, apply some filter, click to Export => I get export of the filtered hosts only (the behaviour asked to work for Content Hosts as well) - it is confusing this works differently for Hosts and for Content Hosts
- it is rather a bug than missing feature: if I apply a Content Host filter, see few Content Hosts, why Export button provides me many irrelevant hosts, then?

Comment 3 Pavel Moravec 2019-03-27 13:16:14 UTC
Anyway, isnt this DUP of https://bugzilla.redhat.com/show_bug.cgi?id=1615800 we will deliver in 6.5?

Comment 4 Brad Buckingham 2019-07-10 20:56:24 UTC
Pavel, you are correct, it is a duplicate.

*** This bug has been marked as a duplicate of bug 1615800 ***