Bug 1386765

Summary: UI exception thrown when selecting numerous sub tabs
Product: [oVirt] ovirt-engine Reporter: Tal Nisan <tnisan>
Component: Frontend.WebAdminAssignee: Vojtech Szocs <vszocs>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: ---CC: bugs, combuster, tnisan
Target Milestone: ovirt-4.0.5Flags: rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
tnisan: devel_ack+
pstehlik: testing_ack+
Target Release: 4.0.5.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 07:36:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tal Nisan 2016-10-19 15:21:27 UTC
Description of problem:
When clicking on many sub tabs a UI exception is thrown and the UI does not allow you to click on other tabs/buttons in the application forcing you to refresh the page.


Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. In the VM tabs select a VM
2. Click on the Network/Snapshots sub tab
3.

Actual results:
A UI exception is thrown

Expected results:
Sub tab should be opened without and exception

Additional info:
Caused by change gerrit.ovirt.org/54186 (verified that by reverting it and compiling), quite possibly because lack of escaping of the inner text, haven't dug that deep to find out but that's the stack trace:

com.google.gwt.core.client.JavaScriptException: (Error) @org.ovirt.engine.ui.common.utils.JqueryUtils::getTextFromHtml(Ljava/lang/String;)([string: 'Speed <sub>(Mbps)</sub>']): Syntax error, unrecognized expression: Speed <sub>(Mbps)</sub> 	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) 	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) 	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) 	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) 	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) 	at org.ovirt.engine.ui.common.utils.JqueryUtils.getTextFromHtml(JqueryUtils.java) 	at org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.getColumnContextMenuTitle(ColumnResizeCellTable.java:427) 	at org.ovirt.engine.ui.common.widget.table.ColumnContextMenuItem.update(ColumnContextMenuItem.java:76) 	at org.ovirt.engine.ui.common.widget.table.ColumnContextMenuItem.<init>(ColumnContextMenuItem.java:72) 	at org.ovirt.engine.ui.common.widget.table.ColumnContextMenu.addItem(ColumnContextMenu.java:52) 	at org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.addColumn(ColumnResizeCellTable.java:230) 	at org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.addColumnWithHtmlHeader(ColumnResizeCellTable.java:256) 	at org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable.addColumn(EntityModelCellTable.java:405) 	at org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotInfoPanel.initNicsTable(VmSnapshotInfoPanel.java:240) 	at org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotInfoPanel.initPanel(VmSnapshotInfoPanel.java:57) 	at org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotInfoPanel.<init>(VmSnapshotInfoPanel.java:48) 	at org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotListModelTable.<init>(VmSnapshotListModelTable.java:74) 	at org.ovirt.engine.ui.webadmin.section.main.view.tab.virtualMachine.SubTabVirtualMachineSnapshotView.<init>(SubTabVirtualMachineSnapshotView.java:30) 	at org.ovirt.engine.ui.webadmin.section.main.view.tab.virtualMachine.com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.org$ovirt$engine$ui$webadmin$section$main$view$tab$virtualMachine$SubTabVirtualMachineSnapshotView_org$ovirt$engine$ui$webadmin$section$main$view$tab$virtualMachine$SubTabVirtualMachineSnapshotView_methodInjection(com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:149) 	at org.ovirt.engine.ui.webadmin.section.main.view.tab.virtualMachine.com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.get_Key$type$org$ovirt$engine$ui$webadmin$section$main$view$tab$virtualMachine$SubTabVirtualMachineSnapshotView$_annotation$$none$$(com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:139) 	at org.ovirt.engine.ui.webadmin.section.main.presenter.tab.virtualMachine.com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.get_Key$type$org$ovirt$engine$ui$webadmin$section$main$presenter$tab$virtualMachine$SubTabVirtualMachineSnapshotPresenter$ViewDef$_annotation$$none$$(com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:202) 	at org.ovirt.engine.ui.webadmin.section.main.presenter.tab.virtualMachine.com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.get_Key$type$org$ovirt$engine$ui$webadmin$section$main$presenter$tab$virtualMachine$SubTabVirtualMachineSnapshotPresenter$_annotation$$none$$(com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:926) 	at org.ovirt.engine.ui.webadmin.section.main.presenter.tab.virtualMachine.com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment$11$1.onSuccess(com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:949)

Comment 1 Vojtech Szocs 2016-10-19 16:22:35 UTC
> org.ovirt.engine.ui.common.utils.JqueryUtils.getTextFromHtml(JqueryUtils.java)

Same issue as in the other BZ, I have an infra fix, I'll post the patch soon.

Comment 2 Tal Nisan 2016-10-19 21:50:20 UTC
Indeed, you can use this bug as it's more general

Comment 3 Vojtech Szocs 2016-10-24 15:55:08 UTC
*** Bug 1385570 has been marked as a duplicate of this bug. ***

Comment 4 Vojtech Szocs 2016-10-24 17:25:49 UTC
4.0 UI is potentially impacted by this bug so re-targeted to ovirt-4.0.5

Comment 5 Yaniv Kaul 2016-10-25 08:23:27 UTC
Tal - this is missing devel ack, and I'm not sure if it's going to 4.0.5 and/or 4.1 (the flag is 4.1? target milestone is 4.0.5)

Comment 6 Tal Nisan 2016-10-25 13:59:10 UTC
Based on Vojtech's comment it should be 4.0.5, Vojtech just didn't marked the correct flag so I did.
As for devel_ack, that's a UX bug and not storage but since a patch was already submitted I gave it devel_ack+

Comment 7 Pavel Novotny 2016-10-31 15:55:43 UTC
Verified in
ovirt-engine-webadmin-portal-4.0.5.4-0.1.el7ev.noarch
rhevm-4.0.5.4-0.1.el7ev.noarch

Browsers:
Firefox 45.4 ESR
Firefox 49
Chromium 53

Verification:
1. Go to Virtual Machines tab and select a VM.
2. Go to Snapshots sub-tab / Network Interfaces part.

Result: no exception is thrown in the UI, nor is logged in engine.log/ui.log.