add api call to reports page to get the index section
Need api call to get back a list of reports via json so that it returns the same thing http://foreman/reports currently does.
Will need report summary, timestamp, hosts, report id, report status.
#3 Updated by Corey Osman over 9 years ago
This does not work correctly. The code below (in the patch) only returns success and never returns a summary status with failed or modified.
You can reproduce this by using the following url
2. Use the browser search to find the summary. The summary result should be "failed" instead of "success"
def summarystatus case self when error? "Failed" when changes? "Modified" else "Success" end end
The following code ensures the correct status will be returned.
def summarystatus if self.error? return "Failed" elsif self.changes? return "Modified" else return "Success" end end