ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject incubator-ignite git commit: IGNITE-843 Fixed XML and java generation for store datasource. Renamed configurator to control center.
Date Wed, 08 Jul 2015 08:58:29 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 c0e81b126 -> cbb8e4ae5


IGNITE-843 Fixed XML and java generation for store datasource. Renamed configurator to control
center.


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

Branch: refs/heads/ignite-843
Commit: cbb8e4ae5e16c4668075993c3012f1e653973235
Parents: c0e81b1
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Wed Jul 8 15:58:23 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Wed Jul 8 15:58:23 2015 +0700

----------------------------------------------------------------------
 modules/web-control-center/nodejs/bin/www       |  2 +-
 .../nodejs/config/default.json                  |  2 +-
 modules/web-control-center/nodejs/db.js         |  2 +-
 .../nodejs/generator/common.js                  | 29 ++++++++++----
 .../web-control-center/nodejs/generator/java.js | 40 ++++++++++++++++---
 .../web-control-center/nodejs/generator/xml.js  | 42 ++++++++++++++++++--
 modules/web-control-center/nodejs/package.json  |  1 +
 .../javascripts/controllers/adminController.js  |  2 +-
 .../public/javascripts/controllers/caches.js    | 14 +++----
 .../public/javascripts/controllers/clusters.js  |  2 +-
 .../public/javascripts/controllers/common.js    | 20 +++++-----
 .../javascripts/controllers/persistences.js     |  2 +-
 .../public/javascripts/controllers/summary.js   |  2 +-
 .../nodejs/views/includes/header.jade           |  2 +-
 .../web-control-center/nodejs/views/layout.jade |  4 +-
 15 files changed, 123 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/bin/www
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/bin/www b/modules/web-control-center/nodejs/bin/www
index b565c71..a125143 100644
--- a/modules/web-control-center/nodejs/bin/www
+++ b/modules/web-control-center/nodejs/bin/www
@@ -5,7 +5,7 @@
  */
 
 var app = require('../app');
-var debug = require('debug')('ignite-web-configurator:server');
+var debug = require('debug')('ignite-web-control-center:server');
 var http = require('http');
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/config/default.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/config/default.json b/modules/web-control-center/nodejs/config/default.json
index 922fe9d..72dbd4e 100644
--- a/modules/web-control-center/nodejs/config/default.json
+++ b/modules/web-control-center/nodejs/config/default.json
@@ -3,6 +3,6 @@
         "port": 3000
     },
     "mongoDB": {
-        "url": "mongodb://localhost/web-configurator"
+        "url": "mongodb://localhost/web-control-center"
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/db.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/db.js b/modules/web-control-center/nodejs/db.js
index da65c51..c0f145e 100644
--- a/modules/web-control-center/nodejs/db.js
+++ b/modules/web-control-center/nodejs/db.js
@@ -99,7 +99,7 @@ var CacheSchema = new Schema({
             dataSourceBean: String,
             dialect: {
                 type: String,
-                enum: ['BasicJdbcDialect', 'OracleDialect', 'DB2Dialect', 'SQLServerDialect',
'MySQLDialect', 'H2Dialect']
+                enum: ['Oracle', 'DB2', 'SQLServer', 'MySQL', 'PosgreSQL', 'H2']
             }
         },
         CacheJdbcBlobStoreFactory: {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/generator/common.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/generator/common.js b/modules/web-control-center/nodejs/generator/common.js
index 2469c2e..8d11fdc 100644
--- a/modules/web-control-center/nodejs/generator/common.js
+++ b/modules/web-control-center/nodejs/generator/common.js
@@ -160,12 +160,21 @@ exports.evictionPolicies = {
 };
 
 exports.knownClasses = {
-    OracleDialect: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.OracleDialect',
{}),
-    BasicJdbcDialect: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.BasicJdbcDialect',
{}),
-    DB2Dialect: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.DB2Dialect',
{}),
-    SQLServerDialect: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.SQLServerDialect',
{}),
-    MySQLDialect: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.MySQLDialect',
{}),
-    H2Dialect: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.H2Dialect',
{})
+    Oracle: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.OracleDialect',
{}),
+    DB2: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.DB2Dialect', {}),
+    SQLServer: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.SQLServerDialect',
{}),
+    MySQL: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.MySQLDialect',
{}),
+    PostgreSQL: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.BasicJdbcDialect',
{}),
+    H2: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.H2Dialect', {})
+};
+
+exports.dataSources = {
+    Oracle: {className: 'oracle.jdbc.pool.OracleDataSource'},
+    DB2: {className: 'com.ibm.db2.jcc.DB2ConnectionPoolDataSource'},
+    SQLServer: {className: 'com.microsoft.sqlserver.jdbc.SQLServerDataSource'},
+    MySQL: {className: 'com.mysql.jdbc.jdbc2.optional.MysqlDataSource'},
+    PostgreSQL: {className: 'org.postgresql.ds.PGPoolingDataSource'},
+    H2: {className: 'org.h2.jdbcx.JdbcDataSource'}
 };
 
 exports.storeFactories = {
@@ -222,4 +231,10 @@ exports.hasProperty = function(obj, props) {
     }
 
     return false;
-};
\ No newline at end of file
+};
+
+exports.toJavaName = function(name) {
+    var javaName = name.replace(/[^A-Za-z_0-9]+/, '_');
+
+    return javaName.charAt(0).toLocaleUpperCase() + javaName.slice(1);
+};

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/generator/java.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/generator/java.js b/modules/web-control-center/nodejs/generator/java.js
index 81357fa..36332a1 100644
--- a/modules/web-control-center/nodejs/generator/java.js
+++ b/modules/web-control-center/nodejs/generator/java.js
@@ -15,11 +15,15 @@
  * limitations under the License.
  */
 
