Bug 966062 - [Admin Portal] Move to lighter business entities
Summary: [Admin Portal] Move to lighter business entities
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-webadmin-portal
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Pavel Stehlik
URL:
Whiteboard: ux
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-22 12:01 UTC by Jiri Belka
Modified: 2015-09-22 13:09 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-01 19:23:51 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
NetworkData.xml - IE Developer Tools (15.15 KB, application/x-gzip)
2013-05-22 12:01 UTC, Jiri Belka
no flags Details

Description Jiri Belka 2013-05-22 12:01:33 UTC
Created attachment 751670 [details]
NetworkData.xml - IE Developer Tools

Description of problem:
Vm's subdata (like Applications reported by guest agent) are downloaded when entering Virtual Machines main tab but only for VMs which were previously selected.

More exactly: When staying in Virtual Machines maintab, you select couple of VMs. Then you go to 'Data Centers' maintab. Then you go back to 'Virtual Machines' maintab, though no VMs is selected (as you won't click on any VMs!), the Admin Portal app still downloads subtabs' data for each VMs (ones previously selected).

This seems to be wrong, for example for performance reasons.

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

How reproducible:
100%

Steps to Reproduce:
1. go to 'Virtual Machines' maintab and select all VMs
2. switch to 'Data Centers' maintab
3. go back to 'Virtual Machines' maintab

Actual results:
subtabs' data are downloaded for previously selected VMs (in step 1.)

Expected results:
i think it should not download subtabs' data when no VMs is again selected

Additional info:
I discovered this with IE Developers tools (F12). More precisly:
* go to 'Virtual Machines' maintab and select all VMs
* switch to 'Data Centers' maintab
* in Developer Tools select 'Network' and start capturing data
* go back to 'Virtual Machines' maintab
* in Developer Tools stop capturing, save data, open it and check if subtabs' data were downloaded (I have couple of VMs with guest agent running and I could see installed apps like RHEV-Agent64, so this is evidently from Applications subtab).

In attachment you can see my captured data after described action.

Comment 1 Einav Cohen 2013-05-23 12:42:54 UTC
Jiri: the "installed applications" are part of the VM business entity; when fetching the VMs to display in the VMs main tab (even without selecting any of the VMs to display the sub-tabs), the "installed application" information for each VM is there (again - since it is part of the VM business entity that is returned from the backend within the search results), even if it is currently not being displayed.

so the "installed applications" information is downloaded to the client for *all* displayed VMs, and not only for VMs that were previously selected.

I agree that this information is not needed while we are not selecting any VM in the grid, and we indeed discussed in the past the possibility of returning in the search results "lighter" business entities in order to save some traffic between the server and the client and possibly improve the performance.

I am turning this BZ to be a general "move to lighter business entities" BZ. We should consider it against other tasks that we are planning, e.g. moving to work against the REST API (including REST API business entities).

Comment 2 Vojtech Szocs 2013-05-28 16:41:07 UTC
> Jiri: the "installed applications" are part of the VM business entity

Yes, in VmDynamic entity (part of VM entity) there's "String appList" field that contains delimited list of installed applications. So "installed applications" data should be always part of VM entity data, even when fetching VMs for VM main-tab.

On the other hand, each time you change selection in VM main table, VM "Applications" sub-tab (VmAppListModel) fetches up-to-date "installed applications" data by GetVmDataByPoolId query, which basically returns (updated) VM entity for given selection -> again, we use "String appList" field of VM entity, as mentioned above.

The general problem is using same business entities on both client and server, which should be solved after we move GUI on top of REST API -> even better, if REST API supports returning entity data filtered according to client preferences (i.e. just get me fields X and Y but not Z because I don't need it in my GUI).

Comment 3 Itamar Heim 2013-12-01 19:23:51 UTC
as vojtech mentioned, we'll try to do this as part of moving to the rest api. i don't think we need a separate tracker for this though.

Comment 4 Vojtech Szocs 2013-12-09 13:55:07 UTC
(In reply to Itamar Heim from comment #3)
> as vojtech mentioned, we'll try to do this as part of moving to the rest
> api. i don't think we need a separate tracker for this though.

Indeed, moving to use REST API in web UI will solve many problems related to GWT RPC, including problem described in this BZ.

Note: aggregation of useful data related to given entity (i.e. VM) can be implemented either on client (JavaScript SDK) or server (REST API backend).


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