You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2016/01/26 12:08:43 UTC

[1/3] ignite git commit: IGNITE-843 Fixed import model

Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc3 8bc460b4f -> 1dccb656d


IGNITE-843 Fixed import model


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

Branch: refs/heads/ignite-843-rc3
Commit: cbea5f554a1f686744c8ced75fa0ef29a6e51296
Parents: 8bc460b
Author: Andrey <an...@gridgain.com>
Authored: Tue Jan 26 15:38:17 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Tue Jan 26 15:38:17 2016 +0700

----------------------------------------------------------------------
 .../main/js/controllers/domains-controller.js   | 170 +++++++++----------
 .../js/views/configuration/domains-import.jade  |  10 +-
 2 files changed, 83 insertions(+), 97 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/cbea5f55/modules/control-center-web/src/main/js/controllers/domains-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/domains-controller.js b/modules/control-center-web/src/main/js/controllers/domains-controller.js
index a1f0e3d..300735c 100644
--- a/modules/control-center-web/src/main/js/controllers/domains-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/domains-controller.js
@@ -28,7 +28,6 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
         var IMPORT_DM_NEW_CACHE = 1;
         var IMPORT_DM_ASSOCIATE_CACHE = 2;
 
-        $scope.ui.importCommonAction = IMPORT_DM_NEW_CACHE;
         $scope.ui.packageName = $commonUtils.toJavaPackageName($scope.$root.user.email.replace('@', '.')
             .split('.').reverse().join('.') + '.model');
         $scope.ui.builtinKeys = true;
@@ -597,53 +596,13 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
             }
         };
 