+var _ = require('lodash');
+
 var generatorUtils = require("./common");
 
 exports.generateClusterConfiguration = function(cluster, generateJavaClass) {
     var res = generatorUtils.builder();
 
+    res.datasourceBeans = [];
+
     if (generateJavaClass) {
         res.line('/**');
         res.line(' * ' + generatorUtils.mainComment());
@@ -41,6 +45,7 @@ exports.generateClusterConfiguration = function(cluster, generateJavaClass)
{
 
         res.importClass('org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi');
         res.line('TcpDiscoverySpi discovery = new TcpDiscoverySpi();');
+
         switch (d.kind) {
             case 'Multicast':
                 addBeanWithProperties(res, d.Multicast, 'discovery', 'ipFinder', 'ipFinder',
@@ -141,8 +146,7 @@ exports.generateClusterConfiguration = function(cluster, generateJavaClass)
{
 
             var cache = cluster.caches[i];
 
-            var cacheName = cache.name.replace(/[^A-Za-z_0-9]+/, '_');
-            cacheName = 'cache' + cacheName.charAt(0).toLocaleUpperCase() + cacheName.slice(1);
+            var cacheName = 'cache' + generatorUtils.toJavaName(cache.name);
 
             names.push(cacheName);
 
@@ -382,11 +386,35 @@ function generateCacheConfiguration(cacheCfg, varName, res) {
     res.needEmptyLine = true;
     
     if (cacheCfg.cacheStoreFactory && cacheCfg.cacheStoreFactory.kind) {
-        var obj = cacheCfg.cacheStoreFactory[cacheCfg.cacheStoreFactory.kind];
+        var storeFactory = cacheCfg.cacheStoreFactory[cacheCfg.cacheStoreFactory.kind];
         var data = generatorUtils.storeFactories[cacheCfg.cacheStoreFactory.kind];
 
-        addBeanWithProperties(res, obj, varName, 'cacheStoreFactory', 'cacheStoreFactory',
data.className,
+        var sfVarName = 'storeFactory' + generatorUtils.toJavaName(cacheCfg.name);
+        var dsVarName = 'none';
+
+        if (storeFactory.dialect) {
+            var dataSourceBean = storeFactory.dataSourceBean;
+
+            dsVarName = 'dataSource' + generatorUtils.toJavaName(dataSourceBean);
+
+            if (!_.contains(res.datasourceBeans, dataSourceBean)) {
+                res.datasourceBeans.push(dataSourceBean);
+
+                var dataSource = generatorUtils.dataSources[storeFactory.dialect];
+
+                res.line();
+                res.line(dataSource.className + ' ' + dsVarName + ' = new ' + dataSource.className
+ '();');
+                res.line(dsVarName + '.setURL(_URL_);');
+                res.line(dsVarName + '.setUsername(_User_Name_);');
+                res.line(dsVarName + '.setPassword(_Password_);');
+            }
+        }
+
+        addBeanWithProperties(res, storeFactory, varName, 'cacheStoreFactory', sfVarName,
data.className,
             data.fields, true);
+
+        if (dsVarName != 'none')
+            res.line(sfVarName + '.setDataSource(' + dsVarName + ');');
     }
 
     res.needEmptyLine = true;
@@ -502,6 +530,7 @@ function addBeanWithProperties(res, bean, objVarName, beanPropName, beanVarName,
         }
         
         res.line(beanClass + ' ' + beanVarName + ' = new ' + beanClass + '();');
+
         for (var propName in props) {
             if (props.hasOwnProperty(propName)) {
                 var descr = props[propName];
@@ -544,8 +573,9 @@ function addBeanWithProperties(res, bean, objVarName, beanPropName, beanVarName,
                         
                         case 'className':
                             if (bean[propName]) {
-                                res.line(beanVarName + '.' + getSetterName(propName) + '(new
' + bean[propName] + '());');
+                                res.line(beanVarName + '.' + getSetterName(propName) + '(new
' + generatorUtils.knownClasses[bean[propName]].className + '());');
                             }
+
                             break;
                         
                         default:

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/generator/xml.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/generator/xml.js b/modules/web-control-center/nodejs/generator/xml.js
index 0278cf3..e6b96d0 100644
--- a/modules/web-control-center/nodejs/generator/xml.js
+++ b/modules/web-control-center/nodejs/generator/xml.js
@@ -15,12 +15,17 @@
  * limitations under the License.
  */
 
+var _ = require('lodash');
+
 var generatorUtils = require("./common");
 var dataStructures = require("../public/javascripts/dataStructures.js");
 
 exports.generateClusterConfiguration = function(cluster) {
     var res = generatorUtils.builder();
 
+    res.propertiesRequired = false;
+    res.datasourceBeans = [];
+
     res.push('' +
         '<?xml version="1.0" encoding="UTF-8"?>\n' +
         '\n' +
@@ -31,8 +36,9 @@ exports.generateClusterConfiguration = function(cluster) {
         '       xsi:schemaLocation="http://www.springframework.org/schema/beans\n' +
         '                           http://www.springframework.org/schema/beans/spring-beans.xsd\n'
+
         '                           http://www.springframework.org/schema/util\n' +
-        '                           http://www.springframework.org/schema/util/spring-util.xsd">\n'
+
-        '    <bean class="org.apache.ignite.configuration.IgniteConfiguration">\n');
+        '                           http://www.springframework.org/schema/util/spring-util.xsd">\n');
+
+    res.push('    <bean class="org.apache.ignite.configuration.IgniteConfiguration">\n');
 
     res.deep = 2;
 
@@ -266,6 +272,14 @@ exports.generateClusterConfiguration = function(cluster) {
     res.push('    </bean>\n');
     res.push('</beans>');
 
+    if (res.propertiesRequired) {
+        res.splice(1, 0,
+            '\n    <!--Bean to load properties file -->\n' +
+            '    <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">\n'
+
+            '        <property name="location" value="classpath:ignite.properties"/>\n'
+
+            '    </bean>\n');
+    }
+
     return res.join('');
 };
 
@@ -361,10 +375,30 @@ function generateCacheConfiguration(cacheCfg, res) {
     res.needEmptyLine = true;
 
     if (cacheCfg.cacheStoreFactory && cacheCfg.cacheStoreFactory.kind) {
-        var obj = cacheCfg.cacheStoreFactory[cacheCfg.cacheStoreFactory.kind];
+        var storeFactory = cacheCfg.cacheStoreFactory[cacheCfg.cacheStoreFactory.kind];
         var data = generatorUtils.storeFactories[cacheCfg.cacheStoreFactory.kind];
 
-        addBeanWithProperties(res, obj, 'cacheStoreFactory', data.className, data.fields,
true);
+        addBeanWithProperties(res, storeFactory, 'cacheStoreFactory', data.className, data.fields,
true);
+
+        if (storeFactory.dialect) {
+            res.propertiesRequired = true;
+
+            if (!_.contains(res.datasourceBeans, storeFactory.dataSourceBean)) {
+                res.datasourceBeans.push(storeFactory.dataSourceBean);
+
+                var dataSource = generatorUtils.dataSources[storeFactory.dialect];
+
+                var dsBean = '\n    <bean id= "' + storeFactory.dataSourceBean + '" class="'
+ dataSource.className + '">\n';
+
+                dsBean += '        <property name="URL" value="${' + storeFactory.dataSourceBean
+ '.jdbc.url}" />\n';
+                dsBean += '        <property name="user" value="${' + storeFactory.dataSourceBean
+ '.jdbc.username}" />\n';
+                dsBean += '        <property name="password" value="${' + storeFactory.dataSourceBean
+ '.jdbc.password}" />\n';
+
+                dsBean += '    </bean>\n\n';
+
+                res.splice(1, 0, dsBean);
+            }
+        }
     }
 
     res.needEmptyLine = true;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/package.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/package.json b/modules/web-control-center/nodejs/package.json
index 1ff5b6f..52ee2ee 100644
--- a/modules/web-control-center/nodejs/package.json
+++ b/modules/web-control-center/nodejs/package.json
@@ -18,6 +18,7 @@
     "express-session": "^1.11.1",
     "jade": "~1.9.2",
     "less-middleware": "1.0.x",
+    "lodash": "3.10.0",
     "mongoose": "^4.0.2",
     "nconf": "^0.7.1",
     "passport": "^0.2.1",

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/public/javascripts/controllers/adminController.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/adminController.js
b/modules/web-control-center/nodejs/public/javascripts/controllers/adminController.js
index 908b092..e0ded83 100644
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/adminController.js
+++ b/modules/web-control-center/nodejs/public/javascripts/controllers/adminController.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-configuratorModule.controller('adminController', [
+controlCenterModule.controller('adminController', [
     '$scope', '$alert', '$http', 'commonFunctions', function ($scope,
         $alert, $http, commonFunctions) {
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/public/javascripts/controllers/caches.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/caches.js b/modules/web-control-center/nodejs/public/javascripts/controllers/caches.js
index 73307c6..294ff8f 100644
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/caches.js
+++ b/modules/web-control-center/nodejs/public/javascripts/controllers/caches.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-configuratorModule.controller('cachesController', ['$scope', '$alert', '$http', 'commonFunctions',
function ($scope, $alert, $http, commonFunctions) {
+controlCenterModule.controller('cachesController', ['$scope', '$alert', '$http', 'commonFunctions',
function ($scope, $alert, $http, commonFunctions) {
         $scope.swapSimpleItems = commonFunctions.swapSimpleItems;
         $scope.joinTip = commonFunctions.joinTip;
         $scope.getModel = commonFunctions.getModel;
@@ -65,12 +65,12 @@ configuratorModule.controller('cachesController', ['$scope', '$alert',
'$http',
         ];
 
         $scope.cacheStoreJdbcDialects = [
-            {value: 'BasicJdbcDialect', label: 'Generic JDBC dialect'},
-            {value: 'OracleDialect', label: 'Oracle'},
-            {value: 'DB2Dialect', label: 'IBM DB2'},
-            {value: 'SQLServerDialect', label: 'Microsoft SQL Server'},
-            {value: 'MySQLDialect', label: 'My SQL'},
-            {value: 'H2Dialect', label: 'H2 database'}
+            {value: 'Oracle', label: 'Oracle'},
+            {value: 'DB2', label: 'IBM DB2'},
+            {value: 'SQLServer', label: 'Microsoft SQL Server'},
+            {value: 'MySQL', label: 'My SQL'},
+            {value: 'PostgreSQL', label: 'Postgre SQL'},
+            {value: 'H2', label: 'H2 database'}
         ];
 
         $scope.general = [];

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/public/javascripts/controllers/clusters.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/clusters.js
b/modules/web-control-center/nodejs/public/javascripts/controllers/clusters.js
index 95a30ba..431ca54 100644
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/clusters.js
+++ b/modules/web-control-center/nodejs/public/javascripts/controllers/clusters.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-configuratorModule.controller('clustersController', ['$scope', '$alert', '$http', 'commonFunctions',
function ($scope, $alert, $http, commonFunctions) {
+controlCenterModule.controller('clustersController', ['$scope', '$alert', '$http', 'commonFunctions',
function ($scope, $alert, $http, commonFunctions) {
         $scope.swapSimpleItems = commonFunctions.swapSimpleItems;
         $scope.joinTip = commonFunctions.joinTip;
         $scope.getModel = commonFunctions.getModel;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/public/javascripts/controllers/common.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/common.js b/modules/web-control-center/nodejs/public/javascripts/controllers/common.js
index d712078..228181a 100644
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/common.js
+++ b/modules/web-control-center/nodejs/public/javascripts/controllers/common.js
@@ -15,9 +15,9 @@
  * limitations under the License.
  */
 
-var configuratorModule = angular.module('ignite-web-configurator', ['smart-table', 'mgcrea.ngStrap',
'ngSanitize']);
+var controlCenterModule = angular.module('ignite-web-control-center', ['smart-table', 'mgcrea.ngStrap',
'ngSanitize']);
 
-configuratorModule.service('commonFunctions', function () {
+controlCenterModule.service('commonFunctions', function () {
     return {
         getModel: function (obj, path) {
             if (!path)
@@ -69,7 +69,7 @@ configuratorModule.service('commonFunctions', function () {
     }
 });
 
-configuratorModule.config(function ($tooltipProvider) {
+controlCenterModule.config(function ($tooltipProvider) {
     angular.extend($tooltipProvider.defaults, {
         container: 'body',
         placement: 'right',
@@ -78,7 +78,7 @@ configuratorModule.config(function ($tooltipProvider) {
     });
 });
 
-configuratorModule.config(function ($selectProvider) {
+controlCenterModule.config(function ($selectProvider) {
     angular.extend($selectProvider.defaults, {
         maxLength: '1',
         allText: 'Select All',
@@ -88,7 +88,7 @@ configuratorModule.config(function ($selectProvider) {
 });
 
 // Alert settings
-configuratorModule.config(function ($alertProvider) {
+controlCenterModule.config(function ($alertProvider) {
     angular.extend($alertProvider.defaults, {
         container: 'body',
         placement: 'top-right',
@@ -98,7 +98,7 @@ configuratorModule.config(function ($alertProvider) {
 });
 
 // Decode name using map(value, label).
-configuratorModule.filter('displayValue', function () {
+controlCenterModule.filter('displayValue', function () {
     return function (v, m, dflt) {
         var i = _.findIndex(m, function (item) {
             return item.value == v;
@@ -125,7 +125,7 @@ configuratorModule.filter('displayValue', function () {
  * @param s String to replace in.
  * @return Replaces string.
  */
-configuratorModule.filter('compact', function () {
+controlCenterModule.filter('compact', function () {
     return function (s) {
         return s.replace("org.apache.ignite.internal.visor.", "o.a.i.i.v.").
             replace("org.apache.ignite.internal.", "o.a.i.i.").
@@ -134,7 +134,7 @@ configuratorModule.filter('compact', function () {
     }
 });
 
-configuratorModule.directive('ipaddress', function () {
+controlCenterModule.directive('ipaddress', function () {
     const ip = '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])';
     const port = '([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])';
     const portRange = '(:' + port + '(..' + port + ')?)?';
@@ -153,14 +153,14 @@ configuratorModule.directive('ipaddress', function () {
     }
 });
 
-configuratorModule.controller('activeLink', [
+controlCenterModule.controller('activeLink', [
     '$scope', function ($scope) {
         $scope.isActive = function (path) {
             return window.location.pathname.substr(0, path.length) == path;
         };
     }]);
 
-configuratorModule.controller('auth', [
+controlCenterModule.controller('auth', [
     '$scope', '$modal', '$alert', '$http', '$window', 'commonFunctions',
     function ($scope, $modal, $alert, $http, $window, commonFunctions) {
         $scope.errorMessage = commonFunctions.errorMessage;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/public/javascripts/controllers/persistences.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/persistences.js
b/modules/web-control-center/nodejs/public/javascripts/controllers/persistences.js
index ab26dea..645a193 100644
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/persistences.js
+++ b/modules/web-control-center/nodejs/public/javascripts/controllers/persistences.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-configuratorModule.controller('persistenceController', ['$scope', '$alert', '$http', 'commonFunctions',
function ($scope, $alert, $http, commonFunctions) {
+controlCenterModule.controller('persistenceController', ['$scope', '$alert', '$http', 'commonFunctions',
function ($scope, $alert, $http, commonFunctions) {
         $scope.joinTip = commonFunctions.joinTip;
         $scope.getModel = commonFunctions.getModel;
         $scope.errorMessage = commonFunctions.errorMessage;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/public/javascripts/controllers/summary.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/summary.js b/modules/web-control-center/nodejs/public/javascripts/controllers/summary.js
index 0e80045..031807f 100644
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/summary.js
+++ b/modules/web-control-center/nodejs/public/javascripts/controllers/summary.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-configuratorModule.controller('summaryController', ['$scope', '$http', function ($scope,
$http) {
+controlCenterModule.controller('summaryController', ['$scope', '$http', function ($scope,
$http) {
     $scope.generateJavaItems = [
         { label: 'snippet',value: false},
         { label: 'factory class',value: true}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/views/includes/header.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/includes/header.jade b/modules/web-control-center/nodejs/views/includes/header.jade
index 53e46a9..d2046d3 100644
--- a/modules/web-control-center/nodejs/views/includes/header.jade
+++ b/modules/web-control-center/nodejs/views/includes/header.jade
@@ -22,7 +22,7 @@ header.header(id='header')
             ul.nav.navbar-nav(ng-controller='activeLink' ng-show='loggedInUser')
                 li
                     a(ng-class="{active: isActive('/configuration')}" href='/configuration/clusters')
Configuration
-                li(ng-show='loggedInUser && loggedInUser.admin')
+                li(ng-if='loggedInUser && loggedInUser.admin')
                     a(ng-class="{active: isActive('/admin')}" href='/admin/userList') Administration
                 //li
                 //    a(ng-class="{active: isActive('/sql')}" href='/sql') SQL

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cbb8e4ae/modules/web-control-center/nodejs/views/layout.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/layout.jade b/modules/web-control-center/nodejs/views/layout.jade
index ba6d67e..88dfee7 100644
--- a/modules/web-control-center/nodejs/views/layout.jade
+++ b/modules/web-control-center/nodejs/views/layout.jade
@@ -15,7 +15,7 @@
     limitations under the License.
 
 doctype html
-html(ng-app='ignite-web-configurator', ng-init='loggedInUser = #{JSON.stringify(user)}')
+html(ng-app='ignite-web-control-center', ng-init='loggedInUser = #{JSON.stringify(user)}')
     head
         title= title
 
@@ -34,7 +34,7 @@ html(ng-app='ignite-web-configurator', ng-init='loggedInUser = #{JSON.stringify(
         block scripts
             script(src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js')
 
-            script(src='//cdnjs.cloudflare.com/ajax/libs/lodash.js/3.9.3/lodash.min.js')
+            script(src='//cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.0/lodash.min.js')
 
             script(src='//ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js')
             script(src='//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.15/angular-sanitize.js')


Mime
View raw message