فهرست منبع

AMBARI-8310. Ambari Web: convert non-async AJAX calls to async (alexantonenko)

Alex Antonenko 10 سال پیش
والد
کامیت
f0a7a1be32
4فایلهای تغییر یافته به همراه2 افزوده شده و 13 حذف شده
  1. 1 2
      ambari-web/app/controllers/wizard.js
  2. 1 1
      ambari-web/app/router.js
  3. 0 9
      ambari-web/app/utils/ajax/ajax.js
  4. 0 1
      ambari-web/app/utils/polling.js

+ 1 - 2
ambari-web/app/controllers/wizard.js

@@ -526,8 +526,7 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, {
       sender: this,
       data: {
         stackUrl: App.get('stackVersionURL'),
-        stackVersion: App.get('currentStackVersionNumber'),
-        async: false
+        stackVersion: App.get('currentStackVersionNumber')
       },
       success: 'loadServiceComponentsSuccessCallback',
       error: 'loadServiceComponentsErrorCallback'

+ 1 - 1
ambari-web/app/router.js

@@ -109,7 +109,7 @@ App.Router = Em.Router.extend({
     var authResp = (auth && auth === true);
     if (authResp) {
       App.ajax.send({
-        name: 'router.authentication',
+        name: 'router.login.clusters',
         sender: this,
         success: 'onAuthenticationSuccess',
         error: 'onAuthenticationError'

+ 0 - 9
ambari-web/app/utils/ajax/ajax.js

@@ -1475,15 +1475,6 @@ var urls = {
     'real': '/logout',
     'mock': ''
   },
-  'router.authentication': {
-    'real': '/clusters?fields=Clusters/provisioning_state',
-    'mock': '/data/clusters/info.json',
-    'format': function() {
-      return {
-        async: false
-      };
-    }
-  },
   'ambari.service.load_jdk_name': {
     'real': '/services/AMBARI/components/AMBARI_SERVER?fields=RootServiceComponents/properties/jdk.name,RootServiceComponents/properties/java.home,RootServiceComponents/properties/jdk_location',
     'mock': '/data/requests/host_check/jdk_name.json'

+ 0 - 1
ambari-web/app/utils/polling.js

@@ -73,7 +73,6 @@ App.Poll = Em.Object.extend({
     $.ajax({
       type: method,
       url: url,
-      async: false,
       data: data,
       dataType: 'text',
       timeout: App.timeout,