This is an automated email from the ASF dual-hosted git repository.

chishengliu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new 6d01a16  SUBMARINE-1136. fix sending the repeat request bug in 
experiment page
6d01a16 is described below

commit 6d01a166eba44d9a9226e119b7b86462a19f5954
Author: KUAN-HSUN-LI <[email protected]>
AuthorDate: Sat Mar 12 17:27:28 2022 +0800

    SUBMARINE-1136. fix sending the repeat request bug in experiment page
    
    ### What is this PR for?
    When switching the pages between experiment and other pages, the reload 
request doesn't destroy. Fix by destroying the reload subscribe when switching 
the page.
    
    ### What type of PR is it?
    [Bug Fix]
    
    ### Todos
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/SUBMARINE-1136
    ### How should this be tested?
    
    ### Screenshots (if appropriate)
    
https://user-images.githubusercontent.com/38066413/158012550-3eec4d17-9055-462a-b53e-b08fa7949c15.mp4
    
    ### Questions:
    * Do the license files need updating? Yes/No
    * Are there breaking changes for older versions? Yes/No
    * Does this need new documentation? Yes/No
    
    Author: KUAN-HSUN-LI <[email protected]>
    
    Signed-off-by: Chi-Sheng Liu <[email protected]>
    
    Closes #899 from KUAN-HSUN-LI/SUBMARINE-1136 and squashes the following 
commits:
    
    4c1c5149 [KUAN-HSUN-LI] SUBMARINE-1136. fix multiple request bug
---
 .../experiment/experiment-home/experiment-home.component.ts         | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-home.component.ts
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-home.component.ts
index e78b1a8..6a8ab7a 100644
--- 
a/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-home.component.ts
+++ 
b/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-home.component.ts
@@ -76,6 +76,12 @@ export class ExperimentHomeComponent implements OnInit {
     this.onSwitchAutoReload();
   }
 
+  ngOnDestroy() {
+    if (this.reloadSub) {
+      this.reloadSub.unsubscribe();
+    }
+  }
+
   fetchExperimentList(isAutoReload: boolean) {
     this.experimentService.fetchExperimentList().subscribe(
       (list) => {

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to