You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2016/01/25 18:13:56 UTC

[01/11] ignite git commit: IGNITE-2370 Minor fix for message

Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc3 9ef6c9c9a -> ffb7edcfd


IGNITE-2370 Minor fix for message


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

Branch: refs/heads/ignite-843-rc3
Commit: 34b3c4bfb3d6379113d5bf8ea8fca76ddd2ec030
Parents: e967301
Author: vsisko <vs...@gridgain.com>
Authored: Fri Jan 22 14:39:48 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Jan 22 14:39:48 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/caches-controller.js          |  2 +-
 .../src/main/js/controllers/clusters-controller.js        |  2 +-
 .../src/main/js/controllers/common-module.js              | 10 +++-------
 .../src/main/js/controllers/domains-controller.js         |  1 -
 4 files changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/34b3c4bf/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index f0732db..c7a7249 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -477,7 +477,7 @@ consoleModule.controller('cachesController', [
                     'Found caches "' + checkRes.firstCache.name + '" and "' + checkRes.secondCache.name + '" in cluster "' + failCluster.label + '" ' +
                     'with the same data source bean name "' + checkRes.firstCache.cacheStoreFactory[checkRes.firstCache.cacheStoreFactory.kind].dataSourceBean +
                     '" and different configured databases: "' + $common.cacheStoreJdbcDialectsLabel(checkRes.firstDB) + '" in "' + checkRes.firstCache.name + '" and "' +
-                    $common.cacheStoreJdbcDialectsLabel(checkRes.secondDB) + '" in "' + checkRes.secondCache.name + '"');
+                    $common.cacheStoreJdbcDialectsLabel(checkRes.secondDB) + '" in "' + checkRes.secondCache.name + '"', 10000);
             }
 
             return true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/34b3c4bf/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index 73f6f8c..8106ecc 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -469,7 +469,7 @@ consoleModule.controller('clustersController', function ($http, $timeout, $scope
                     'Found caches "' + checkRes.firstCache.name + '" and "' + checkRes.secondCache.name + '" ' +
                     'with the same data source bean name "' + checkRes.firstCache.cacheStoreFactory[checkRes.firstCache.cacheStoreFactory.kind].dataSourceBean +
                     '" and different configured databases: "' + $common.cacheStoreJdbcDialectsLabel(checkRes.firstDB) + '" in "' + checkRes.firstCache.name + '" and "' +
-                    $common.cacheStoreJdbcDialectsLabel(checkRes.secondDB) + '" in "' + checkRes.secondCache.name + '"');
+                    $common.cacheStoreJdbcDialectsLabel(checkRes.secondDB) + '" in "' + checkRes.secondCache.name + '"', 10000);
             }
 
             var b = item.binaryConfiguration;

http://git-wip-us.apache.org/repos/asf/ignite/blob/34b3c4bf/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 ef460a1..32f72cb 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
@@ -586,9 +586,7 @@ consoleModule.service('$common', [
             }
         }
 