-        $scope.importCommonActions = [];
-        $scope.importCommonCachesOrTemplates = [];
-
-        $scope.importCurrentActions = [];
-        $scope.importCurrentTemplates = [];
-        $scope.importCurrentCaches = [];
-
-        function _fillCommonCachesOrTemplates() {
-            $scope.importCommonCachesOrTemplates.length = 0;
-
-            if ($scope.ui.importCommonAction == IMPORT_DM_NEW_CACHE) {
-                $scope.importCommonCachesOrTemplates.push(DFLT_PARTITIONED_CACHE);
-                $scope.importCommonCachesOrTemplates.push(DFLT_REPLICATED_CACHE);
-            }
-
-            if (!$common.isEmptyArray($scope.caches)) {
-                if ($scope.importCommonCachesOrTemplates.length > 0)
-                    $scope.importCommonCachesOrTemplates.push(null);
-
-                _.forEach($scope.caches, function (cache) {
-                    $scope.importCommonCachesOrTemplates.push(cache);
-                });
-
-                $scope.ui.importCommonCacheOrTemplate = $scope.importCommonCachesOrTemplates.length > 0 ? $scope.importCommonCachesOrTemplates[0].value : null;
-            }
-        }
-
-        $scope.$watch('ui.importCommonAction', function () {
-            _fillCommonCachesOrTemplates();
-        });
-
         $scope.tableActionView = function(tbl) {
-            if (tbl.action === IMPORT_DM_NEW_CACHE) {
-                var template = _.find($scope.importCurrentTemplates, function (t) {
-                    return t && tbl.template === t.value;
-                });
-
-                return 'Create ' + tbl.generatedCacheName + ' (' + template.label + ')';
-            }
-            else {
-                var cache = _.find($scope.importCurrentCaches, function (c) {
-                    return tbl.cache === c.value;
-                });
+            var cacheName = _.find(_importCachesOrTemplates, {value: tbl.cacheOrTemplate}).label;
 
+            if (tbl.action === IMPORT_DM_NEW_CACHE)
+                return 'Create ' + tbl.generatedCacheName + ' (' + cacheName + ')';
 
-                return cache ? ('Associate with ' + cache.label) : 'No caches to associate with';
-            }
+            return 'Associate with ' + cacheName;
         };
 
         /**
@@ -665,41 +624,11 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
 
             $http.post('/api/v1/agent/tables', preset)
                 .success(function (tables) {
-                    var hasCaches = !$common.isEmptyArray($scope.caches);
-
-                    $scope.importCommonActions.length = 0;
-                    $scope.importCommonActions.push({label: 'Create new cache by template', value: IMPORT_DM_NEW_CACHE});
-                    if (hasCaches)
-                        $scope.importCommonActions.push({label: 'Associate with existing cache', value: IMPORT_DM_ASSOCIATE_CACHE});
-
-                    $scope.importCurrentActions.length = 0;
-                    $scope.importCurrentActions.push({label: 'Create', value: IMPORT_DM_NEW_CACHE});
-                    if (hasCaches)
-                        $scope.importCurrentActions.push({label: 'Associate', value: IMPORT_DM_ASSOCIATE_CACHE});
-
-                    $scope.importCurrentTemplates.length = 0;
-                    $scope.importCurrentCaches.length = 0;
-
-                    $scope.importCurrentTemplates.push(DFLT_PARTITIONED_CACHE);
-                    $scope.importCurrentTemplates.push(DFLT_REPLICATED_CACHE);
-
-                    if (hasCaches) {
-                        $scope.importCurrentTemplates.push(null);
-
-                        _.forEach($scope.caches, function (cache) {
-                            $scope.importCurrentTemplates.push(cache);
-                            $scope.importCurrentCaches.push(cache);
-                        });
-                    }
-
-                    var dfltCache = $scope.importCurrentCaches.length > 0 ? $scope.importCurrentCaches[0] : null;
-
                     _.forEach(tables, function (tbl, idx) {
                         tbl.id = idx;
                         tbl.action = IMPORT_DM_NEW_CACHE;
                         tbl.generatedCacheName = toJavaClassName(tbl.tbl) + 'Cache';
-                        tbl.сache = dfltCache ? dfltCache.value : null;
-                        tbl.template = DFLT_PARTITIONED_CACHE.value;
+                        tbl.cacheOrTemplate = DFLT_PARTITIONED_CACHE.value;
                         tbl.label = tbl.schema + '.' + tbl.tbl;
                         tbl.edit = false;
                         tbl.use = $common.isDefined(_.find(tbl.cols, function (col) {
@@ -710,8 +639,6 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
                     $scope.importDomain.action = 'tables';
                     $scope.importDomain.tables = tables;
                     $scope.importDomain.info = INFO_SELECT_TABLES;
-
-                    _fillCommonCachesOrTemplates();
                 })
                 .error(function (errMsg) {
                     $common.showError(errMsg);
@@ -724,23 +651,33 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
         $scope.applyDefaults = function () {
             _.forEach($scope.importDomain.displayedTables, function (table) {
                 table.edit = false;
-                table.action = $scope.ui.importCommonAction;
-
-                if (table.action === IMPORT_DM_NEW_CACHE)
-                    table.template = $scope.ui.importCommonCacheOrTemplate;
-                else
-                    table.cache = $scope.ui.importCommonCacheOrTemplate;
+                table.action = $scope.importCommon.action;
+                table.cacheOrTemplate = $scope.importCommon.cacheOrTemplate;
             });
         };
 
-        $scope.curDbTable = null;
+        $scope._curDbTable = null;
 
         $scope.startEditDbTableCache = function (tbl) {
-            if ($scope.curDbTable)
-                $scope.curDbTable.edit = false;
+            if ($scope._curDbTable) {
+                $scope._curDbTable.edit = false;
+
+                if ($scope._curDbTable.actionWatch) {
+                    $scope._curDbTable.actionWatch();
+
+                    $scope._curDbTable.actionWatch = null;
+                }
+            }
+
+            $scope._curDbTable = tbl;
+
+            var _fillFn = _fillCommonCachesOrTemplates($scope._curDbTable);
+
+            _fillFn($scope._curDbTable.action);
 
-            tbl.edit = true;
-            $scope.curDbTable = tbl;
+            $scope._curDbTable.actionWatch = $scope.$watch('_curDbTable.action', _fillFn, true);
+
+            $scope._curDbTable.edit = true;
         };
 
         /**
@@ -955,9 +892,9 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
 
                     // Prepare caches for generation.
                     if (table.action === IMPORT_DM_NEW_CACHE) {
-                        var template = _.find($scope.importCurrentTemplates, {value: table.template});
+                        var template = _.find(_importCachesOrTemplates, {value: table.cacheOrTemplate});
 
-                        newDomain.newCache = angular.copy(template ? template.cache : DFLT_PARTITIONED_CACHE.cache);
+                        newDomain.newCache = angular.copy(template.cache);
 
                         delete newDomain.newCache._id;
                         newDomain.newCache.name = typeName + 'Cache';
@@ -979,7 +916,7 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
                         }
                     }
                     else {
-                        var cacheId = table.cache;
+                        var cacheId = table.cacheOrTemplate;
 
                         newDomain.caches = [cacheId];
 
@@ -1150,9 +1087,45 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
                 $scope.selectItem($scope.domains[0]);
         }
 
+        $scope.importActions = [{
+            label: 'Create new cache by template',
+            shortLabel: 'Create',
+            value: IMPORT_DM_NEW_CACHE
+        }];
+
+        $scope.importCommon = {};
+
+    function _fillCommonCachesOrTemplates(item) {
+            return function (action) {
+                if (item.cachesOrTemplates)
+                    item.cachesOrTemplates.length = 0;
+                else
+                    item.cachesOrTemplates = [];
+
+                if (action == IMPORT_DM_NEW_CACHE) {
+                    item.cachesOrTemplates.push(DFLT_PARTITIONED_CACHE);
+                    item.cachesOrTemplates.push(DFLT_REPLICATED_CACHE);
+                }
+
+                if (!$common.isEmptyArray($scope.caches)) {
+                    if (item.cachesOrTemplates.length > 0)
+                        item.cachesOrTemplates.push(null);
+
+                    _.forEach($scope.caches, function (cache) {
+                        item.cachesOrTemplates.push(cache);
+                    });
+                }
+
+                if (!_.find(item.cachesOrTemplates, {value: item.cacheOrTemplate}))
+                    item.cacheOrTemplate = item.cachesOrTemplates[0].value;
+            }
+        }
+
         // When landing on the page, get domain models and show them.
         $loading.start('loadingDomainModelsScreen');
 
+        var _importCachesOrTemplates = [];
+
         $http.post('/api/v1/configuration/domains/list')
             .success(function (data) {
                 $scope.spaces = data.spaces;
@@ -1160,10 +1133,23 @@ consoleModule.controller('domainsController', function ($filter, $http, $timeout
                 $scope.caches = _mapCaches(data.caches);
                 $scope.domains = data.domains;
 
+                _importCachesOrTemplates = [DFLT_PARTITIONED_CACHE, DFLT_REPLICATED_CACHE].concat($scope.caches);
+
                 _.forEach($scope.clusters, function (cluster) {
                     $scope.ui.generatedCachesClusters.push(cluster.value);
                 });
 
+                if (!$common.isEmptyArray($scope.caches))
+                    $scope.importActions.push({
+                        label: 'Associate with existing cache',
+                        shortLabel: 'Associate',
+                        value: IMPORT_DM_ASSOCIATE_CACHE
+                    });
+
+                $scope.$watch('importCommon.action', _fillCommonCachesOrTemplates($scope.importCommon), true);
+
+                $scope.importCommon.action = IMPORT_DM_NEW_CACHE;
+
                 // Load page descriptor.
                 $http.get('/models/domains.json')
                     .success(function (data) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/cbea5f55/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/domains-import.jade b/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
index 4a03f88..73df0c0 100644
--- a/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/domains-import.jade
@@ -144,9 +144,9 @@ mixin td-ellipses-lbl(w, lbl)
                                                     div.td-ellipsis
                                                         a(ng-if='!table.edit' ng-click='startEditDbTableCache(table)') {{tableActionView(table)}}
                                                         div(style='display: flex' ng-if='table.edit')
-                                                            button.select-toggle.form-control(style='width: 35%; margin-right: 5px' bs-select ng-model='table.action' data-container='false' bs-options='item.value as item.label for item in importCurrentActions')
-                                                            button.select-toggle.form-control(ng-if='table.action==1' style='width: 65%; margin-right: 0' bs-select ng-model='table.template' data-container='false' bs-options='item.value as item.label for item in importCurrentTemplates')
-                                                            button.select-toggle.form-control(ng-if='table.action==2' style='width: 65%; margin-right: 0' bs-select ng-model='table.cache' data-container='false' bs-options='item.value as item.label for item in importCurrentCaches')
+                                                            button.select-toggle.form-control(style='width: 35%; margin-right: 5px' bs-select ng-model='table.action' data-container='false' bs-options='item.value as item.shortLabel for item in importActions')
+                                                            button.select-toggle.form-control(style='width: 65%; margin-right: 0' bs-select ng-model='table.cacheOrTemplate' data-container='false' bs-options='item.value as item.label for item in table.cachesOrTemplates')
+                                                            //- button.select-toggle.form-control(ng-if='table.action==2' style='width: 65%; margin-right: 0' bs-select ng-model='table.cache' data-container='false' bs-options='item.value as item.label for item in importCurrentCaches')
                                                 td
                 .settings-row
                     label Defaults to be applied for filtered tables
@@ -154,9 +154,9 @@ mixin td-ellipses-lbl(w, lbl)
                 .settings-row
                     .col-sm-11
                         .col-sm-6(style='padding-right: 5px')
-                            button.select-toggle.form-control(bs-select ng-model='ui.importCommonAction' data-container='false' bs-options='item.value as item.label for item in importCommonActions')
+                            button.select-toggle.form-control(bs-select ng-model='importCommon.action' data-container='false' bs-options='item.value as item.label for item in importActions')
                         .col-sm-6(style='padding-left: 5px; padding-right: 5px')
-                            button.select-toggle.form-control(bs-select ng-model='ui.importCommonCacheOrTemplate' data-container='false' bs-options='item.value as item.label for item in importCommonCachesOrTemplates')
+                            button.select-toggle.form-control(bs-select ng-model='importCommon.cacheOrTemplate' data-container='false' bs-options='item.value as item.label for item in importCommon.cachesOrTemplates')
                     .col-sm-1(style='padding-left: 5px')
                         button.btn.btn-primary(ng-click='applyDefaults()') Apply
             .import-domain-model-wizard-page(ng-show='importDomain.action == "options"' style='margin-bottom: 176px')


[2/3] ignite git commit: IGNITE-843 Fixed project structure ui.

Posted by an...@apache.org.
IGNITE-843 Fixed project structure ui.


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

Branch: refs/heads/ignite-843-rc3
Commit: ec0f9148d27ab015377b694d2097d1b9c0bc849f
Parents: cbea5f5
Author: Andrey <an...@gridgain.com>
Authored: Tue Jan 26 18:03:23 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Tue Jan 26 18:03:23 2016 +0700

----------------------------------------------------------------------
 .../configuration/summary/summary.controller.js | 63 ++++++++++----------
 .../src/main/js/public/stylesheets/style.scss   |  9 ++-
 .../summary-project-structure.jade              |  2 +-
 3 files changed, 37 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ec0f9148/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
index 44da468..a3e29a9 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
@@ -48,13 +48,15 @@ export default [
             injectClasses: {
                 iExpanded: 'fa fa-folder-open-o',
                 iCollapsed: 'fa fa-folder-o'
+            },
+            equality: (node1, node2) => {
+                return node1 === node2;
             }
         };
 
         const javaConfigFolder = {
             type: 'folder',
-            name: 'src-config',
-            title: 'config',
+            name: 'config',
             children: [
                 { type: 'file', name: 'ClientConfigurationFactory.java' },
                 { type: 'file', name: 'ServerConfigurationFactory.java' }
@@ -78,8 +80,7 @@ export default [
             children: [
                 {
                     type: 'folder',
-                    name: 'src-config',
-                    title: 'config',
+                    name: 'config',
                     children: [
                         javaConfigFolder,
                         javaStartupFolder
@@ -132,44 +133,44 @@ export default [
         $scope.tabsServer = { activeTab: 0 };
         $scope.tabsClient = { activeTab: 0 };
 
-        function findFolder(node, name) {
-            if (node.name === name)
+        /**
+         *
+         * @param {Object} node - Tree node.
+         * @param {string[]} path - Path to find.
+         * @returns {Object} Tree node.
+         */
+        function getOrCreateFolder(node, path) {
+            if (_.isEmpty(path))
                 return node;
 
-            if (node.children) {
-                let folder = null;
+            const leaf = path.shift();
 
-                for (let i = 0; folder === null && i < node.children.length; i++)
-                    folder = findFolder(node.children[i], name);
+            let children = null;
 
-                return folder;
-            }
+            if (!_.isEmpty(node.children)) {
+                children = _.find(node.children, {name: leaf});
 
-            return null;
-        }
+                if (children)
+                    return getOrCreateFolder(children, path);
+            }
 
