You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2016/06/20 02:59:00 UTC
[37/50] [abbrv] ignite git commit: IGNITE-2047 Fixed rename,
refactored functions, not closed by esc agent download dialog.
IGNITE-2047 Fixed rename, refactored functions, not closed by esc agent download dialog.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9b7c7476
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9b7c7476
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9b7c7476
Branch: refs/heads/ignite-3262
Commit: 9b7c7476c7c0be3bc0612428f800bd6d59727a38
Parents: e052899
Author: vsisko <vs...@gridgain.com>
Authored: Wed Jun 15 14:17:33 2016 +0700
Committer: vsisko <vs...@gridgain.com>
Committed: Wed Jun 15 14:17:33 2016 +0700
----------------------------------------------------------------------
.../main/js/app/modules/agent/agent.module.js | 3 +-
.../src/main/js/controllers/sql-controller.js | 36 ++++++++------------
2 files changed, 17 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b7c7476/modules/web-console/src/main/js/app/modules/agent/agent.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/agent/agent.module.js b/modules/web-console/src/main/js/app/modules/agent/agent.module.js
index 2353a5f..10fb090 100644
--- a/modules/web-console/src/main/js/app/modules/agent/agent.module.js
+++ b/modules/web-console/src/main/js/app/modules/agent/agent.module.js
@@ -31,7 +31,8 @@ class IgniteAgentMonitor {
scope: this._scope,
templateUrl: '/templates/agent-download.html',
show: false,
- backdrop: 'static'
+ backdrop: 'static',
+ keyboard: false
});
const _modalHide = this._downloadAgentModal.hide;
http://git-wip-us.apache.org/repos/asf/ignite/blob/9b7c7476/modules/web-console/src/main/js/controllers/sql-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/controllers/sql-controller.js b/modules/web-console/src/main/js/controllers/sql-controller.js
index 7d3bbbe..38fcb97 100644
--- a/modules/web-console/src/main/js/controllers/sql-controller.js
+++ b/modules/web-console/src/main/js/controllers/sql-controller.js
@@ -786,7 +786,7 @@ consoleModule.controller('sqlController', [
QueryNotebooks.read($state.params.noteId)
.then(loadNotebook)
- .catch(function() {
+ .catch(() => {
$scope.notebookLoadFailed = true;
$loading.finish('sqlLoading');
@@ -797,6 +797,8 @@ consoleModule.controller('sqlController', [
return;
if ($scope.notebook.name !== name) {
+ const prevName = $scope.notebook.name;
+
$scope.notebook.name = name;
QueryNotebooks.save($scope.notebook)
@@ -813,7 +815,11 @@ consoleModule.controller('sqlController', [
$scope.notebook.edit = false;
})
- .catch(_handleException);
+ .catch((err) => {
+ $scope.notebook.name = prevName;
+
+ _handleException(err);
+ });
}
else
$scope.notebook.edit = false;
@@ -1192,9 +1198,7 @@ consoleModule.controller('sqlController', [
.then(() => _closeOldQuery(paragraph))
.then(() => agentMonitor.query(args.cacheName, args.pageSize, args.query))
.then(_processQueryResult.bind(this, paragraph))
- .catch((err) => {
- paragraph.errMsg = err.message;
- });
+ .catch((err) => paragraph.errMsg = err.message);
};
const _tryStartRefresh = function(paragraph) {
@@ -1241,9 +1245,7 @@ consoleModule.controller('sqlController', [
$scope.stopRefresh(paragraph);
})
- .finally(function() {
- paragraph.ace.focus();
- });
+ .finally(() => paragraph.ace.focus());
};
$scope.queryExecuted = function(paragraph) {
@@ -1286,9 +1288,7 @@ consoleModule.controller('sqlController', [
_showLoading(paragraph, false);
})
- .finally(function() {
- paragraph.ace.focus();
- });
+ .finally(() => paragraph.ace.focus());
};
$scope.scan = function(paragraph) {
@@ -1314,9 +1314,7 @@ consoleModule.controller('sqlController', [
_showLoading(paragraph, false);
})
- .finally(function() {
- paragraph.ace.focus();
- });
+ .finally(() => paragraph.ace.focus());
};
function _updatePieChartsWithData(paragraph, newDatum) {
@@ -1370,9 +1368,7 @@ consoleModule.controller('sqlController', [
_showLoading(paragraph, false);
})
- .finally(function() {
- paragraph.ace.focus();
- });
+ .finally(() => paragraph.ace.focus());
};
const _export = (fileName, columnFilter, meta, rows) => {
@@ -1541,10 +1537,8 @@ consoleModule.controller('sqlController', [
return cache;
}), 'name');
})
- .catch((err) => _handleException(err))
- .finally(function() {
- $loading.finish('loadingCacheMetadata');
- });
+ .catch(_handleException)
+ .finally(() => $loading.finish('loadingCacheMetadata'));
};
$scope.showResultQuery = function(paragraph) {