Explorar o código

AMBARI-12395. Loading Admin > Stacks and Versions > Versions is extremely slow (alexantonenko)

Alex Antonenko %!s(int64=10) %!d(string=hai) anos
pai
achega
a30d31795e

+ 1 - 1
ambari-web/app/views/main/admin/stack_upgrade/versions_view.js

@@ -195,7 +195,7 @@ App.MainAdminStackVersionsView = Em.View.extend({
    * load ClusterStackVersions data
    * load ClusterStackVersions data
    */
    */
   willInsertElement: function () {
   willInsertElement: function () {
-    this.doPolling();
+    this.poll();
   },
   },
 
 
   /**
   /**

+ 3 - 3
ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js

@@ -318,14 +318,14 @@ describe('App.mainAdminStackVersionsView', function () {
 
 
   describe("#willInsertElement()", function() {
   describe("#willInsertElement()", function() {
     before(function () {
     before(function () {
-      sinon.stub(view, 'doPolling', Em.K);
+      sinon.stub(view, 'poll', Em.K);
     });
     });
     after(function () {
     after(function () {
-      view.doPolling.restore();
+      view.poll.restore();
     });
     });
     it("", function() {
     it("", function() {
       view.willInsertElement();
       view.willInsertElement();
-      expect(view.doPolling.calledOnce).to.be.true;
+      expect(view.poll.calledOnce).to.be.true;
     });
     });
   });
   });