Bug 1343539
Summary: | Task auto-reload function leaks to other pages | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Roman Plevka <rplevka> | ||||
Component: | Tasks Plugin | Assignee: | Adam Ruzicka <aruzicka> | ||||
Status: | CLOSED ERRATA | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.2.0 | CC: | aruzicka, bbuckingham, bkearney, ehelms, inecas | ||||
Target Milestone: | Unspecified | Keywords: | Triaged | ||||
Target Release: | Unused | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | tfm-rubygem-foreman-tasks-0.9.3 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-02-21 16:49:54 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: |
|
Created attachment 1165608 [details]
task progress on domains page
Created redmine issue http://projects.theforeman.org/issues/17347 from this bug Upstream bug assigned to aruzicka Upstream bug assigned to aruzicka Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17347 has been resolved. VERIFIED on sat6.3.0-16 The issue no longer ocurs Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:0336 |
Description of problem: <pre> if (typeof taskProgressReloader === 'undefined') { var taskProgressReloader = { timeoutId: null, reload: function () { // we need different reload mechanism for two-pane and non-two-pane if (typeof currentTwoPaneTask !== 'undefined') { >>> if($('.two-pane-right').length) { taskProgressReloader.timeoutId = null; two_pane_open(currentTwoPaneTask); } else { taskProgressReloader.stop(); } } else { document.location.reload(); } }, </pre> If you have a running task with auto-reload set to True, it will refresh the '.two-pane-right' element every 5 seconds if it exists in the DOM. However, if you manage to navigate to e.g. Infrastructure -> Domains -> Domain_ID, you'll open another dialog with the same class. Since the navigation is handled by javascript, no DOM refresh occurs, keeping the auto refresh function running. This detects the `.two-pane-right` element and refreshes it with the task details. User ends up with a task details dialog at Domains page (see screenshot). Version-Release number of selected component (if applicable): 6.2.0 beta (GA14.2) How reproducible: always Steps to Reproduce: 1. create some long-running task (e.g. sync some red hat repos) 2. open up the task details via Monitor -> Tasks 3. leave auto-refreshing on 4. just after the refresh, navigate to some entity using the same css class (e.g. Infrastructure->Domains->yourDomain) 5. after a short while (<5seconds) the domain details should bre refreshed and display the task details Actual results: taskProgressReloader is not being stopped as it still detects the .two-pane-right element. Expected results: taskProgressReloader stops on navigating out of the page. the condition should look for some unique selector instead of a class shared all across satellite (.two-pane-right) Additional info: