ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [01/28] incubator-ignite git commit: IGNITE-843: WIP Generate cache type metadata configs + typeahead for java types + minor fixes.
Date Thu, 30 Jul 2015 09:36:45 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1155_1 ac83b3203 -> 3017ad525


IGNITE-843: WIP Generate cache type metadata configs + typeahead for java types + minor fixes.


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

Branch: refs/heads/ignite-1155_1
Commit: 8af110a8f5bd58fc069cfdac1eb4daa59e28c032
Parents: ee6fa09
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Mon Jul 27 18:17:06 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Mon Jul 27 18:17:06 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    |   1 +
 .../src/main/js/controllers/common-module.js    |   5 +-
 .../main/js/controllers/metadata-controller.js  |  63 +++++-----
 .../main/js/controllers/models/metadata.json    |   4 +-
 modules/web-control-center/src/main/js/db.js    |  20 +++-
 .../web-control-center/src/main/js/package.json |   1 +
 .../src/main/js/routes/generator/common.js      |  16 +++
 .../src/main/js/routes/generator/xml.js         | 114 +++++++++++++++++--
 .../src/main/js/routes/summary.js               |   2 +-
 .../src/main/js/views/configuration/caches.jade |   2 +-
 .../main/js/views/configuration/clusters.jade   |   2 +-
 .../main/js/views/configuration/metadata.jade   |   8 +-
 .../main/js/views/configuration/summary.jade    |  27 +++--
 .../src/main/js/views/includes/controls.jade    |  44 ++++---
 .../src/main/js/views/login.jade                |   2 +-
 .../src/main/js/views/settings/admin.jade       |   2 +-
 .../src/main/js/views/settings/profile.jade     |   2 +-
 .../src/main/js/views/templates/confirm.jade    |   6 +-
 .../src/main/js/views/templates/copy.jade       |   8 +-
 19 files changed, 234 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/controllers/caches-controller.js b/modules/web-control-center/src/main/js/controllers/caches-controller.js
index d8993c2..0cebc16 100644
--- a/modules/web-control-center/src/main/js/controllers/caches-controller.js
+++ b/modules/web-control-center/src/main/js/controllers/caches-controller.js
@@ -18,6 +18,7 @@
 controlCenterModule.controller('cachesController', ['$scope', '$http', '$common', '$confirm', '$copy', '$table', function ($scope, $http, $common, $confirm, $copy, $table) {
         $scope.joinTip = $common.joinTip;
         $scope.getModel = $common.getModel;
+        $scope.javaBuildInTypes = $common.javaBuildInTypes;
 
         $scope.tableNewItem = $table.tableNewItem;
         $scope.tableNewItemActive = $table.tableNewItemActive;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/controllers/common-module.js b/modules/web-control-center/src/main/js/controllers/common-module.js
index 75af155..d44b895 100644
--- a/modules/web-control-center/src/main/js/controllers/common-module.js
+++ b/modules/web-control-center/src/main/js/controllers/common-module.js
@@ -129,7 +129,10 @@ controlCenterModule.service('$common', ['$alert', function ($alert) {
                 title: msg,
                 duration: 2
             });
-        }
+        },
+        javaBuildInTypes: [
+            'Boolean', 'Byte', 'Date', 'Double', 'Float', 'Integer', 'Long', 'Short', 'String', 'Time', 'Timestamp', 'UUID'
+        ]
     }
 }]);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/controllers/metadata-controller.js b/modules/web-control-center/src/main/js/controllers/metadata-controller.js
index 21af931..47c8687 100644
--- a/modules/web-control-center/src/main/js/controllers/metadata-controller.js
+++ b/modules/web-control-center/src/main/js/controllers/metadata-controller.js
@@ -18,6 +18,7 @@
 controlCenterModule.controller('metadataController', ['$scope', '$http', '$common', '$confirm', '$copy', '$table', function ($scope, $http, $common, $confirm, $copy, $table) {
         $scope.joinTip = $common.joinTip;
         $scope.getModel = $common.getModel;
+        $scope.javaBuildInTypes = $common.javaBuildInTypes;
 
         $scope.tableNewItem = $table.tableNewItem;
         $scope.tableNewItemActive = $table.tableNewItemActive;
@@ -127,8 +128,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: true,
                             key: true,
                             ak: true,
-                            dbName: 'name1',
-                            dbType: 'dbType1',
+                            databaseName: 'name1',
+                            databaseType: 'dbType1',
                             javaName: 'javaName1',
                             javaType: 'javaType1'
                         },
@@ -136,8 +137,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: true,
                             key: false,
                             ak: false,
-                            dbName: 'name2',
-                            dbType: 'dbType2',
+                            databaseName: 'name2',
+                            databaseType: 'dbType2',
                             javaName: 'javaName2',
                             javaType: 'javaType2'
                         },
@@ -145,8 +146,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: false,
                             key: false,
                             ak: false,
-                            dbName: 'name3',
-                            dbType: 'dbType3',
+                            databaseName: 'name3',
+                            databaseType: 'dbType3',
                             javaName: 'javaName3',
                             javaType: 'javaType3'
                         }
@@ -164,8 +165,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: true,
                             key: true,
                             ak: true,
-                            dbName: 'name4',
-                            dbType: 'dbType4',
+                            databaseName: 'name4',
+                            databaseType: 'dbType4',
                             javaName: 'javaName4',
                             javaType: 'javaType4'
                         },
