You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Antonenko Alexander (JIRA)" <ji...@apache.org> on 2014/11/13 17:11:33 UTC
[jira] [Updated] (AMBARI-8310) Ambari Web: convert non-async AJAX
calls to async
[ https://issues.apache.org/jira/browse/AMBARI-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antonenko Alexander updated AMBARI-8310:
----------------------------------------
Attachment: AMBARI-8310.patch
> Ambari Web: convert non-async AJAX calls to async
> -------------------------------------------------
>
> Key: AMBARI-8310
> URL: https://issues.apache.org/jira/browse/AMBARI-8310
> Project: Ambari
> Issue Type: Bug
> Components: ambari-web
> Affects Versions: 1.7.0
> Reporter: Antonenko Alexander
> Assignee: Antonenko Alexander
> Priority: Critical
> Fix For: 2.0.0
>
> Attachments: AMBARI-8310.patch
>
>
> We removed most of non-async calls, but there's a few that still need to be converted.
> Non-async calls are problematic. If the request is not satisfied for whatever reason - say wifi drops, it completely blocks the browser tab (you cannot even close the browser tab in Chrome):
> ambari-web/app/controllers/wizard.js:
> loadServiceComponents: function () {
> return App.ajax.send({
> name: 'wizard.service_components',
> sender: this,
> data: {
> stackUrl: App.get('stackVersionURL'),
> stackVersion: App.get('currentStackVersionNumber'),
> async: false
> },
> success: 'loadServiceComponentsSuccessCallback',
> error: 'loadServiceComponentsErrorCallback'
> });
> },
> ambari-web/app/utils/ajax/ajax.js:
> 'router.authentication': {
> 'real': '/clusters?fields=Clusters/provisioning_state',
> 'mock': '/data/clusters/info.json',
> 'format': function() {
> return {
> async: false
> };
> }
> },
> ambari-web/app/utils/polling.js:
> setRequestId: function () {
> if (App.get('testMode')) {
> this.set('requestId', '1');
> this.doPolling();
> return;
> }
> var self = this;
> var url = this.get('url');
> var method = 'PUT';
> var data = this.get('data');
> $.ajax({
> type: method,
> url: url,
> async: false,
> data: data,
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)