Bug 830998 - UI needs a way to cancel an operation
Summary: UI needs a way to cancel an operation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHQ 4.5.0
Assignee: John Mazzitelli
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-11 21:49 UTC by John Mazzitelli
Modified: 2013-09-01 10:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-01 10:15:17 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 831297 0 unspecified CLOSED when an operation is canceled, it should show the Cancel status/icon 2021-02-22 00:41:40 UTC

Internal Links: 831297

Description John Mazzitelli 2012-06-11 21:49:14 UTC
When viewing the Operation History list for a group or resource, we should provide a cancel button to request the operation be canceled.  When pressing the cancel button, the UI should call:

org.rhq.enterprise.server.operation.OperationManagerBean.cancelOperationHistory(Subject, int, boolean)

Comment 1 John Mazzitelli 2012-06-12 17:41:37 UTC
git commit to master:

a96bf77b2e402a29dd2265ad2b2bf80e5459bb88 (the actual code to implement this BZ)
7771076c4c28709021d601b03ad79fcc05eaf5a8 (a minor i18n commit, nothing substantial)

There is still one issue - when you cancel an operation, the status shows as "Failure" with the Failure icon. It should show the Cancel status/icon if we can determine the operation was actually canceled. I'll create a new BZ for that, since as it stands now with these commits, we can cancel.

Comment 2 John Mazzitelli 2012-06-13 19:46:04 UTC
how to test:

1) create a executable shell script that sleeps before exiting - something like:

   #!bin/sh
   echo "Sleeping for 60 seconds"
   sleep 60
   echo "Exiting with exit code 0"
   exit 0

2) Import a platform and create a child resource by manually importing that script as a "Script Server" resource (this is the script plugin).

3) The "Script Server" resource has an operation called "execute". Invoke that operation so your test script is invoked by the agent.

4) When you see the operation history item show up as "in progress" in the Operation>History list, select that "in progress" item and click the "Cancel" button.

5) Wait to see that the operation got canceled. By refreshing the history list, you should see its status change to "Canceled".

6) Create a new compatible group and put your Script Server resource in that group

7) Go to that group's Operation tab and invoke the "execute" operation.

8) Go to the group Operation>History subtab and use the Cancel button to cancel the group operation

9) You should eventually see the GROUP operation show "Failure" (the red failure icon goes in the status) meaning the group operation failed (that is, one or more resource operations did not complete successfully).

10) Drill down into that group operation (double click it) and see that the individual resource operation shows the Canceled status.

Comment 3 Charles Crouch 2012-07-17 21:42:39 UTC
Feature enhancement - retargeting at rhq4.5

Comment 4 Heiko W. Rupp 2013-09-01 10:15:17 UTC
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.


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