@@ -173,8 +174,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: true,
                             key: false,
                             ak: false,
-                            dbName: 'name5',
-                            dbType: 'dbType5',
+                            databaseName: 'name5',
+                            databaseType: 'dbType5',
                             javaName: 'javaName5',
                             javaType: 'javaType5'
                         },
@@ -182,8 +183,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: false,
                             key: false,
                             ak: false,
-                            dbName: 'name6',
-                            dbType: 'dbType6',
+                            databaseName: 'name6',
+                            databaseType: 'dbType6',
                             javaName: 'javaName6',
                             javaType: 'javaType6'
                         }
@@ -200,8 +201,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: true,
                             key: true,
                             ak: true,
-                            dbName: 'name7',
-                            dbType: 'dbType7',
+                            databaseName: 'name7',
+                            databaseType: 'dbType7',
                             javaName: 'javaName7',
                             javaType: 'javaType7'
                         },
@@ -209,8 +210,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: true,
                             key: false,
                             ak: false,
-                            dbName: 'name8',
-                            dbType: 'dbType8',
+                            databaseName: 'name8',
+                            databaseType: 'dbType8',
                             javaName: 'javaName8',
                             javaType: 'javaType8'
                         },
@@ -218,8 +219,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: false,
                             key: false,
                             ak: false,
-                            dbName: 'name9',
-                            dbType: 'dbType9',
+                            databaseName: 'name9',
+                            databaseType: 'dbType9',
                             javaName: 'javaName9',
                             javaType: 'javaType9'
                         },
@@ -227,8 +228,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: false,
                             key: false,
                             ak: false,
-                            dbName: 'name10',
-                            dbType: 'dbType10',
+                            databaseName: 'name10',
+                            databaseType: 'dbType10',
                             javaName: 'javaName10',
                             javaType: 'javaType10'
                         },
@@ -236,8 +237,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: false,
                             key: false,
                             ak: false,
-                            dbName: 'name11',
-                            dbType: 'dbType11',
+                            databaseName: 'name11',
+                            databaseType: 'dbType11',
                             javaName: 'javaName11',
                             javaType: 'javaType11'
                         },
@@ -245,8 +246,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             use: false,
                             key: false,
                             ak: false,
-                            dbName: 'name12',
-                            dbType: 'dbType12',
+                            databaseName: 'name12',
+                            databaseType: 'dbType12',
                             javaName: 'javaName12',
                             javaType: 'javaType12'
                         }
@@ -467,21 +468,21 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
             return true;
         };
 