-        function addChildren(fullClsName) {
-            const parts = fullClsName.split('.');
+            children = {type: 'folder', name: leaf, children: []};
 
-            const shortClsName = parts.pop() + '.java';
+            node.children.push(children);
 
-            let lastFolder = javaFolder;
+            node.children = _.sortByOrder(node.children, ['type', 'name'], ['desc', 'asc']);
 
-            _.forEach(parts, (part) => {
-                const folder = findFolder(javaFolder, part);
+            return getOrCreateFolder(children, path);
+        }
 
-                if (!folder) {
-                    const newLastFolder = {type: 'folder', name: part, children: []};
+        function addClass(fullClsName) {
+            const path = fullClsName.split('.');
 
-                    lastFolder.children.push(newLastFolder);
+            const shortClsName = path.pop() + '.java';
 
-                    lastFolder = newLastFolder;
-                }
-                else
-                    lastFolder = folder;
-            });
+            const folder = getOrCreateFolder(javaFolder, path);
 
-            lastFolder.children.push({type: 'file', name: shortClsName});
+            folder.children.push({type: 'file', name: shortClsName});
         }
 
         $scope.selectItem = (cluster) => {
@@ -199,9 +200,9 @@ export default [
                 _.forEach(cache.domains, (domain) => {
                     if (!$common.isEmptyArray(domain.keyFields)) {
                         if (!JavaTypes.isBuiltInClass(domain.keyType))
-                            addChildren(domain.keyType);
+                            addClass(domain.keyType);
 
-                        addChildren(domain.valueType);
+                        addClass(domain.valueType);
                     }
                 });
             });

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec0f9148/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 18dc326..bd947a1 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -1767,18 +1767,17 @@ treecontrol.tree-classic {
     }
 
     li {
-        padding-left: 17px;
+        padding-left: 15px;
     }
 
