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 2015/12/03 09:20:47 UTC
ignite git commit: IGNITE-2051 Fixed expanded query.
Repository: ignite
Updated Branches:
refs/heads/ignite-843-rc2 466e9e661 -> 138384374
IGNITE-2051 Fixed expanded query.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/13838437
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/13838437
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/13838437
Branch: refs/heads/ignite-843-rc2
Commit: 138384374ab86a03ed86636e84cbb26eeb5ace6b
Parents: 466e9e6
Author: Andrey <an...@gridgain.com>
Authored: Thu Dec 3 15:20:37 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Dec 3 15:20:37 2015 +0700
----------------------------------------------------------------------
.../src/main/js/app/modules/states/sql/index.js | 2 +-
.../src/main/js/controllers/common-module.js | 2 +-
.../src/main/js/controllers/sql-controller.js | 21 ++++++--------------
.../src/main/js/views/sql/sql.jade | 2 +-
4 files changed, 9 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/13838437/modules/control-center-web/src/main/js/app/modules/states/sql/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/sql/index.js b/modules/control-center-web/src/main/js/app/modules/states/sql/index.js
index fc3bfea..ea81343 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/sql/index.js
+++ b/modules/control-center-web/src/main/js/app/modules/states/sql/index.js
@@ -25,7 +25,7 @@ angular
// set up the states
$stateProvider
.state('base.sql', {
- url: '/sql?{id}',
+ url: '/sql/{id}',
templateUrl: '/sql/sql.html'
});
}]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/13838437/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 227ee28..fb96f24 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
@@ -2244,7 +2244,7 @@ consoleModule.controller('notebooks', ['$scope', '$modal', '$state', '$http', '$
_.forEach($scope.$root.notebooks, function (notebook) {
$scope.notebookDropdown.push({
text: notebook.name,
- href: '/sql?id=' + notebook._id
+ href: '/sql/' + notebook._id
});
});
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/13838437/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 7c384bf..00f44e6 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
@@ -135,13 +135,8 @@ consoleModule.controller('sqlController', function ($scope, $controller, $http,
var idx = _.findIndex($scope.notebook.paragraphs, {id: paragraphId});
if (idx >= 0) {
- if (!_.contains($scope.notebook.activePanels, idx)) {
- var activePanels = angular.copy($scope.notebook.activePanels);
-
- activePanels.push(idx);
-
- $scope.notebook.activePanels = activePanels;
- }
+ if (!_.contains($scope.notebook.expandedParagraphs, idx))
+ $scope.notebook.expandedParagraphs.push(idx);
setTimeout(function () {
$scope.notebook.paragraphs[idx].ace.focus();
@@ -246,8 +241,8 @@ consoleModule.controller('sqlController', function ($scope, $controller, $http,
$scope.notebook_name = notebook.name;
- if (!$scope.notebook.activePanels)
- $scope.notebook.activePanels = [];
+ if (!$scope.notebook.expandedParagraphs)
+ $scope.notebook.expandedParagraphs = [];
if (!$scope.notebook.paragraphs)
$scope.notebook.paragraphs = [];
@@ -376,11 +371,7 @@ consoleModule.controller('sqlController', function ($scope, $controller, $http,
$scope.notebook.paragraphs.push(paragraph);
- var _activePanels = angular.copy($scope.notebook.activePanels);
-
- _activePanels.push(sz);
-
- $scope.notebook.activePanels = _activePanels;
+ $scope.notebook.expandedParagraphs.push(sz);
$scope.rebuildScrollParagraphs();
@@ -440,7 +431,7 @@ consoleModule.controller('sqlController', function ($scope, $controller, $http,
return paragraph == item;
});
- var panel_idx = _.findIndex($scope.notebook.activePanels, function (item) {
+ var panel_idx = _.findIndex($scope.notebook.expandedParagraphs, function (item) {
return paragraph_idx == item;
});
http://git-wip-us.apache.org/repos/asf/ignite/blob/13838437/modules/control-center-web/src/main/js/views/sql/sql.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/sql/sql.jade b/modules/control-center-web/src/main/js/views/sql/sql.jade
index 9cd2a52..642b5f1 100644
--- a/modules/control-center-web/src/main/js/views/sql/sql.jade
+++ b/modules/control-center-web/src/main/js/views/sql/sql.jade
@@ -86,7 +86,7 @@ mixin chart-settings(mdl)
.btn-group(style='margin-top: 2px')
+btn-toolbar('fa-plus', 'addParagraph()', 'Add new query')
.docs-body.paragraphs
- .panel-group(bs-collapse ng-model='notebook.activePanels' data-allow-multiple='true' data-start-collapsed='false')
+ .panel-group(bs-collapse ng-model='notebook.expandedParagraphs' data-allow-multiple='true' data-start-collapsed='false')
.panel.panel-default(ng-repeat='paragraph in notebook.paragraphs')
.panel-heading(id='{{paragraph.id}}' bs-collapse-toggle)
.row