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-2711 Stop refresh on paragraph remove.
Date Wed, 24 Feb 2016 09:38:50 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 1b214b0ef -> 1c7286063


IGNITE-2711 Stop refresh on paragraph remove.


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

Branch: refs/heads/ignite-843-rc2
Commit: 5e3b91912eda5dcb9f5a3afb2811f61cfad152a9
Parents: daccaef
Author: Andrey <anovikov@gridgain.com>
Authored: Wed Feb 24 16:38:25 2016 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Wed Feb 24 16:38:25 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js   | 26 +++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5e3b9191/modules/control-center-web/src/main/js/controllers/sql-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/sql-controller.js b/modules/control-center-web/src/main/js/controllers/sql-controller.js
index a7abc82..84773b2 100644
--- a/modules/control-center-web/src/main/js/controllers/sql-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/sql-controller.js
@@ -407,23 +407,25 @@ consoleModule.controller('sqlController', function ($http, $timeout,
$interval,
     $scope.removeParagraph = function(paragraph) {
         $confirm.confirm('Are you sure you want to remove: "' + paragraph.name + '"?')
             .then(function () {
-                    var paragraph_idx = _.findIndex($scope.notebook.paragraphs, function
(item) {
-                        return paragraph == item;
-                    });
+                $scope.stopRefresh(paragraph);
 
-                    var panel_idx = _.findIndex($scope.expandedParagraphs, function (item)
{
-                        return paragraph_idx == item;
-                    });
+                var paragraph_idx = _.findIndex($scope.notebook.paragraphs, function (item)
{
+                    return paragraph == item;
+                });
+
+                var panel_idx = _.findIndex($scope.expandedParagraphs, function (item) {
+                    return paragraph_idx == item;
+                });
 
-                    if (panel_idx >= 0)
-                        $scope.expandedParagraphs.splice(panel_idx, 1);
+                if (panel_idx >= 0)
+                    $scope.expandedParagraphs.splice(panel_idx, 1);
 
-                    $scope.notebook.paragraphs.splice(paragraph_idx, 1);
+                $scope.notebook.paragraphs.splice(paragraph_idx, 1);
 
-                    $scope.rebuildScrollParagraphs();
+                $scope.rebuildScrollParagraphs();
 
-                    QueryNotebooks.save($scope.demo, $scope.notebook)
-                        .catch(_handleException);
+                QueryNotebooks.save($scope.demo, $scope.notebook)
+                    .catch(_handleException);
             });
     };
 


Mime
View raw message