-
-    li.tree-expanded i.fa, li.tree-collapsed i.fa, li.tree-leaf i.fa {
+    li.tree-expanded i.tree-branch-head.fa, li.tree-collapsed i.tree-branch-head.fa, li.tree-leaf i.tree-branch-head.fa, .tree-label i.fa {
         background: none no-repeat;
         padding: 1px 5px 1px 1px;
     }
 
     li.tree-leaf i.tree-leaf-head {
-        background: none no-repeat;
-        padding: 0;
+        background: none no-repeat !important;
+        padding: 0 !important;
     }
 
     li .tree-selected {

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec0f9148/modules/control-center-web/src/main/js/views/configuration/summary-project-structure.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/summary-project-structure.jade b/modules/control-center-web/src/main/js/views/configuration/summary-project-structure.jade
index 80249d5..33e7bc4 100644
--- a/modules/control-center-web/src/main/js/views/configuration/summary-project-structure.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/summary-project-structure.jade
@@ -19,7 +19,7 @@
         treecontrol.tree-classic(tree-model='projectStructure' options='projectStructureOptions' expanded-nodes='projectStructureExpanded')
             span(ng-switch='' on='node.type')
                 span(ng-switch-when='folder')
-                    label {{node.title ? node.title : node.name}}
+                    label {{node.name}}
                 span(ng-switch-when='file')
                     i.fa.fa-file-text-o
                     label {{node.name}}


[3/3] ignite git commit: IGNITE-843 Generator fixes.

Posted by an...@apache.org.
IGNITE-843 Generator fixes.


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

Branch: refs/heads/ignite-843-rc3
Commit: 1dccb656dbbde5f3f8763904037fba790e3e187c
Parents: ec0f914
Author: Vasiliy Sisko <vs...@gridgain.com>
Authored: Tue Jan 26 18:06:04 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Tue Jan 26 18:06:04 2016 +0700

----------------------------------------------------------------------
 .../main/js/helpers/generator/generator-java.js |  2 +-
 .../main/js/helpers/generator/generator-xml.js  | 22 +++++++++++++++-----
 2 files changed, 18 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1dccb656/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 abb2b4a..fefc6d1 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
@@ -320,7 +320,7 @@ $generatorJava.beanProperty = function (res, varName, bean, beanPropName, beanVa
                             break;
 
                         case 'enum':
-                            $generatorJava.property(res, beanVarName, bean, propName, descr.enumClass, descr.setterName);
+                            $generatorJava.property(res, beanVarName, bean, propName, descr.enumClass, descr.setterName, descr.dflt);
                             break;
 
                         case 'float':

http://git-wip-us.apache.org/repos/asf/ignite/blob/1dccb656/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 a4925cf..67024c9 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
@@ -143,10 +143,15 @@ $generatorXml.beanProperty = function (res, bean, beanPropName, desc, createBean
     var props = desc.fields;
 
     if (bean && $commonUtils.hasProperty(bean, props)) {
-        res.startSafeBlock();
+        if (!createBeanAlthoughNoProps)
+            res.startSafeBlock();
 
         res.emptyLineIfNeeded();
         res.startBlock('<property name="' + beanPropName + '">');
+
+        if (createBeanAlthoughNoProps)
+            res.startSafeBlock();
+
         res.startBlock('<bean class="' + desc.className + '">');
 
         var hasData = false;
@@ -211,16 +216,23 @@ $generatorXml.beanProperty = function (res, bean, beanPropName, desc, createBean
         });
 
         res.endBlock('</bean>');
+
+        if (createBeanAlthoughNoProps && !hasData) {
+            res.rollbackSafeBlock();
+
+            res.line('<bean class="' + desc.className + '"/>');
+        }
+
         res.endBlock('</property>');
 
-        if (!hasData)
+        if (!createBeanAlthoughNoProps && !hasData)
             res.rollbackSafeBlock();
     }
     else if (createBeanAlthoughNoProps) {
         res.emptyLineIfNeeded();
-        res.line('<property name="' + beanPropName + '">');
-        res.line('    <bean class="' + desc.className + '"/>');
-        res.line('</property>');
+        res.startBlock('<property name="' + beanPropName + '">');
+        res.line('<bean class="' + desc.className + '"/>');
+        res.endBlock('</property>');
     }
 };