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-2381 WIP Move indexed key-value pairs to metadata screen.
Date Fri, 15 Jan 2016 06:39:15 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 c08529959 -> a8ac74390


IGNITE-2381 WIP Move indexed key-value pairs to metadata screen.


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

Branch: refs/heads/ignite-843-rc2
Commit: a8ac743903124deb0e2640c97199be782bb3cfa5
Parents: c085299
Author: vsisko <vsisko@gridgain.com>
Authored: Fri Jan 15 13:39:25 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Jan 15 13:39:25 2016 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    |  6 --
 .../main/js/controllers/metadata-controller.js  | 68 ++++++++++--------
 .../src/main/js/controllers/models/caches.json  | 14 ----
 .../main/js/controllers/models/metadata.json    | 32 +++++++++
 modules/control-center-web/src/main/js/db.js    |  2 +-
 .../js/helpers/generator/generator-common.js    |  5 ++
 .../main/js/helpers/generator/generator-java.js | 74 ++++++++++++--------
 .../main/js/helpers/generator/generator-xml.js  | 56 ++++++++++-----
 .../src/main/js/views/includes/controls.jade    |  2 -
 9 files changed, 160 insertions(+), 99 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a8ac7439/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 50ebf1b..d3d5c2f 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -44,12 +44,6 @@ consoleModule.controller('cachesController', [
                         return $table.tableSimpleSave($scope.tableSimpleValid, $scope.backupItem,
field, index, stopEdit);
 
                     break;
-
-                case 'indexedTypes':
-                    if ($table.tablePairSaveVisible(field, index))
-                        return $table.tablePairSave($scope.tablePairValid, $scope.backupItem,
field, index, stopEdit);
-
-                    break;
             }
 
             return true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a8ac7439/modules/control-center-web/src/main/js/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/metadata-controller.js b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index f22a8d3..310a5df 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -182,6 +182,8 @@ consoleModule.controller('metadataController', function ($filter, $http,
$timeou
         $scope.tablePairSave = $table.tablePairSave;
         $scope.tablePairSaveVisible = $table.tablePairSaveVisible;
 
+        $scope.metadataVariants = $common.mkOptions(['Annotations', 'Configuration']);
+
         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 cache type metadata';
@@ -1041,6 +1043,13 @@ consoleModule.controller('metadataController', function ($filter, $http,
$timeou
                 else
                     $scope.backupItem = undefined;
 
+                if ($common.isDefined($scope.backupItem) && !$common.isDefined($scope.backupItem.metadata))
{
+                    $scope.backupItem.metadata = 'Configuration';
+
+                    if ($common.isDefined($scope.selectedItem))
+                        $scope.selectedItem.metadata = 'Configuration';
+                }
+
                 if ($common.getQueryVariable('new'))
                     $state.go('base.configuration.metadata');
             }
@@ -1056,7 +1065,8 @@ consoleModule.controller('metadataController', function ($filter, $http,
$timeou
             return {
                 space: $scope.spaces[0]._id,
                 caches: cacheId && _.find($scope.caches, {value: cacheId}) ? [cacheId]
:
-                    (!$common.isEmptyArray($scope.caches) ? [$scope.caches[0].value] : [])
+                    (!$common.isEmptyArray($scope.caches) ? [$scope.caches[0].value] : []),
+                metadata: 'Configuration'
             };
         }
 
@@ -1084,43 +1094,45 @@ consoleModule.controller('metadataController', function ($filter,
$http, $timeou
             else if (!$common.isValidJavaClass('Value type', item.valueType, false, 'valueType'))
                 return false;
 
-            var qry = $common.metadataForQueryConfigured(item);
+            if (item.metadata === 'Configuration') {
+                var qry = $common.metadataForQueryConfigured(item);
 
-            if (qry) {
-                if ($common.isEmptyArray(item.fields))
-                    return showPopoverMessage($scope.panels, 'query', 'fields-legend', 'Query
fields should not be empty');
+                if (qry) {
+                    if ($common.isEmptyArray(item.fields))
+                        return showPopoverMessage($scope.panels, 'query', 'fields-legend',
'Query fields should not be empty');
 
-                var indexes = item.indexes;
+                    var indexes = item.indexes;
 
-                if (indexes && indexes.length > 0) {
-                    if (_.find(indexes, function(index, i) {
-                        if ($common.isEmptyArray(index.fields))
-                            return !showPopoverMessage($scope.panels, 'query', 'indexes'
+ i, 'Index fields are not specified');
-                    }))
-                        return false;
+                    if (indexes && indexes.length > 0) {
+                        if (_.find(indexes, function (index, i) {
+                                if ($common.isEmptyArray(index.fields))
+                                    return !showPopoverMessage($scope.panels, 'query', 'indexes'
+ i, 'Index fields are not specified');
+                            }))
+                            return false;
+                    }
                 }
-            }
 
-            var str = $common.metadataForStoreConfigured(item);
+                var str = $common.metadataForStoreConfigured(item);
 
-            if (str) {
-                if ($common.isEmptyString(item.databaseSchema))
-                    return showPopoverMessage($scope.panels, 'store', 'databaseSchema', 'Database
schema should not be empty');
+                if (str) {
+                    if ($common.isEmptyString(item.databaseSchema))
+                        return showPopoverMessage($scope.panels, 'store', 'databaseSchema',
'Database schema should not be empty');
 
-                if ($common.isEmptyString(item.databaseTable))
-                    return showPopoverMessage($scope.panels, 'store', 'databaseTable', 'Database
table should not be empty');
+                    if ($common.isEmptyString(item.databaseTable))
+                        return showPopoverMessage($scope.panels, 'store', 'databaseTable',
'Database table should not be empty');
 
-                if ($common.isEmptyArray(item.keyFields))
-                    return showPopoverMessage($scope.panels, 'store', 'keyFields-add', 'Key
fields are not specified');
+                    if ($common.isEmptyArray(item.keyFields))
+                        return showPopoverMessage($scope.panels, 'store', 'keyFields-add',
'Key fields are not specified');
 
-                if ($common.isJavaBuiltInClass(item.keyType) && item.keyFields.length
!== 1)
-                    return showPopoverMessage($scope.panels, 'store', 'keyFields-add', 'Only
one field should be specified in case when key type is a Java built-in type');
+                    if ($common.isJavaBuiltInClass(item.keyType) && item.keyFields.length
!== 1)
+                        return showPopoverMessage($scope.panels, 'store', 'keyFields-add',
'Only one field should be specified in case when key type is a Java built-in type');
 
-                if ($common.isEmptyArray(item.valueFields))
-                    return showPopoverMessage($scope.panels, 'store', 'valueFields-add',
'Value fields are not specified');
-            }
-            else if (!qry) {
-                return showPopoverMessage($scope.panels, 'query', 'query-title', 'SQL query
metadata should be configured');
+                    if ($common.isEmptyArray(item.valueFields))
+                        return showPopoverMessage($scope.panels, 'store', 'valueFields-add',
'Value fields are not specified');
+                }
+                else if (!qry) {
+                    return showPopoverMessage($scope.panels, 'query', 'query-title', 'SQL
query metadata should be configured');
+                }
             }
 
             return true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a8ac7439/modules/control-center-web/src/main/js/controllers/models/caches.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/caches.json b/modules/control-center-web/src/main/js/controllers/models/caches.json
index 2c21f0b..555b440 100644
--- a/modules/control-center-web/src/main/js/controllers/models/caches.json
+++ b/modules/control-center-web/src/main/js/controllers/models/caches.json
@@ -350,20 +350,6 @@
           ]
         },
         {
-          "ui": "table-pair",
-          "id": "indexedTypes",
-          "type": "indexedTypes",
-          "model": "indexedTypes",
-          "keyName": "keyClass",
-          "valueName": "valueClass",
-          "focusId": "IndexedType",
-          "addTip": "Add new key and value classes to indexed types",
-          "removeTip": "Remove item from indexed types",
-          "tip": [
-            "Collection of types to index"
-          ]
-        },
-        {
           "label": "SQL functions",
           "id": "sqlFunctionClasses",
           "type": "table-simple",

http://git-wip-us.apache.org/repos/asf/ignite/blob/a8ac7439/modules/control-center-web/src/main/js/controllers/models/metadata.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/metadata.json b/modules/control-center-web/src/main/js/controllers/models/metadata.json
index caac576..6c623d8 100644
--- a/modules/control-center-web/src/main/js/controllers/models/metadata.json
+++ b/modules/control-center-web/src/main/js/controllers/models/metadata.json
@@ -23,6 +23,21 @@
           }
         },
         {
+          "label": "Metadata",
+          "id": "metadata",
+          "type": "dropdown",
+          "model": "metadata",
+          "items": "metadataVariants",
+          "required": true,
+          "tip": [
+            "Metadata configured in: ",
+            "<ul>",
+            "  <li>Class annotations</li>",
+            "  <li>Configuration</li>",
+            "</ul>"
+          ]
+        },
+        {
           "label": "Key type",
           "id": "keyType",
           "type": "typeahead",
@@ -55,6 +70,11 @@
       ],
       "fields": [
         {
+          "label": "Not available for annotated types",
+          "type": "label",
+          "hide": "backupItem.metadata === 'Configuration'"
+        },
+        {
           "label": "Fields",
           "id": "fields",
           "ui": "table-pair",
@@ -63,6 +83,7 @@
           "keyName": "name",
           "valueName": "className",
           "focusId": "QryField",
+          "hide": "backupItem.metadata !== 'Configuration'",
           "addTip": "Add field to query",
           "removeTip": "Remove field",
           "tip": [
@@ -78,6 +99,7 @@
           "keyName": "field",
           "valueName": "alias",
           "focusId": "Alias",
+          "hide": "backupItem.metadata !== 'Configuration'",
           "addTip": "Add alias to query",
           "removeTip": "Remove alias",
           "tip": [
@@ -91,6 +113,7 @@
           "type": "table-indexes",
           "ui": "table-indexes",
           "model": "indexes",
+          "hide": "backupItem.metadata !== 'Configuration'",
           "addTip": "Add new index",
           "removeTip": "Remove index",
           "addItemTip": "Add new field to index",
@@ -110,10 +133,16 @@
       ],
       "fields": [
         {
+          "label": "Not available for annotated types",
+          "type": "label",
+          "hide": "backupItem.metadata === 'Configuration'"
+        },
+        {
           "label": "Database schema",
           "id": "databaseSchema",
           "type": "text",
           "model": "databaseSchema",
+          "hide": "backupItem.metadata !== 'Configuration'",
           "placeholder": "Input DB schema name",
           "tip": [
             "Schema name in database"
@@ -124,6 +153,7 @@
           "id": "databaseTable",
           "type": "text",
           "model": "databaseTable",
+          "hide": "backupItem.metadata !== 'Configuration'",
           "placeholder": "Input DB table name",
           "tip": [
             "Table name in database"
@@ -137,6 +167,7 @@
           "keyName": "name",
           "valueName": "className",
           "focusId": "KeyField",
+          "hide": "backupItem.metadata !== 'Configuration'",
           "addTip": "Add key field",
           "removeTip": "Remove key field",
           "tip": [
@@ -151,6 +182,7 @@
           "keyName": "name",
           "valueName": "className",
           "focusId": "ValueField",
+          "hide": "backupItem.metadata !== 'Configuration'",
           "addTip": "Add value field",
           "removeTip": "Remove value field",
           "tip": [

http://git-wip-us.apache.org/repos/asf/ignite/blob/a8ac7439/modules/control-center-web/src/main/js/db.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/db.js b/modules/control-center-web/src/main/js/db.js
index 9cc4c8f..2678ade 100644
--- a/modules/control-center-web/src/main/js/db.js
+++ b/modules/control-center-web/src/main/js/db.js
@@ -74,6 +74,7 @@ exports.Space = mongoose.model('Space', new Schema({
 var CacheTypeMetadataSchema = new Schema({
     space: {type: ObjectId, ref: 'Space'},
     caches: [{type: ObjectId, ref: 'Cache'}],
+    metadata: {type: String, enum: ['Annotations', 'Config']},
     kind: {type: String, enum: ['query', 'store', 'both']},
     databaseSchema: String,
     databaseTable: String,
@@ -183,7 +184,6 @@ var CacheSchema = new Schema({
     sqlSchema: String,
     sqlOnheapRowCacheSize: Number,
     longQueryWarningTimeout: Number,
-    indexedTypes: [{keyClass: String, valueClass: String}],
     sqlFunctionClasses: [String],
     statisticsEnabled: Boolean,
     managementEnabled: Boolean,

http://git-wip-us.apache.org/repos/asf/ignite/blob/a8ac7439/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
b/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
index e479c2d..9922e8a 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
@@ -463,3 +463,8 @@ $generatorCommon.binaryIsDefined = function (binary) {
     return binary && ($commonUtils.isDefinedAndNotEmpty(binary.idMapper) || $commonUtils.isDefinedAndNotEmpty(binary.serializer)
||
         $commonUtils.isDefinedAndNotEmpty(binary.typeConfigurations) || ($commonUtils.isDefined(binary.compactFooter)
&& !binary.compactFooter));
 };
+
+// Extract domain metadata.
+$generatorCommon.domainMetadata = function(domain) {
+    return domain.metadata ? domain.metadata : 'Configuration';
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/a8ac7439/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
index badf8e3..36fa6a4 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
@@ -986,16 +986,20 @@ $generatorJava.cacheQuery = function (cache, varName, res) {
     $generatorJava.property(res, varName, cache, 'sqlOnheapRowCacheSize');
     $generatorJava.property(res, varName, cache, 'longQueryWarningTimeout');
 
-    if (cache.indexedTypes && cache.indexedTypes.length > 0) {
+    var indexedTypes = _.filter(cache.metadatas, function (meta) {
+        return meta.metadata === 'Annotations'
+    });
+
+    if ($commonUtils.isDefinedAndNotEmpty(indexedTypes)) {
         res.emptyLineIfNeeded();
 
         res.startBlock(varName + '.setIndexedTypes(');
 
-        var len = cache.indexedTypes.length - 1;
+        var len = indexedTypes.length - 1;
 
-        _.forEach(cache.indexedTypes, function(pair, ix) {
-            res.line($generatorJava.toJavaCode(res.importClass(pair.keyClass), 'class') +
', ' +
-                $generatorJava.toJavaCode(res.importClass(pair.valueClass), 'class') + (ix
< len ? ',' : ''));
+        _.forEach(indexedTypes, function(meta, ix) {
+            res.line($generatorJava.toJavaCode(res.importClass(meta.keyType), 'class') +
', ' +
+                $generatorJava.toJavaCode(res.importClass(meta.valueType), 'class') + (ix
< len ? ',' : ''));
         });
 
         res.endBlock(');');
@@ -1172,14 +1176,17 @@ $generatorJava.cacheStore = function (cache, metadatas, cacheVarName,
res) {
 
                 res.needEmptyLine = true;
 
-                if (metadatas && _.find(metadatas, function (meta) {
-                    return $commonUtils.isDefinedAndNotEmpty(meta.databaseTable);
-                })) {
+                var metaConfigs = _.filter(metadatas, function (meta) {
+                    return $generatorCommon.domainMetadata(meta) === 'Configuration' &&
+                        $commonUtils.isDefinedAndNotEmpty(meta.databaseTable);
+                });
+
+                if ($commonUtils.isDefinedAndNotEmpty(metaConfigs)) {
                     $generatorJava.declareVariable(res, 'jdbcTypes', 'java.util.Collection',
'java.util.ArrayList', 'org.apache.ignite.cache.store.jdbc.JdbcType');
 
                     res.needEmptyLine = true;
 
-                    _.forEach(metadatas, function (meta) {
+                    _.forEach(metaConfigs, function (meta) {
                         if ($commonUtils.isDefinedAndNotEmpty(meta.databaseTable))
                             res.line('jdbcTypes.add(jdbcType' + $generatorJava.extractType(meta.valueType)
+ '(' + cacheVarName + '.getName()));');
                     });
@@ -1489,13 +1496,15 @@ $generatorJava.metadataQuery = function (meta, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    $generatorJava.metadataQueryFields(res, meta);
+    if ($generatorCommon.domainMetadata(meta) === 'Configuration') {
+        $generatorJava.metadataQueryFields(res, meta);
 
-    $generatorJava.metadataQueryAliases(res, meta);
+        $generatorJava.metadataQueryAliases(res, meta);
 
-    $generatorJava.metadataQueryIndexes(res, meta);
+        $generatorJava.metadataQueryIndexes(res, meta);
 
-    res.needEmptyLine = true;
+        res.needEmptyLine = true;
+    }
 
     return res;
 };
@@ -1505,19 +1514,21 @@ $generatorJava.metadataStore = function (meta, withTypes, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    $generatorJava.property(res, 'jdbcType', meta, 'databaseSchema');
-    $generatorJava.property(res, 'jdbcType', meta, 'databaseTable');
+    if ($generatorCommon.domainMetadata(meta) === 'Configuration') {
+        $generatorJava.property(res, 'jdbcType', meta, 'databaseSchema');
+        $generatorJava.property(res, 'jdbcType', meta, 'databaseTable');
 
-    if (withTypes) {
-        $generatorJava.classNameProperty(res, 'jdbcType', meta, 'keyType');
-        $generatorJava.property(res, 'jdbcType', meta, 'valueType');
-    }
+        if (withTypes) {
+            $generatorJava.classNameProperty(res, 'jdbcType', meta, 'keyType');
+            $generatorJava.property(res, 'jdbcType', meta, 'valueType');
+        }
 
-    $generatorJava.metadataDatabaseFields(res, meta, 'keyFields');
+        $generatorJava.metadataDatabaseFields(res, meta, 'keyFields');
 
-    $generatorJava.metadataDatabaseFields(res, meta, 'valueFields');
+        $generatorJava.metadataDatabaseFields(res, meta, 'valueFields');
 
-    res.needEmptyLine = true;
+        res.needEmptyLine = true;
+    }
 
     return res;
 };
@@ -1527,13 +1538,16 @@ $generatorJava.cacheMetadatas = function (metadatas, varName, res)
{
     if (!res)
         res = $generatorCommon.builder();
 
+    var metaConfigs = _.filter(metadatas, function (meta) {
+        return $generatorCommon.domainMetadata(meta) === 'Configuration' &&
+            $commonUtils.isDefinedAndNotEmpty(meta.fields);
+    });
+
     // Generate cache type metadata configs.
-    if (metadatas && _.find(metadatas, function (meta) {
-            return $commonUtils.isDefinedAndNotEmpty(meta.fields);
-        })) {
+    if ($commonUtils.isDefinedAndNotEmpty(metaConfigs)) {
         $generatorJava.declareVariable(res, 'queryEntities', 'java.util.Collection', 'java.util.ArrayList',
'org.apache.ignite.cache.QueryEntity');
 
-        _.forEach(metadatas, function (meta) {
+        _.forEach(metaConfigs, function (meta) {
             if ($commonUtils.isDefinedAndNotEmpty(meta.fields))
                 res.line('queryEntities.add(queryEntity' + $generatorJava.extractType(meta.valueType)
+ '());');
         });
@@ -1581,7 +1595,8 @@ $generatorJava.clusterMetadatas = function (caches, res) {
 
     _.forEach(caches, function (cache) {
         _.forEach(cache.metadatas, function (meta) {
-            if (!$commonUtils.isDefined(_.find(metadatas, function (m) {
+            if ($generatorCommon.domainMetadata(meta) === 'Configuration' &&
+                !$commonUtils.isDefined(_.find(metadatas, function (m) {
                     return m === meta.valueType;
                 }))) {
                 $generatorJava.resetVariables(res);
@@ -2021,9 +2036,10 @@ $generatorJava.pojos = function (caches, useConstructor, includeKeyFields)
{
     _.forEach(caches, function(cache) {
         _.forEach(cache.metadatas, function(meta) {
             // Skip already generated classes.
-            if (!_.find(metadatas, {valueType: meta.valueType}) &&
+            if ($generatorCommon.domainMetadata(meta) === 'Configuration' &&
+                !_.find(metadatas, {valueType: meta.valueType}) &&
                 // Skip metadata without value fields.
-                $commonUtils.isDefined(meta.valueFields) && meta.valueFields.length
> 0) {
+                $commonUtils.isDefinedAndNotEmpty(meta.valueFields)) {
                 var metadata = {};
 
                 // Key class generation only if key is not build in java class.

http://git-wip-us.apache.org/repos/asf/ignite/blob/a8ac7439/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
index bf74f41..5d14a22 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
@@ -765,13 +765,17 @@ $generatorXml.cacheQuery = function(cache, res) {
     $generatorXml.property(res, cache, 'sqlOnheapRowCacheSize');
     $generatorXml.property(res, cache, 'longQueryWarningTimeout');
 
-    if (cache.indexedTypes && cache.indexedTypes.length > 0) {
+    var indexedTypes = _.filter(cache.metadatas, function (meta) {
+        return meta.metadata === 'Annotations'
+    });
+
+    if (indexedTypes.length > 0) {
         res.startBlock('<property name="indexedTypes">');
         res.startBlock('<list>');
 
-        _.forEach(cache.indexedTypes, function(pair) {
-            res.line('<value>' + $dataStructures.fullClassName(pair.keyClass) + '</value>');
-            res.line('<value>' + $dataStructures.fullClassName(pair.valueClass) + '</value>');
+        _.forEach(cache.indexedTypes, function(meta) {
+            res.line('<value>' + $dataStructures.fullClassName(meta.keyType) + '</value>');
+            res.line('<value>' + $dataStructures.fullClassName(meta.valueType) + '</value>');
         });
 
         res.endBlock('</list>');
@@ -810,11 +814,16 @@ $generatorXml.cacheStore = function(cache, metadatas, res) {
                 res.line('<bean class="' + $generatorCommon.jdbcDialectClassName(storeFactory.dialect)
+ '"/>');
                 res.endBlock('</property>');
 
-                if (metadatas && metadatas.length > 0) {
+                var metaConfigs = _.filter(metadatas, function (meta) {
+                    return $generatorCommon.domainMetadata(meta) === 'Configuration' &&
+                        $commonUtils.isDefinedAndNotEmpty(meta.databaseTable);
+                });
+
+                if ($commonUtils.isDefinedAndNotEmpty(metaConfigs)) {
                     res.startBlock('<property name="types">');
                     res.startBlock('<list>');
 
-                    _.forEach(metadatas, function (meta) {
+                    _.forEach(metaConfigs, function (meta) {
                         res.startBlock('<bean class="org.apache.ignite.cache.store.jdbc.JdbcType">');
 
                         $generatorXml.property(res, cache, 'name', 'cacheName');
@@ -1113,13 +1122,15 @@ $generatorXml.metadataQuery = function(meta, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    $generatorXml.metadataQueryFields(res, meta);
+    if ($generatorCommon.domainMetadata(meta) === 'Configuration') {
+        $generatorXml.metadataQueryFields(res, meta);
 
-    $generatorXml.metadataQueryAliases(res, meta);
+        $generatorXml.metadataQueryAliases(res, meta);
 
-    $generatorXml.metadataQueryIndexes(res, meta);
+        $generatorXml.metadataQueryIndexes(res, meta);
 
-    res.needEmptyLine = true;
+        res.needEmptyLine = true;
+    }
 
     return res;
 };
@@ -1129,17 +1140,19 @@ $generatorXml.metadataStore = function(meta, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    $generatorXml.property(res, meta, 'databaseSchema');
-    $generatorXml.property(res, meta, 'databaseTable');
+    if ($generatorCommon.domainMetadata(meta) === 'Configuration') {
+        $generatorXml.property(res, meta, 'databaseSchema');
+        $generatorXml.property(res, meta, 'databaseTable');
 
-    res.needEmptyLine = true;
+        res.needEmptyLine = true;
 
-    if (!$dataStructures.isJavaBuiltInClass(meta.keyType))
-        $generatorXml.metadataDatabaseFields(res, meta, 'keyFields');
+        if (!$dataStructures.isJavaBuiltInClass(meta.keyType))
+            $generatorXml.metadataDatabaseFields(res, meta, 'keyFields');
 
-    $generatorXml.metadataDatabaseFields(res, meta, 'valueFields');
+        $generatorXml.metadataDatabaseFields(res, meta, 'valueFields');
 
-    res.needEmptyLine = true;
+        res.needEmptyLine = true;
+    }
 
     return res;
 };
@@ -1167,13 +1180,18 @@ $generatorXml.cacheMetadatas = function(metadatas, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    if (metadatas && metadatas.length > 0) {
+    var metaConfigs = _.filter(metadatas, function (meta) {
+        return $generatorCommon.domainMetadata(meta) === 'Configuration' &&
+            $commonUtils.isDefinedAndNotEmpty(meta.fields);
+    });
+
+    if ($commonUtils.isDefinedAndNotEmpty(metaConfigs)) {
         res.emptyLineIfNeeded();
 
         res.startBlock('<property name="queryEntities">');
         res.startBlock('<list>');
 
-        _.forEach(metadatas, function (meta) {
+        _.forEach(metaConfigs, function (meta) {
             $generatorXml.cacheQueryMetadata(meta, res);
         });
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a8ac7439/modules/control-center-web/src/main/js/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/includes/controls.jade b/modules/control-center-web/src/main/js/views/includes/controls.jade
index 1676af1..949d551 100644
--- a/modules/control-center-web/src/main/js/views/includes/controls.jade
+++ b/modules/control-center-web/src/main/js/views/includes/controls.jade
@@ -432,8 +432,6 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
                                     +btn-save('tableSimpleSaveVisible(field, -1)', 'tableSimpleSave(tableSimpleValid,
backupItem, field, -1)')
                                     .input-tip
                                         input.form-control(id='new{{::field.focusId}}' type='text'
ng-model='field.newValue' placeholder='{{::field.placeholder}}' on-enter='tableSimpleSaveVisible(field,
-1) && tableSimpleSave(tableSimpleValid, backupItem, field, -1)' on-escape='tableReset()')
-        .group-section(ng-switch-when='indexedTypes')
-            +table-pair('Index key-value type pairs', fieldMdl, 'keyClass', 'valueClass',
'Key full class name', 'Value class full name', true, true, '/')
         div(ng-switch-when='fields' ng-hide=fieldHide)
             +table-pair('{{::field.label}}', fieldMdl, 'name', 'className', 'Field name',
'Field full class name', false, true, '/')
         .group-section(ng-switch-when='aliases' ng-hide=fieldHide)


Mime
View raw message