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-843 Reworked handling case when NO jdbc drivers found.
Date Tue, 19 Jan 2016 09:52:30 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 cf54e94a8 -> 838dcb343


IGNITE-843 Reworked handling case when NO jdbc drivers found.


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

Branch: refs/heads/ignite-843-rc2
Commit: 838dcb343324080fde4488fdd6c66c7ec19556bc
Parents: cf54e94
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Tue Jan 19 16:52:25 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Tue Jan 19 16:52:25 2016 +0700

----------------------------------------------------------------------
 .../main/js/controllers/domains-controller.js   | 44 +++++++++++++-------
 .../js/views/configuration/domains-import.jade  | 10 ++++-
 2 files changed, 36 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/838dcb34/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 ecf6f45..2178ed4 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
@@ -199,8 +199,8 @@ consoleModule.controller('domainsController', function ($filter, $http,
$timeout
 
         var INFO_CONNECT_TO_DB = 'Configure connection to database';
         var INFO_SELECT_SCHEMAS = 'Select schemas to load tables from';
-        var INFO_SELECT_TABLES = 'Select tables to import as domain models';
-        var INFO_SELECT_OPTIONS = 'Select import domain models options';
+        var INFO_SELECT_TABLES = 'Select tables to import as domain model';
+        var INFO_SELECT_OPTIONS = 'Select import domain model options';
         var LOADING_JDBC_DRIVERS = {text: 'Loading JDBC drivers...'};
         var LOADING_SCHEMAS = {text: 'Loading schemas...'};
         var LOADING_TABLES = {text: 'Loading tables...'};
@@ -439,6 +439,7 @@ consoleModule.controller('domainsController', function ($filter, $http,
$timeout
                 $scope.importDomain = {
                     demo: demo,
                     action: 'drivers',
+                    jdbcDriversFound: false,
                     schemas: [],
                     allSchemasSelected: false,
                     tables: [],
@@ -473,6 +474,8 @@ consoleModule.controller('domainsController', function ($filter, $http,
$timeout
                                 }
 
                                 if (drivers && drivers.length > 0) {
+                                    $scope.importDomain.jdbcDriversFound = true;
+
                                     drivers = _.sortBy(drivers, 'jdbcDriverJar');
 
                                     if ($scope.importDomain.demo) {
@@ -514,9 +517,7 @@ consoleModule.controller('domainsController', function ($filter, $http,
$timeout
                                     });
                                 }
                                 else {
-                                    $common.showError('JDBC drivers not found!');
-
-                                    importDomainModal.hide();
+                                    $scope.importDomain.button = 'Cancel';
                                 }
                             })
                             .error(function (errMsg, status) {
@@ -1010,24 +1011,33 @@ consoleModule.controller('domainsController', function ($filter, $http,
$timeout
             if (!$scope.importDomainNextAvailable())
                 return;
 
-            if ($scope.importDomain.action === 'connect') {
+            var act = $scope.importDomain.action;
+
+            if (act === 'drivers' && !$scope.importDomain.jdbcDriversFound)
+                importDomainModal.hide();
+            else if (act === 'connect') {
                 if ($scope.importDomain.demo && $scope.demoConnection.db !== 'H2')
                     importDomainModal.hide();
                 else
                     _loadSchemas();
             }
-            else if ($scope.importDomain.action === 'schemas')
+            else if (act === 'schemas')
                 _loadTables();
-            else if ($scope.importDomain.action === 'tables')
+            else if (act === 'tables')
                 _selectOptions();
-            else if ($scope.importDomain.action === 'options')
+            else if (act === 'options')
                 _saveDomainModel();
         };
 
         $scope.nextTooltipText = function () {
             var importDomainNextAvailable = $scope.importDomainNextAvailable();
 
-            if ($scope.importDomain.action === 'connect') {
+            var act = $scope.importDomain.action;
+
+            if (act === 'drivers' && !$scope.importDomain.jdbcDriversFound)
+                return 'Resolve issue with JDBC drivers<br>Close this dialog and try
again';
+
+            if (act === 'connect') {
                 if ($scope.importDomain.demo && $scope.demoConnection.db !== 'H2')
                     return 'Resolve issue with H2 database driver<br>Close this dialog
and try again';
 
@@ -1035,26 +1045,28 @@ consoleModule.controller('domainsController', function ($filter, $http,
$timeout
                     return 'Click to load list of schemas from database';
             }
 
-            if ($scope.importDomain.action === 'schemas')
+            if (act === 'schemas')
                 return importDomainNextAvailable ? 'Click to load list of tables from database'
: 'Select schemas to continue';
 
-            if ($scope.importDomain.action === 'tables')
+            if (act === 'tables')
                 return importDomainNextAvailable ? 'Click to show import options' : 'Select
tables to continue';
 
-            if ($scope.importDomain.action === 'options')
+            if (act === 'options')
                 return 'Click to import domain model for selected tables';
 
             return 'Click to continue';
         };
 
         $scope.prevTooltipText = function () {
-            if ($scope.importDomain.action === 'schemas')
+            var act = $scope.importDomain.action;
+
+            if (act === 'schemas')
                 return $scope.importDomain.demo ? 'Click to return on demo description step'
: 'Click to return on connection configuration step';
 
-            if ($scope.importDomain.action === 'tables')
+            if (act === 'tables')
                 return 'Click to return on schemas selection step';
 
-            if ($scope.importDomain.action === 'options')
+            if (act === 'options')
                 return 'Click to return on tables selection step';
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/838dcb34/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 3fb1222..3e5666e 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
@@ -31,6 +31,12 @@ mixin td-ellipses-lbl(w, lbl)
                 h4.modal-title(ng-if='!importDomain.demo') Import domain models from database
                 h4.modal-title(ng-if='importDomain.demo') Import domain models from demo
database
             .import-domain-model-wizard-page(ng-show='importDomain.action == "drivers"' style="margin-bottom:
256px;")
+                div(ng-if='!importDomain.jdbcDriversFound')
+                    label Domain model could not be imported
+                        ul
+                            li Agent not found JDBC drivers
+                            li Copy required JDBC drivers into agent '\jdbc-drivers' folder
and try again
+                            li Refer to agent README.txt for more information
             .import-domain-model-wizard-page(ng-show='importDomain.action == "connect" &&
importDomain.demo' style='margin-bottom: 211px')
                 div(ng-if='demoConnection.db == "H2"')
                     label Demo description:
@@ -191,6 +197,6 @@ mixin td-ellipses-lbl(w, lbl)
                             .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')
             .modal-footer
-                label(ng-hide='importDomain.action == "connect" && importDomain.demo').labelField
{{importDomain.info}}
-                a.btn.btn-primary(ng-show='importDomain.action != "connect"' ng-click='importDomainPrev()'
bs-tooltip='' data-title='{{prevTooltipText()}}' data-placement='bottom') Prev
+                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
                 a.btn.btn-primary(ng-click='importDomainNext()' ng-disabled='!importDomainNextAvailable()'
bs-tooltip='' data-title='{{nextTooltipText()}}' data-placement='bottom') {{importDomain.button}}


Mime
View raw message