Bug 1033665
Summary: | Add to dashboard does not add multiple charts to default dashboard | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Operations Network | Reporter: | Sunil Kondkar <skondkar> | ||||||
Component: | UI | Assignee: | Mike Thompson <mithomps> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | JON 3.2 | CC: | ahovsepy, jshaughn, lzoubek, mithomps | ||||||
Target Milestone: | ER03 | ||||||||
Target Release: | JON 3.3.0 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2014-12-11 14:01:02 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: | |||||||||
Attachments: |
|
Description
Sunil Kondkar
2013-11-22 14:48:40 UTC
Created attachment 827838 [details]
Charts Selected
Created attachment 827839 [details]
Default Dashboard
TCMS testrun https://tcms.engineering.redhat.com/run/99835/ on ER6 the buttone was disabled...and that changed in ER7 Additionally, "Add" button should be disabled when no metric is selected. Right now, if you don't select any metric and push the button, nothing happens. Additional context from the logs relevant to issue: Root Cause : org.hibernate.StaleStateException:Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 Detail : java.lang.RuntimeException:[1374788639526] javax.ejb.EJBTransactionRolledbackException:Transaction rolled back -> javax.transaction.RollbackException:ARJUNA016053: Could not commit transaction. -> javax.persistence.OptimisticLockException:org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 -> org.hibernate.StaleStateException:Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 --- STACK TRACE FOLLOWS --- [1374788639526] javax.ejb.EJBTransactionRolledbackException:Transaction rolled back -> javax.transaction.RollbackException:ARJUNA016053: Could not commit transaction. -> javax.persistence.OptimisticLockException:org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 -> org.hibernate.StaleStateException:Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 at Unknown.anonymous(Unknown Source) at Unknown.anonymous(Unknown Source) Mike, I think we should just disable this ability and add one at a time. Just change the button enablement, unless you really want to fix it to allow multiple. I added the ability to add one at a time. This was more difficult than it should have been because the listgrid selection policy was already set to SINGLE and yet it acts like MULTIPLE. So now I just take the last selected row if multiple rows are selected and use that to add to the dashboard. I also fixed Libor's comment: "Add" button should be disabled when no metric is selected. It is now not possible to add if there is no selection. Committed to Master: commit 50f3dad8c8a813d76b22a67cb6a423c84d3d0a60 Author: Mike Thompson <mithomps> Date: Wed Sep 10 11:06:29 2014 -0700 [Bug 1033665] Add to dashboard does not add multiple charts to default dashboard. Mike, here is the cherry pick. release/jon3.3.x commit 99fd48185da1e71fcb775493d761f3522913b23a Author: Mike Thompson <mithomps> Date: Wed Sep 10 11:06:29 2014 -0700 (cherry picked from commit 50f3dad8c8a813d76b22a67cb6a423c84d3d0a60) Signed-off-by: Jay Shaughnessy <jshaughn> It looks like what made this difficult was that the relevant class, MetricsTableView, doesn't make use of any of the table action (i.e. button) support that we use pretty much everywhere for the list views deriving from Table. Not sure why not. If it did it could have just set SelectionPolict to SINGLE and I think we'd be good, that seems to work everywhere else. Jay, this table for the metrics view is more complicated than a regular table action as it a hierarchical listgrid with special refreshing for the both the graphs, sparkline graphs and it must remember what graphs are opened during a refresh. So it really a different beast than Table. Regardless, the selectionPolicy should work and when you inspect it it shows the SelectionPolicy as SINGLE (but behaves as MULTIPLE). OK, cool, thanks for the explanation, I should have looked more closely. Moving to ON_QA as available for test with the following brew build: https://brewweb.devel.redhat.com//buildinfo?buildID=385149 Verified on version : 3.3.0.ER03 build number : 4aefe39:44e33a4 Verified that 'Add' button is disabled when no metric is selected. If multiple rows are selected, then Add to dashboard adds last selected row to the default dashboard. Multiple charts are added to the default dashboard if selected and added one by one. Cleaning up needinfo flag. |