-        function showPopoverMessage(panels, panelId, id, message) {
-            popoverShown = false;
-
+        function showPopoverMessage(panels, panelId, id, message, showTime) {
             ensureActivePanel(panels, panelId, id);
 
             var el = $('body').find('#' + id);
@@ -602,7 +600,7 @@ consoleModule.service('$common', [
 
             $timeout(function () { newPopover.$promise.then(newPopover.show); }, 400);
 
-            $timeout(function () { newPopover.hide(); }, 5000);
+            $timeout(function () { newPopover.hide(); }, showTime ? showTime : 5000);
 
             return false;
         }
@@ -887,9 +885,7 @@ consoleModule.service('$common', [
 
                 return false;
             },
-            showPopoverMessage: function (panels, panelId, id, message) {
-                return showPopoverMessage(panels, panelId, id, message);
-            },
+            showPopoverMessage: showPopoverMessage,
             hidePopover: function () {
                 if (popover)
                     popover.hide();

http://git-wip-us.apache.org/repos/asf/ignite/blob/34b3c4bf/modules/control-center-web/src/main/js/controllers/domains-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/domains-controller.js b/modules/control-center-web/src/main/js/controllers/domains-controller.js
index e638f32..201e71a 100644
--- a/modules/control-center-web/src/main/js/controllers/domains-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/domains-controller.js
@@ -907,7 +907,6 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
 
                     var dupSfx = (dup ? '_' + dupCnt : '');
 
-
                     newDomain.keyType = valType + 'Key' + dupSfx;
                     newDomain.valueType = valType + dupSfx;
                     newDomain.queryMetadata = 'Configuration';


[10/11] ignite git commit: IGNITE-843 Added information block for igfs.

Posted by ak...@apache.org.
IGNITE-843 Added information block for igfs.


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

Branch: refs/heads/ignite-843-rc3
Commit: ac8625b480d317d58f8b46bb792b78598c0af154
Parents: 40e44de
Author: Andrey <an...@gridgain.com>
Authored: Mon Jan 25 18:01:32 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Mon Jan 25 18:01:32 2016 +0700

----------------------------------------------------------------------
 .../information/information.directive.js        | 30 +++++++++++++
 .../app/directives/information/information.jade | 20 +++++++++
 .../app/directives/information/information.scss | 46 ++++++++++++++++++++
 .../control-center-web/src/main/js/app/index.js |  2 +
 .../src/main/js/public/stylesheets/style.scss   |  1 +
 .../src/main/js/views/configuration/igfs.jade   | 11 +++--
 6 files changed, 106 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ac8625b4/modules/control-center-web/src/main/js/app/directives/information/information.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/directives/information/information.directive.js b/modules/control-center-web/src/main/js/app/directives/information/information.directive.js
new file mode 100644
index 0000000..9250639
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/directives/information/information.directive.js
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import template from './information.jade!';
+
+export default ['igniteInformation', [() => {
+    return {
+        scope: {
+            title: '@'
+        },
+        restrict: 'E',
+        template,
+        replace: true,
+        transclude: true
+    };
+}]];

http://git-wip-us.apache.org/repos/asf/ignite/blob/ac8625b4/modules/control-center-web/src/main/js/app/directives/information/information.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/directives/information/information.jade b/modules/control-center-web/src/main/js/app/directives/information/information.jade
new file mode 100644
index 0000000..3153a22
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/directives/information/information.jade
@@ -0,0 +1,20 @@
+//-
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+.block-information
+    span.icon.fa.fa-info-circle
+    h3(style='font-weight: bold') {{::title}}
+    div(ng-transclude='')

http://git-wip-us.apache.org/repos/asf/ignite/blob/ac8625b4/modules/control-center-web/src/main/js/app/directives/information/information.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/directives/information/information.scss b/modules/control-center-web/src/main/js/app/directives/information/information.scss
new file mode 100644
index 0000000..1e53a1a
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/directives/information/information.scss
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+$ignite-block-information: #fcfcfc;
+$ignite-block-information-border: #aab8c6;
+$ignite-block-information-icon: #4a6785;
+
+.block-information {
+    position: relative;
+
+    background: $ignite-block-information;
+
+    border-radius: 5px;
+    border: 1px solid $ignite-block-information-border;
+
+    margin: 20px 0;
+    padding: 10px 10px 0 30px;
+
+
+    > .icon {
+        color: $ignite-block-information-icon;
+
+        position: absolute;
+        top: 12px;
+        left: 10px;
+
+        font-size: 16px;
+
+        vertical-align: text-bottom
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/ac8625b4/modules/control-center-web/src/main/js/app/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/index.js b/modules/control-center-web/src/main/js/app/index.js
index 7c56081..c9611b7 100644
--- a/modules/control-center-web/src/main/js/app/index.js
+++ b/modules/control-center-web/src/main/js/app/index.js
@@ -82,6 +82,7 @@ import './modules/terms/main';
 import igniteLoading from './directives/loading/loading.directive';
 import igniteCallout from './directives/callout/callout.directive';
 import igniteCalloutCel from './directives/callout/callout-cel.directive';
+import igniteInformation from './directives/information/information.directive';
 import igniteUiAceXml from './directives/ui-ace-xml/ui-ace-xml.directive';
 import igniteUiAceJava from './directives/ui-ace-java/ui-ace-java.directive';
 import igniteUiAcePom from './directives/ui-ace-pom/ui-ace-pom.directive';
@@ -124,6 +125,7 @@ angular
 .directive(...igniteLoading)
 .directive(...igniteCallout)
 .directive(...igniteCalloutCel)
+.directive(...igniteInformation)
 .directive(...igniteUiAceXml)
 .directive(...igniteUiAceJava)
 .directive(...igniteUiAcePom)

http://git-wip-us.apache.org/repos/asf/ignite/blob/ac8625b4/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 404971a..18dc326 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -19,6 +19,7 @@
 @import "bootstrap-custom";
 
 @import "./../../app/directives/callout/callout.scss";
+@import "./../../app/directives/information/information.scss";
 
 $logo-path: "/images/logo.png";
 $input-height: 28px;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ac8625b4/modules/control-center-web/src/main/js/views/configuration/igfs.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/igfs.jade b/modules/control-center-web/src/main/js/views/configuration/igfs.jade
index a30af50..13c14dc 100644
--- a/modules/control-center-web/src/main/js/views/configuration/igfs.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/igfs.jade
@@ -19,24 +19,27 @@ include ../includes/controls
 .docs-header
     h1 Create and Configure IGFS
 .docs-body(ng-controller='igfsController')
-    ignite-callout
+    ignite-information(data-title='Configure IGFS only if you going to use In-memory File System')
+        p Ignite File System (IGFS) is an in-memory file system allowing work with files and directories over existing cache infrastructure.
+        p IGFS can either work as purely in-memory file system, or delegate to another file system (e.g. various Hadoop file system implementations) acting as a caching layer (see #[a(href='https://apacheignite.readme.io/docs/secondary-file-system' target='_blank') secondary file system]  for more detail).
+        p In addition IGFS provides API to execute map-reduce tasks over file system data.
+    //-- ignite-callout
         ignite-callout-cel(data-title='On This Screen')
             li Configure IGFS file systems
             li
                 ignite-dialog More info
                     ignite-dialog-title IGFS screen
-                    ignite-dialog-content 
+                    ignite-dialog-content
                         | Manage your IGFS file systems on current screen.#[br]
                         | IGFS can be assigned to specified #[a(ui-sref='base.configuration.clusters') clusters].#[br]
                         | Generated cluster with IGFS available on #[a(ui-sref='base.configuration.summary') summary] screen.
-                    
+
         ignite-callout-cel(data-title='Next Steps')
             li Continue to #[a(ui-sref='base.configuration.summary') Summary]
             li Back to #[a(ui-sref='base.configuration.clusters') Clusters]
 
     div(dw-loading='loadingIgfsScreen' dw-loading-options='{text: "Loading IGFS screen...", className: "page-loading-overlay"}')
         div(ng-show='ui.ready')
-            hr
             +main-table('IGFS', 'igfss', 'igfsName', 'selectItem(row)', '{{$index + 1}}) {{row.name}}', 'name')
             .padding-top-dflt(bs-affix)
                 .panel-tip-container(data-placement='bottom' bs-tooltip='' data-title='Create new IGFS')


[05/11] ignite git commit: IGNITE-2363 Open links in tabs.

Posted by ak...@apache.org.
IGNITE-2363 Open links in tabs.


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

Branch: refs/heads/ignite-843-rc3
Commit: 43c24524de55ef5a87295b2dd8621a7f9dadfea6
Parents: b42e2fb
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jan 22 23:01:33 2016 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jan 22 23:01:33 2016 +0700

----------------------------------------------------------------------
 .../configuration/summary/summary.controller.js       | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/43c24524/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
index 75d1926..43f599f 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
@@ -277,19 +277,7 @@ export default [
             ];
 
             refs.forEach((ref) => {
-                $timeout(() => {
-                    const fake_link = document.createElement('a');
-
-                    fake_link.style.display = 'none';
-
-                    document.body.appendChild(fake_link);
-
-                    fake_link.setAttribute('href', ref);
-                    fake_link.setAttribute('target', '_blank');
-                    fake_link.click();
-
-                    document.body.removeChild(fake_link);
-                }, 100);
+                window.open(ref);
             });
         };
     }


[11/11] ignite git commit: IGNITE-843 WIP rework domain model import + minor fixes on IGFS and summary.

Posted by ak...@apache.org.
IGNITE-843 WIP rework domain model import + minor fixes on IGFS and summary.


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

Branch: refs/heads/ignite-843-rc3
Commit: ffb7edcfda91cefe16fdb68e9f11f1219da79081
Parents: ac8625b
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jan 26 00:11:58 2016 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jan 26 00:11:58 2016 +0700

----------------------------------------------------------------------
 .../configuration/summary/summary.controller.js |   1 +
 .../main/js/controllers/domains-controller.js   | 136 +++++++++++--------
 .../js/views/configuration/domains-import.jade  |  17 ++-
 .../src/main/js/views/configuration/igfs.jade   |   8 +-
 4 files changed, 93 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ffb7edcf/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
index fc816c9..44da468 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
@@ -40,6 +40,7 @@ export default [
         $scope.panelExpanded = $common.panelExpanded;
         $scope.tableVisibleRow = $table.tableVisibleRow;
         $scope.widthIsSufficient = $common.widthIsSufficient;
+        $scope.dialects = {};
 
         $scope.projectStructureOptions = {
             nodeChildren: 'children',

http://git-wip-us.apache.org/repos/asf/ignite/blob/ffb7edcf/modules/control-center-web/src/main/js/controllers/domains-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/domains-controller.js b/modules/control-center-web/src/main/js/controllers/domains-controller.js
index ff19b5b..a1f0e3d 100644
--- a/modules/control-center-web/src/main/js/controllers/domains-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/domains-controller.js
@@ -469,7 +469,7 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
 
                                 if ($scope.importDomain.demo) {
                                     $scope.ui.packageNamePrev = $scope.ui.packageName;
-                                    $scope.ui.packageName = 'org.apache.ignite.console.demo.model';
+                                    $scope.ui.packageName = 'model';
                                 }
                                 else if ($scope.ui.packageNamePrev) {
                                     $scope.ui.packageName = $scope.ui.packageNamePrev;
@@ -597,37 +597,53 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
             }
         };
 
-        $scope.importCommonActions = [
-            {label: 'Create new cache by template', value: 1},
-            {label: 'Associate with existing cache', value: 2}
-        ];
-
-        // TODO $scope.$watch();
+        $scope.importCommonActions = [];
+        $scope.importCommonCachesOrTemplates = [];
 
-        var zzz = [];
+        $scope.importCurrentActions = [];
+        $scope.importCurrentTemplates = [];
+        $scope.importCurrentCaches = [];
 
-        $scope.importCommonCachesOrTemplates = function () {
-            zzz.length = 0;
+        function _fillCommonCachesOrTemplates() {
+            $scope.importCommonCachesOrTemplates.length = 0;
 
             if ($scope.ui.importCommonAction == IMPORT_DM_NEW_CACHE) {
-                zzz.push(DFLT_PARTITIONED_CACHE);
-                zzz.push(DFLT_REPLICATED_CACHE);
+                $scope.importCommonCachesOrTemplates.push(DFLT_PARTITIONED_CACHE);
+                $scope.importCommonCachesOrTemplates.push(DFLT_REPLICATED_CACHE);
             }
 
             if (!$common.isEmptyArray($scope.caches)) {
-                if (zzz.length > 0)
-                    zzz.push(null);
+                if ($scope.importCommonCachesOrTemplates.length > 0)
+                    $scope.importCommonCachesOrTemplates.push(null);
 
                 _.forEach($scope.caches, function (cache) {
-                    zzz.push(cache);
+                    $scope.importCommonCachesOrTemplates.push(cache);
                 });
 
-                $timeout(function() {
-                    $scope.ui.importCommonCacheOrTemplate = zzz.length > 0 ? zzz[0].value : null;
+                $scope.ui.importCommonCacheOrTemplate = $scope.importCommonCachesOrTemplates.length > 0 ? $scope.importCommonCachesOrTemplates[0].value : null;
+            }
+        }
+
+        $scope.$watch('ui.importCommonAction', function () {
+            _fillCommonCachesOrTemplates();
+        });
+
+        $scope.tableActionView = function(tbl) {
+            if (tbl.action === IMPORT_DM_NEW_CACHE) {
+                var template = _.find($scope.importCurrentTemplates, function (t) {
+                    return t && tbl.template === t.value;
                 });
+
+                return 'Create ' + tbl.generatedCacheName + ' (' + template.label + ')';
             }
+            else {
+                var cache = _.find($scope.importCurrentCaches, function (c) {
+                    return tbl.cache === c.value;
+                });
 
-            return zzz;
+
+                return cache ? ('Associate with ' + cache.label) : 'No caches to associate with';
+            }
         };
 
         /**
@@ -649,14 +665,43 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
 
             $http.post('/api/v1/agent/tables', preset)
                 .success(function (tables) {
+                    var hasCaches = !$common.isEmptyArray($scope.caches);
+
+                    $scope.importCommonActions.length = 0;
+                    $scope.importCommonActions.push({label: 'Create new cache by template', value: IMPORT_DM_NEW_CACHE});
+                    if (hasCaches)
+                        $scope.importCommonActions.push({label: 'Associate with existing cache', value: IMPORT_DM_ASSOCIATE_CACHE});
+
+                    $scope.importCurrentActions.length = 0;
+                    $scope.importCurrentActions.push({label: 'Create', value: IMPORT_DM_NEW_CACHE});
+                    if (hasCaches)
+                        $scope.importCurrentActions.push({label: 'Associate', value: IMPORT_DM_ASSOCIATE_CACHE});
+
+                    $scope.importCurrentTemplates.length = 0;
+                    $scope.importCurrentCaches.length = 0;
+
+                    $scope.importCurrentTemplates.push(DFLT_PARTITIONED_CACHE);
+                    $scope.importCurrentTemplates.push(DFLT_REPLICATED_CACHE);
+
+                    if (hasCaches) {
+                        $scope.importCurrentTemplates.push(null);
+
+                        _.forEach($scope.caches, function (cache) {
+                            $scope.importCurrentTemplates.push(cache);
+                            $scope.importCurrentCaches.push(cache);
+                        });
+                    }
+
+                    var dfltCache = $scope.importCurrentCaches.length > 0 ? $scope.importCurrentCaches[0] : null;
 
                     _.forEach(tables, function (tbl, idx) {
                         tbl.id = idx;
-                        tbl.cache = IMPORT_DM_NEW_CACHE.value;
+                        tbl.action = IMPORT_DM_NEW_CACHE;
+                        tbl.generatedCacheName = toJavaClassName(tbl.tbl) + 'Cache';
+                        tbl.сache = dfltCache ? dfltCache.value : null;
                         tbl.template = DFLT_PARTITIONED_CACHE.value;
                         tbl.label = tbl.schema + '.' + tbl.tbl;
-                        tbl.editCache = false;
-                        tbl.editTemplate = false;
+                        tbl.edit = false;
                         tbl.use = $common.isDefined(_.find(tbl.cols, function (col) {
                             return col.key;
                         }));
@@ -665,6 +710,8 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
                     $scope.importDomain.action = 'tables';
                     $scope.importDomain.tables = tables;
                     $scope.importDomain.info = INFO_SELECT_TABLES;
+
+                    _fillCommonCachesOrTemplates();
                 })
                 .error(function (errMsg) {
                     $common.showError(errMsg);
@@ -676,49 +723,26 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
 
         $scope.applyDefaults = function () {
             _.forEach($scope.importDomain.displayedTables, function (table) {
-                table.editCache = false;
-                table.editTemplate = false;
-                table.cache = $scope.ui.dfltTableCache;
-                table.template = $scope.ui.dfltTableTemplate;
+                table.edit = false;
+                table.action = $scope.ui.importCommonAction;
+
+                if (table.action === IMPORT_DM_NEW_CACHE)
+                    table.template = $scope.ui.importCommonCacheOrTemplate;
+                else
+                    table.cache = $scope.ui.importCommonCacheOrTemplate;
             });
         };
 
         $scope.curDbTable = null;
 
         $scope.startEditDbTableCache = function (tbl) {
-            if ($scope.curDbTable) {
-                $scope.curDbTable.editCache = false;
-                $scope.curDbTable.editTemplate = false;
-            }
+            if ($scope.curDbTable)
+                $scope.curDbTable.edit = false;
 
-            tbl.editCache = true;
+            tbl.edit = true;
             $scope.curDbTable = tbl;
         };
 
-        $scope.startEditDbTableTemplate = function (tbl) {
-            if ($scope.curDbTable) {
-                $scope.curDbTable.editCache = false;
-                $scope.curDbTable.editTemplate = false;
-            }
-
-            $timeout(function () {
-                tbl.editTemplate = true;
-                $scope.curDbTable = tbl;
-            });
-        };
-
-        $scope.dbTableCache = function (tbl) {
-            return 'TODO'; //  _.find($scope.importCaches, {value: tbl.cache}).label;
-        };
-
-        $scope.dbTableTemplate = function (tbl) {
-            return 'TODO';
-            //if (tbl.cache === IMPORT_DM_NEW_CACHE.value)
-            //    return _.find($scope.importCacheTemplates, {value: tbl.template}).label;
-            //
-            //return '';
-        };
-
         /**
          * Show page with import domain models options.
          */
@@ -930,8 +954,8 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
                         newDomain.keyType = newDomain.keyFields[0].jdbcType.javaType;
 
                     // Prepare caches for generation.
-                    if (table.cache === IMPORT_DM_NEW_CACHE.value) {
-                        var template = _.find($scope.importCacheTemplates, {value: table.template});
+                    if (table.action === IMPORT_DM_NEW_CACHE) {
+                        var template = _.find($scope.importCurrentTemplates, {value: table.template});
 
                         newDomain.newCache = angular.copy(template ? template.cache : DFLT_PARTITIONED_CACHE.cache);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ffb7edcf/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/domains-import.jade b/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
index a67c96d..4a03f88 100644
--- a/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
@@ -140,24 +140,23 @@ mixin td-ellipses-lbl(w, lbl)
                                                     input(type='checkbox' ng-model='table.use' ng-change='selectTable()')
                                                 +td-ellipses-lbl('130px', '{{::table.schema}}')
                                                 +td-ellipses-lbl('160px', '{{::table.tbl}}')
-                                                td(width='160px' style='min-width: 160px; max-width: 160px')
+                                                td(colspan='2' width='288px' style='min-width: 160px; max-width: 160px')
                                                     div.td-ellipsis
-                                                        a(ng-if='!table.editCache' ng-click='startEditDbTableCache(table)') {{dbTableCache(table)}}
-                                                        button.select-toggle.form-control(ng-if='table.editCache' bs-select ng-model='table.cache' data-container='false' bs-options='item.value as item.label for item in importCaches')
-                                                td(width='128px' style='min-width: 128px; max-width: 128px')
-                                                    div.td-ellipsis
-                                                        a(ng-if='!table.editTemplate' ng-click='startEditDbTableTemplate(table)') {{dbTableTemplate(table)}}
-                                                        button.select-toggle.form-control(ng-if='table.editTemplate' bs-select ng-model='table.template' style='max-width: 110px' data-container='false' bs-options='item.value as item.label for item in importCacheTemplates')
+                                                        a(ng-if='!table.edit' ng-click='startEditDbTableCache(table)') {{tableActionView(table)}}
+                                                        div(style='display: flex' ng-if='table.edit')
+                                                            button.select-toggle.form-control(style='width: 35%; margin-right: 5px' bs-select ng-model='table.action' data-container='false' bs-options='item.value as item.label for item in importCurrentActions')
+                                                            button.select-toggle.form-control(ng-if='table.action==1' style='width: 65%; margin-right: 0' bs-select ng-model='table.template' data-container='false' bs-options='item.value as item.label for item in importCurrentTemplates')
+                                                            button.select-toggle.form-control(ng-if='table.action==2' style='width: 65%; margin-right: 0' bs-select ng-model='table.cache' data-container='false' bs-options='item.value as item.label for item in importCurrentCaches')
                                                 td
                 .settings-row
-                    label Defaults for tables
+                    label Defaults to be applied for filtered tables
                     i.tipLabel.fa.fa-question-circle(bs-tooltip='' data-title='Select and apply options for caches generation')
                 .settings-row
                     .col-sm-11
                         .col-sm-6(style='padding-right: 5px')
                             button.select-toggle.form-control(bs-select ng-model='ui.importCommonAction' data-container='false' bs-options='item.value as item.label for item in importCommonActions')
                         .col-sm-6(style='padding-left: 5px; padding-right: 5px')
-                            button.select-toggle.form-control(bs-select ng-model='ui.importCommonCacheOrTemplate' data-container='false' bs-options='item.value as item.label for item in importCommonCachesOrTemplates()')
+                            button.select-toggle.form-control(bs-select ng-model='ui.importCommonCacheOrTemplate' data-container='false' bs-options='item.value as item.label for item in importCommonCachesOrTemplates')
                     .col-sm-1(style='padding-left: 5px')
                         button.btn.btn-primary(ng-click='applyDefaults()') Apply
             .import-domain-model-wizard-page(ng-show='importDomain.action == "options"' style='margin-bottom: 176px')

http://git-wip-us.apache.org/repos/asf/ignite/blob/ffb7edcf/modules/control-center-web/src/main/js/views/configuration/igfs.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/igfs.jade b/modules/control-center-web/src/main/js/views/configuration/igfs.jade
index 13c14dc..7dcd6be 100644
--- a/modules/control-center-web/src/main/js/views/configuration/igfs.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/igfs.jade
@@ -19,10 +19,10 @@ include ../includes/controls
 .docs-header
     h1 Create and Configure IGFS
 .docs-body(ng-controller='igfsController')
-    ignite-information(data-title='Configure IGFS only if you going to use In-memory File System')
-        p Ignite File System (IGFS) is an in-memory file system allowing work with files and directories over existing cache infrastructure.
-        p IGFS can either work as purely in-memory file system, or delegate to another file system (e.g. various Hadoop file system implementations) acting as a caching layer (see #[a(href='https://apacheignite.readme.io/docs/secondary-file-system' target='_blank') secondary file system]  for more detail).
-        p In addition IGFS provides API to execute map-reduce tasks over file system data.
+    ignite-information(data-title='Configure IGFS only if you are going to use In-memory File System')
+        p Ignite File System (IGFS) is an in-memory file system allowing work with files and directories over existing cache infrastructure
+        p IGFS can either work as purely in-memory file system, or delegate to another file system (e.g. various Hadoop file system implementations) acting as a caching layer (see #[a(href='https://apacheignite.readme.io/docs/secondary-file-system' target='_blank') secondary file system]  for more detail)
+        p In addition IGFS provides API to execute map-reduce tasks over file system data
     //-- ignite-callout
         ignite-callout-cel(data-title='On This Screen')
             li Configure IGFS file systems


[04/11] ignite git commit: IGNITE-2363 WIP on open pages with JDBC drivers downloads.

Posted by ak...@apache.org.
IGNITE-2363 WIP on open pages with JDBC drivers downloads.


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

Branch: refs/heads/ignite-843-rc3
Commit: b42e2fbea43700bb6085ea9f74e497d9163fb370
Parents: 7ecefe1
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Fri Jan 22 18:12:24 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Jan 22 18:12:24 2016 +0700

----------------------------------------------------------------------
 .../configuration/summary/summary.controller.js | 32 ++++++++++++++++++--
 .../src/main/js/public/stylesheets/style.scss   |  6 +++-
 .../main/js/views/configuration/summary.jade    |  1 +
 3 files changed, 36 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b42e2fbe/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
index a2148d9..75d1926 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
@@ -18,8 +18,8 @@
 import JSZip from 'jszip';
 
 export default [
-    '$scope', '$http', '$common', '$loading', '$table', '$filter', 'ConfigurationSummaryResource', 'JavaTypes',
-    function($scope, $http, $common, $loading, $table, $filter, Resource, JavaTypes) {
+    '$scope', '$http', '$common', '$loading', '$table', '$filter', '$timeout', 'ConfigurationSummaryResource', 'JavaTypes',
+    function($scope, $http, $common, $loading, $table, $filter, $timeout, Resource, JavaTypes) {
         const ctrl = this;
         const igniteVersion = '1.5.0.final';
 
@@ -264,5 +264,33 @@ export default [
             // Download archive.
             saveAs(blob, cluster.name + '-configuration.zip');
         };
+
+        $scope.openJdbcDownloadLinksVisible = function() {
+            return true; // TODO
+        };
+
+        $scope.openJdbcDownloadLinks = function() {
+            const refs = [
+                'http://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html',
+                'http://www-01.ibm.com/support/docview.wss?uid=swg21363866',
+                'https://www.microsoft.com/en-us/download/details.aspx?id=11774'
+            ];
+
+            refs.forEach((ref) => {
+                $timeout(() => {
+                    const fake_link = document.createElement('a');
+
+                    fake_link.style.display = 'none';
+
+                    document.body.appendChild(fake_link);
+
+                    fake_link.setAttribute('href', ref);
+                    fake_link.setAttribute('target', '_blank');
+                    fake_link.click();
+
+                    document.body.removeChild(fake_link);
+                }, 100);
+            });
+        };
     }
 ];

http://git-wip-us.apache.org/repos/asf/ignite/blob/b42e2fbe/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 02c3410..3f1e588 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -435,10 +435,14 @@ h1, h2, h3, h4, h5, h6 {
     margin-bottom: 0;
 }
 
-button, a.btn {
+button, .btn {
     margin-right: 5px;
 }
 
+i.btn {
+    margin-right: 0;
+}
+
 .btn {
     padding: 3px 6px;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/b42e2fbe/modules/control-center-web/src/main/js/views/configuration/summary.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/summary.jade b/modules/control-center-web/src/main/js/views/configuration/summary.jade
index f59b83a..3dbf3c9 100644
--- a/modules/control-center-web/src/main/js/views/configuration/summary.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/summary.jade
@@ -68,6 +68,7 @@ mixin ignite-form-field-tooltip(message)
                         div(bs-popover data-template-url='/configuration/summary-project-structure.html', data-placement='bottom', data-trigger='click' data-auto-close='true')
                             i.fa.fa-sitemap
                             label.tipLabel Project structure
+                    button.btn.btn-primary(id='proprietary-jdbc-drivers' ng-click='openJdbcDownloadLinks()' bs-tooltip='' data-title='Open JDBC drivers download pages' data-placement='bottom') Download JDBC drivers
                     hr
                 .panel-group(bs-collapse ng-init='panels.activePanels=[0,1]' ng-model='panels.activePanels' data-allow-multiple='true')
                     .panel.panel-default


[03/11] ignite git commit: IGNITE-2370 Minor fix for validation message.

Posted by ak...@apache.org.
IGNITE-2370 Minor fix for validation message.


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

Branch: refs/heads/ignite-843-rc3
Commit: 7ecefe176f98ccae9394c7ba7590e09d45e69937
Parents: 362b7dd
Author: vsisko <vs...@gridgain.com>
Authored: Fri Jan 22 16:03:53 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Jan 22 16:03:53 2016 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    |  8 +-
 .../main/js/controllers/clusters-controller.js  |  2 +-
 .../src/main/js/controllers/common-module.js    | 77 ++++++++++++--------
 3 files changed, 52 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7ecefe17/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index c7a7249..8ddea36 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -467,16 +467,16 @@ consoleModule.controller('cachesController', [
 
                 caches.push($scope.backupItem);
 
-                checkRes = $common.checkCachesDataSources(caches);
+                checkRes = $common.checkCachesDataSources(caches, $scope.backupItem);
 
                 return !checkRes.checked;
             });
 
             if (!checkRes.checked) {
-                return showPopoverMessage($scope.panels, 'store', checkRes.secondCache.cacheStoreFactory.kind === 'CacheJdbcPojoStoreFactory' ? 'dialect' : 'database',
-                    'Found caches "' + checkRes.firstCache.name + '" and "' + checkRes.secondCache.name + '" in cluster "' + failCluster.label + '" ' +
+                return showPopoverMessage($scope.panels, 'store', checkRes.firstCache.cacheStoreFactory.kind === 'CacheJdbcPojoStoreFactory' ? 'dialect' : 'database',
+                    'Found cache "' + checkRes.secondCache.name + '" in cluster "' + failCluster.label + '" ' +
                     'with the same data source bean name "' + checkRes.firstCache.cacheStoreFactory[checkRes.firstCache.cacheStoreFactory.kind].dataSourceBean +
-                    '" and different configured databases: "' + $common.cacheStoreJdbcDialectsLabel(checkRes.firstDB) + '" in "' + checkRes.firstCache.name + '" and "' +
+                    '" and different database: "' + $common.cacheStoreJdbcDialectsLabel(checkRes.firstDB) + '" in current cache and "' +
                     $common.cacheStoreJdbcDialectsLabel(checkRes.secondDB) + '" in "' + checkRes.secondCache.name + '"', 10000);
             }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7ecefe17/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index 8106ecc..5abef5c 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -468,7 +468,7 @@ consoleModule.controller('clustersController', function ($http, $timeout, $scope
                 return showPopoverMessage($scope.panels, 'general', 'caches',
                     'Found caches "' + checkRes.firstCache.name + '" and "' + checkRes.secondCache.name + '" ' +
                     'with the same data source bean name "' + checkRes.firstCache.cacheStoreFactory[checkRes.firstCache.cacheStoreFactory.kind].dataSourceBean +
-                    '" and different configured databases: "' + $common.cacheStoreJdbcDialectsLabel(checkRes.firstDB) + '" in "' + checkRes.firstCache.name + '" and "' +
+                    '" and different databases: "' + $common.cacheStoreJdbcDialectsLabel(checkRes.firstDB) + '" in "' + checkRes.firstCache.name + '" and "' +
                     $common.cacheStoreJdbcDialectsLabel(checkRes.secondDB) + '" in "' + checkRes.secondCache.name + '"', 10000);
             }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7ecefe17/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 32f72cb..57d96ae 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
@@ -702,6 +702,30 @@ consoleModule.service('$common', [
             return !isEmpty;
         }
 
+        var DS_CHECK_SUCCESS = { checked: true };
+
+        function compareDataSources(firstCache, secondCache) {
+            var firstDs = extractDataSource(firstCache);
+            var secondDs = extractDataSource(secondCache);
+
+            if (firstDs && secondDs) {
+                var firstDB = firstDs.dialect || firstDs.database;
+                var secondDB = secondDs.dialect || secondDs.database;
+
+                if (firstDs.dataSourceBean === secondDs.dataSourceBean && firstDB !== secondDB) {
+                    return {
+                        checked: false,
+                        firstCache: firstCache,
+                        firstDB: firstDB,
+                        secondCache: secondCache,
+                        secondDB: secondDB
+                    };
+                }
+            }
+
+            return DS_CHECK_SUCCESS;
+        }
+
         return {
             getModel: getModel,
             joinTip: function (arr) {
@@ -1027,42 +1051,35 @@ consoleModule.service('$common', [
 
                 return found ? found.label : undefined;
             },
-            checkCachesDataSources: function (caches) {
-                var res = { checked: true };
-
-                res.checked = !isDefined(_.find(caches, function (curCache, curIx) {
-                    return _.find(caches, function (checkCache, checkIx) {
-                        if (checkIx < curIx) {
-                            var curDs = extractDataSource(curCache);
-                            var checkDs = extractDataSource(checkCache);
-
-                            if (curDs && checkDs) {
-                                var curDB = curDs.dialect || curDs.database;
-                                var checkDB = checkDs.dialect || checkDs.database;
-
-                                if (curDs.dataSourceBean === checkDs.dataSourceBean && curDB !== checkDB) {
-                                    res = {
-                                        checked: false,
-                                        firstCache: checkCache,
-                                        firstDB: checkDB,
-                                        secondCache: curCache,
-                                        secondDB: curDB
-                                    };
-
-                                    return true;
-                                }
-                            }
+            checkCachesDataSources: function (caches, checkCacheExt) {
+                var res = DS_CHECK_SUCCESS;
+
+                _.find(caches, function (curCache, curIx) {
+                    if (isDefined(checkCacheExt)) {
+                        if (!isDefined(checkCacheExt._id) || checkCacheExt.id != curCache._id) {
+                            res = compareDataSources(checkCacheExt, curCache);
+
+                            return !res.checked;
                         }
 
                         return false;
-                    });
-                }));
+                    }
+                    else {
+                        return _.find(caches, function (checkCache, checkIx) {
+                            if (checkIx < curIx) {
+                                res = compareDataSources(checkCache, curCache);
+
+                                return !res.checked;
+                            }
+
+                            return false;
+                        });
+                    }
+                });
 
                 return res;
             },
             autoCacheStoreConfiguration: function (cache, domains) {
-                var change;
-
                 var cacheStoreFactory = isDefined(cache.cacheStoreFactory) &&
                     isDefined(cache.cacheStoreFactory.kind);
 
@@ -1126,7 +1143,7 @@ consoleModule.service('$unsavedChangesGuard', function ($rootScope) {
                 window.onbeforeunload = null;
             });
 
-            var unbind = $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
+            var unbind = $rootScope.$on('$stateChangeStart', function(event) {
                 if ($scope.ui && $scope.ui.isDirty()) {
                     if (!confirm('You have unsaved changes.\n\nAre you sure you want to discard them?')) {
                         event.preventDefault();


[02/11] ignite git commit: Merge remote-tracking branch 'origin/ignite-843-rc2' into ignite-843-rc2

Posted by ak...@apache.org.
Merge remote-tracking branch 'origin/ignite-843-rc2' into ignite-843-rc2


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

Branch: refs/heads/ignite-843-rc3
Commit: 362b7dd7ded68c08a551e30a1cfa92fb5602ff12
Parents: 34b3c4b 9ef6c9c
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Fri Jan 22 14:40:18 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Jan 22 14:40:18 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/app/modules/configuration/sidebar/main.js      | 2 +-
 .../src/main/js/views/configuration/caches.jade                | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[06/11] ignite git commit: IGNITE-2363 Open pages with JDBC drivers downloads.

Posted by ak...@apache.org.
IGNITE-2363 Open pages with JDBC drivers downloads.


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

Branch: refs/heads/ignite-843-rc3
Commit: bcb66dbfbc77dec1f2778d568dfe71932532dbec
Parents: 43c2452
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Mon Jan 25 10:47:59 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Jan 25 10:47:59 2016 +0700

----------------------------------------------------------------------
 .../configuration/summary/summary.controller.js | 45 +++++++++++++++-----
 .../main/js/views/configuration/summary.jade    |  2 +-
 2 files changed, 35 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bcb66dbf/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
index 43f599f..c3761cc 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
@@ -181,12 +181,26 @@ export default [
 
             $scope.cluster = cluster;
             $scope.selectedItem = cluster;
+            $scope.dialects = {};
 
             sessionStorage.summarySelectedId = $scope.clusters.indexOf(cluster);
 
             javaFolder.children = [javaConfigFolder, javaStartupFolder];
 
             _.forEach(cluster.caches, (cache) => {
+                if (cache.cacheStoreFactory) {
+                    //const store = cache.cacheStoreFactory[cache.cacheStoreFactory.kind];
+                    //
+                    //if (store && store.dialect)
+                    //    $scope.dialects[store.dialect] = true;
+
+                    if (cache.cacheStoreFactory.kind === 'CacheJdbcPojoStoreFactory')
+                        $scope.dialects[cache.cacheStoreFactory.CacheJdbcPojoStoreFactory.dialect] = true;
+
+                    if (cache.cacheStoreFactory.kind === 'CacheJdbcBlobStoreFactory')
+                        $scope.dialects[cache.cacheStoreFactory.CacheJdbcBlobStoreFactory.database] = true;
+                }
+
                 _.forEach(cache.domains, (domain) => {
                     if (!$common.isEmptyArray(domain.keyFields)) {
                         if (!JavaTypes.isBuiltInClass(domain.keyType))
@@ -265,20 +279,29 @@ export default [
             saveAs(blob, cluster.name + '-configuration.zip');
         };
 
-        $scope.openJdbcDownloadLinksVisible = function() {
-            return true; // TODO
+        /**
+         * @returns {boolean} 'true' if at least one proprietary JDBC driver is configured for cache store.
+         */
+        $scope.downloadJdbcDriversVisible = function() {
+            const dialects = $scope.dialects;
+
+            return !!(dialects.Oracle || dialects.DB2 || dialects.SQLServer);
         };
 
-        $scope.openJdbcDownloadLinks = function() {
-            const refs = [
-                'http://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html',
-                'http://www-01.ibm.com/support/docview.wss?uid=swg21363866',
-                'https://www.microsoft.com/en-us/download/details.aspx?id=11774'
-            ];
+        /**
+         * Open download proprietary JDBC driver pages.
+         */
+        $scope.downloadJdbcDrivers = function() {
+            const dialects = $scope.dialects;
 
-            refs.forEach((ref) => {
-                window.open(ref);
-            });
+            if (dialects.Oracle)
+                window.open('http://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html');
+
+            if (dialects.DB2)
+                window.open('http://www-01.ibm.com/support/docview.wss?uid=swg21363866');
+
+            if (dialects.SQLServer)
+                window.open('https://www.microsoft.com/en-us/download/details.aspx?id=11774');
         };
     }
 ];

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcb66dbf/modules/control-center-web/src/main/js/views/configuration/summary.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/summary.jade b/modules/control-center-web/src/main/js/views/configuration/summary.jade
index 3dbf3c9..8930626 100644
--- a/modules/control-center-web/src/main/js/views/configuration/summary.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/summary.jade
@@ -68,7 +68,7 @@ mixin ignite-form-field-tooltip(message)
                         div(bs-popover data-template-url='/configuration/summary-project-structure.html', data-placement='bottom', data-trigger='click' data-auto-close='true')
                             i.fa.fa-sitemap
                             label.tipLabel Project structure
-                    button.btn.btn-primary(id='proprietary-jdbc-drivers' ng-click='openJdbcDownloadLinks()' bs-tooltip='' data-title='Open JDBC drivers download pages' data-placement='bottom') Download JDBC drivers
+                    button.btn.btn-primary(id='proprietary-jdbc-drivers' ng-if='downloadJdbcDriversVisible()' ng-click='downloadJdbcDrivers()' bs-tooltip='' data-title='Open proprietary JDBC drivers download pages' data-placement='bottom') Download JDBC drivers
                     hr
                 .panel-group(bs-collapse ng-init='panels.activePanels=[0,1]' ng-model='panels.activePanels' data-allow-multiple='true')
                     .panel.panel-default


[08/11] ignite git commit: IGNITE-843 Fixed review notes.

Posted by ak...@apache.org.
IGNITE-843 Fixed review notes.


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

Branch: refs/heads/ignite-843-rc3
Commit: da6b16e06943539c86ff235b8c6ddd5b35b679d6
Parents: 4a193df
Author: Andrey <an...@gridgain.com>
Authored: Mon Jan 25 15:18:11 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Mon Jan 25 15:18:11 2016 +0700

----------------------------------------------------------------------
 .../main/js/app/modules/QueryNotebooks/index.js | 24 ++++++++++----------
 .../src/main/js/controllers/common-module.js    |  2 +-
 .../src/main/js/public/stylesheets/style.scss   |  5 ++++
 3 files changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/da6b16e0/modules/control-center-web/src/main/js/app/modules/QueryNotebooks/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/QueryNotebooks/index.js b/modules/control-center-web/src/main/js/app/modules/QueryNotebooks/index.js
index 8b73230..b9c1d4b 100644
--- a/modules/control-center-web/src/main/js/app/modules/QueryNotebooks/index.js
+++ b/modules/control-center-web/src/main/js/app/modules/QueryNotebooks/index.js
@@ -26,23 +26,23 @@ angular
             name: 'SQL demo',
             paragraphs: [
                 {
-                    name: 'Simple query',
+                    name: 'Query with refresh rate',
                     cacheName: 'CarCache',
                     pageSize: 50,
-                    query: 'SELECT * FROM "CarCache".Car',
-                    result: 'table',
+                    query: 'SELECT count(*)\nFROM "CarCache".Car',
+                    result: 'bar',
                     timeLineSpan: '1',
                     rate: {
-                        value: 30,
+                        value: 3,
                         unit: 1000,
-                        installed: false
+                        installed: true
                     }
                 },
                 {
-                    name: 'Query with aggregates',
+                    name: 'Simple query',
                     cacheName: 'CarCache',
                     pageSize: 50,
-                    query: 'SELECT p.name, count(*) AS cnt\nFROM "ParkingCache".Parking p\nINNER JOIN "CarCache".Car c\n  ON (p.id) = (c.parkingId)\nGROUP BY P.NAME',
+                    query: 'SELECT * FROM "CarCache".Car',
                     result: 'table',
                     timeLineSpan: '1',
                     rate: {
@@ -52,16 +52,16 @@ angular
                     }
                 },
                 {
-                    name: 'Query with refresh rate',
+                    name: 'Query with aggregates',
                     cacheName: 'CarCache',
                     pageSize: 50,
-                    query: 'SELECT count(*)\nFROM "CarCache".Car',
-                    result: 'line',
+                    query: 'SELECT p.name, count(*) AS cnt\nFROM "ParkingCache".Parking p\nINNER JOIN "CarCache".Car c\n  ON (p.id) = (c.parkingId)\nGROUP BY P.NAME',
+                    result: 'table',
                     timeLineSpan: '1',
                     rate: {
-                        value: 3,
+                        value: 30,
                         unit: 1000,
-                        installed: true
+                        installed: false
                     }
                 }
             ],

http://git-wip-us.apache.org/repos/asf/ignite/blob/da6b16e0/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 f88379f..c48d796 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
@@ -2255,7 +2255,7 @@ consoleModule.controller('notebooks', ['$scope', '$modal', '$state', '$http', '$
         if ($scope.$root.notebooks.length > 0)
             $scope.notebookDropdown.push({divider: true});
 
-        $scope.notebookDropdown.push({text: 'SQL demo', sref: 'base.sql.demo', custom: true});
+        $scope.notebookDropdown.push({text: 'Demo', sref: 'base.sql.demo', custom: true});
     };
 
     $scope.$root.reloadNotebooks = function() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/da6b16e0/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 3f1e588..404971a 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -200,6 +200,10 @@ ul.navbar-nav, .sidebar-nav {
             margin-right: 0;
         }
     }
+
+    li.divider {
+        margin: 3px 0;
+    }
 }
 
 .theme-line .border-left .sidebar-nav {
@@ -559,6 +563,7 @@ button.form-control {
 .theme-line .sql-notebooks {
     li.custom > a {
         color: $brand-info;
+        font-weight: bold;
     }
 
     li.custom > a:hover {


[09/11] ignite git commit: IGNITE-843 WIP rework domain model import.

Posted by ak...@apache.org.
IGNITE-843 WIP rework domain model import.


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

Branch: refs/heads/ignite-843-rc3
Commit: 40e44de717345ab37e350b284e5525b966be2a8d
Parents: da6b16e
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Mon Jan 25 17:05:15 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Jan 25 17:05:15 2016 +0700

----------------------------------------------------------------------
 .../main/js/controllers/domains-controller.js   | 139 ++++++++++---------
 .../js/views/configuration/domains-import.jade  |  38 ++---
 2 files changed, 87 insertions(+), 90 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/40e44de7/modules/control-center-web/src/main/js/controllers/domains-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/domains-controller.js b/modules/control-center-web/src/main/js/controllers/domains-controller.js
index 201e71a..ff19b5b 100644
--- a/modules/control-center-web/src/main/js/controllers/domains-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/domains-controller.js
@@ -25,11 +25,14 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
 
         $scope.ui = $common.formUI();
 
+        var IMPORT_DM_NEW_CACHE = 1;
+        var IMPORT_DM_ASSOCIATE_CACHE = 2;
+
+        $scope.ui.importCommonAction = IMPORT_DM_NEW_CACHE;
         $scope.ui.packageName = $commonUtils.toJavaPackageName($scope.$root.user.email.replace('@', '.')
             .split('.').reverse().join('.') + '.model');
         $scope.ui.builtinKeys = true;
         $scope.ui.usePrimitives = true;
-        $scope.ui.generateCaches = true;
         $scope.ui.generatedCachesClusters = [];
 
         $scope.removeDemoDropdown = [{
@@ -594,18 +597,38 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
             }
         };
 
-        var IMPORT_DM_NEW_CACHE = {
-            label: 'New cache',
-            value: -1
-        };
+        $scope.importCommonActions = [
+            {label: 'Create new cache by template', value: 1},
+            {label: 'Associate with existing cache', value: 2}
+        ];
 
-        var IMPORT_DM_DO_NOT_GENERATE = {
-            label: 'Do not generate',
-            value: -2
-        };
+        // TODO $scope.$watch();
+
+        var zzz = [];
+
+        $scope.importCommonCachesOrTemplates = function () {
+            zzz.length = 0;
+
+            if ($scope.ui.importCommonAction == IMPORT_DM_NEW_CACHE) {
+                zzz.push(DFLT_PARTITIONED_CACHE);
+                zzz.push(DFLT_REPLICATED_CACHE);
+            }
 
-        $scope.ui.dfltTableCache = IMPORT_DM_NEW_CACHE.value;
-        $scope.ui.dfltTableTemplate = DFLT_PARTITIONED_CACHE.value;
+            if (!$common.isEmptyArray($scope.caches)) {
+                if (zzz.length > 0)
+                    zzz.push(null);
+
+                _.forEach($scope.caches, function (cache) {
+                    zzz.push(cache);
+                });
+
+                $timeout(function() {
+                    $scope.ui.importCommonCacheOrTemplate = zzz.length > 0 ? zzz[0].value : null;
+                });
+            }
+
+            return zzz;
+        };
 
         /**
          * Load list of database tables.
@@ -626,19 +649,6 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
 
             $http.post('/api/v1/agent/tables', preset)
                 .success(function (tables) {
-                    $scope.importCaches = [IMPORT_DM_NEW_CACHE, IMPORT_DM_DO_NOT_GENERATE];
-
-                    $scope.importCacheTemplates = [DFLT_PARTITIONED_CACHE, DFLT_REPLICATED_CACHE];
-
-                    if (!$common.isEmptyArray($scope.caches)) {
-                        $scope.importCaches.push(null);
-                        $scope.importCacheTemplates.push(null);
-
-                        _.forEach($scope.caches, function (cache) {
-                            $scope.importCaches.push(cache);
-                            $scope.importCacheTemplates.push(cache);
-                        });
-                    }
 
                     _.forEach(tables, function (tbl, idx) {
                         tbl.id = idx;
@@ -664,10 +674,6 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
                 });
         }
 
-        $scope.dfltTableTemplateVisible = function () {
-            return $scope.ui.dfltTableCache === IMPORT_DM_NEW_CACHE.value;
-        };
-
         $scope.applyDefaults = function () {
             _.forEach($scope.importDomain.displayedTables, function (table) {
                 table.editCache = false;
@@ -702,14 +708,15 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
         };
 
         $scope.dbTableCache = function (tbl) {
-            return _.find($scope.importCaches, {value: tbl.cache}).label;
+            return 'TODO'; //  _.find($scope.importCaches, {value: tbl.cache}).label;
         };
 
         $scope.dbTableTemplate = function (tbl) {
-            if (tbl.cache === IMPORT_DM_NEW_CACHE.value)
-                return _.find($scope.importCacheTemplates, {value: tbl.template}).label;
-
-            return '';
+            return 'TODO';
+            //if (tbl.cache === IMPORT_DM_NEW_CACHE.value)
+            //    return _.find($scope.importCacheTemplates, {value: tbl.template}).label;
+            //
+            //return '';
         };
 
         /**
@@ -923,46 +930,44 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
                         newDomain.keyType = newDomain.keyFields[0].jdbcType.javaType;
 
                     // Prepare caches for generation.
-                    if ($scope.ui.generateCaches && table.cache !== IMPORT_DM_DO_NOT_GENERATE.value) {
-                        if (table.cache === IMPORT_DM_NEW_CACHE.value) {
-                            var template = _.find($scope.importCacheTemplates, {value: table.template});
-
-                            newDomain.newCache = angular.copy(template ? template.cache : DFLT_PARTITIONED_CACHE.cache);
-
-                            delete newDomain.newCache._id;
-                            newDomain.newCache.name = typeName + 'Cache';
-                            newDomain.newCache.clusters = $scope.ui.generatedCachesClusters;
-                            newDomain.newCache.demo = $scope.importDomain.demo;
-
-                            // POJO store factory is not defined in template.
-                            if (!newDomain.newCache.cacheStoreFactory ||
-                                newDomain.newCache.cacheStoreFactory.kind !== 'CacheJdbcPojoStoreFactory') {
-                                var dialect = $scope.importDomain.demo ? 'H2' : $scope.selectedPreset.db;
-
-                                newDomain.newCache.cacheStoreFactory = {
-                                    kind: 'CacheJdbcPojoStoreFactory',
-                                    CacheJdbcPojoStoreFactory: {
-                                        dataSourceBean: 'ds' + dialect,
-                                        dialect: dialect
-                                    }
-                                };
-                            }
+                    if (table.cache === IMPORT_DM_NEW_CACHE.value) {
+                        var template = _.find($scope.importCacheTemplates, {value: table.template});
+
+                        newDomain.newCache = angular.copy(template ? template.cache : DFLT_PARTITIONED_CACHE.cache);
+
+                        delete newDomain.newCache._id;
+                        newDomain.newCache.name = typeName + 'Cache';
+                        newDomain.newCache.clusters = $scope.ui.generatedCachesClusters;
+                        newDomain.newCache.demo = $scope.importDomain.demo;
+
+                        // POJO store factory is not defined in template.
+                        if (!newDomain.newCache.cacheStoreFactory ||
+                            newDomain.newCache.cacheStoreFactory.kind !== 'CacheJdbcPojoStoreFactory') {
+                            var dialect = $scope.importDomain.demo ? 'H2' : $scope.selectedPreset.db;
+
+                            newDomain.newCache.cacheStoreFactory = {
+                                kind: 'CacheJdbcPojoStoreFactory',
+                                CacheJdbcPojoStoreFactory: {
+                                    dataSourceBean: 'ds' + dialect,
+                                    dialect: dialect
+                                }
+                            };
                         }
-                        else if (table.cache !== IMPORT_DM_DO_NOT_GENERATE._id) {
-                            var cacheId = table.cache;
+                    }
+                    else {
+                        var cacheId = table.cache;
 
-                            newDomain.caches = [cacheId];
+                        newDomain.caches = [cacheId];
 
-                            if (!_.contains(checkedCaches, cacheId)) {
-                                var cache = _.find($scope.caches, {value: cacheId}).cache;
+                        if (!_.contains(checkedCaches, cacheId)) {
+                            var cache = _.find($scope.caches, {value: cacheId}).cache;
 
-                                var change = $common.autoCacheStoreConfiguration(cache, [newDomain]);
+                            var change = $common.autoCacheStoreConfiguration(cache, [newDomain]);
 
-                                if (change)
-                                    newDomain.cacheStoreChanges = [{cacheId: cacheId, change: change}];
+                            if (change)
+                                newDomain.cacheStoreChanges = [{cacheId: cacheId, change: change}];
 
-                                checkedCaches.push(cacheId)
-                            }
+                            checkedCaches.push(cacheId)
                         }
                     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/40e44de7/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/domains-import.jade b/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
index fb99045..a67c96d 100644
--- a/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
@@ -126,10 +126,8 @@ mixin td-ellipses-lbl(w, lbl)
                                 label Schema
                             th(width='160px')
                                 label Table name
-                            th(width='160px')
-                                label(ng-show='ui.generateCaches') Cache
-                            th(width='128px')
-                                label(ng-show='ui.generateCaches') Template
+                            th(colspan=2 width='288px')
+                                label Cache
                             th
                     tbody
                         tr
@@ -143,31 +141,25 @@ mixin td-ellipses-lbl(w, lbl)
                                                 +td-ellipses-lbl('130px', '{{::table.schema}}')
                                                 +td-ellipses-lbl('160px', '{{::table.tbl}}')
                                                 td(width='160px' style='min-width: 160px; max-width: 160px')
-                                                    div.td-ellipsis(ng-show='ui.generateCaches')
+                                                    div.td-ellipsis
                                                         a(ng-if='!table.editCache' ng-click='startEditDbTableCache(table)') {{dbTableCache(table)}}
                                                         button.select-toggle.form-control(ng-if='table.editCache' bs-select ng-model='table.cache' data-container='false' bs-options='item.value as item.label for item in importCaches')
                                                 td(width='128px' style='min-width: 128px; max-width: 128px')
-                                                    div.td-ellipsis(ng-show='ui.generateCaches')
+                                                    div.td-ellipsis
                                                         a(ng-if='!table.editTemplate' ng-click='startEditDbTableTemplate(table)') {{dbTableTemplate(table)}}
                                                         button.select-toggle.form-control(ng-if='table.editTemplate' bs-select ng-model='table.template' style='max-width: 110px' data-container='false' bs-options='item.value as item.label for item in importCacheTemplates')
                                                 td
                 .settings-row
-                    .checkbox
-                        label
-                            input(id='importGenerateCaches' type='checkbox' ng-model='ui.generateCaches')
-                            | Generate caches
-                        i.tipLabel.fa.fa-question-circle(bs-tooltip='' data-title='Separate cache will be generated for each loaded table')
-                    div
-                        .col-xs-5.col-sm-5.col-md-5
-                            label(style='float: left; line-height: 28px; margin-right: 10px') Cache:
-                            .input-tip
-                                button.select-toggle.form-control(bs-select ng-model='ui.dfltTableCache' ng-disabled='!ui.generateCaches' data-container='false' bs-options='item.value as item.label for item in importCaches')
-                        .col-xs-5.col-sm-5.col-md-5(ng-show='dfltTableTemplateVisible()')
-                            label(style='float: left; line-height: 28px; margin: 0 10px') Template:
-                            .input-tip
-                                button.select-toggle.form-control(bs-select ng-model='ui.dfltTableTemplate' ng-disabled='!ui.generateCaches' data-container='false' bs-options='item.value as item.label for item in importCacheTemplates')
-                        .col-xs-2.col-sm-2.col-md-2
-                            button.btn.btn-primary(style="margin: 0 0 0 5px" ng-disabled='!ui.generateCaches' ng-click='applyDefaults()') Apply
+                    label Defaults for tables
+                    i.tipLabel.fa.fa-question-circle(bs-tooltip='' data-title='Select and apply options for caches generation')
+                .settings-row
+                    .col-sm-11
+                        .col-sm-6(style='padding-right: 5px')
+                            button.select-toggle.form-control(bs-select ng-model='ui.importCommonAction' data-container='false' bs-options='item.value as item.label for item in importCommonActions')
+                        .col-sm-6(style='padding-left: 5px; padding-right: 5px')
+                            button.select-toggle.form-control(bs-select ng-model='ui.importCommonCacheOrTemplate' data-container='false' bs-options='item.value as item.label for item in importCommonCachesOrTemplates()')
+                    .col-sm-1(style='padding-left: 5px')
+                        button.btn.btn-primary(ng-click='applyDefaults()') Apply
             .import-domain-model-wizard-page(ng-show='importDomain.action == "options"' style='margin-bottom: 176px')
                 form.form-horizontal(name='optionsForm' novalidate)
                     .settings-row
@@ -195,7 +187,7 @@ mixin td-ellipses-lbl(w, lbl)
                         .col-xs-9.col-sm-10.col-md-10
                             i.tipField.fa.fa-question-circle(bs-tooltip='' data-title='Choose clusters that will be associated with generated caches')
                             .input-tip
-                                button.select-toggle.form-control(id='generatedCachesClusters' bs-select ng-model='ui.generatedCachesClusters' ng-disabled='!ui.generateCaches' ng-class='{placeholder: !(ui.generatedCachesClusters && ui.generatedCachesClusters.length > 0)}' data-container='false' data-multiple='1' placeholder='Choose clusters for generated caches' bs-options='item.value as item.label for item in clusters')
+                                button.select-toggle.form-control(id='generatedCachesClusters' bs-select ng-model='ui.generatedCachesClusters' ng-class='{placeholder: !(ui.generatedCachesClusters && ui.generatedCachesClusters.length > 0)}' data-container='false' data-multiple='1' placeholder='Choose clusters for generated caches' bs-options='item.value as item.label for item in clusters')
             .modal-footer
                 label(ng-hide='importDomain.action == "drivers" || (importDomain.action == "connect" && importDomain.demo)').labelField {{importDomain.info}}
                 a.btn.btn-primary(ng-hide='importDomain.action == "drivers" || importDomain.action == "connect"' ng-click='importDomainPrev()' bs-tooltip='' data-title='{{prevTooltipText()}}' data-placement='bottom') Prev


[07/11] ignite git commit: IGNITE-2363 Rename database to dialect.

Posted by ak...@apache.org.
IGNITE-2363 Rename database to dialect.


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

Branch: refs/heads/ignite-843-rc3
Commit: 4a193dff661e390ed2d0e2fa66f253dfd93554aa
Parents: bcb66db
Author: vsisko <vs...@gridgain.com>
Authored: Mon Jan 25 15:00:38 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Jan 25 15:00:38 2016 +0700

----------------------------------------------------------------------
 .../configuration/summary/summary.controller.js | 12 +++------
 .../main/js/controllers/caches-controller.js    |  8 +++---
 .../src/main/js/controllers/common-module.js    |  4 +--
 .../src/main/js/controllers/models/caches.json  | 16 +++++------
 modules/control-center-web/src/main/js/db.js    |  2 +-
 .../js/helpers/generator/generator-common.js    |  8 ++----
 .../main/js/helpers/generator/generator-java.js | 14 +++-------
 .../main/js/helpers/generator/generator-pom.js  | 13 +++------
 .../helpers/generator/generator-properties.js   |  2 +-
 .../main/js/helpers/generator/generator-xml.js  | 28 ++++++++++----------
 .../src/main/js/views/includes/controls.jade    |  2 +-
 11 files changed, 43 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4a193dff/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
index c3761cc..fc816c9 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
@@ -189,16 +189,10 @@ export default [
 
             _.forEach(cluster.caches, (cache) => {
                 if (cache.cacheStoreFactory) {
-                    //const store = cache.cacheStoreFactory[cache.cacheStoreFactory.kind];
-                    //
-                    //if (store && store.dialect)
-                    //    $scope.dialects[store.dialect] = true;
+                    const store = cache.cacheStoreFactory[cache.cacheStoreFactory.kind];
 
-                    if (cache.cacheStoreFactory.kind === 'CacheJdbcPojoStoreFactory')
-                        $scope.dialects[cache.cacheStoreFactory.CacheJdbcPojoStoreFactory.dialect] = true;
-
-                    if (cache.cacheStoreFactory.kind === 'CacheJdbcBlobStoreFactory')
-                        $scope.dialects[cache.cacheStoreFactory.CacheJdbcBlobStoreFactory.database] = true;
+                    if (store && store.dialect)
+                        $scope.dialects[store.dialect] = true;
                 }
 
                 _.forEach(cache.domains, (domain) => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/4a193dff/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 8ddea36..b4f3da2 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -473,7 +473,7 @@ consoleModule.controller('cachesController', [
             });
 
             if (!checkRes.checked) {
-                return showPopoverMessage($scope.panels, 'store', checkRes.firstCache.cacheStoreFactory.kind === 'CacheJdbcPojoStoreFactory' ? 'dialect' : 'database',
+                return showPopoverMessage($scope.panels, 'store', checkRes.firstCache.cacheStoreFactory.kind === 'CacheJdbcPojoStoreFactory' ? 'pojoDialect' : 'blobDialect',
                     'Found cache "' + checkRes.secondCache.name + '" in cluster "' + failCluster.label + '" ' +
                     'with the same data source bean name "' + checkRes.firstCache.cacheStoreFactory[checkRes.firstCache.cacheStoreFactory.kind].dataSourceBean +
                     '" and different database: "' + $common.cacheStoreJdbcDialectsLabel(checkRes.firstDB) + '" in current cache and "' +
@@ -509,7 +509,7 @@ consoleModule.controller('cachesController', [
                         return false;
 
                     if (!storeFactory.dialect)
-                        return showPopoverMessage($scope.panels, 'store', 'dialect',
+                        return showPopoverMessage($scope.panels, 'store', 'pojoDialect',
                             'Dialect should not be empty');
 
                     if (!checkDataSources())
@@ -534,8 +534,8 @@ consoleModule.controller('cachesController', [
                         if (!$common.isValidJavaIdentifier('Data source bean', storeFactory.dataSourceBean, 'dataSourceBean', $scope.panels, 'store'))
                             return false;
 
-                        if (!storeFactory.database)
-                            return showPopoverMessage($scope.panels, 'store', 'database',
+                        if (!storeFactory.dialect)
+                            return showPopoverMessage($scope.panels, 'store', 'blobDialect',
                                 'Database should not be empty');
 
                         if (!checkDataSources())

http://git-wip-us.apache.org/repos/asf/ignite/blob/4a193dff/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 57d96ae..f88379f 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
@@ -709,8 +709,8 @@ consoleModule.service('$common', [
             var secondDs = extractDataSource(secondCache);
 
             if (firstDs && secondDs) {
-                var firstDB = firstDs.dialect || firstDs.database;
-                var secondDB = secondDs.dialect || secondDs.database;
+                var firstDB = firstDs.dialect;
+                var secondDB = secondDs.dialect;
 
                 if (firstDs.dataSourceBean === secondDs.dataSourceBean && firstDB !== secondDB) {
                     return {

http://git-wip-us.apache.org/repos/asf/ignite/blob/4a193dff/modules/control-center-web/src/main/js/controllers/models/caches.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/caches.json b/modules/control-center-web/src/main/js/controllers/models/caches.json
index dc17a61..6693082 100644
--- a/modules/control-center-web/src/main/js/controllers/models/caches.json
+++ b/modules/control-center-web/src/main/js/controllers/models/caches.json
@@ -424,7 +424,7 @@
                 },
                 {
                   "label": "Dialect",
-                  "id": "dialect",
+                  "id": "pojoDialect",
                   "type": "dropdown",
                   "path": "cacheStoreFactory.CacheJdbcPojoStoreFactory",
                   "model": "dialect",
@@ -473,7 +473,7 @@
                   "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
                   "model": "connectionUrl",
                   "required": true,
-                  "hide": "backupItem.cacheStoreFactory.CacheJdbcBlobStoreFactory.connectVia == 'DataSource'",
+                  "hide": "backupItem.cacheStoreFactory.CacheJdbcBlobStoreFactory.connectVia !== 'URL'",
                   "tip": [
                     "URL for database access, for example: jdbc:h2:mem:myDatabase"
                   ]
@@ -485,7 +485,7 @@
                   "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
                   "model": "user",
                   "required": true,
-                  "hide": "backupItem.cacheStoreFactory.CacheJdbcBlobStoreFactory.connectVia == 'DataSource'",
+                  "hide": "backupItem.cacheStoreFactory.CacheJdbcBlobStoreFactory.connectVia !== 'URL'",
                   "tip": [
                     "User name for database access"
                   ]
@@ -493,7 +493,7 @@
                 {
                   "label": "Note, password will be generated as stubs.",
                   "type": "label",
-                  "hide": "backupItem.cacheStoreFactory.CacheJdbcBlobStoreFactory.connectVia == 'DataSource'"
+                  "hide": "backupItem.cacheStoreFactory.CacheJdbcBlobStoreFactory.connectVia !== 'URL'"
                 },
                 {
                   "label": "Data source bean name",
@@ -503,21 +503,21 @@
                   "model": "dataSourceBean",
                   "required": true,
                   "placeholder": "Bean name in Spring context",
-                  "hide": "backupItem.cacheStoreFactory.CacheJdbcBlobStoreFactory.connectVia == 'URL'",
+                  "hide": "backupItem.cacheStoreFactory.CacheJdbcBlobStoreFactory.connectVia  !== 'DataSource'",
                   "tip": [
                     "Name of the data source bean in Spring context"
                   ]
                 },
                 {
                   "label": "Database",
-                  "id": "database",
+                  "id": "blobDialect",
                   "type": "dropdown",
                   "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
-                  "model": "database",
+                  "model": "dialect",
                   "required": true,
                   "placeholder": "Choose database",
                   "items": "cacheStoreJdbcDialects",
-                  "hide": "backupItem.cacheStoreFactory.CacheJdbcBlobStoreFactory.connectVia == 'URL'",
+                  "hide": "backupItem.cacheStoreFactory.CacheJdbcBlobStoreFactory.connectVia  !== 'DataSource'",
                   "tip": [
                     "Database:",
                     "<ul>",

http://git-wip-us.apache.org/repos/asf/ignite/blob/4a193dff/modules/control-center-web/src/main/js/db.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/db.js b/modules/control-center-web/src/main/js/db.js
index 7e0c30f..77e5850 100644
--- a/modules/control-center-web/src/main/js/db.js
+++ b/modules/control-center-web/src/main/js/db.js
@@ -150,7 +150,7 @@ var CacheSchema = new Schema({
             connectionUrl: String,
             user: String,
             dataSourceBean: String,
-            database: {
+            dialect: {
                 type: String,
                 enum: ['Generic', 'Oracle', 'DB2', 'SQLServer', 'MySQL', 'PostgreSQL', 'H2']
             },

http://git-wip-us.apache.org/repos/asf/ignite/blob/4a193dff/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-common.js b/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
index 993e5d8..973d7cb 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
@@ -442,13 +442,9 @@ $generatorCommon.IGFS_IPC_CONFIGURATION = {
 // Check that cache has datasource.
 $generatorCommon.cacheHasDatasource = function (cache) {
     if (cache.cacheStoreFactory && cache.cacheStoreFactory.kind) {
-        var factoryKind = cache.cacheStoreFactory.kind;
+        var storeFactory = cache.cacheStoreFactory[cache.cacheStoreFactory.kind];
 
-        var storeFactory = cache.cacheStoreFactory[factoryKind];
-
-        if (storeFactory && (storeFactory.dialect || storeFactory.database)) {
-            return true;
-        }
+        return !!(storeFactory && (storeFactory.connectVia ? (storeFactory.connectVia === 'DataSource' ? storeFactory.dialect : false) : storeFactory.dialect));
     }
 
     return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/4a193dff/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
index 7343e7a..abb2b4a 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
@@ -1024,18 +1024,14 @@ $generatorJava.cacheQuery = function (cache, varName, res) {
  * @param res Resulting output with generated code.
  */
 $generatorJava.cacheStoreDataSource = function (storeFactory, res) {
-    var dialect = storeFactory.dialect || (storeFactory.connectVia === 'DataSource' ? storeFactory.database : undefined);
+    var dialect = storeFactory.connectVia ? (storeFactory.connectVia === 'DataSource' ? storeFactory.dialect : undefined) : storeFactory.dialect;
 
     if (dialect) {
         var varName = 'dataSource';
 
         var dataSourceBean = storeFactory.dataSourceBean;
 
-        var dsClsName = $generatorCommon.dataSourceClassName(dialect);
-
-        var varType = res.importClass(dsClsName);
-
-        var beanClassName = $commonUtils.toJavaName(varType, dataSourceBean);
+        var varType = res.importClass($generatorCommon.dataSourceClassName(dialect));
 
         res.line('public static final ' + varType + ' INSTANCE_' + dataSourceBean + ' = create' + dataSourceBean + '();');
 
@@ -1169,8 +1165,6 @@ $generatorJava.cacheStore = function (cache, domains, cacheVarName, res) {
                 res.line('/** {@inheritDoc} */');
                 res.startBlock('@Override public ' + res.importClass('org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore') + ' create() {');
 
-                var beanClassName = $generatorJava.dataSourceClassName(res, storeFactory);
-
                 res.line('setDataSource(DataSources.INSTANCE_' + storeFactory.dataSourceBean + ');');
 
                 res.needEmptyLine = true;
@@ -1220,8 +1214,6 @@ $generatorJava.cacheStore = function (cache, domains, cacheVarName, res) {
                     res.line('/** {@inheritDoc} */');
                     res.startBlock('@Override public ' + res.importClass('org.apache.ignite.cache.store.jdbc.CacheJdbcBlobStore') + ' create() {');
 
-                    beanClassName = $generatorJava.dataSourceClassName(res, storeFactory);
-
                     res.line('setDataSource(DataSources.INSTANCE_' + storeFactory.dataSourceBean + ');');
 
                     res.needEmptyLine = true;
@@ -2480,7 +2472,7 @@ $generatorJava.cluster = function (cluster, pkg, javaClass, clientNearCfg) {
  * @returns {*} Data source class name.
  */
 $generatorJava.dataSourceClassName = function (res, storeFactory) {
-    var dialect = storeFactory.dialect || (storeFactory.connectVia === 'DataSource' ? storeFactory.database : undefined);
+    var dialect = storeFactory.connectVia ? (storeFactory.connectVia === 'DataSource' ? storeFactory.dialect : undefined) : storeFactory.dialect;
 
     if (dialect) {
         var dataSourceBean = storeFactory.dataSourceBean;

http://git-wip-us.apache.org/repos/asf/ignite/blob/4a193dff/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js b/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
index cac9c2e..10ddcf1 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
@@ -75,16 +75,11 @@ $generatorPom.pom = function (cluster, igniteVersion, mvnRepositories, res) {
     var dialect = {};
 
     _.forEach(caches, function (cache) {
-        if (cache.cacheStoreFactory && cache.cacheStoreFactory.kind === 'CacheJdbcPojoStoreFactory') {
-            if (cache.cacheStoreFactory.CacheJdbcPojoStoreFactory) {
-                dialect[cache.cacheStoreFactory.CacheJdbcPojoStoreFactory.dialect] = true;
-            }
-        }
+        if (cache.cacheStoreFactory && cache.cacheStoreFactory.kind) {
+            const storeFactory = cache.cacheStoreFactory[cache.cacheStoreFactory.kind];
 
-        if (cache.cacheStoreFactory && cache.cacheStoreFactory.kind === 'CacheJdbcBlobStoreFactory') {
-            if (cache.cacheStoreFactory.CacheJdbcBlobStoreFactory && cache.cacheStoreFactory.CacheJdbcBlobStoreFactory.connectVia === 'DataSource') {
-                dialect[cache.cacheStoreFactory.CacheJdbcBlobStoreFactory.database] = true;
-            }
+            if (storeFactory.dialect && (!storeFactory.connectVia || storeFactory.connectVia === 'DataSource'))
+                dialect[storeFactory.dialect] = true;
         }
     });
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4a193dff/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js b/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
index 16d892d..56dea8f 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
@@ -52,7 +52,7 @@ $generatorProperties.dataSourcesProperties = function (cluster, res) {
             if (cache.cacheStoreFactory && cache.cacheStoreFactory.kind) {
                 var storeFactory = cache.cacheStoreFactory[cache.cacheStoreFactory.kind];
 
-                var dialect = storeFactory.dialect || (storeFactory.connectVia === 'DataSource' ? storeFactory.database : undefined);
+                var dialect = storeFactory.connectVia ? (storeFactory.connectVia === 'DataSource' ? storeFactory.dialect : undefined): storeFactory.dialect;
 
                 if (dialect) {
                     if (!res) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/4a193dff/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
index 16986f2..a4925cf 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
@@ -280,7 +280,7 @@ $generatorXml.clusterGeneral = function (cluster, res) {
 
                 if (d.S3) {
                     if (d.S3.bucketName)
-                        res.line('<property name="bucketName" value="' + $generatorXml.escape(d.S3.bucketName) + '" />');
+                        res.line('<property name="bucketName" value="' + $generatorXml.escape(d.S3.bucketName) + '"/>');
                 }
 
                 res.endBlock('</bean>');
@@ -852,7 +852,7 @@ $generatorXml.cacheStore = function(cache, domains, res) {
                 else {
                     $generatorXml.property(res, storeFactory, 'connectionUrl');
                     $generatorXml.property(res, storeFactory, 'user');
-                    res.line('<property name="password" value="${ds.' + storeFactory.user + '.password}" />');
+                    res.line('<property name="password" value="${ds.' + storeFactory.user + '.password}"/>');
                 }
 
                 $generatorXml.property(res, storeFactory, 'initSchema');
@@ -868,14 +868,14 @@ $generatorXml.cacheStore = function(cache, domains, res) {
             else
                 $generatorXml.beanProperty(res, storeFactory, 'cacheStoreFactory', $generatorCommon.STORE_FACTORIES[factoryKind], true);
 
-            if (storeFactory.dataSourceBean && (storeFactory.dialect || (storeFactory.connectVia === 'DataSource' ? storeFactory.database : undefined))) {
+            if (storeFactory.dataSourceBean && (storeFactory.connectVia ? (storeFactory.connectVia === 'DataSource' ? storeFactory.dialect : undefined) : storeFactory.dialect)) {
                 if (_.findIndex(res.datasources, function (ds) {
                         return ds.dataSourceBean === storeFactory.dataSourceBean;
                     }) < 0) {
                     res.datasources.push({
                         dataSourceBean: storeFactory.dataSourceBean,
-                        className: $generatorCommon.DATA_SOURCES[storeFactory.dialect || storeFactory.database],
-                        dialect: storeFactory.dialect || storeFactory.database
+                        className: $generatorCommon.DATA_SOURCES[storeFactory.dialect],
+                        dialect: storeFactory.dialect
                     });
                 }
             }
@@ -1470,29 +1470,29 @@ $generatorXml.generateDataSources = function (datasources, res) {
 
             switch (item.dialect) {
                 case 'Generic':
-                    res.line('<property name="jdbcUrl" value="${' + beanId + '.jdbc.url}" />');
+                    res.line('<property name="jdbcUrl" value="${' + beanId + '.jdbc.url}"/>');
 
                     break;
 
                 case 'DB2':
-                    res.line('<property name="serverName" value="${' + beanId + '.jdbc.server_name}" />');
-                    res.line('<property name="portNumber" value="${' + beanId + '.jdbc.port_number}" />');
-                    res.line('<property name="databaseName" value="${' + beanId + '.jdbc.database_name}" />');
-                    res.line('<property name="driverType" value="${' + beanId + '.jdbc.driver_type}" />');
+                    res.line('<property name="serverName" value="${' + beanId + '.jdbc.server_name}"/>');
+                    res.line('<property name="portNumber" value="${' + beanId + '.jdbc.port_number}"/>');
+                    res.line('<property name="databaseName" value="${' + beanId + '.jdbc.database_name}"/>');
+                    res.line('<property name="driverType" value="${' + beanId + '.jdbc.driver_type}"/>');
 
                     break;
 
                 case 'PostgreSQL':
-                    res.line('<property name="url" value="${' + beanId + '.jdbc.url}" />');
+                    res.line('<property name="url" value="${' + beanId + '.jdbc.url}"/>');
 
                     break;
 
                 default:
-                    res.line('<property name="URL" value="${' + beanId + '.jdbc.url}" />');
+                    res.line('<property name="URL" value="${' + beanId + '.jdbc.url}"/>');
             }
 
-            res.line('<property name="user" value="${' + beanId + '.jdbc.username}" />');
-            res.line('<property name="password" value="${' + beanId + '.jdbc.password}" />');
+            res.line('<property name="user" value="${' + beanId + '.jdbc.username}"/>');
+            res.line('<property name="password" value="${' + beanId + '.jdbc.password}"/>');
 
             res.endBlock('</bean>');
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4a193dff/modules/control-center-web/src/main/js/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/includes/controls.jade b/modules/control-center-web/src/main/js/views/includes/controls.jade
index 2f20072..72f8fbc 100644
--- a/modules/control-center-web/src/main/js/views/includes/controls.jade
+++ b/modules/control-center-web/src/main/js/views/includes/controls.jade
@@ -153,7 +153,7 @@ mixin details-row(lblClasses, fieldClasses)
     - var customValidators = {'ng-attr-ipaddress': '{{detail.ipaddress}}'}
 
     div(ng-switch='detail.type')
-        div(ng-switch-when='label')
+        div(ng-switch-when='label' ng-hide=detailHide)
             label {{::detail.label}}
         div.checkbox(ng-switch-when='check' ng-hide=detailHide)
             label(id='{{::detail.id}}')