-        $scope.tableDbFieldSaveVisible = function (dbName, dbType, javaName, javaType) {
-            return $common.isNonEmpty(dbName) && $common.isDefined(dbType) &&
+        $scope.tableDbFieldSaveVisible = function (databaseName, databaseType, javaName, javaType) {
+            return $common.isNonEmpty(databaseName) && $common.isDefined(databaseType) &&
                 $common.isNonEmpty(javaName) && $common.isDefined(javaType);
         };
 
-        $scope.tableDbFieldSave = function (field, newDbName, newDbType, newJavaName, newJavaType, index) {
+        $scope.tableDbFieldSave = function (field, newDatabaseName, newDatabaseType, newJavaName, newJavaType, index) {
             var item = $scope.backupItem;
 
             var model = item[field.model];
 
-            var newItem = {dbName: newDbName, dbType: newDbType, javaName: newJavaName, javaType: newJavaType};
+            var newItem = {databaseName: newDatabaseName, databaseType: newDatabaseType, javaName: newJavaName, javaType: newJavaType};
 
             if ($common.isDefined(model)) {
                 var idx = _.findIndex(model, function (dbMeta) {
-                    return dbMeta.dbName == newDbName
+                    return dbMeta.databaseName == newDatabaseName
                 });
 
                 // Found duplicate.
@@ -500,8 +501,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                 else {
                     var dbField = model[index];
 
-                    dbField.dbName = newDbName;
-                    dbField.dbType = newDbType;
+                    dbField.databaseName = newDatabaseName;
+                    dbField.databaseType = newDatabaseType;
                     dbField.javaName = newJavaName;
                     dbField.javaType = newJavaType;
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/controllers/models/metadata.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/controllers/models/metadata.json b/modules/web-control-center/src/main/js/controllers/models/metadata.json
index 6c9bf35..85ac5aa 100644
--- a/modules/web-control-center/src/main/js/controllers/models/metadata.json
+++ b/modules/web-control-center/src/main/js/controllers/models/metadata.json
@@ -68,7 +68,7 @@
     },
     {
       "label": "Key type",
-      "type": "text",
+      "type": "withJavaBuildInTypes",
       "model": "keyType",
       "required": true,
       "placeholder": "Full class name for Key",
@@ -189,7 +189,7 @@
     {
       "label": "Database type",
       "type": "dropdown",
-      "model": "dbType",
+      "model": "rdbms",
       "placeholder": "Choose database",
       "items": "databases",
       "tip": [

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/db.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/db.js b/modules/web-control-center/src/main/js/db.js
index 84947e5..e6fb99b 100644
--- a/modules/web-control-center/src/main/js/db.js
+++ b/modules/web-control-center/src/main/js/db.js
@@ -23,6 +23,8 @@ var mongoose = require('mongoose'),
     ObjectId = mongoose.Schema.Types.ObjectId,
     passportLocalMongoose = require('passport-local-mongoose');
 
+var deepPopulate = require('mongoose-deep-populate');
+
 // Connect to mongoDB database.
 mongoose.connect(config.get('mongoDB:url'), {server: {poolSize: 4}});
 
@@ -70,8 +72,8 @@ var CacheTypeMetadataSchema = new Schema({
     databaseTable: String,
     keyType: String,
     valueType: String,
-    keyFields: [{dbName: String, dbType: String, javaName: String, javaType: String}],
-    valueFields: [{dbName: String, dbType: String, javaName: String, javaType: String}],
+    keyFields: [{databaseName: String, databaseType: String, javaName: String, javaType: String}],
+    valueFields: [{databaseName: String, databaseType: String, javaName: String, javaType: String}],
     queryFields: [{name: String, className: String}],
     ascendingFields: [{name: String, className: String}],
     descendingFields:  [{name: String, className: String}],
@@ -312,6 +314,14 @@ var ClusterSchema = new Schema({
     waitForSegmentOnStart: Boolean
 });
 
+ClusterSchema.plugin(deepPopulate, {
+    whitelist: [
+        'caches',
+        'caches.queryMetadata',
+        'caches.storeMetadata'
+    ]
+});
+
 // Define cluster model.
 exports.Cluster = mongoose.model('Cluster', ClusterSchema);
 
@@ -319,7 +329,7 @@ exports.Cluster = mongoose.model('Cluster', ClusterSchema);
 var PersistenceSchema = new Schema({
     space: {type: ObjectId, ref: 'Space'},
     name: String,
-    dbType: {type: String, enum: ['oracle', 'db2', 'mssql', 'postgre', 'mysql', 'h2']},
+    rdbms: {type: String, enum: ['oracle', 'db2', 'mssql', 'postgre', 'mysql', 'h2']},
     dbName: String,
     host: String,
     user: String,
@@ -334,8 +344,8 @@ var PersistenceSchema = new Schema({
             pk: Boolean,
             ak: Boolean,
             notNull: Boolean,
-            dbName: String,
-            dbType: Number,
+            databaseName: String,
+            databaseType: Number,
             javaName: String,
             javaType: String
         }]

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/package.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/package.json b/modules/web-control-center/src/main/js/package.json
index ed06004..fd82196 100644
--- a/modules/web-control-center/src/main/js/package.json
+++ b/modules/web-control-center/src/main/js/package.json
@@ -32,6 +32,7 @@
     "jade": "~1.9.2",
     "lodash": "3.10.0",
     "mongoose": "^4.0.2",
+    "mongoose-deep-populate": "1.1.0",
     "nconf": "^0.7.1",
     "node-sass-middleware": "^0.9.0",
     "passport": "^0.2.1",

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/routes/generator/common.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/routes/generator/common.js b/modules/web-control-center/src/main/js/routes/generator/common.js
index dcbf156..05405d3 100644
--- a/modules/web-control-center/src/main/js/routes/generator/common.js
+++ b/modules/web-control-center/src/main/js/routes/generator/common.js
@@ -174,6 +174,22 @@ exports.marshallers = {
     JdkMarshaller: new ClassDescriptor('org.apache.ignite.marshaller.jdk.JdkMarshaller', {})
 };
 
+exports.knownBuildInClasses = {
+    BigDecimal: {className: 'java.math.Boolean'},
+    Boolean: {className: 'java.lang.Boolean'},
+    Byte: {className: 'java.lang.Byte'},
+    Date: {className: 'java.sql.Date'},
+    Double: {className: 'java.lang.Double'},
+    Float: {className: 'java.lang.Float'},
+    Integer: {className: 'java.lang.Integer'},
+    Long: {className: 'java.lang.Long'},
+    Short: {className: 'java.lang.Short'},
+    String: {className: 'java.lang.String'},
+    Time: {className: 'java.sql.Time'},
+    Timestamp: {className: 'java.sql.Timestamp'},
+    UUID: {className: 'java.util.UUID'}
+};
+
 exports.knownClasses = {
     Oracle: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.OracleDialect', {}),
     DB2: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.DB2Dialect', {}),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/routes/generator/xml.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/routes/generator/xml.js b/modules/web-control-center/src/main/js/routes/generator/xml.js
index 7c18655..8009698 100644
--- a/modules/web-control-center/src/main/js/routes/generator/xml.js
+++ b/modules/web-control-center/src/main/js/routes/generator/xml.js
@@ -337,13 +337,79 @@ function createEvictionPolicy(res, evictionPolicy, propertyName) {
     }
 }
 
+function addFields(res, meta, fieldsProperty) {
+    var fields = meta[fieldsProperty];
+
+    if (fields && fields.length > 0) {
+        res.startBlock('<property name="' + fieldsProperty + '">');
+
+        res.startBlock('<list>');
+
+        _.forEach(fields, function (field) {
+            res.startBlock('<bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">');
+
+            addProperty(res, field, 'databaseName');
+
+            addProperty(res, field, 'databaseType');
+            //addPropertyAsConst(res, field, databaseType, toJdbcTypeConst);
+
+            addProperty(res, field, 'javaName');
+            addElement(res, 'property', 'name', 'javaType', 'value', knownBuildInClasses(field.javaType));
+
+            res.endBlock('</bean>');
+        });
+
+        res.endBlock('</list>');
+    }
+}
+
+function knownBuildInClasses(className) {
+    var fullClassName = generatorUtils.knownBuildInClasses[className];
+
+    if (fullClassName)
+        return fullClassName.className;
+
+    return className;
+}
+
+function addQueryFields(res, meta, fieldsProperty) {
+    var fields = meta[fieldsProperty];
+
+    if (fields && fields.length > 0) {
+        res.startBlock('<property name="' + fieldsProperty + '">');
+
+        res.startBlock('<map>');
+
+        _.forEach(fields, function (field) {
+            addElement(res, 'entry', 'key', field.name, 'value', knownBuildInClasses(field.className));
+        });
+
+        res.endBlock('</map>');
+
+        res.endBlock('</property>');
+    }
+}
+
 function generateCacheTypeMetadataConfiguration(metaCfg, res) {
     if (!res)
         res = generatorUtils.builder();
 
     res.startBlock('<bean class="org.apache.ignite.cache.CacheTypeMetadata">');
 
+    addProperty(res, metaCfg, 'databaseSchema');
+    addProperty(res, metaCfg, 'databaseTable');
+
+    addProperty(res, metaCfg, 'keyType');
+    addProperty(res, metaCfg, 'valueType');
+
+    addFields(res, metaCfg, 'keyFields');
+    addFields(res, metaCfg, 'valueFields');
+
+    addQueryFields(res, metaCfg, 'queryFields');
+    addQueryFields(res, metaCfg, 'ascendingFields');
+    addQueryFields(res, metaCfg, 'descendingFields');
 
+    addListProperty(res, metaCfg, 'textFields');
 
     res.endBlock('</bean>');
 
@@ -409,8 +475,8 @@ function generateCacheConfiguration(cacheCfg, res) {
         for (var i = 0; i < cacheCfg.indexedTypes.length; i++) {
             var pair = cacheCfg.indexedTypes[i];
 
-            res.line('<value>' + escape(pair.keyClass) + '</value>');
-            res.line('<value>' + escape(pair.valueClass) + '</value>');
+            res.line('<value>' + knownBuildInClasses(pair.keyClass) + '</value>');
+            res.line('<value>' + knownBuildInClasses(pair.valueClass) + '</value>');
         }
 
         res.endBlock('</list>');
@@ -486,10 +552,26 @@ function generateCacheConfiguration(cacheCfg, res) {
         res.startBlock('<property name="typeMetadata">');
         res.startBlock('<list>');
 
-        // TODO
+        var metas = [];
+
+        if (cacheCfg.queryMetadata && cacheCfg.queryMetadata.length > 0) {
+            _.forEach(cacheCfg.queryMetadata, function (meta) {
+                metas.push(meta);
+            });
+        }
+
+        if (cacheCfg.storeMetadata && cacheCfg.storeMetadata.length > 0) {
+            _.forEach(cacheCfg.storeMetadata, function (meta) {
+                metas.push(meta);
+            });
+        }
+
+        _.forEach(metas, function (meta) {
+            generateCacheTypeMetadataConfiguration(meta, res);
+        });
 
         res.endBlock('</list>');
-        res.endBlock('</property');
+        res.endBlock('</property>');
     }
 
     res.endBlock('</bean>');
@@ -499,14 +581,28 @@ function generateCacheConfiguration(cacheCfg, res) {
 
 exports.generateCacheConfiguration = generateCacheConfiguration;
 
-function addProperty(res, obj, propName, setterName) {
-    var val = obj[propName];
+function addElement(res, tag, attr1, val1, attr2, val2) {
+    var elem = '<' + tag;
 
-    if (generatorUtils.isDefined(val)) {
-        res.emptyLineIfNeeded();
+    if (attr1) {
+        elem += ' ' + attr1 + '="' + val1 + '"'
+    }
 
-        res.line('<property name="' + (setterName ? setterName : propName) + '" value="' + escapeAttr(val) + '"/>');
+    if (attr2) {
+        elem += ' ' + attr2 + '="' + val2 + '"'
     }
+
+    elem += '/>';
+
+    res.emptyLineIfNeeded();
+    res.line(elem);
+}
+
+function addProperty(res, obj, propName, setterName) {
+    var val = obj[propName];
+
+    if (generatorUtils.isDefined(val))
+        addElement(res, 'property', 'name', setterName ? setterName : propName, 'value', escapeAttr(val));
 }
 
 function addBeanWithProperties(res, bean, beanPropName, beanClass, props, createBeanAlthoughNoProps) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/routes/summary.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/routes/summary.js b/modules/web-control-center/src/main/js/routes/summary.js
index f766945..9f8df2a 100644
--- a/modules/web-control-center/src/main/js/routes/summary.js
+++ b/modules/web-control-center/src/main/js/routes/summary.js
@@ -30,7 +30,7 @@ router.get('/', function (req, res) {
 
 router.post('/generator', function (req, res) {
     // Get cluster.
-    db.Cluster.findById(req.body._id).populate('caches').exec(function (err, cluster) {
+    db.Cluster.findById(req.body._id).deepPopulate('caches caches.queryMetadata caches.storeMetadata').exec(function (err, cluster) {
         if (err)
             return res.status(500).send(err.message);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/views/configuration/caches.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/views/configuration/caches.jade b/modules/web-control-center/src/main/js/views/configuration/caches.jade
index ea50317..579b5aa 100644
--- a/modules/web-control-center/src/main/js/views/configuration/caches.jade
+++ b/modules/web-control-center/src/main/js/views/configuration/caches.jade
@@ -48,7 +48,7 @@ block content
                         .panel-body
                             .settings-row(ng-repeat='field in general')
                                 +form-row(['col-sm-3'], ['col-sm-3'])
-            .panel-group(bs-collapse data-allow-multiple="true")
+            .panel-group(bs-collapse data-allow-multiple='true')
                 div(bs-collapse data-start-collapsed='true')
                     .panel-title(ng-show='expanded')
                         h3

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/views/configuration/clusters.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/views/configuration/clusters.jade b/modules/web-control-center/src/main/js/views/configuration/clusters.jade
index cf429e5..882a2b9 100644
--- a/modules/web-control-center/src/main/js/views/configuration/clusters.jade
+++ b/modules/web-control-center/src/main/js/views/configuration/clusters.jade
@@ -51,7 +51,7 @@ block content
                         .panel-body
                             .settings-row(ng-repeat='field in general')
                                 +form-row
-            .panel-group(bs-collapse data-allow-multiple="true")
+            .panel-group(bs-collapse data-allow-multiple='true')
                 div(bs-collapse data-start-collapsed='true')
                     .panel-title(ng-show='expanded')
                         h3

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/views/configuration/metadata.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/views/configuration/metadata.jade b/modules/web-control-center/src/main/js/views/configuration/metadata.jade
index 9f94965..e01eaa8 100644
--- a/modules/web-control-center/src/main/js/views/configuration/metadata.jade
+++ b/modules/web-control-center/src/main/js/views/configuration/metadata.jade
@@ -41,12 +41,12 @@ block content
             button.btn.btn-default(ng-model='template' data-template='/select' data-placeholder='Choose metadata type' bs-options='item.value as item.label for item in templates' bs-select)
             i.tiplabel.fa.fa-question-circle(bs-tooltip data-title='{{joinTip(templateTip)}}' type='button')
         hr
-        .panel-group(bs-collapse ng-model='panels.activePanel' data-allow-multiple="false")
+        .panel-group(bs-collapse ng-model='panels.activePanel' data-allow-multiple='false')
             .panel.panel-default(ng-show='selectedItem || backupItem')
                 .panel-heading
                     h3
                         a(bs-collapse-toggle) Manual
-                .panel-collapse(role="tabpanel" bs-collapse-target)
+                .panel-collapse(role='tabpanel' bs-collapse-target)
                     .panel-body
                         form.form-horizontal(name='manualForm' ng-if='backupItem' novalidate)
                             .settings-row(ng-repeat='field in metadataManual')
@@ -107,9 +107,9 @@ block content
                         //                td
                         //                    +dbcheck('row.ak')
                         //                td
-                        //                    label {{row.dbName}}
+                        //                    label {{row.databaseName}}
                         //                td
-                        //                    label {{row.dbType}}
+                        //                    label {{row.databaseType}}
                         //                td
                         //                    a(ng-show='data.curFieldIdx != $index' ng-click='selectField($index)') {{row.javaName}}
                         //                    input.form-control(type='text' ng-show='data.curFieldIdx == $index' ng-model='data.curJavaName' placeholder='Field Java name')

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/views/configuration/summary.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/views/configuration/summary.jade b/modules/web-control-center/src/main/js/views/configuration/summary.jade
index 8e19b7c..be1cf77 100644
--- a/modules/web-control-center/src/main/js/views/configuration/summary.jade
+++ b/modules/web-control-center/src/main/js/views/configuration/summary.jade
@@ -19,8 +19,8 @@ extends sidebar
 append scripts
     script(src='/summary-controller.js')
 
-    script(src="//cdn.jsdelivr.net/angularjs/1.3.15/angular-animate.min.js")
-    script(src="//cdn.jsdelivr.net/angularjs/1.3.15/angular-sanitize.min.js")
+    script(src='//cdn.jsdelivr.net/angularjs/1.3.15/angular-animate.min.js')
+    script(src='//cdn.jsdelivr.net/angularjs/1.3.15/angular-sanitize.min.js')
 
     script(src='//cdnjs.cloudflare.com/ajax/libs/ace/1.2.0/theme-chrome.js')
     script(src='//cdnjs.cloudflare.com/ajax/libs/ace/1.2.0/mode-xml.js')
@@ -32,7 +32,7 @@ append css
 include ../includes/controls
 
 mixin hard-link(ref, txt)
-    a(style='color:#ec1c24' href=ref target="_blank") #{txt}
+    a(style='color:#ec1c24' href=ref target='_blank') #{txt}
 
 block content
     .docs-header
@@ -51,17 +51,17 @@ block content
                     tr(ng-repeat='row in clusters track by row._id')
                         td.col-sm-6(ng-class='{active: row._id == selectedItem._id}')
                             a(ng-click='selectItem(row)') {{$index + 1}}) {{row.name}}
-        div(ng-show='selectedItem' role="tab" method='post' action='summary/download')
+        div(ng-show='selectedItem' role='tab' method='post' action='summary/download')
             .padding-dflt(bs-collapse data-start-collapsed='false')
                 .panel.panel-default
                     form.panel-heading(role='tab' method='post' action='summary/download')
-                        input(type="hidden" name="_id" value="{{selectedItem._id}}")
-                        input(type="hidden" name="os" value="{{os}}")
-                        input(type="hidden" name="javaClass" value="{{javaClassServer}}")
+                        input(type='hidden' name='_id' value='{{selectedItem._id}}')
+                        input(type='hidden' name='os' value='{{os}}')
+                        input(type='hidden' name='javaClass' value='{{javaClassServer}}')
                         h3
                             a(bs-collapse-toggle) Server
                             button.btn.btn-primary.pull-right(type='submit' style='margin-top: -5px') Download
-                    .panel-collapse(role="tabpanel" bs-collapse-target)
+                    .panel-collapse(role='tabpanel' bs-collapse-target)
                         div(ng-show='selectedItem' bs-tabs style='margin-top: 0.65em')
                             div(title='<img src="/images/xml.png" width="16px" height="16px"/> XML' bs-pane)
                                 div(ui-ace='{ onLoad: aceInit, mode: "xml" }' ng-model='xmlServer')
@@ -86,19 +86,18 @@ block content
                                     .col-sm-2
                                         label(for='os') Operation System:
                                     .col-sm-4
-                                        input#os.form-control(type='text', ng-model='configServer.os' placeholder='debian:8' data-min-length="0" data-html="1" data-auto-select="true" data-animation="am-flip-x" bs-typeahead bs-options='os for os in oss')
+                                        input#os.form-control(type='text', ng-model='configServer.os' placeholder='debian:8' data-min-length='0' data-html='1' data-auto-select='true' data-animation='am-flip-x' bs-typeahead bs-options='os for os in oss')
                                 div(ui-ace='{ onLoad: aceInit, mode: "dockerfile" }' ng-model='dockerServer')
             .padding-dflt(bs-collapse data-start-collapsed='false')
                 .panel.panel-default
                     form.panel-heading(role='tab' method='post' action='summary/download')
-                        input(type="hidden" name="_id" value="{{selectedItem._id}}")
-                        input(type="hidden" name="javaClass" value="{{javaClassClient}}")
-                        input(type="hidden" name="clientNearConfiguration" value="{{backupItem}}")
-
+                        input(type='hidden' name='_id' value='{{selectedItem._id}}')
+                        input(type='hidden' name='javaClass' value='{{javaClassClient}}')
+                        input(type='hidden' name='clientNearConfiguration' value='{{backupItem}}')
                         h3
                             a(bs-collapse-toggle) Client
                             button.btn.btn-primary.pull-right(type='submit' style='margin-top: -5px') Download
-                    .panel-collapse(role="tabpanel" bs-collapse-target)
+                    .panel-collapse(role='tabpanel' bs-collapse-target)
                         div(ng-show='selectedItem')
                             .details-row(ng-repeat='field in clientFields')
                                 +form-row-custom(['col-sm-3'], ['col-sm-3'])

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/views/includes/controls.jade b/modules/web-control-center/src/main/js/views/includes/controls.jade
index aebe4de..340a612 100644
--- a/modules/web-control-center/src/main/js/views/includes/controls.jade
+++ b/modules/web-control-center/src/main/js/views/includes/controls.jade
@@ -52,14 +52,20 @@ mixin btn-up(show, click)
 mixin btn-down(show, click)
     i.tipField.fa.fa-arrow-down(ng-show=show ng-click=click bs-tooltip data-title='Move item down')
 
-mixin table-pair-edit(keyModel, valModel, keyPlaceholder, valPlaceholder)
+mixin table-pair-edit(keyModel, valModel, keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes)
     .col-sm-6(style='float: right')
-        input.form-control(type='text' ng-model=valModel placeholder=valPlaceholder)
+        if valueJavaBuildInTypes
+            input.form-control(type='text' ng-model=valModel placeholder=valPlaceholder bs-typeahead data-min-length='1' bs-options='javaType for javaType in javaBuildInTypes')
+        else
+            input.form-control(type='text' ng-model=valModel placeholder=valPlaceholder)
     label.fieldSep /
     .input-tip
-        input.form-control(type='text' ng-model=keyModel placeholder=keyPlaceholder)
+        if keyJavaBuildInTypes
+            input.form-control(type='text' ng-model=keyModel placeholder=keyPlaceholder bs-typeahead data-min-length='1' bs-options='javaType for javaType in javaBuildInTypes')
+        else
+            input.form-control(type='text' ng-model=keyModel placeholder=keyPlaceholder)
 
-mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder)
+mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes)
     .col-sm-6
         label.table-header #{header}:
         +tipLabel('field.tip')
@@ -75,12 +81,12 @@ mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder)
                             div(ng-show='tableEditing(field, $index)')
                                 label.labelField {{$index + 1}})
                                 +btn-save('tablePairSaveVisible(curKey, curValue)', 'tablePairSave(tablePairValid, backupItem, field, curKey, curValue, $index)')
-                                +table-pair-edit('curKey', 'curValue', keyPlaceholder, valPlaceholder)
+                                +table-pair-edit('curKey', 'curValue', keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes)
                 tfoot(ng-show='tableNewItemActive(field)')
                     tr
                         td.col-sm-12
                             +btn-save('tablePairSaveVisible(newKey, newValue)', 'tablePairSave(tablePairValid, backupItem, field, newKey, newValue, -1)')
-                            +table-pair-edit('newKey', 'newValue', keyPlaceholder, valPlaceholder)
+                            +table-pair-edit('newKey', 'newValue', keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes)
 
 mixin details-row
     - var lblDetailClasses = ['col-sm-4', 'details-label']
@@ -149,7 +155,7 @@ mixin details-row
                 input.form-control(name='{{detail.model}}' type='text' ng-model='newValue' ng-focus='tableNewItem(detail)' placeholder='{{::detail.placeholder}}')&attributes(customValidators)
                 +ico-exclamation('{{detail.model}}', 'ipaddress', 'Invalid address, see help for format description.')
 
-mixin table-db-field-edit(dbName, dbType, javaName, javaType)
+mixin table-db-field-edit(databaseName, databaseType, javaName, javaType)
     div(style='width: 22%; float: right')
         button.form-control(ng-model=javaType bs-select data-placeholder='Java type' bs-options='item.value as item.label for item in {{javaTypes}}')
     label.fieldSep /
@@ -157,10 +163,10 @@ mixin table-db-field-edit(dbName, dbType, javaName, javaType)
         input.form-control(type='text' ng-model=javaName placeholder='Java name')
     label.fieldSep /
     div(style='width: 22%; float: right')
-        button.form-control(ng-model=dbType bs-select data-placeholder='JDBC type' bs-options='item.value as item.label for item in {{jdbcTypes}}')
+        button.form-control(ng-model=databaseType bs-select data-placeholder='JDBC type' bs-options='item.value as item.label for item in {{jdbcTypes}}')
     label.fieldSep /
     .input-tip
-        input.form-control(type='text' ng-model=dbName placeholder='DB name')
+        input.form-control(type='text' ng-model=databaseName placeholder='DB name')
 
 mixin table-group-item-edit(fieldName, className, direction)
     div(style='width: 15%; float: right')
@@ -195,6 +201,12 @@ mixin form-row-custom(lblClasses, fieldClasses)
                 +tipField('field.tip')
                 .input-tip
                     input.form-control(type='text' placeholder='{{::field.placeholder}}')&attributes(fieldCommon)
+        div(ng-switch-when='withJavaBuildInTypes' ng-hide=fieldHide)
+            label(class=lblClasses ng-class=fieldRequiredClass) {{::field.label}}:
+            div(class=fieldClasses)
+                +tipField('field.tip')
+                .input-tip
+                    input.form-control(type='text' placeholder='{{::field.placeholder}}' bs-typeahead data-min-length='1' bs-options='javaType for javaType in javaBuildInTypes')&attributes(fieldCommon)
         div(ng-switch-when='password' ng-hide=fieldHide)
             label(class=lblClasses ng-class=fieldRequiredClass) {{::field.label}}:
             div(class=fieldClasses)
@@ -264,9 +276,9 @@ mixin form-row-custom(lblClasses, fieldClasses)
                                         .input-tip
                                             input.form-control(type='text' ng-model='newValue' placeholder='{{::field.placeholder}}')
         div(ng-switch-when='indexedTypes')
-            +table-pair('Index key-value type pairs', fieldMdl, 'keyClass', 'valueClass', 'Key class full name', 'Value class full name')
+            +table-pair('Index key-value type pairs', fieldMdl, 'keyClass', 'valueClass', 'Key class full name', 'Value class full name', true, false)
         div(ng-switch-when='queryFields' ng-hide=fieldHide)
-            +table-pair('{{::field.label}}', fieldMdl, 'name', 'className', 'Field name', 'Field class full name')
+            +table-pair('{{::field.label}}', fieldMdl, 'name', 'className', 'Field name', 'Field class full name', false, true)
         div(ng-switch-when='dbFields' ng-hide=fieldHide)
             .col-sm-6
                 label.table-header {{::field.label}}:
@@ -280,17 +292,17 @@ mixin form-row-custom(lblClasses, fieldClasses)
                                 tr(ng-repeat='item in #{fieldMdl}')
                                     td.col-sm-12
                                         div(ng-show='!tableEditing(field, $index)')
-                                            a.labelFormField(ng-click='curField = tableStartEdit(backupItem, field, $index); curDbName = curField.dbName; curDbType = curField.dbType; curJavaName = curField.javaName; curJavaType = curField.javaType') {{$index + 1}}) {{item.dbName}} / {{item.dbType}} / {{item.javaName}} / {{item.javaType}}
+                                            a.labelFormField(ng-click='curField = tableStartEdit(backupItem, field, $index); curDatabaseName = curField.databaseName; curDatabaseType = curField.databaseType; curJavaName = curField.javaName; curJavaType = curField.javaType') {{$index + 1}}) {{item.databaseName}} / {{item.databaseType}} / {{item.javaName}} / {{item.javaType}}
                                             +btn-remove('tableRemove(backupItem, field, $index)', 'field.removeTip')
                                         div(ng-if='tableEditing(field, $index)')
                                             label.labelField {{$index + 1}})
-                                            +btn-save('tableDbFieldSaveVisible(curDbName, curDbType, curJavaName, curJavaType)', 'tableDbFieldSave(field, curDbName, curDbType, curJavaName, curJavaType, $index)')
-                                            +table-db-field-edit('curDbName', 'curDbType', 'curJavaName', 'curJavaType')
+                                            +btn-save('tableDbFieldSaveVisible(curDatabaseName, curDatabaseType, curJavaName, curJavaType)', 'tableDbFieldSave(field, curDatabaseName, curDatabaseType, curJavaName, curJavaType, $index)')
+                                            +table-db-field-edit('curDatabaseName', 'curDatabaseType', 'curJavaName', 'curJavaType')
                             tfoot(ng-show='tableNewItemActive(field)')
                                 tr
                                     td.col-sm-12
-                                        +btn-save('tableDbFieldSaveVisible(newDbName, newDbType, newJavaName, newJavaType)', 'tableDbFieldSave(field, newDbName, newDbType, newJavaName, newJavaType, -1)')
-                                        +table-db-field-edit('newDbName', 'newDbType', 'newJavaName', 'newJavaType')
+                                        +btn-save('tableDbFieldSaveVisible(newDatabaseName, newDatabaseType, newJavaName, newJavaType)', 'tableDbFieldSave(field, newDatabaseName, newDatabaseType, newJavaName, newJavaType, -1)')
+                                        +table-db-field-edit('newDatabaseName', 'newDatabaseType', 'newJavaName', 'newJavaType')
         div(ng-switch-when='queryGroups' ng-hide=fieldHide)
             .col-sm-6
                 label.table-header {{::field.label}}:

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/views/login.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/views/login.jade b/modules/web-control-center/src/main/js/views/login.jade
index 5bb39dd..7cce3f6 100644
--- a/modules/web-control-center/src/main/js/views/login.jade
+++ b/modules/web-control-center/src/main/js/views/login.jade
@@ -49,7 +49,7 @@ mixin lbl(txt)
 
             .modal-footer
                 a.show-signup.ng-hide(ng-show='action != "login"', ng-click='action = "login";') log in
-                a.show-signup(ng-show="action != 'register'", ng-click='action = "register";') sign up
+                a.show-signup(ng-show='action != "register"', ng-click='action = "register"') sign up
                 | &nbsp;or&nbsp;
                 button.btn.btn-primary(ng-show='action == "login"' ng-click='auth(action, user_info)') Log In
                 button.btn.btn-primary(ng-show='action == "register"' ng-disabled='loginForm.$invalid || user_info.password != user_info.confirm' ng-click='auth(action, user_info)') Sign Up

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/views/settings/admin.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/views/settings/admin.jade b/modules/web-control-center/src/main/js/views/settings/admin.jade
index 4d50631..8345bb9 100644
--- a/modules/web-control-center/src/main/js/views/settings/admin.jade
+++ b/modules/web-control-center/src/main/js/views/settings/admin.jade
@@ -53,6 +53,6 @@ block container
                                     i.fa.fa-eye
                     tfoot
                         tr
-                            td(colspan='5' class="text-right")
+                            td.text-right(colspan='5')
                                 div(st-pagination st-items-by-page='15' st-displayed-pages='5')
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/views/settings/profile.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/views/settings/profile.jade b/modules/web-control-center/src/main/js/views/settings/profile.jade
index dbc6dea..96f06c5 100644
--- a/modules/web-control-center/src/main/js/views/settings/profile.jade
+++ b/modules/web-control-center/src/main/js/views/settings/profile.jade
@@ -42,7 +42,7 @@ block container
                         .details-row
                             .checkbox
                                 label
-                                    input(type="checkbox" ng-model='profileUser.changePassword')
+                                    input(type='checkbox' ng-model='profileUser.changePassword')
                                     | Change password
                         div(ng-show='profileUser.changePassword')
                             .details-row

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/views/templates/confirm.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/views/templates/confirm.jade b/modules/web-control-center/src/main/js/views/templates/confirm.jade
index bdaf9bf..949318a 100644
--- a/modules/web-control-center/src/main/js/views/templates/confirm.jade
+++ b/modules/web-control-center/src/main/js/views/templates/confirm.jade
@@ -18,10 +18,10 @@
     .modal-dialog
         .modal-content
             .modal-header
-                button.close(type="button" ng-click="$hide()") &times;
+                button.close(type='button' ng-click='$hide()') &times;
                 h4.modal-title Confirmation
             .modal-body(ng-show='content')
                 p(ng-bind-html='content' style='text-align: center;')
             .modal-footer
-                button.btn.btn-default(type="button" ng-click="$hide()") Cancel
-                button.btn.btn-primary(type="button" ng-click="ok()") Confirm
\ No newline at end of file
+                button.btn.btn-default(type='button' ng-click='$hide()') Cancel
+                button.btn.btn-primary(type='button' ng-click='ok()') Confirm
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8af110a8/modules/web-control-center/src/main/js/views/templates/copy.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/views/templates/copy.jade b/modules/web-control-center/src/main/js/views/templates/copy.jade
index 22cc64c..2ba9096 100644
--- a/modules/web-control-center/src/main/js/views/templates/copy.jade
+++ b/modules/web-control-center/src/main/js/views/templates/copy.jade
@@ -18,14 +18,14 @@
     .modal-dialog
         .modal-content
             .modal-header
-                button.close(type="button" ng-click="$hide()") &times;
+                button.close(type='button' ng-click='$hide()') &times;
                 h4.modal-title Copy
             form.form-horizontal(name='inputForm' novalidate)
                 .modal-body.row
                     .col-sm-9.login.col-sm-offset-1
                         label.required.labelFormField() New name:&nbsp;
                         .col-sm-9
-                            input.form-control(type="text" ng-model='newName' required)
+                            input.form-control(type='text' ng-model='newName' required)
             .modal-footer
-                button.btn.btn-default(type="button" ng-click="$hide()") Cancel
-                button.btn.btn-primary(type="button" ng-disabled='inputForm.$invalid' ng-click="ok(newName)") Confirm
\ No newline at end of file
+                button.btn.btn-default(type='button' ng-click='$hide()') Cancel
+                button.btn.btn-primary(type='button' ng-disabled='inputForm.$invalid' ng-click='ok(newName)') Confirm
\ No newline at end of file


Mime
View raw message