Bug 1388970

Summary: webadmin: Move upload logic outside UploadImageModel
Product: [oVirt] ovirt-engine Reporter: Vojtech Szocs <vszocs>
Component: Frontend.WebAdminAssignee: Daniel Erez <derez>
Status: CLOSED CURRENTRELEASE QA Contact: Raz Tamir <ratamir>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: amureini, bugs, derez, mgoldboi, ratamir, tnisan, ylavi
Target Milestone: ovirt-4.2.0Keywords: CodeChange
Target Release: 4.2.0Flags: rule-engine: ovirt-4.2+
rule-engine: planning_ack+
rule-engine: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 10:54:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1360192    

Description Vojtech Szocs 2016-10-26 15:20:39 UTC
In relation to recent GWT UI infra changes focused primarily on dialog resource cleanup [1], each dialog's PopupView should call:

  driver.cleanup();

within its cleanup() method. This will ensure the corresponding model(s) and UI widgets are cleaned up, making all dialog-related objects eligible for garbage collection.

[1] https://gerrit.ovirt.org/#/c/63708/
    https://gerrit.ovirt.org/#/c/65733/

In general, once a dialog has been closed, any dialog-related objects should not be referenced or needed anymore.

Please revisit [2], I'd suggest moving the upload logic outside UploadImageModel:

- UploadImageModel should only contain data/logic needed to display/update contents of the dialog
- once user clicks a dialog button (UICommand), upload operation can be initiated
- upload logic can be called/managed by the owner (list) model that triggers the dialog

[2] https://gerrit.ovirt.org/#/c/64459/

Comment 1 Amit Aviram 2016-10-31 14:23:24 UTC
There is no posted patch yet for this bug

Comment 2 Moran Goldboim 2016-11-30 09:44:07 UTC
Is this bug a regression?

Comment 3 Amit Aviram 2016-11-30 10:01:17 UTC
No, it is a part of the UX team effort to improve performance. 
Most of the webadmin dialogs were changed in order to achieve it, and in the upload dialog there's a bit more work which is what described in this bug.

Comment 4 Allon Mureinik 2017-07-26 05:59:57 UTC
Daniel - is there anything for QA to verify here, or just make sure there are no regressions?

Comment 5 Daniel Erez 2017-07-26 07:30:22 UTC
(In reply to Allon Mureinik from comment #4)
> Daniel - is there anything for QA to verify here, or just make sure there
> are no regressions?

Indeed, it's just a codechange, no new behaviour. So just regressions check.

Comment 6 Pavel Stehlik 2017-08-30 12:05:02 UTC
CodeChange, thus nothing for QE.

Comment 7 Raz Tamir 2017-11-19 19:39:50 UTC
Verified based on comment #4 + #5 and no regression in ipload image

Comment 8 Sandro Bonazzola 2017-12-20 10:54:17 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.