This is a companion bug to 1445932, created at the direction of Greg McCullough on 2018-08-29 13:27:25 EDT Description of problem: Currently, widgets are generated based on a schedule set per widget (with a minimum of 1 hour wait). I would like to be able to trigger the generation of a widget content from REST API. Version-Release number of selected component (if applicable): 5.7.2.1.20170406142927_0a1ad0e How reproducible: Always Steps to Reproduce: 1. Create a widget (default update is every hour) Actual results: Manual generation of widget content is possible or you will have to wait for an hour before the widget gets generated. Expected results: I should be able to trigger a refresh from automate or REST API. Additional info: A workaround is to call rails command in automate with a method like: # # Description: generate widget content by calling shell command # cmd = "/var/www/miq/vmdb/bin/rails r 'MiqWidget.find_by_title(\"Migration Candidates\").queue_generate_content'" system(cmd) exit MIQ_OK
Hey Johnny, I'm looking into this.
The PR in https://bugzilla.redhat.com/show_bug.cgi?id=1445932 satisfies the use case for this ticket. The preferred route for the use case was an Automate action, not API functionality, and since the Automate enhancement is merged, I don't know what's needed here. Could someone clarify what else is needed for this ticket, please?
I think PM (Loic) is the right person to ask for clarification, but this looks like just assigning out API RFEs. Having it in Automate does not preclude it from being added to the API. Maybe just a question if priority as it relates to getting it into the 5.10.10 release.
https://github.com/ManageIQ/manageiq-api/pull/660
Does someone want to go give the PR a spin, based off https://github.com/ManageIQ/manageiq-api/pull/660#issuecomment-524914969 please? Joe or Johnny or anyone, please?
Thanks for the info!
Changed target release per comment seven, please don't yell at me.
New commit detected on ManageIQ/manageiq-api/master: https://github.com/ManageIQ/manageiq-api/commit/c47021de3a7d1535c58b190497defccf5800c9f3 commit c47021de3a7d1535c58b190497defccf5800c9f3 Author: d-m-u <drewuhlmann> AuthorDate: Sun Aug 25 19:25:58 2019 -0400 Commit: d-m-u <drewuhlmann> CommitDate: Sun Aug 25 19:25:58 2019 -0400 Add widgets endpoints Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1623607 app/controllers/api/widgets_controller.rb | 25 + config/api.yml | 24 + spec/requests/widgets_spec.rb | 100 + 3 files changed, 149 insertions(+)
Also need https://github.com/ManageIQ/manageiq-api/pull/679