Bug 719329 - (enhancement) add an operation results page that polls the Server for operation completion and displays the results once the operation has completed
(enhancement) add an operation results page that polls the Server for operati...
Status: NEW
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.0.1
Unspecified Unspecified
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-06 10:00 EDT by Ian Springer
Modified: 2015-02-01 18:29 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Springer 2011-07-06 10:00:35 EDT
The RHQ server API for invoking an operation is asynchronous, even for immediately executed operations, so the operation results page would have to poll the server (perhaps every 5 or 10 seconds) to check if the operation has completed. Once it knows the operation has completed, it could ask the Server for the results and display them. During the polling, it could display some sort of "waiting" icon and a message stating that is is waiting for the operation to complete.

After the user executes an operation immediately, they could be redirected to this new results page. For other scheduled operations, the user could be sent to this page when they click on the operation on the group Operations>Schedule page.
Comment 1 Naoki Takezoe 2011-07-26 03:40:54 EDT
Thanks Ian for raising issue from my request.

It might have a problem with long-running operation such as start or shutdown servers. So I think it would be nice if it's selectable for each operation.

Now RHQ provides 4 options for operation scheduling:

- Now
- Now & Repeat
- Later
- Later & Repeat

My idea is adding new option 'Synchronized'. We can specify whether an operation supports 'Synchronized' option or not at operation definition in the rhq-plugin.xml as following:

--------
<operation name="helloWorld" supportSynchExec="true">
  ...
</operation>
--------

If supportSynchExec is true, 'Synchronized' is selected in default at the operation scheduling settings, otherwise it can't be chosen.
Comment 2 Ian Springer 2011-07-26 12:45:40 EDT
I assume you mean "Synchronous" not "Synchronized". I'm not sure that would be necessary. 

I was thinking that the user would always be taken to the operation results page after scheduling an operation to run Now. For long-running operations, they could always navigate away from the page at which point the GUI would stop polling the Server unless they returned to the page. The tricky part is that the results are ultimately part of an operation history item, and there is currently no relationship in the db between an operation schedule and the operation histories corresponding to invocations of that schedule. However, an operation history item does include the Quartz job name, by which the schedule could be queried.

A related improvement in the operations GUI would be to add a table on the details page for an existing operation schedule that lists all operation history items, if any, corresponding to that schedule. Without a db relationship between schedules and histories, this would involve querying for all histories with the same quartz job id as the schedule. If we did this, then we could just always redirect users to this page after they create a schedule, even if they specified Now & Repeat, Later, or Later & Repeat.

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