ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [1/2] ignite git commit: IGNITE-1673 increase timeout
Date Wed, 21 Oct 2015 09:27:51 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 301febdca -> 08f27c83a


IGNITE-1673 increase timeout


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

Branch: refs/heads/ignite-843-rc1
Commit: 7dc68163bf30d3f7e742a5a25b88fe661067cbfc
Parents: af7db2e
Author: Andrey <anovikov@gridgain.com>
Authored: Wed Oct 21 16:27:21 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Wed Oct 21 16:27:21 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/common-module.js        | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7dc68163/modules/control-center-web/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js
index 1c51662..43492ed 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -1997,14 +1997,15 @@ consoleModule.controller('agent-download', [
          *
          * @param errMsg Error message.
          * @param status Error code.
+         * @param timedOut True if request timedOut.
          */
-        var _handleException = function (errMsg, status) {
+        var _handleException = function (errMsg, status, timedOut) {
             if (_agentDownloadModal.skipSingleError)
                 _agentDownloadModal.skipSingleError = false;
             else if (!_agentDownloadModal.$isShown)
                 _agentDownloadModal.$promise.then(_agentDownloadModal.show);
 
-            $scope.nodeFailedConnection = status == 404;
+            $scope.nodeFailedConnection = status == 404 || timedOut;
 
             if (status == 500)
                 $common.showError(errMsg, 'top-right', 'body', true);
@@ -2032,7 +2033,14 @@ consoleModule.controller('agent-download', [
          * Try to access agent and execute specified function.
          */
         function _tryWithAgent() {
-            $http.post(_agentDownloadModal.checkUrl, undefined, {timeout: 5000})
+            var timeout = 3000,
+                timedOut = false;
+
+            setTimeout(function () {
+                timedOut = true;
+            }, timeout);
+
+            $http.post(_agentDownloadModal.checkUrl, undefined, {timeout: timeout})
                 .success(function (result) {
                     _agentDownloadModal.skipSingleError = true;
 
@@ -2044,7 +2052,7 @@ consoleModule.controller('agent-download', [
                     _agentDownloadModal.checkFn(result, _agentDownloadModal.hide, _handleException);
                 })
                 .error(function (errMsg, status) {
-                    _handleException(errMsg, status);
+                    _handleException(errMsg, status, timedOut);
                 });
         }
 


Mime
View raw message