Repository: ignite
Updated Branches:
  refs/heads/master f6c67e864 -> bea6fe311


IGNITE-8999 Web Console: Fixed issue with missing errorParser on paragraph 
creation.


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

Branch: refs/heads/master
Commit: bea6fe31125f907c57446582292b878ef7d6d994
Parents: f6c67e8
Author: Alexey Kuznetsov <[email protected]>
Authored: Tue Jul 31 18:35:20 2018 +0700
Committer: Alexey Kuznetsov <[email protected]>
Committed: Tue Jul 31 18:35:20 2018 +0700

----------------------------------------------------------------------
 .../components/queries-notebook/controller.js          | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bea6fe31/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
----------------------------------------------------------------------
diff --git 
a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
 
b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
index 132f7f6..c887f4d 100644
--- 
a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
+++ 
b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
@@ -66,7 +66,7 @@ const _fullColName = (col) => {
 let paragraphId = 0;
 
 class Paragraph {
-    constructor($animate, $timeout, JavaTypes, paragraph, errorParser) {
+    constructor($animate, $timeout, JavaTypes, errorParser, paragraph) {
         const self = this;
 
         self.id = 'paragraph-' + paragraphId++;
@@ -957,6 +957,10 @@ export class NotebookCtrl {
                 .subscribe();
         };
 
+        const _newParagraph = (paragraph) => {
+            return new Paragraph($animate, $timeout, JavaTypes, errorParser, 
paragraph);
+        };
+
         Notebook.find($state.params.noteId)
             .then((notebook) => {
                 $scope.notebook = _.cloneDeep(notebook);
@@ -969,8 +973,7 @@ export class NotebookCtrl {
                 if (!$scope.notebook.paragraphs)
                     $scope.notebook.paragraphs = [];
 
-                $scope.notebook.paragraphs = _.map($scope.notebook.paragraphs,
-                    (paragraph) => new Paragraph($animate, $timeout, 
JavaTypes, paragraph, this.errorParser));
+                $scope.notebook.paragraphs = _.map($scope.notebook.paragraphs, 
(p) => _newParagraph(p));
 
                 if (_.isEmpty($scope.notebook.paragraphs))
                     $scope.addQuery();
@@ -1042,7 +1045,7 @@ export class NotebookCtrl {
 
             ActivitiesData.post({ action: '/queries/add/query' });
 
-            const paragraph = new Paragraph($animate, $timeout, JavaTypes, {
+            const paragraph = _newParagraph({
                 name: 'Query' + (sz === 0 ? '' : sz),
                 query: '',
                 pageSize: $scope.pageSizes[1],
@@ -1071,7 +1074,7 @@ export class NotebookCtrl {
 
             ActivitiesData.post({ action: '/queries/add/scan' });
 
-            const paragraph = new Paragraph($animate, $timeout, JavaTypes, {
+            const paragraph = _newParagraph({
                 name: 'Scan' + (sz === 0 ? '' : sz),
                 query: '',
                 pageSize: $scope.pageSizes[1],

Reply via email to