You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/03/20 00:41:24 UTC

[2/6] ambari git commit: AMBARI-10137. Jobs View: "No Tez Information" popup appearing few times (alexantonenko)

AMBARI-10137. Jobs View: "No Tez Information" popup appearing few times (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e0935981
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e0935981
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e0935981

Branch: refs/heads/trunk
Commit: e0935981a7da033537911eef9acc87278d78cc8c
Parents: dc65403
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Mar 19 23:12:13 2015 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Mar 20 01:40:59 2015 +0200

----------------------------------------------------------------------
 .../ui/app/scripts/controllers/job_controller.js          | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e0935981/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/job_controller.js
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/job_controller.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/job_controller.js
index dbf3a4f..566fd9f 100644
--- a/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/job_controller.js
+++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/controllers/job_controller.js
@@ -52,13 +52,18 @@ App.JobController = Ember.ObjectController.extend(App.RunPeriodically, {
    * @method showPopup
    */
   showPopup: function (title) {
-    Bootstrap.ModalManager.open(
+    var self = this,
+    modal = Bootstrap.ModalManager.open(
       'errorPopup',
       title,
       'job/error_popup',
       this.get('showPopupButtons'),
       this
     );
+    this.stop();
+    modal.on('closed', function ( ) {
+      self.transitionToRoute('jobs');
+    });
   },
 
   /**
@@ -95,11 +100,12 @@ App.JobController = Ember.ObjectController.extend(App.RunPeriodically, {
                 break;
               case 'job.dag.id.loaderror':
               case 'job.dag.name.loaderror':
+                self.transitionToRoute('jobs');
                 break;
               default:
+                self.transitionToRoute('jobs');
                 break;
             }
-            this.transitionToRoute('jobs');
           }
         );
       }