ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-2363 Open pages with JDBC drivers downloads.
Date Mon, 25 Jan 2016 03:48:05 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 43c24524d -> bcb66dbfb


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-rc2
Commit: bcb66dbfbc77dec1f2778d568dfe71932532dbec
Parents: 43c2452
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Mon Jan 25 10:47:59 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@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


Mime
View raw message