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 2015/07/09 08:01:58 UTC

[1/6] incubator-ignite git commit: # ignite-843 Refactor

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 6f91bb827 -> 36063e133


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/routes/generator/xml.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/routes/generator/xml.js b/modules/web-control-center/nodejs/routes/generator/xml.js
new file mode 100644
index 0000000..500a7e7
--- /dev/null
+++ b/modules/web-control-center/nodejs/routes/generator/xml.js
@@ -0,0 +1,559 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var _ = require('lodash');
+
+var generatorUtils = require("./common");
+var dataStructures = require("../../helpers/data-structures.js");
+
+exports.generateClusterConfiguration = function(cluster) {
+    var res = generatorUtils.builder();
+
+    res.datasources = [];
+    res.deep = 1;
+
+    // Generate Ignite Configuration.
+    res.startBlock('<bean class="org.apache.ignite.configuration.IgniteConfiguration">');
+
+    // Generate discovery.
+    if (cluster.discovery) {
+        res.startBlock('<property name="discoverySpi">');
+        res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">');
+        res.startBlock('<property name="ipFinder">');
+
+        var d = cluster.discovery;
+
+        switch (d.kind) {
+            case 'Multicast':
+                res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">');
+
+                addProperty(res, d.Multicast, 'multicastGroup');
+                addProperty(res, d.Multicast, 'multicastPort');
+                addProperty(res, d.Multicast, 'responseWaitTime');
+                addProperty(res, d.Multicast, 'addressRequestAttempts');
+                addProperty(res, d.Multicast, 'localAddress');
+
+                res.endBlock('</bean>');
+
+                break;
+
+            case 'Vm':
+                if (d.Vm.addresses.length > 0) {
+                    res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">');
+
+                    addListProperty(res, d.Vm, 'addresses');
+
+                    res.endBlock('</bean>');
+                }
+                else {
+                    res.line('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"/>');
+                }
+
+                break;
+
+            case 'S3':
+                res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">');
+
+                if (d.S3 && d.S3.bucketName)
+                    res.line('<property name="bucketName" value="' + escapeAttr(d.S3.bucketName) + '" />');
+
+                res.endBlock('</bean>');
+
+                break;
+
+            case 'Cloud':
+                res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinder">');
+
+                addProperty(res, d.Cloud, 'credential');
+                addProperty(res, d.Cloud, 'credentialPath');
+                addProperty(res, d.Cloud, 'identity');
+                addProperty(res, d.Cloud, 'provider');
+                addListProperty(res, d.Cloud, 'regions');
+                addListProperty(res, d.Cloud, 'zones');
+
+                res.endBlock('</bean>');
+
+                break;
+
+            case 'GoogleStorage':
+                res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.gce.TcpDiscoveryGoogleStorageIpFinder">');
+
+                addProperty(res, d.GoogleStorage, 'projectName');
+                addProperty(res, d.GoogleStorage, 'bucketName');
+                addProperty(res, d.GoogleStorage, 'serviceAccountP12FilePath');
+
+                //if (d.GoogleStorage.addrReqAttempts) todo ????
+                //    res.line('<property name="serviceAccountP12FilePath" value="' + escapeAttr(d.GoogleStorage.addrReqAttempts) + '"/>');
+
+                res.endBlock('</bean>');
+
+                break;
+
+            case 'Jdbc':
+                res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder">');
+                res.line('<property name="initSchema" value="' + (d.Jdbc.initSchema != null || d.Jdbc.initSchema) + '"/>');
+                res.endBlock('</bean>');
+
+                break;
+
+            case 'SharedFs':
+                if (d.SharedFs.path) {
+                    res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder">');
+                    addProperty(res, d.SharedFs, 'path');
+                    res.endBlock('</bean>');
+                }
+                else {
+                    res.line('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder"/>');
+                }
+
+                break;
+
+            default:
+                throw "Unknown discovery kind: " + d.kind;
+        }
+
+        res.endBlock('</property>');
+        res.endBlock('</bean>');
+        res.endBlock('</property>');
+
+        res.needEmptyLine = true
+    }
+
+    // Generate atomics group.
+    addBeanWithProperties(res, cluster.atomicConfiguration, 'atomicConfiguration',
+        generatorUtils.atomicConfiguration.className, generatorUtils.atomicConfiguration.fields);
+    res.needEmptyLine = true;
+
+    // Generate communication group.
+    addProperty(res, cluster, 'networkTimeout');
+    addProperty(res, cluster, 'networkSendRetryDelay');
+    addProperty(res, cluster, 'networkSendRetryCount');
+    addProperty(res, cluster, 'segmentCheckFrequency');
+    addProperty(res, cluster, 'waitForSegmentOnStart');
+    addProperty(res, cluster, 'discoveryStartupDelay');
+    res.needEmptyLine = true;
+
+    // Generate deployment group.
+    addProperty(res, cluster, 'deploymentMode');
+    res.needEmptyLine = true;
+
+    // Generate events group.
+    if (cluster.includeEventTypes && cluster.includeEventTypes.length > 0) {
+        res.emptyLineIfNeeded();
+        
+        res.startBlock('<property name="includeEventTypes">');
+        
+        if (cluster.includeEventTypes.length == 1) {
+            res.line('<util:constant static-field="org.apache.ignite.events.EventType.' + cluster.includeEventTypes[0] + '"/>')
+        }
+        else {
+            res.startBlock('<array>');
+
+            for (i = 0; i < cluster.includeEventTypes.length; i++) {
+                if (i > 0)
+                    res.line();
+
+                var eventGroup = cluster.includeEventTypes[i];
+
+                res.line('<!-- EventType.' + eventGroup + ' -->');
+
+                var eventList = dataStructures.eventGroups[eventGroup];
+
+                for (var k = 0; k < eventList.length; k++) {
+                    res.line('<util:constant static-field="org.apache.ignite.events.EventType.' + eventList[k] + '"/>')
+                }
+            }
+
+            res.endBlock('</array>');
+        }
+        
+        res.endBlock('</property>');
+
+        res.needEmptyLine = true;
+    }
+
+    // Generate marshaller group.
+    addProperty(res, cluster, 'marshalLocalJobs');
+    addProperty(res, cluster, 'marshCacheKeepAliveTime');
+    addProperty(res, cluster, 'marshCachePoolSize');
+    res.needEmptyLine = true;
+
+    // Generate metrics group.
+    addProperty(res, cluster, 'metricsExpireTime');
+    addProperty(res, cluster, 'metricsHistorySize');
+    addProperty(res, cluster, 'metricsLogFrequency');
+    addProperty(res, cluster, 'metricsUpdateFrequency');
+    res.needEmptyLine = true;
+
+    // Generate PeerClassLoading group.
+    addProperty(res, cluster, 'peerClassLoadingEnabled');
+    addListProperty(res, cluster, 'peerClassLoadingLocalClassPathExclude');
+    addProperty(res, cluster, 'peerClassLoadingMissedResourcesCacheSize');
+    addProperty(res, cluster, 'peerClassLoadingThreadPoolSize');
+    res.needEmptyLine = true;
+
+    // Generate swap group.
+    if (cluster.swapSpaceSpi && cluster.swapSpaceSpi.kind == 'FileSwapSpaceSpi') {
+        addBeanWithProperties(res, cluster.swapSpaceSpi.FileSwapSpaceSpi, 'swapSpaceSpi',
+            generatorUtils.swapSpaceSpi.className, generatorUtils.swapSpaceSpi.fields, true);
+
+        res.needEmptyLine = true;
+    }
+
+    // Generate time group.
+    addProperty(res, cluster, 'clockSyncSamples');
+    addProperty(res, cluster, 'clockSyncFrequency');
+    addProperty(res, cluster, 'timeServerPortBase');
+    addProperty(res, cluster, 'timeServerPortRange');
+    res.needEmptyLine = true;
+
+    // Generate thread pools group.
+    addProperty(res, cluster, 'publicThreadPoolSize');
+    addProperty(res, cluster, 'systemThreadPoolSize');
+    addProperty(res, cluster, 'managementThreadPoolSize');
+    addProperty(res, cluster, 'igfsThreadPoolSize');
+    res.needEmptyLine = true;
+
+    // Generate transactions group.
+    addBeanWithProperties(res, cluster.transactionConfiguration, 'transactionConfiguration',
+        generatorUtils.transactionConfiguration.className, generatorUtils.transactionConfiguration.fields);
+    res.needEmptyLine = true;
+
+    // Generate utility group.
+    addProperty(res, cluster, 'utilityCacheKeepAliveTime');
+    addProperty(res, cluster, 'utilityCachePoolSize');
+
+    // Generate caches configs.
+    if (cluster.caches && cluster.caches.length > 0) {
+        res.emptyLineIfNeeded();
+
+        res.startBlock('<property name="cacheConfiguration">');
+        res.startBlock('<list>');
+
+        for (var i = 0; i < cluster.caches.length; i++) {
+            if (i > 0)
+                res.line();
+
+            generateCacheConfiguration(cluster.caches[i], res);
+        }
+
+        res.endBlock('</list>');
+        res.endBlock('</property>');
+
+        res.needEmptyLine = true;
+    }
+
+    res.endBlock('</bean>');
+
+    // Build final XML:
+    // 1. Add header.
+    var xml = '<?xml version="1.0" encoding="UTF-8"?>\n\n';
+
+    xml += '<!-- ' + generatorUtils.mainComment() + ' -->\n';
+    xml += '<beans xmlns="http://www.springframework.org/schema/beans"\n';
+    xml += '       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n';
+    xml += '       xmlns:util="http://www.springframework.org/schema/util"\n';
+    xml += '       xsi:schemaLocation="http://www.springframework.org/schema/beans\n';
+    xml += '                           http://www.springframework.org/schema/beans/spring-beans.xsd\n';
+    xml += '                           http://www.springframework.org/schema/util\n';
+    xml += '                           http://www.springframework.org/schema/util/spring-util.xsd">\n';
+
+    // 2. Add external property file and all data sources.
+    if (res.datasources.length > 0) {
+        xml += '    <!-- Load external properties file. -->\n';
+        xml += '    <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">\n';
+        xml += '        <property name="location" value="classpath:ignite.properties"/>\n';
+        xml += '    </bean>\n\n';
+
+        xml += '    <!-- Data source beans will be initialized from external properties file. -->\n';
+
+        _.forEach(res.datasources, function(item) {
+            var beanId = item.dataSourceBean;
+
+            xml += '    <bean id= "' + beanId + '" class="' + item.className + '">\n';
+            xml += '        <property name="URL" value="${' + beanId + '.jdbc.url}" />\n';
+            xml += '        <property name="user" value="${' + beanId + '.jdbc.username}" />\n';
+            xml += '        <property name="password" value="${' + beanId + '.jdbc.password}" />\n';
+            xml += '    </bean>\n\n';
+        });
+    }
+
+    // 3. Add main content.
+    xml += res.join('');
+
+    // 4. Add footer.
+    xml += '</beans>\n';
+
+    return xml;
+};
+
+function createEvictionPolicy(res, evictionPolicy, propertyName) {
+    if (evictionPolicy && evictionPolicy.kind) {
+        var e = generatorUtils.evictionPolicies[evictionPolicy.kind];
+
+        var obj = evictionPolicy[evictionPolicy.kind.toUpperCase()];
+
+        addBeanWithProperties(res, obj, propertyName, e.className, e.fields, true);
+    }
+}
+
+function generateCacheConfiguration(cacheCfg, res) {
+    if (!res)
+        res = generatorUtils.builder();
+
+    res.startBlock('<bean class="org.apache.ignite.configuration.CacheConfiguration">');
+
+    addProperty(res, cacheCfg, 'name');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, 'mode', 'cacheMode');
+
+    addProperty(res, cacheCfg, 'atomicityMode');
+    addProperty(res, cacheCfg, 'backups');
+    addProperty(res, cacheCfg, 'startSize');
+    addProperty(res, cacheCfg, 'readFromBackup');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, 'memoryMode');
+    addProperty(res, cacheCfg, 'offHeapMaxMemory');
+    addProperty(res, cacheCfg, 'swapEnabled');
+    addProperty(res, cacheCfg, 'copyOnRead');
+
+    res.needEmptyLine = true;
+
+    createEvictionPolicy(res, cacheCfg.evictionPolicy, 'evictionPolicy');
+
+    res.needEmptyLine = true;
+
+    if (cacheCfg.nearCacheEnabled) {
+        res.emptyLineIfNeeded();
+
+        res.startBlock('<property name="nearConfiguration">');
+        res.startBlock('<bean class="org.apache.ignite.configuration.NearCacheConfiguration">');
+
+        if (cacheCfg.nearConfiguration && cacheCfg.nearConfiguration.nearStartSize)
+            addProperty(res, cacheCfg.nearConfiguration, 'nearStartSize');
+
+        if (cacheCfg.nearConfiguration && cacheCfg.nearConfiguration.nearEvictionPolicy.kind)
+            createEvictionPolicy(res, cacheCfg.nearConfiguration.nearEvictionPolicy, 'nearEvictionPolicy');
+
+        res.endBlock('</bean>');
+        res.endBlock('</property>');
+    }
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, 'sqlEscapeAll');
+    addProperty(res, cacheCfg, 'sqlOnheapRowCacheSize');
+    addProperty(res, cacheCfg, 'longQueryWarningTimeout');
+
+    if (cacheCfg.indexedTypes && cacheCfg.indexedTypes.length > 0) {
+        res.startBlock('<property name="indexedTypes">');
+        res.startBlock('<array>');
+
+        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.endBlock('</array>');
+        res.endBlock('</property>');
+    }
+
+    addListProperty(res, cacheCfg, 'sqlFunctionClasses', 'array');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, 'rebalanceMode');
+    addProperty(res, cacheCfg, 'rebalanceThreadPoolSize');
+    addProperty(res, cacheCfg, 'rebalanceBatchSize');
+    addProperty(res, cacheCfg, 'rebalanceOrder');
+    addProperty(res, cacheCfg, 'rebalanceDelay');
+    addProperty(res, cacheCfg, 'rebalanceTimeout');
+    addProperty(res, cacheCfg, 'rebalanceThrottle');
+
+    res.needEmptyLine = true;
+
+    if (cacheCfg.cacheStoreFactory && cacheCfg.cacheStoreFactory.kind) {
+        var storeFactory = cacheCfg.cacheStoreFactory[cacheCfg.cacheStoreFactory.kind];
+        var data = generatorUtils.storeFactories[cacheCfg.cacheStoreFactory.kind];
+
+        addBeanWithProperties(res, storeFactory, 'cacheStoreFactory', data.className, data.fields, true);
+
+        if (storeFactory.dialect) {
+            if (_.findIndex(res.datasources, function (ds) {
+                    return ds.dataSourceBean == storeFactory.dataSourceBean;
+                }) < 0) {
+                res.datasources.push({
+                    dataSourceBean: storeFactory.dataSourceBean,
+                    className: generatorUtils.dataSources[storeFactory.dialect]
+                });
+            }
+        }
+    }
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, 'loadPreviousValue');
+    addProperty(res, cacheCfg, 'readThrough');
+    addProperty(res, cacheCfg, 'writeThrough');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, 'invalidate');
+    addProperty(res, cacheCfg, 'defaultLockTimeout');
+    addProperty(res, cacheCfg, 'transactionManagerLookupClassName');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, 'writeBehindEnabled');
+    addProperty(res, cacheCfg, 'writeBehindBatchSize');
+    addProperty(res, cacheCfg, 'writeBehindFlushSize');
+    addProperty(res, cacheCfg, 'writeBehindFlushFrequency');
+    addProperty(res, cacheCfg, 'writeBehindFlushThreadCount');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, 'statisticsEnabled');
+    addProperty(res, cacheCfg, 'managementEnabled');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, 'maxConcurrentAsyncOperations');
+    
+    res.endBlock('</bean>');
+
+    return res;
+}
+
+exports.generateCacheConfiguration = generateCacheConfiguration;
+
+function addProperty(res, obj, propName, setterName) {
+    var val = obj[propName];
+
+    if (val) {
+        res.emptyLineIfNeeded();
+
+        res.line('<property name="' + (setterName ? setterName : propName) + '" value="' + escapeAttr(val) + '"/>');
+    }
+}
+
+function addBeanWithProperties(res, bean, beanPropName, beanClass, props, createBeanAlthoughNoProps) {
+    if (!bean)
+        return;
+
+    if (generatorUtils.hasProperty(bean, props)) {
+        res.emptyLineIfNeeded();
+        res.startBlock('<property name="' + beanPropName + '">');
+        res.startBlock('<bean class="' + beanClass + '">');
+
+        for (var propName in props) {
+            if (props.hasOwnProperty(propName)) {
+                var descr = props[propName];
+
+                if (descr) {
+                    if (descr.type == 'list') {
+                        addListProperty(res, bean, propName, descr.setterName);
+                    }
+                    else if (descr.type == 'className') {
+                        if (bean[propName]) {
+                            res.startBlock('<property name="' + propName + '">');
+                            res.line('<bean class="' + generatorUtils.knownClasses[bean[propName]].className + '"/>');
+                            res.endBlock('</property>');
+                        }
+                    }
+                    else if (descr.type == 'propertiesAsList') {
+                        var val = bean[propName];
+
+                        if (val && val.length > 0) {
+                            res.startBlock('<property name="' + propName + '">');
+                            res.startBlock('<props>');
+
+                            for (var i = 0; i < val.length; i++) {
+                                var nameAndValue = val[i];
+
+                                var eqIndex = nameAndValue.indexOf('=');
+                                if (eqIndex >= 0) {
+                                    res.line('<prop key="' + escapeAttr(nameAndValue.substring(0, eqIndex)) + '">' +
+                                            + escape(nameAndValue.substr(eqIndex + 1)) + '</prop>');
+                                }
+                            }
+
+                            res.endBlock('</props>');
+                            res.endBlock('</property>');
+                        }
+                    }
+                    else {
+                        addProperty(res, bean, propName, descr.setterName);
+                    }
+                }
+                else {
+                    addProperty(res, bean, propName);
+                }
+            }
+        }
+
+        res.endBlock('</bean>');
+        res.endBlock('</property>');
+    }
+    else if (createBeanAlthoughNoProps) {
+        res.emptyLineIfNeeded();
+        res.line('<property name="' + beanPropName + '">');
+        res.line('    <bean class="' + beanClass + '"/>');
+        res.line('</property>');
+    }
+}
+function addListProperty(res, obj, propName, listType, rowFactory) {
+    var val = obj[propName];
+
+    if (val && val.length > 0) {
+        res.emptyLineIfNeeded();
+
+        if (!listType)
+            listType = 'list';
+
+        if (!rowFactory)
+            rowFactory = function(val) { return '<value>' + escape(val) + '</value>' };
+
+        res.startBlock('<property name="' + propName + '">');
+        res.startBlock('<' + listType + '>');
+
+        for (var i = 0; i < val.length; i++)
+            res.line(rowFactory(val[i]));
+
+        res.endBlock('</' + listType + '>');
+        res.endBlock('</property>');
+    }
+}
+
+function escapeAttr(s) {
+    if (typeof(s) != 'string')
+        return s;
+
+    return s.replace(/&/g, '&amp;').replace(/"/g, '&quot;');
+}
+
+function escape(s) {
+    if (typeof(s) != 'string')
+        return s;
+
+    return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/routes/persistences.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/routes/persistences.js b/modules/web-control-center/nodejs/routes/persistences.js
index a3bb1d2..1f0fc24 100644
--- a/modules/web-control-center/nodejs/routes/persistences.js
+++ b/modules/web-control-center/nodejs/routes/persistences.js
@@ -17,7 +17,7 @@
 
 var router = require('express').Router();
 var db = require('../db');
-var ds = require('../public/javascripts/dataStructures.js'), jdbcTypes = ds.jdbcTypes, javaTypes = ds.javaTypes;
+var ds = require('../helpers/data-structures.js'), jdbcTypes = ds.jdbcTypes, javaTypes = ds.javaTypes;
 
 /* GET persistence page. */
 router.get('/', function(req, res) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/routes/profile.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/routes/profile.js b/modules/web-control-center/nodejs/routes/profile.js
index f9ba260..d19394b 100644
--- a/modules/web-control-center/nodejs/routes/profile.js
+++ b/modules/web-control-center/nodejs/routes/profile.js
@@ -17,7 +17,7 @@
 
 var router = require('express').Router();
 var db = require('../db');
-var uiUtils = require('../utils/ui-utils');
+var uiUtils = require('../helpers/ui-utils');
 
 /**
  * Get list of user accounts.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/routes/summary.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/routes/summary.js b/modules/web-control-center/nodejs/routes/summary.js
index 7c3f9de..71c9489 100644
--- a/modules/web-control-center/nodejs/routes/summary.js
+++ b/modules/web-control-center/nodejs/routes/summary.js
@@ -19,8 +19,8 @@ var db = require('../db');
 
 var router = require('express').Router();
 
-var generatorXml = require('./../generator/xml');
-var generatorJava = require('./../generator/java');
+var generatorXml = require('./generator/xml');
+var generatorJava = require('./generator/java');
 
 /* GET summary page. */
 router.get('/', function(req, res) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/test/routes/persistence.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/test/routes/persistence.js b/modules/web-control-center/nodejs/test/routes/persistence.js
deleted file mode 100644
index e5d8390..0000000
--- a/modules/web-control-center/nodejs/test/routes/persistence.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var request = require('supertest'),
-    should = require('should'),
-    express = require('express'),
-    persistenceRouter = require('../../routes/persistences');
-
-var app = express();
-
-app.use(require('body-parser').json());
-
-app.use('/rest/persistence', persistenceRouter);
-
-describe('request.persistence', function(){
-    var agent = request.agent(app);
-
-    it('should return 200', function(done){
-        agent
-            .post('/rest/persistence/pg')
-            .send({
-                    username: 'nva',
-                    password: 'nva.141',
-                    host: 'localhost',
-                    port: '5432',
-                    dbName: 'ggmonitor'
-                })
-            .end(function(err, res) {
-                if (err)
-                    throw err;
-
-                done();
-            });
-    });
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/tests/routes/persistence.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/tests/routes/persistence.js b/modules/web-control-center/nodejs/tests/routes/persistence.js
new file mode 100644
index 0000000..e5d8390
--- /dev/null
+++ b/modules/web-control-center/nodejs/tests/routes/persistence.js
@@ -0,0 +1,32 @@
+var request = require('supertest'),
+    should = require('should'),
+    express = require('express'),
+    persistenceRouter = require('../../routes/persistences');
+
+var app = express();
+
+app.use(require('body-parser').json());
+
+app.use('/rest/persistence', persistenceRouter);
+
+describe('request.persistence', function(){
+    var agent = request.agent(app);
+
+    it('should return 200', function(done){
+        agent
+            .post('/rest/persistence/pg')
+            .send({
+                    username: 'nva',
+                    password: 'nva.141',
+                    host: 'localhost',
+                    port: '5432',
+                    dbName: 'ggmonitor'
+                })
+            .end(function(err, res) {
+                if (err)
+                    throw err;
+
+                done();
+            });
+    });
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/utils/ui-utils.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/utils/ui-utils.js b/modules/web-control-center/nodejs/utils/ui-utils.js
deleted file mode 100644
index e9e680b..0000000
--- a/modules/web-control-center/nodejs/utils/ui-utils.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-exports.filterUser = function (user) {
-    if (!user)
-        return null;
-
-    return {
-        _id: user._id,
-        username: user.username,
-        lastLogin: user.lastLogin,
-        admin: user.admin,
-        email: user.email
-    }
-};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/admin/index.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/admin/index.jade b/modules/web-control-center/nodejs/views/admin/index.jade
new file mode 100644
index 0000000..f667976
--- /dev/null
+++ b/modules/web-control-center/nodejs/views/admin/index.jade
@@ -0,0 +1,21 @@
+//-
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+         http://www.apache.org/licenses/LICENSE-2.0
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+extends ../templates/layout
+
+append scripts
+    script(src='/admin-controller.js')
+    script(src='//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js')
+
+block container
+    include userList_content.html

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/admin/userList.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/admin/userList.jade b/modules/web-control-center/nodejs/views/admin/userList.jade
deleted file mode 100644
index af2dbd4..0000000
--- a/modules/web-control-center/nodejs/views/admin/userList.jade
+++ /dev/null
@@ -1,21 +0,0 @@
-//-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-         http://www.apache.org/licenses/LICENSE-2.0
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-extends ../layout
-
-append scripts
-    script(src='/javascripts/controllers/adminController.js')
-    script(src='//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js')
-
-block container
-    include userList_content.html

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/caches.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/caches.jade b/modules/web-control-center/nodejs/views/caches.jade
index 9fc8957..9ffcb29 100644
--- a/modules/web-control-center/nodejs/views/caches.jade
+++ b/modules/web-control-center/nodejs/views/caches.jade
@@ -14,10 +14,10 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-extends layout-sidebar
+extends templates/layout-sidebar
 
 append scripts
-    script(src='/javascripts/controllers/caches.js')
+    script(src='/caches-controller.js')
 
 include includes/controls
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/clients.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/clients.jade b/modules/web-control-center/nodejs/views/clients.jade
index 6b55449..87cfc10 100644
--- a/modules/web-control-center/nodejs/views/clients.jade
+++ b/modules/web-control-center/nodejs/views/clients.jade
@@ -14,7 +14,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-extends layout-sidebar
+extends templates/layout-sidebar
 block head
 block content
     .docs-header
@@ -23,4 +23,4 @@ block content
         hr
     .docs-body(ng-controller='clientsRouter')
 block body
-    script(src='/javascripts/controllers/clients.js')
\ No newline at end of file
+    script(src='/clients.js')
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/clusters.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/clusters.jade b/modules/web-control-center/nodejs/views/clusters.jade
index c654b4a..a6f5ab8 100644
--- a/modules/web-control-center/nodejs/views/clusters.jade
+++ b/modules/web-control-center/nodejs/views/clusters.jade
@@ -14,10 +14,10 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-extends layout-sidebar
+extends templates/layout-sidebar
 
 append scripts
-    script(src='/javascripts/controllers/clusters.js')
+    script(src='/clusters-controller.js')
 
 include includes/controls
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/error.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/error.jade b/modules/web-control-center/nodejs/views/error.jade
index cfa2ad1..b458fb7 100644
--- a/modules/web-control-center/nodejs/views/error.jade
+++ b/modules/web-control-center/nodejs/views/error.jade
@@ -14,7 +14,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-extends layout
+extends templates/layout
 
 block container
   h1= message

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/includes/header.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/includes/header.jade b/modules/web-control-center/nodejs/views/includes/header.jade
index b09525e..1be7acc 100644
--- a/modules/web-control-center/nodejs/views/includes/header.jade
+++ b/modules/web-control-center/nodejs/views/includes/header.jade
@@ -23,7 +23,7 @@ header.header(id='header')
                 li
                     a(ng-class="{active: isActive('/configuration')}" href='/configuration/clusters') Configuration
                 li(ng-if='loggedInUser && loggedInUser.admin')
-                    a(ng-class="{active: isActive('/admin')}" href='/admin/userList') Administration
+                    a(ng-class="{active: isActive('/admin')}" href='/admin') Administration
                 //li
                 //    a(ng-class="{active: isActive('/sql')}" href='/sql') SQL
             ul.nav.navbar-nav.pull-right

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/index.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/index.jade b/modules/web-control-center/nodejs/views/index.jade
index b913fb0..55fe816 100644
--- a/modules/web-control-center/nodejs/views/index.jade
+++ b/modules/web-control-center/nodejs/views/index.jade
@@ -14,7 +14,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-extends layout
+extends templates/layout
 block container
     .row
         .docs-content

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/layout-sidebar.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/layout-sidebar.jade b/modules/web-control-center/nodejs/views/layout-sidebar.jade
deleted file mode 100644
index 36c778b..0000000
--- a/modules/web-control-center/nodejs/views/layout-sidebar.jade
+++ /dev/null
@@ -1,37 +0,0 @@
-//-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
-extends layout
-
-block container
-    .row
-        .col-sm-2.border-right.section-left.greedy
-            .sidebar-nav
-                ul.menu(ng-controller='activeLink')
-                    li
-                        a(ng-class="{active: isActive('/configuration/clusters')}" href='/configuration/clusters') Clusters
-                    li
-                        a(ng-class="{active: isActive('/configuration/caches')}" href='/configuration/caches') Caches
-                    //li
-                    //    a(ng-class="{active: isActive('/persistence')}" href='/persistence') Persistence
-                    //li
-                    //    a(ng-class="{active: isActive('/clients')}" href='/clients') Clients
-                    li
-                        p
-                        a(ng-class="{active: isActive('/configuration/summary')}" href='/configuration/summary') Summary
-        .col-sm-10.border-left.section-right
-            .docs-content
-                block content
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/layout.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/layout.jade b/modules/web-control-center/nodejs/views/layout.jade
deleted file mode 100644
index 86d2bc7..0000000
--- a/modules/web-control-center/nodejs/views/layout.jade
+++ /dev/null
@@ -1,59 +0,0 @@
-//-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
-doctype html
-html(ng-app='ignite-web-control-center', ng-init='loggedInUser = #{JSON.stringify(filterUser(user))}; viewedUser = #{JSON.stringify(viewedUser)}')
-    head
-        title= title
-
-        block css
-            // Bootstrap
-            link(rel='stylesheet', href='//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/css/bootstrap.css')
-
-            // Font Awesome Icons
-            link(rel='stylesheet', href='//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css')
-
-            // Font
-            link(rel='stylesheet', href='//fonts.googleapis.com/css?family=Roboto+Slab:700:serif|Roboto+Slab:400:serif')
-
-            link(rel='stylesheet', href='/stylesheets/style.css')
-
-        block scripts
-            script(src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js')
-
-            script(src='//cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.0/lodash.min.js')
-
-            script(src='//ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js')
-            script(src='//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.15/angular-sanitize.js')
-            script(src='//cdnjs.cloudflare.com/ajax/libs/angular-strap/2.2.2/angular-strap.js')
-            script(src='//cdnjs.cloudflare.com/ajax/libs/angular-strap/2.2.2/angular-strap.tpl.min.js')
-
-            script(src='https://cdnjs.cloudflare.com/ajax/libs/angular-smart-table/2.0.3/smart-table.js')
-
-            script(src='/javascripts/controllers/common.js')
-            script(src='/javascripts/dataStructures.js')
-
-            script(src='/javascripts/bundle.js')
-    body.theme-line.body-overlap
-        .wrapper
-            include includes/header
-
-            .container.body-container
-                .main-content
-                    .main-head
-                        block container
-
-            include includes/footer

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/persistence.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/persistence.jade b/modules/web-control-center/nodejs/views/persistence.jade
index 84b1616..b456b17 100644
--- a/modules/web-control-center/nodejs/views/persistence.jade
+++ b/modules/web-control-center/nodejs/views/persistence.jade
@@ -14,10 +14,10 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-extends layout-sidebar
+extends templates/layout-sidebar
 
 append scripts
-    script(src='/javascripts/controllers/persistences.js')
+    script(src='/persistences-controller.js')
 
 include includes/controls
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/profile.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/profile.jade b/modules/web-control-center/nodejs/views/profile.jade
index 34e71f9..0e5268d 100644
--- a/modules/web-control-center/nodejs/views/profile.jade
+++ b/modules/web-control-center/nodejs/views/profile.jade
@@ -14,7 +14,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-extends layout-sidebar
+extends templates/layout-sidebar
 
 block content
     .docs-header(ng-init='editableUser = #{JSON.stringify(filterUser(editableUser))}')

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/sql.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/sql.jade b/modules/web-control-center/nodejs/views/sql.jade
index a816251..93e2893 100644
--- a/modules/web-control-center/nodejs/views/sql.jade
+++ b/modules/web-control-center/nodejs/views/sql.jade
@@ -14,7 +14,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-extends layout
+extends templates/layout
 
 block container
     .docs-header

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/summary.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/summary.jade b/modules/web-control-center/nodejs/views/summary.jade
index a6ecd92..3762822 100644
--- a/modules/web-control-center/nodejs/views/summary.jade
+++ b/modules/web-control-center/nodejs/views/summary.jade
@@ -14,10 +14,11 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-extends layout-sidebar
+extends templates/layout-sidebar
 
 append scripts
-    script(src='/javascripts/controllers/summary.js')
+    script(src='/summary-controller.js')
+
     script(src='//cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shCore.min.js')    
     script(src='//cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushXml.js')    
     script(src='//cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushJava.js')

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/templates/layout-sidebar.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/templates/layout-sidebar.jade b/modules/web-control-center/nodejs/views/templates/layout-sidebar.jade
new file mode 100644
index 0000000..36c778b
--- /dev/null
+++ b/modules/web-control-center/nodejs/views/templates/layout-sidebar.jade
@@ -0,0 +1,37 @@
+//-
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+extends layout
+
+block container
+    .row
+        .col-sm-2.border-right.section-left.greedy
+            .sidebar-nav
+                ul.menu(ng-controller='activeLink')
+                    li
+                        a(ng-class="{active: isActive('/configuration/clusters')}" href='/configuration/clusters') Clusters
+                    li
+                        a(ng-class="{active: isActive('/configuration/caches')}" href='/configuration/caches') Caches
+                    //li
+                    //    a(ng-class="{active: isActive('/persistence')}" href='/persistence') Persistence
+                    //li
+                    //    a(ng-class="{active: isActive('/clients')}" href='/clients') Clients
+                    li
+                        p
+                        a(ng-class="{active: isActive('/configuration/summary')}" href='/configuration/summary') Summary
+        .col-sm-10.border-left.section-right
+            .docs-content
+                block content
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/views/templates/layout.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/templates/layout.jade b/modules/web-control-center/nodejs/views/templates/layout.jade
new file mode 100644
index 0000000..1bc75e4
--- /dev/null
+++ b/modules/web-control-center/nodejs/views/templates/layout.jade
@@ -0,0 +1,58 @@
+//-
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+doctype html
+html(ng-app='ignite-web-control-center', ng-init='loggedInUser = #{JSON.stringify(filterUser(user))}; viewedUser = #{JSON.stringify(viewedUser)}')
+    head
+        title= title
+
+        block css
+            // Bootstrap
+            link(rel='stylesheet', href='//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/css/bootstrap.css')
+
+            // Font Awesome Icons
+            link(rel='stylesheet', href='//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css')
+
+            // Font
+            link(rel='stylesheet', href='//fonts.googleapis.com/css?family=Roboto+Slab:700:serif|Roboto+Slab:400:serif')
+
+            link(rel='stylesheet', href='/stylesheets/style.css')
+
+        block scripts
+            script(src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js')
+
+            script(src='//cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.0/lodash.min.js')
+
+            script(src='//ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js')
+            script(src='//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.15/angular-sanitize.js')
+            script(src='//cdnjs.cloudflare.com/ajax/libs/angular-strap/2.2.2/angular-strap.js')
+            script(src='//cdnjs.cloudflare.com/ajax/libs/angular-strap/2.2.2/angular-strap.tpl.min.js')
+
+            script(src='https://cdnjs.cloudflare.com/ajax/libs/angular-smart-table/2.0.3/smart-table.js')
+
+            script(src='/common-module.js')
+            script(src='/data-structures.js')
+
+    body.theme-line.body-overlap
+        .wrapper
+            include ../includes/header
+
+            .container.body-container
+                .main-content
+                    .main-head
+                        block container
+
+            include ../includes/footer


[3/6] incubator-ignite git commit: # ignite-843 Refactor

Posted by an...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/form-models/clusters.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/form-models/clusters.json b/modules/web-control-center/nodejs/public/form-models/clusters.json
deleted file mode 100644
index e6be772..0000000
--- a/modules/web-control-center/nodejs/public/form-models/clusters.json
+++ /dev/null
@@ -1,891 +0,0 @@
-{
-  "templateTip": [
-    "Use following template for add cluster:",
-    "<ul>",
-    "  <li>blank - Empty configuration.</li>",
-    "  <li>local - Configuration with static ips discovery and pre-configured list of IP addresses.</li>",
-    "  <li>multicast - Configuration with multicast discovery.</li>",
-    "</ul>"
-  ],
-  "general": [
-    {
-      "label": "Name",
-      "type": "text",
-      "model": "name",
-      "required": true,
-      "placeholder": "Input name"
-    },
-    {
-      "label": "Caches",
-      "type": "dropdown-multiple",
-      "model": "caches",
-      "placeholder": "Choose caches",
-      "items": "caches",
-      "tip": [
-        "Select caches to start in cluster."
-      ],
-      "addLink": {
-        "label": "Add cache(s)",
-        "ref": "/caches"
-      }
-    },
-    {
-      "label": "Discovery",
-      "type": "dropdown-details",
-      "path": "discovery",
-      "model": "kind",
-      "required": true,
-      "placeholder": "Choose discovery",
-      "items": "discoveries",
-      "tip": [
-        "Discovery allows to discover remote nodes in grid."
-      ],
-      "details": {
-        "Vm": {
-          "expanded": true,
-          "fields": [
-            {
-              "type": "table-simple",
-              "path": "discovery.Vm",
-              "model": "addresses",
-              "editIdx": -1,
-              "reordering": true,
-              "ipaddress": true,
-              "placeholder": "IP address:port",
-              "tip": [
-                "Addresses may be represented as follows:",
-                "<ul>",
-                "  <li>IP address (e.g. 127.0.0.1, 9.9.9.9, etc);</li>",
-                "  <li>IP address and port (e.g. 127.0.0.1:47500, 9.9.9.9:47501, etc);</li>",
-                "  <li>IP address and port range (e.g. 127.0.0.1:47500..47510, 9.9.9.9:47501..47504, etc);</li>",
-                "  <li>Hostname (e.g. host1.com, host2, etc);</li>",
-                "  <li>Hostname and port (e.g. host1.com:47500, host2:47502, etc).</li>",
-                "  <li>Hostname and port range (e.g. host1.com:47500..47510, host2:47502..47508, etc).</li>",
-                "</ul>",
-                "If port is 0 or not provided then default port will be used (depends on discovery SPI configuration).",
-                "If port range is provided (e.g. host:port1..port2) the following should be considered:",
-                "<ul>",
-                "  <li>port1 < port2 should be true;</li>",
-                "  <li>Both port1 and port2 should be greater than 0.</li>",
-                "</ul>"
-              ]
-            }
-          ]
-        },
-        "Multicast": {
-          "expanded": false,
-          "fields": [
-            {
-              "label": "IP address",
-              "type": "text",
-              "path": "discovery.Multicast",
-              "model": "multicastGroup",
-              "placeholder": "228.1.2.4",
-              "tip": [
-                "IP address of multicast group."
-              ]
-            },
-            {
-              "label": "Port number",
-              "type": "number",
-              "path": "discovery.Multicast",
-              "model": "multicastPort",
-              "max": 65535,
-              "placeholder": "47400",
-              "tip": [
-                "Port number which multicast messages are sent to."
-              ]
-            },
-            {
-              "label": "Waits for reply",
-              "type": "number",
-              "path": "discovery.Multicast",
-              "model": "responseWaitTime",
-              "placeholder": "500",
-              "tip": [
-                "Time in milliseconds IP finder waits for reply to multicast address request."
-              ]
-            },
-            {
-              "label": "Attempts count",
-              "type": "number",
-              "path": "discovery.Multicast",
-              "model": "addressRequestAttempts",
-              "placeholder": "2",
-              "tip": [
-                "Number of attempts to send multicast address request.",
-                "IP finder re-sends request only in case if no reply for previous request is received."
-              ]
-            },
-            {
-              "label": "Local address",
-              "type": "text",
-              "path": "discovery.Multicast",
-              "model": "localAddress",
-              "tip": [
-                "Local host address used by this IP finder.",
-                "If provided address is non-loopback then multicast socket is bound to this interface.",
-                "If local address is not set or is any local address then IP finder creates multicast sockets for all found non-loopback addresses."
-              ]
-            }
-          ]
-        },
-        "S3": {
-          "expanded": true,
-          "fields": [
-            {
-              "label": "Bucket name",
-              "type": "text",
-              "required": true,
-              "path": "discovery.S3",
-              "model": "bucketName",
-              "placeholder": "",
-              "tip": [
-                "Bucket name for IP finder."
-              ]
-            }
-          ]
-        },
-        "Cloud": {
-          "expanded": true,
-          "fields": [
-            {
-              "label": "Credential",
-              "type": "text",
-              "path": "discovery.Cloud",
-              "model": "credential",
-              "placeholder": "",
-              "tip": [
-                "Credential that is used during authentication on the cloud.",
-                "Depending on a cloud platform it can be a password or access key."
-              ]
-            },
-            {
-              "label": "Path to credential",
-              "type": "text",
-              "path": "discovery.Cloud",
-              "model": "credentialPath",
-              "placeholder": "",
-              "tip": [
-                "Path to a credential that is used during authentication on the cloud.",
-                "Access key or private key should be stored in a plain or PEM file without a passphrase."
-              ]
-            },
-            {
-              "label": "Identity",
-              "type": "text",
-              "required": true,
-              "path": "discovery.Cloud",
-              "model": "identity",
-              "placeholder": "",
-              "tip": [
-                "Identity that is used as a user name during a connection to the cloud.",
-                "Depending on a cloud platform it can be an email address, user name, etc."
-              ]
-            },
-            {
-              "label": "Provider",
-              "type": "text",
-              "required": true,
-              "path": "discovery.Cloud",
-              "model": "provider",
-              "placeholder": "",
-              "tip": [
-                "Cloud provider to use."
-              ]
-            },
-            {
-              "label": "Regions",
-              "type": "table-simple",
-              "path": "discovery.Cloud",
-              "model": "regions",
-              "editIdx": -1,
-              "placeholder": "",
-              "tableTip": [
-                "List of regions where VMs are located.",
-                "If the regions are not set then every region, that a cloud provider has, will be investigated. This could lead to significant performance degradation.",
-                "Note, that some cloud providers, like Google Compute Engine, doesn't have a notion of a region. For such providers a call to this method is redundant."
-              ],
-              "tip": [
-                "Region where VMs are located."
-              ]
-            },
-            {
-              "label": "Zones",
-              "type": "table-simple",
-              "path": "discovery.Cloud",
-              "model": "zones",
-              "editIdx": -1,
-              "placeholder": "",
-              "tableTip": [
-                "List of zones where VMs are located.",
-                "If the zones are not set then every zone from regions, set by {@link #setRegions(Collection)}}, will be taken into account.",
-                "Note, that some cloud providers, like Rackspace, doesn't have a notion of a zone. For such providers a call to this method is redundant."
-              ],
-              "tip": [
-                "Zone where VMs are located."
-              ]
-            }
-          ]
-        },
-        "GoogleStorage": {
-          "expanded": true,
-          "fields": [
-            {
-              "label": "Project name",
-              "type": "text",
-              "required": true,
-              "path": "discovery.GoogleStorage",
-              "model": "projectName",
-              "placeholder": "",
-              "tip": [
-                "Google Cloud Platforms project name.",
-                "Usually this is an auto generated project number (ex. 208709979073) that can be found in 'Overview' section of Google Developer Console."
-              ]
-            },
-            {
-              "label": "Bucket name",
-              "type": "text",
-              "required": true,
-              "path": "discovery.GoogleStorage",
-              "model": "bucketName",
-              "placeholder": "",
-              "tip": [
-                "Google Cloud Storage bucket name.",
-                "If the bucket doesn't exist Ignite will automatically create it.",
-                "However the name must be unique across whole Google Cloud Storage and Service Account Id must be authorized to perform this operation."
-              ]
-            },
-            {
-              "label": "Private key path",
-              "type": "text",
-              "required": true,
-              "path": "discovery.GoogleStorage",
-              "model": "serviceAccountP12FilePath",
-              "placeholder": "",
-              "tip": [
-                "Full path to the private key in PKCS12 format of the Service Account."
-              ]
-            },
-            {
-              "label": "Account id",
-              "type": "text",
-              "required": true,
-              "path": "discovery.GoogleStorage",
-              "model": "accountId",
-              "placeholder": "",
-              "tip": [
-                "Service account ID (typically an e-mail address)."
-              ]
-            }
-          ]
-        },
-        "Jdbc": {
-          "expanded": true,
-          "fields": [
-            {
-              "label": "DB schema should be initialized by Ignite",
-              "type": "check",
-              "path": "discovery.Jdbc",
-              "model": "initSchema",
-              "tip": [
-                "Flag indicating whether DB schema should be initialized by Ignite or was explicitly created by user."
-              ]
-            }
-          ]
-        },
-        "SharedFs": {
-          "expanded": false,
-          "fields": [
-            {
-              "label": "File path",
-              "type": "text",
-              "path": "discovery.SharedFs",
-              "model": "path",
-              "placeholder": "disco/tcp"
-            }
-          ]
-        }
-      }
-    }
-  ],
-  "advanced": [
-    {
-      "label": "Atomic configuration",
-      "tip": [
-        "Configuration for atomic data structures.",
-        "Atomics are distributed across the cluster, essentially enabling performing atomic operations (such as increment-and-get or compare-and-set) with the same globally-visible value."
-      ],
-      "fields": [
-        {
-          "label": "Backups",
-          "type": "number",
-          "path": "atomicConfiguration",
-          "model": "backups",
-          "placeholder": "0",
-          "tip": [
-            "Number of backup nodes."
-          ]
-        },
-        {
-          "label": "Cache mode",
-          "type": "dropdown",
-          "path": "atomicConfiguration",
-          "model": "cacheMode",
-          "placeholder": "PARTITIONED",
-          "items": "cacheModes",
-          "tip": [
-            "Cache modes:",
-            "<ul>",
-            "  <li>Partitioned - in this mode the overall key set will be divided into partitions and all partitions will be split equally between participating nodes.</li>",
-            "  <li>Replicated - in this mode all the keys are distributed to all participating nodes.</li>",
-            "  <li>Local - in this mode caches residing on different grid nodes will not know about each other.</li>",
-            "</ul>"
-          ]
-        },
-        {
-          "label": "Sequence reserve",
-          "type": "number",
-          "path": "atomicConfiguration",
-          "model": "atomicSequenceReserveSize",
-          "placeholder": "1,000",
-          "tip": [
-            "Default number of sequence values reserved for IgniteAtomicSequence instances.",
-            "After a certain number has been reserved, consequent increments of sequence will happen locally, without communication with other nodes, until the next reservation has to be made."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Communication",
-      "tip": [
-        "Cluster communication network properties."
-      ],
-      "fields": [
-        {
-          "label": "Timeout",
-          "type": "number",
-          "model": "networkTimeout",
-          "placeholder": "5,000",
-          "tip": [
-            "Maximum timeout in milliseconds for network requests."
-          ]
-        },
-        {
-          "label": "Send retry delay",
-          "type": "number",
-          "model": "networkSendRetryDelay",
-          "placeholder": "1,000",
-          "tip": [
-            "Interval in milliseconds between message send retries."
-          ]
-        },
-        {
-          "label": "Send retry count",
-          "type": "number",
-          "model": "networkSendRetryCount",
-          "placeholder": "3",
-          "tip": [
-            "Message send retries count."
-          ]
-        },
-        {
-          "label": "Segment check frequency",
-          "type": "number",
-          "model": "segmentCheckFrequency",
-          "placeholder": "10,000",
-          "tip": [
-            "Network segment check frequency in milliseconds.",
-            "If 0, periodic segment check is disabled and segment is checked only on topology changes (if segmentation resolvers are configured)."
-          ]
-        },
-        {
-          "label": "Wait for segment on start",
-          "type": "check",
-          "model": "waitForSegmentOnStart",
-          "tip": [
-            "Wait for segment on start flag.",
-            "<ul>",
-            "  <li>If enabled, node should wait for correct segment on start.</li>",
-            "  <li>If node detects that segment is incorrect on startup and enabled, node waits until segment becomes correct.</li>",
-            "  <li>If segment is incorrect on startup and disabled, exception is thrown.</li>",
-            "</ul>"
-          ]
-        },
-        {
-          "label": "Discovery startup delay",
-          "type": "number",
-          "model": "discoveryStartupDelay",
-          "placeholder": "600,000",
-          "tip": [
-            "This value is used to expire messages from waiting list whenever node discovery discrepancies happen."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Deployment",
-      "tip": [
-        "Task and resources deployment in cluster."
-      ],
-      "fields": [
-        {
-          "label": "Mode",
-          "type": "dropdown",
-          "model": "deploymentMode",
-          "placeholder": "SHARED",
-          "items": "deploymentModes",
-          "tip": [
-            "Task classes and resources sharing mode."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Events",
-      "tip": [
-        " Grid events are used for notification about what happens within the grid."
-      ],
-      "fields": [
-        {
-          "label": "Include type",
-          "type": "dropdown-multiple",
-          "model": "includeEventTypes",
-          "placeholder": "Choose recorded event types",
-          "items": "events",
-          "tip": [
-            "Array of event types, which will be recorded by GridEventStorageManager#record(Event).",
-            "Note, that either the include event types or the exclude event types can be established."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Marshaller",
-      "tip": [
-        "Marshaller allows to marshal or unmarshal objects in grid.",
-        "It provides serialization/deserialization mechanism for all instances that are sent across networks or are otherwise serialized."
-      ],
-      "fields": [
-        {
-          "label": "Marshaller",
-          "type": "dropdown-details",
-          "path": "marshaller",
-          "model": "kind",
-          "placeholder": "Choose marshaller",
-          "items": "marshallers",
-          "tip": [
-            "Instance of marshaller to use in grid. If not provided, OptimizedMarshaller will be used on Java HotSpot VM, and JdkMarshaller will be used on other VMs."
-          ],
-          "details": {
-            "OptimizedMarshaller": {
-              "expanded": false,
-              "fields": [
-                {
-                  "label": "Streams pool size",
-                  "type": "number",
-                  "path": "marshaller.OptimizedMarshaller",
-                  "model": "poolSize",
-                  "placeholder": "0",
-                  "tip": [
-                    "Specifies size of cached object streams used by marshaller.",
-                    "Object streams are cached for performance reason to avoid costly recreation for every serialization routine.",
-                    "If 0 (default), pool is not used and each thread has its own cached object stream which it keeps reusing.",
-                    "Since each stream has an internal buffer, creating a stream for each thread can lead to high memory consumption if many large messages are marshalled or unmarshalled concurrently.",
-                    "Consider using pool in this case. This will limit number of streams that can be created and, therefore, decrease memory consumption.",
-                    "NOTE: Using streams pool can decrease performance since streams will be shared between different threads which will lead to more frequent context switching."
-                  ]
-                },
-                {
-                  "label": "Require serializable",
-                  "type": "check",
-                  "path": "marshaller.OptimizedMarshaller",
-                  "model": "requireSerializable",
-                  "tip": [
-                    "Whether marshaller should require Serializable interface or not."
-                  ]
-                }
-              ]
-            }
-          }
-        },
-        {
-          "label": "Marshal local jobs",
-          "type": "check",
-          "model": "marshalLocalJobs",
-          "placeholder": "false",
-          "tip": [
-            "If this flag is enabled, jobs mapped to local node will be marshalled as if it was remote node."
-          ]
-        },
-        {
-          "label": "Keep alive time",
-          "type": "number",
-          "model": "marshallerCacheKeepAliveTime",
-          "placeholder": "10,000",
-          "tip": [
-            "Keep alive time of thread pool that is in charge of processing marshaller messages."
-          ]
-        },
-        {
-          "label": "Pool size",
-          "type": "number",
-          "model": "marshallerCacheThreadPoolSize",
-          "placeholder": "max(8, availableProcessors) * 2",
-          "tip": [
-            "Default size of thread pool that is in charge of processing marshaller messages."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Metrics",
-      "tip": ["Cluster runtime metrics settings."],
-      "fields": [
-        {
-          "label": "Elapsed time",
-          "type": "number",
-          "model": "metricsExpireTime",
-          "placeholder": "Long.MAX_VALUE",
-          "min": 1,
-          "tip": [
-            "Time in milliseconds after which a certain metric value is considered expired."
-          ]
-        },
-        {
-          "label": "History size",
-          "type": "number",
-          "model": "metricsHistorySize",
-          "placeholder": "10,000",
-          "min": 1,
-          "tip": [
-            "Number of metrics kept in history to compute totals and averages."
-          ]
-        },
-        {
-          "label": "Log frequency",
-          "type": "number",
-          "model": "metricsLogFrequency",
-          "placeholder": "60,000",
-          "tip": [
-            "Frequency of metrics log print out. To disable set to 0"
-          ]
-        },
-        {
-          "label": "Update frequency",
-          "type": "number",
-          "model": "metricsUpdateFrequency",
-          "placeholder": "60,000",
-          "tip": [
-            "Job metrics update frequency in milliseconds.",
-            "<ul>",
-            "  <li>If set to -1 job metrics are never updated.</li>",
-            "  <li>If set to 0 job metrics are updated on each job start and finish.</li>",
-            "  <li>Positive value defines the actual update frequency.</li>",
-            "</ul>"
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Peer Class Loading",
-      "tip": ["Cluster peer class loading settings."],
-      "fields": [
-        {
-          "label": "Enable peer class loading",
-          "type": "check",
-          "model": "peerClassLoadingEnabled",
-          "tip": [
-            "Enables/disables peer class loading."
-          ]
-        },
-        {
-          "label": "Local class path exclude",
-          "type": "text",
-          "model": "peerClassLoadingLocalClassPathExclude",
-          "placeholder": "[]",
-          "tip": [
-            "List of packages separated by comma from the system classpath that need to be peer-to-peer loaded from task originating node.",
-            "'*' is supported at the end of the package name which means that all sub-packages and their classes are included like in Java package import clause."
-          ]
-        },
-        {
-          "label": "Missed resources cache size",
-          "type": "number",
-          "model": "peerClassLoadingMissedResourcesCacheSize",
-          "placeholder": "100",
-          "tip": [
-            "If size greater than 0, missed resources will be cached and next resource request ignored.",
-            "If size is 0, then request for the resource will be sent to the remote node every time this resource is requested."
-          ]
-        },
-        {
-          "label": "Pool size",
-          "type": "number",
-          "model": "peerClassLoadingThreadPoolSize",
-          "placeholder": "availableProcessors",
-          "tip": [
-            "Thread pool size to use for peer class loading."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Swap",
-      "tip": ["Settings for overflow data to disk if it cannot fit in memory."],
-      "fields": [
-        {
-          "label": "Swap space SPI",
-          "type": "dropdown-details",
-          "path": "swapSpaceSpi",
-          "model": "kind",
-          "items": "swapSpaceSpis",
-          "placeholder": "Choose swap SPI",
-          "tip": [
-            "Provides a mechanism in grid for storing data on disk.",
-            "Ignite cache uses swap space to overflow data to disk if it cannot fit in memory."
-          ],
-          "details": {
-            "FileSwapSpaceSpi": {
-              "fields": [
-                {
-                  "label": "Base directory",
-                  "type": "text",
-                  "path": "swapSpaceSpi.FileSwapSpaceSpi",
-                  "model": "baseDirectory",
-                  "placeholder": "swapspace",
-                  "tip": [
-                    "Base directory where to write files."
-                  ]
-                },
-                {
-                  "label": "Read stripe size",
-                  "type": "number",
-                  "path": "swapSpaceSpi.FileSwapSpaceSpi",
-                  "model": "readStripesNumber",
-                  "placeholder": "available CPU cores",
-                  "tip": [
-                    "Read stripe size defines number of file channels to be used concurrently."
-                  ]
-                },
-                {
-                  "label": "Maximum sparsity",
-                  "type": "number",
-                  "path": "swapSpaceSpi.FileSwapSpaceSpi",
-                  "model": "maximumSparsity",
-                  "placeholder": "0.5",
-                  "tip": [
-                    "This property defines maximum acceptable wasted file space to whole file size ratio.",
-                    "When this ratio becomes higher than specified number compacting thread starts working."
-                  ]
-                },
-                {
-                  "label": "Max write queue size",
-                  "type": "number",
-                  "path": "swapSpaceSpi.FileSwapSpaceSpi",
-                  "model": "maxWriteQueueSize",
-                  "placeholder": "1024 * 1024",
-                  "tip": [
-                    "Max write queue size in bytes.",
-                    "If there are more values are waiting for being written to disk then specified size, SPI will block on store operation."
-                  ]
-                },
-                {
-                  "label": "Write buffer size",
-                  "type": "number",
-                  "path": "swapSpaceSpi.FileSwapSpaceSpi",
-                  "model": "writeBufferSize",
-                  "placeholder": "Available CPU cores",
-                  "tip": [
-                    "Write buffer size in bytes.",
-                    "Write to disk occurs only when this buffer is full."
-                  ]
-                }
-              ]
-            }
-          }
-        }
-      ]
-    },
-    {
-      "label": "Time configuration",
-      "tip": ["Time settings for CLOCK write ordering mode."],
-      "fields": [
-        {
-          "label": "Samples size",
-          "type": "number",
-          "model": "clockSyncSamples",
-          "placeholder": "8",
-          "tip": [
-            "Number of samples used to synchronize clocks between different nodes.",
-            "Clock synchronization is used for cache version assignment in CLOCK order mode."
-          ]
-        },
-        {
-          "label": "Frequency",
-          "type": "number",
-          "model": "clockSyncFrequency",
-          "placeholder": "120,000",
-          "tip": [
-            "Frequency at which clock is synchronized between nodes, in milliseconds.",
-            "Clock synchronization is used for cache version assignment in CLOCK order mode."
-          ]
-        },
-        {
-          "label": "Port base",
-          "type": "number",
-          "model": "timeServerPortBase",
-          "max": 65535,
-          "placeholder": "31100",
-          "tip": [
-            "Time server provides clock synchronization between nodes.",
-            "Base UPD port number for grid time server. Time server will be started on one of free ports in range."
-          ]
-        },
-        {
-          "label": "Port range",
-          "type": "number",
-          "model": "timeServerPortRange",
-          "placeholder": "100",
-          "tip": [
-            "Time server port range."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Thread pools size",
-      "tip": ["Settings for node thread pools."],
-      "fields": [
-        {
-          "label": "Public",
-          "type": "number",
-          "model": "publicThreadPoolSize",
-          "placeholder": "max(8, availableProcessors) * 2",
-          "tip": [
-            "Thread pool that is in charge of processing ComputeJob, GridJobs and user messages sent to node."
-          ]
-        },
-        {
-          "label": "System",
-          "type": "number",
-          "model": "systemThreadPoolSize",
-          "placeholder": "max(8, availableProcessors) * 2",
-          "tip": [
-            "Thread pool that is in charge of processing internal system messages."
-          ]
-        },
-        {
-          "label": "Management",
-          "type": "number",
-          "model": "managementThreadPoolSize",
-          "placeholder": "4",
-          "tip": [
-            "Thread pool that is in charge of processing internal and Visor ComputeJob, GridJobs."
-          ]
-        },
-        {
-          "label": "IGFS",
-          "type": "number",
-          "model": "igfsThreadPoolSize",
-          "placeholder": "availableProcessors",
-          "tip": [
-            "Thread pool that is in charge of processing outgoing IGFS messages."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Transactions",
-      "tip": ["Settings for transactions."],
-      "fields": [
-        {
-          "label": "Cache concurrency",
-          "type": "dropdown",
-          "path": "transactionConfiguration",
-          "model": "defaultTxConcurrency",
-          "placeholder": "PESSIMISTIC",
-          "items": "transactionConcurrency",
-          "tip": [
-            "Cache transaction concurrency to use when one is not explicitly specified."
-          ]
-        },
-        {
-          "label": "Isolation",
-          "type": "dropdown",
-          "path": "transactionConfiguration",
-          "model": "transactionIsolation",
-          "placeholder": "REPEATABLE_READ",
-          "items": "transactionIsolation",
-          "tip": [
-            "Default transaction isolation."
-          ]
-        },
-        {
-          "label": "Default timeout",
-          "type": "number",
-          "path": "transactionConfiguration",
-          "model": "defaultTxTimeout",
-          "placeholder": "0",
-          "tip": [
-            "Default transaction timeout."
-          ]
-        },
-        {
-          "label": "Pessimistic log cleanup delay",
-          "type": "number",
-          "path": "transactionConfiguration",
-          "model": "pessimisticTxLogLinger",
-          "placeholder": "10,000",
-          "tip": [
-            "Delay, in milliseconds, after which pessimistic recovery entries will be cleaned up for failed node."
-          ]
-        },
-        {
-          "label": "Pessimistic log size",
-          "type": "number",
-          "path": "transactionConfiguration",
-          "model": "pessimisticTxLogSize",
-          "placeholder": "0",
-          "tip": [
-            "Size of pessimistic transactions log stored on node in order to recover transaction commit if originating node has left grid before it has sent all messages to transaction nodes."
-          ]
-        },
-        {
-          "label": "Enable serializable cache transactions",
-          "type": "check",
-          "path": "transactionConfiguration",
-          "model": "txSerializableEnabled",
-          "tip": [
-            "Flag to enable/disable isolation level for cache transactions.",
-            "Serializable level does carry certain overhead and if not used, should be disabled."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Utility",
-      "tip": ["Settings for utility messages processing."],
-      "fields": [
-        {
-          "label": "Keep alive time",
-          "type": "number",
-          "model": "utilityCacheKeepAliveTime",
-          "placeholder": "10,000",
-          "tip": [
-            "Keep alive time of thread pool that is in charge of processing utility cache messages."
-          ]
-        },
-        {
-          "label": "Pool size",
-          "type": "number",
-          "model": "utilityCachePoolSize",
-          "placeholder": "max(8, availableProcessors) * 2",
-          "tip": [
-            "Thread pool that is in charge of processing utility cache messages."
-          ]
-        }
-      ]
-    }
-  ]
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/form-models/persistence.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/form-models/persistence.json b/modules/web-control-center/nodejs/public/form-models/persistence.json
deleted file mode 100644
index edf5344..0000000
--- a/modules/web-control-center/nodejs/public/form-models/persistence.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
-  "connection": [
-    {
-      "label": "Name",
-      "type": "text",
-      "model": "name",
-      "required": true
-    },
-    {
-      "label": "Database type",
-      "type": "dropdown",
-      "model": "dbType",
-      "placeholder": "Choose database",
-      "items": "databases",
-      "tip": [
-        "Select database type to connect for loading tables metadata."
-      ]
-    },
-    {
-      "label": "Database name",
-      "type": "text",
-      "model": "dbName",
-      "tip": [
-        "Database name to connect for loading tables metadata."
-      ]
-    },
-    {
-      "label": "Host",
-      "type": "text",
-      "model": "host",
-      "placeholder": "IP address or host",
-      "tip": [
-        "IP address or host name where database server deployed."
-      ]
-    },
-    {
-      "label": "Port",
-      "type": "number",
-      "model": "port",
-      "max": 65535,
-      "placeholder": "",
-      "tip": [
-        "Port number for connecting to database."
-      ]
-    },
-    {
-      "label": "User",
-      "type": "text",
-      "model": "user",
-      "placeholder": "",
-      "tip": [
-        "User name for connecting to database."
-      ]
-    },
-    {
-      "label": "Password",
-      "type": "password",
-      "model": "password",
-      "placeholder": "",
-      "tip": [
-        "Password for connecting to database.",
-        "Note, password would not be saved."
-      ]
-    }
-  ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/javascripts/bundle.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/bundle.js b/modules/web-control-center/nodejs/public/javascripts/bundle.js
deleted file mode 100644
index 840da56..0000000
--- a/modules/web-control-center/nodejs/public/javascripts/bundle.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Place here all common utility functions that will be available on each page.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/javascripts/controllers/adminController.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/adminController.js b/modules/web-control-center/nodejs/public/javascripts/controllers/adminController.js
deleted file mode 100644
index e0ded83..0000000
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/adminController.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-controlCenterModule.controller('adminController', [
-    '$scope', '$alert', '$http', 'commonFunctions', function ($scope,
-        $alert, $http, commonFunctions) {
-
-        $scope.userList = null;
-
-        function reload() {
-            $http.get('ajax/list')
-                .success(function (data) {
-                    $scope.userList = data;
-                })
-                .error(function (errMsg) {
-                    $alert({title: $scope.errorMessage(errMsg)});
-                });
-        }
-
-        reload();
-
-        $scope.removeUser = function (user) {
-            if (!confirm("You are going to delete user " + user.username + ". Please, confirm it."))
-                return false;
-
-            $http.get('ajax/remove', {params: {userId: user._id}}).success(
-                function (data) {
-                    $scope.alertStr = "User has been removed: " + user.username;
-                    $scope.alertType = 'success';
-
-                    reload();
-                }).error(function (err) {
-                    $scope.alertStr = "Failed to remove user: " + err;
-                });
-
-            return false;
-        };
-        
-        $scope.toggleAdmin = function(user) {
-            if (user.adminChanging)
-                return;
-            
-            user.adminChanging = true;
-
-            $http.get('ajax/setAdmin', {params: {userId: user._id, adminFlag: user.admin}}).success(
-                function (data) {
-                    reload();
-                }).error(function (err) {
-                    $scope.alertStr = "Failed to update user: " + err;
-                });
-        }
-    }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/javascripts/controllers/caches.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/caches.js b/modules/web-control-center/nodejs/public/javascripts/controllers/caches.js
deleted file mode 100644
index 294ff8f..0000000
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/caches.js
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-controlCenterModule.controller('cachesController', ['$scope', '$alert', '$http', 'commonFunctions', function ($scope, $alert, $http, commonFunctions) {
-        $scope.swapSimpleItems = commonFunctions.swapSimpleItems;
-        $scope.joinTip = commonFunctions.joinTip;
-        $scope.getModel = commonFunctions.getModel;
-        $scope.errorMessage = commonFunctions.errorMessage;
-
-        $scope.atomicities = [
-            {value: 'ATOMIC', label: 'ATOMIC'},
-            {value: 'TRANSACTIONAL', label: 'TRANSACTIONAL'}
-        ];
-
-        $scope.modes = [
-            {value: 'PARTITIONED', label: 'PARTITIONED'},
-            {value: 'REPLICATED', label: 'REPLICATED'},
-            {value: 'LOCAL', label: 'LOCAL'}
-        ];
-
-        $scope.atomicWriteOrderModes = [
-            {value: 'CLOCK', label: 'CLOCK'},
-            {value: 'PRIMARY', label: 'PRIMARY'}
-        ];
-
-        $scope.memoryModes = [
-            {value: 'ONHEAP_TIERED', label: 'ONHEAP_TIERED'},
-            {value: 'OFFHEAP_TIERED', label: 'OFFHEAP_TIERED'},
-            {value: 'OFFHEAP_VALUES', label: 'OFFHEAP_VALUES'}
-        ];
-
-        $scope.evictionPolicies = [
-            {value: 'LRU', label: 'LRU'},
-            {value: 'RND', label: 'Random'},
-            {value: 'FIFO', label: 'FIFO'},
-            {value: 'SORTED', label: 'Sorted'},
-            {value: undefined, label: 'Not set'}
-        ];
-
-        $scope.rebalanceModes = [
-            {value: 'SYNC', label: 'SYNC'},
-            {value: 'ASYNC', label: 'ASYNC'},
-            {value: 'NONE', label: 'NONE'}
-        ];
-
-        $scope.cacheStoreFactories = [
-            {value: 'CacheJdbcPojoStoreFactory', label: 'JDBC POJO store factory'},
-            {value: 'CacheJdbcBlobStoreFactory', label: 'JDBC BLOB store factory'},
-            {value: 'CacheHibernateBlobStoreFactory', label: 'Hibernate BLOB store factory'},
-            {value: undefined, label: 'Not set'}
-        ];
-
-        $scope.cacheStoreJdbcDialects = [
-            {value: 'Oracle', label: 'Oracle'},
-            {value: 'DB2', label: 'IBM DB2'},
-            {value: 'SQLServer', label: 'Microsoft SQL Server'},
-            {value: 'MySQL', label: 'My SQL'},
-            {value: 'PostgreSQL', label: 'Postgre SQL'},
-            {value: 'H2', label: 'H2 database'}
-        ];
-
-        $scope.general = [];
-        $scope.advanced = [];
-
-        $scope.showError = function (msg) {
-            if ($scope.alert)
-                $scope.alert.hide();
-
-            $scope.alert = $alert({title: $scope.errorMessage(msg)});
-        };
-
-        $scope.showInfo = function (msg) {
-            if ($scope.alert)
-                $scope.alert.hide();
-
-            $scope.alert = $alert({
-                type: 'success',
-                title: msg,
-                duration: 2
-            });
-        };
-
-        $http.get('/form-models/caches.json')
-            .success(function (data) {
-                $scope.general = data.general;
-                $scope.advanced = data.advanced;
-            })
-            .error(function (errMsg) {
-                $scope.showError(errMsg);
-            });
-
-        $scope.caches = [];
-
-        // When landing on the page, get caches and show them.
-        $http.post('/configuration/caches/list')
-            .success(function (data) {
-                $scope.spaces = data.spaces;
-                $scope.caches = data.caches;
-
-                var restoredItem = angular.fromJson(sessionStorage.cacheBackupItem);
-
-                if (restoredItem) {
-                    var idx = _.findIndex($scope.caches, function (cache) {
-                        return cache._id == restoredItem._id;
-                    });
-
-                    if (idx >= 0) {
-                        $scope.selectedItem = $scope.caches[idx];
-
-                        $scope.backupItem = restoredItem;
-                    }
-                    else
-                        sessionStorage.removeItem('cacheBackupItem');
-                }
-
-                $scope.$watch('backupItem', function (val) {
-                    if (val)
-                        sessionStorage.cacheBackupItem = angular.toJson(val);
-                }, true);
-            })
-            .error(function (errMsg) {
-                $scope.showError(errMsg);
-            });
-
-        $scope.selectItem = function (item) {
-            $scope.selectedItem = item;
-
-            $scope.backupItem = angular.copy(item);
-        };
-
-        // Add new cache.
-        $scope.createItem = function () {
-            $scope.backupItem = {mode: 'PARTITIONED', atomicityMode: 'ATOMIC', readFromBackup: true};
-            $scope.backupItem.space = $scope.spaces[0]._id;
-        };
-
-        // Save cache in db.
-        $scope.saveItem = function () {
-            var item = $scope.backupItem;
-
-            if (item.cacheStoreFactory && item.cacheStoreFactory.kind && !(item.readThrough || item.writeThrough)) {
-                $scope.showError('Store is configured but read/write through are not enabled!');
-
-                return;
-            }
-
-            if ((item.readThrough || item.writeThrough) && (!item.cacheStoreFactory || !item.cacheStoreFactory.kind)) {
-                $scope.showError('Read / write through are enabled but strore is not configured!');
-
-                return;
-            }
-
-            $http.post('/configuration/caches/save', item)
-                .success(function (_id) {
-                    var idx = _.findIndex($scope.caches, function (cache) {
-                        return cache._id == _id;
-                    });
-
-                    if (idx >= 0)
-                        angular.extend($scope.caches[idx], item);
-                    else {
-                        item._id = _id;
-
-                        $scope.caches.push(item);
-                    }
-
-                    $scope.selectItem(item);
-
-                    $scope.showInfo('Cache "' + item.name + '" saved.');
-                })
-                .error(function (errMsg) {
-                    $scope.showError(errMsg);
-                });
-        };
-
-        $scope.removeItem = function () {
-            var _id = $scope.selectedItem._id;
-
-            $http.post('/configuration/caches/remove', {_id: _id})
-                .success(function () {
-                    var i = _.findIndex($scope.caches, function (cache) {
-                        return cache._id == _id;
-                    });
-
-                    if (i >= 0) {
-                        $scope.caches.splice(i, 1);
-
-                        $scope.selectedItem = undefined;
-                        $scope.backupItem = undefined;
-                    }
-                })
-                .error(function (errMsg) {
-                    $scope.showError(errMsg);
-                });
-        };
-
-        $scope.checkIndexedTypes = function (keyCls, valCls) {
-            if (!keyCls) {
-                $scope.showError('Key class name should be non empty!');
-
-                return false;
-            }
-
-            if (!valCls) {
-                $scope.showError('Value class name should be non empty!');
-
-                return false;
-            }
-
-            return true;
-        };
-
-        $scope.addIndexedTypes = function (keyCls, valCls) {
-            if (!$scope.checkIndexedTypes(keyCls, valCls))
-                return;
-
-            var idxTypes = $scope.backupItem.indexedTypes;
-
-            var newItem = {keyClass: keyCls, valueClass: valCls};
-
-            if (idxTypes)
-                idxTypes.push(newItem);
-            else
-                $scope.backupItem.indexedTypes = [newItem];
-        };
-
-        $scope.saveIndexedType = function (idx, keyCls, valCls) {
-            if (!$scope.checkIndexedTypes(keyCls, valCls))
-                return idx;
-
-            var idxType = $scope.backupItem.indexedTypes[idx];
-
-            idxType.keyClass = keyCls;
-            idxType.valueClass = valCls;
-
-            return -1;
-        };
-    }]
-);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/javascripts/controllers/clusters.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/clusters.js b/modules/web-control-center/nodejs/public/javascripts/controllers/clusters.js
deleted file mode 100644
index 431ca54..0000000
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/clusters.js
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-controlCenterModule.controller('clustersController', ['$scope', '$alert', '$http', 'commonFunctions', function ($scope, $alert, $http, commonFunctions) {
-        $scope.swapSimpleItems = commonFunctions.swapSimpleItems;
-        $scope.joinTip = commonFunctions.joinTip;
-        $scope.getModel = commonFunctions.getModel;
-        $scope.errorMessage = commonFunctions.errorMessage;
-        $scope.console = console;
-
-        $scope.templates = [
-            {value: {discovery: {Vm: {addresses: ['127.0.0.1:47500..47510']}}}, label: 'none'},
-            {value: {discovery: {kind: 'Vm', Vm: {addresses: ['127.0.0.1:47500..47510']}}}, label: 'local'},
-            {value: {discovery: {kind: 'Multicast', Vm: {addresses: ['127.0.0.1:47500..47510']}, Multicast: {}}}, label: 'multicast'}
-        ];
-
-        $scope.discoveries = [
-            {value: 'Vm', label: 'static IPs'},
-            {value: 'Multicast', label: 'multicast'},
-            {value: 'S3', label: 'AWS S3'},
-            {value: 'Cloud', label: 'apache jclouds'},
-            {value: 'GoogleStorage', label: 'google cloud storage'},
-            {value: 'Jdbc', label: 'JDBC'},
-            {value: 'SharedFs', label: 'shared filesystem'}
-        ];
-
-        $scope.swapSpaceSpis = [
-            {value: 'FileSwapSpaceSpi', label: 'File-based swap'},
-            {value: undefined, label: 'Not set'}
-        ];
-
-        $scope.events = [];
-
-        for (var eventGroupName in eventGroups) {
-            if (eventGroups.hasOwnProperty(eventGroupName)) {
-                $scope.events.push({value: eventGroupName, label: eventGroupName});
-            }
-        }
-
-        $scope.cacheModes = [
-            {value: 'LOCAL', label: 'LOCAL'},
-            {value: 'REPLICATED', label: 'REPLICATED'},
-            {value: 'PARTITIONED', label: 'PARTITIONED'}
-        ];
-
-        $scope.deploymentModes = [
-            {value: 'PRIVATE', label: 'PRIVATE'},
-            {value: 'ISOLATED', label: 'ISOLATED'},
-            {value: 'SHARED', label: 'SHARED'},
-            {value: 'CONTINUOUS', label: 'CONTINUOUS'}
-        ];
-
-        $scope.transactionConcurrency = [
-            {value: 'OPTIMISTIC', label: 'OPTIMISTIC'},
-            {value: 'PESSIMISTIC', label: 'PESSIMISTIC'}
-        ];
-
-        $scope.transactionIsolation = [
-            {value: 'READ_COMMITTED', label: 'READ_COMMITTED'},
-            {value: 'REPEATABLE_READ', label: 'REPEATABLE_READ'},
-            {value: 'SERIALIZABLE', label: 'SERIALIZABLE'}
-        ];
-
-        $scope.segmentationPolicy = [
-            {value: 'RESTART_JVM', label: 'RESTART_JVM'},
-            {value: 'STOP', label: 'STOP'},
-            {value: 'NOOP', label: 'NOOP'}
-        ];
-
-        $scope.marshallers = [
-            {value: 'JdkMarshaller', label: 'JdkMarshaller'},
-            {value: 'OptimizedMarshaller', label: 'OptimizedMarshaller'}
-        ];
-
-        $scope.clusters = [];
-
-        $http.get('/form-models/clusters.json')
-            .success(function (data) {
-                $scope.templateTip = data.templateTip;
-
-                $scope.general = data.general;
-                $scope.advanced = data.advanced;
-            })
-            .error(function (errMsg) {
-                $alert({title: $scope.errorMessage(errMsg)});
-            });
-
-        // When landing on the page, get clusters and show them.
-        $http.post('/configuration/clusters/list')
-            .success(function (data) {
-                $scope.caches = data.caches;
-                $scope.spaces = data.spaces;
-                $scope.clusters = data.clusters;
-
-                var restoredItem = angular.fromJson(sessionStorage.clusterBackupItem);
-
-                if (restoredItem) {
-                    var idx = _.findIndex($scope.clusters, function (cluster) {
-                        return cluster._id == restoredItem._id;
-                    });
-
-                    if (idx >= 0) {
-                        $scope.selectedItem = $scope.clusters[idx];
-
-                        $scope.backupItem = restoredItem;
-                    }
-                    else
-                        sessionStorage.removeItem('clusterBackupItem');
-                }
-
-                $scope.$watch('backupItem', function (val) {
-                    if (val)
-                        sessionStorage.clusterBackupItem = angular.toJson(val);
-                }, true);
-            })
-            .error(function (errMsg) {
-                $alert({title: $scope.errorMessage(errMsg)});
-            });
-
-        $scope.selectItem = function (item) {
-            $scope.selectedItem = item;
-
-            $scope.backupItem = angular.copy(item);
-        };
-
-        // Add new cluster.
-        $scope.createItem = function () {
-            $scope.backupItem = angular.copy($scope.create.template);
-
-            $scope.backupItem.space = $scope.spaces[0]._id;
-        };
-
-        // Save cluster in db.
-        $scope.saveItem = function () {
-            var item = $scope.backupItem;
-
-            if (!item.swapSpaceSpi || !item.swapSpaceSpi.kind) {
-                for (var cacheId in item.caches) {
-                    var idx = _.findIndex($scope.caches, function (cache) {
-                        return cache._id == cacheId.value;
-                    });
-
-                    if (idx >= 0) {
-                        var cache = $scope.caches[idx];
-
-                        if (cache.swapEnabled) {
-                            $alert({title: 'Swap space SPI is not configured, but cache "' + cache.label + '" configured to use swap!'});
-
-                            return;
-                        }
-                    }
-                }
-            }
-
-            $http.post('/configuration/clusters/save', item)
-                .success(function (_id) {
-                    var idx = _.findIndex($scope.clusters, function (cluster) {
-                        return cluster._id == _id;
-                    });
-
-                    if (idx >= 0)
-                        angular.extend($scope.clusters[idx], item);
-                    else {
-                        item._id = _id;
-
-                        $scope.clusters.push(item);
-                    }
-
-                    $scope.selectItem(item);
-
-                    $alert({
-                        type: 'success',
-                        title: 'Cluster "' + item.name + '" saved.',
-                        duration: 2,
-                        container: '#save-btn'
-                    });
-                })
-                .error(function (errMsg) {
-                    $alert({title: $scope.errorMessage(errMsg)});
-                });
-        };
-
-        $scope.removeItem = function () {
-            var _id = $scope.selectedItem._id;
-
-            $http.post('/configuration/clusters/remove', {_id: _id})
-                .success(function () {
-                    var i = _.findIndex($scope.clusters, function (cluster) {
-                        return cluster._id == _id;
-                    });
-
-                    if (i >= 0) {
-                        $scope.clusters.splice(i, 1);
-
-                        $scope.selectedItem = undefined;
-                        $scope.backupItem = undefined;
-                    }
-                })
-                .error(function (errMsg) {
-                    $alert({title: $scope.errorMessage(errMsg)});
-                });
-        };
-    }]
-);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/javascripts/controllers/common.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/common.js b/modules/web-control-center/nodejs/public/javascripts/controllers/common.js
deleted file mode 100644
index 228181a..0000000
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/common.js
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var controlCenterModule = angular.module('ignite-web-control-center', ['smart-table', 'mgcrea.ngStrap', 'ngSanitize']);
-
-controlCenterModule.service('commonFunctions', function () {
-    return {
-        getModel: function (obj, path) {
-            if (!path)
-                return obj;
-
-            path = path.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties
-            path = path.replace(/^\./, '');           // strip a leading dot
-
-            var segs = path.split('.');
-            var root = obj;
-
-            while (segs.length > 0) {
-                var pathStep = segs.shift();
-
-                if (typeof root[pathStep] === 'undefined')
-                    root[pathStep] = {};
-
-                root = root[pathStep];
-            }
-
-            return root;
-        },
-        swapSimpleItems: function (a, ix1, ix2) {
-            var tmp = a[ix1];
-
-            a[ix1] = a[ix2];
-            a[ix2] = tmp;
-        },
-        joinTip: function (arr) {
-            if (!arr) {
-                return arr;
-            }
-
-            var lines = arr.map(function (line) {
-                var rtrimmed = line.replace(/\s+$/g, '');
-
-                if (rtrimmed.indexOf('>', this.length - 1) == -1) {
-                    rtrimmed = rtrimmed + '<br/>';
-                }
-
-                return rtrimmed;
-            });
-
-            return lines.join("");
-        },
-        errorMessage: function (errMsg) {
-            return errMsg ? errMsg : 'Internal server error.';
-        }
-    }
-});
-
-controlCenterModule.config(function ($tooltipProvider) {
-    angular.extend($tooltipProvider.defaults, {
-        container: 'body',
-        placement: 'right',
-        html: 'true',
-        trigger: 'click hover'
-    });
-});
-
-controlCenterModule.config(function ($selectProvider) {
-    angular.extend($selectProvider.defaults, {
-        maxLength: '1',
-        allText: 'Select All',
-        noneText: 'Clear All',
-        template: '/select'
-    });
-});
-
-// Alert settings
-controlCenterModule.config(function ($alertProvider) {
-    angular.extend($alertProvider.defaults, {
-        container: 'body',
-        placement: 'top-right',
-        duration: '5',
-        type: 'danger'
-    });
-});
-
-// Decode name using map(value, label).
-controlCenterModule.filter('displayValue', function () {
-    return function (v, m, dflt) {
-        var i = _.findIndex(m, function (item) {
-            return item.value == v;
-        });
-
-        if (i >= 0) {
-            return m[i].label;
-        }
-
-        if (dflt) {
-            return dflt;
-        }
-
-        return 'Unknown value';
-    }
-});
-
-/**
- * Replaces all occurrences of {@code org.apache.ignite.} with {@code o.a.i.},
- * {@code org.apache.ignite.internal.} with {@code o.a.i.i.},
- * {@code org.apache.ignite.internal.visor.} with {@code o.a.i.i.v.} and
- * {@code org.apache.ignite.scalar.} with {@code o.a.i.s.}.
- *
- * @param s String to replace in.
- * @return Replaces string.
- */
-controlCenterModule.filter('compact', function () {
-    return function (s) {
-        return s.replace("org.apache.ignite.internal.visor.", "o.a.i.i.v.").
-            replace("org.apache.ignite.internal.", "o.a.i.i.").
-            replace("org.apache.ignite.scalar.", "o.a.i.s.").
-            replace("org.apache.ignite.", "o.a.i.");
-    }
-});
-
-controlCenterModule.directive('ipaddress', function () {
-    const ip = '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])';
-    const port = '([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])';
-    const portRange = '(:' + port + '(..' + port + ')?)?';
-    const host = '(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])';
-
-    return {
-        require: 'ngModel',
-        link: function (scope, elem, attrs, ctrl) {
-            ctrl.$validators.ipaddress = function (modelValue, viewValue) {
-                if (ctrl.$isEmpty(modelValue) || !attrs['ipaddress'])
-                    return true;
-
-                return viewValue.match(new RegExp('(^' + ip + portRange + '$)|(^' + host + portRange + '$)')) != null;
-            }
-        }
-    }
-});
-
-controlCenterModule.controller('activeLink', [
-    '$scope', function ($scope) {
-        $scope.isActive = function (path) {
-            return window.location.pathname.substr(0, path.length) == path;
-        };
-    }]);
-
-controlCenterModule.controller('auth', [
-    '$scope', '$modal', '$alert', '$http', '$window', 'commonFunctions',
-    function ($scope, $modal, $alert, $http, $window, commonFunctions) {
-        $scope.errorMessage = commonFunctions.errorMessage;
-
-        $scope.action = 'login';
-
-        $scope.valid = false;
-
-        // Pre-fetch an external template populated with a custom scope
-        var authModal = $modal({scope: $scope, template: '/login', show: false});
-
-        $scope.login = function () {
-            // Show when some event occurs (use $promise property to ensure the template has been loaded)
-            authModal.$promise.then(authModal.show);
-        };
-
-        $scope.auth = function (action, user_info) {
-            $http.post('/' + action, user_info)
-                .success(function (data) {
-                    authModal.hide();
-
-                    $window.location = '/configuration/clusters';
-                })
-                .error(function (data) {
-                    $alert({placement: 'top', container: '#errors-container', title: $scope.errorMessage(data)});
-                });
-        };
-    }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/javascripts/controllers/persistences.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/persistences.js b/modules/web-control-center/nodejs/public/javascripts/controllers/persistences.js
deleted file mode 100644
index 645a193..0000000
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/persistences.js
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-controlCenterModule.controller('persistenceController', ['$scope', '$alert', '$http', 'commonFunctions', function ($scope, $alert, $http, commonFunctions) {
-        $scope.joinTip = commonFunctions.joinTip;
-        $scope.getModel = commonFunctions.getModel;
-        $scope.errorMessage = commonFunctions.errorMessage;
-
-        $scope.databases = [
-            {value: 'oracle', label: 'Oracle database'},
-            {value: 'db2', label: 'IBM DB2'},
-            {value: 'mssql', label: 'MS SQL Server'},
-            {value: 'postgre', label: 'PostgreSQL'},
-            {value: 'mysql', label: 'MySQL'},
-            {value: 'h2', label: 'H2 database'}
-        ];
-
-        $scope.connection = [];
-
-        $http.get('/form-models/persistence.json')
-            .success(function (data) {
-                $scope.connection = data.connection;
-            })
-            .error(function (errMsg) {
-                $alert({title: $scope.errorMessage(errMsg)});
-            });
-
-        $scope.persistences = [];
-
-        // When landing on the page, get persistences and show them.
-        $http.post('/configuration/persistences/list')
-            .success(function (data) {
-                $scope.spaces = data.spaces;
-                $scope.persistences = data.persistences;
-
-                var restoredItem = angular.fromJson(sessionStorage.persistenceBackupItem);
-
-                if (restoredItem) {
-                    var idx = _.findIndex($scope.persistences, function (persistence) {
-                        return persistence._id == restoredItem._id;
-                    });
-
-                    if (idx >= 0) {
-                        $scope.selectedItem = $scope.persistences[idx];
-
-                        $scope.backupItem = restoredItem;
-                    }
-                    else
-                        sessionStorage.removeItem('persistenceBackupItem');
-                }
-
-                $scope.$watch('backupItem', function (val) {
-                    if (val)
-                        sessionStorage.persistenceBackupItem = angular.toJson(val);
-                }, true);
-            })
-            .error(function (errMsg) {
-                $alert({title: $scope.errorMessage(errMsg)});
-            });
-
-        $scope.selectItem = function (item) {
-            $scope.selectedItem = item;
-            $scope.backupItem = angular.copy(item);
-        };
-
-        // Add new persistence.
-        $scope.createItem = function () {
-            $scope.backupItem = {database: 'oracle'};
-            $scope.backupItem.space = $scope.spaces[0]._id;
-        };
-
-        // Save persistence in db.
-        $scope.saveItem = function () {
-            var item = $scope.backupItem;
-
-            $http.post('/configuration/persistences/save', item)
-                .success(function (_id) {
-                    var i = _.findIndex($scope.persistences, function (persistence) {
-                        return persistence._id == _id;
-                    });
-
-                    if (i >= 0)
-                        angular.extend($scope.persistences[i], item);
-                    else {
-                        item._id = _id;
-
-                        $scope.persistences.push(item);
-                    }
-
-                    $scope.selectItem(item);
-                })
-                .error(function (errMsg) {
-                    $alert({title: $scope.errorMessage(errMsg)});
-                });
-        };
-
-        $scope.removeItem = function () {
-            var _id = $scope.selectedItem._id;
-
-            $http.post('/configuration/persistences/remove', {_id: _id})
-                .success(function () {
-                    var i = _.findIndex($scope.persistences, function (persistence) {
-                        return persistence._id == _id;
-                    });
-
-                    if (i >= 0) {
-                        $scope.persistences.splice(i, 1);
-
-                        $scope.selectedItem = undefined;
-                        $scope.backupItem = undefined;
-                    }
-                })
-                .error(function (errMsg) {
-                    $alert({title: $scope.errorMessage(errMsg)});
-                });
-        };
-
-        $scope.data = {
-            curTableIdx: -1,
-            curFieldIdx: -1,
-            curKeyClass: '',
-            curValueClass: '',
-            curJavaName: '',
-            curJavaType: '',
-            tables: [
-                {schemaName: 'Schema1', use: true},
-                {schemaName: 'Schema1', use: true, tableName: 'Table1', keyClass: 'KeyClass1', valueClass: 'ValueClass1',
-                    fields: [
-                        {use: true, key: true, ak: true, dbName: 'name1', dbType: 'dbType1', javaName: 'javaName1', javaType: 'javaType1'},
-                        {use: true, key: false, ak: false, dbName: 'name2', dbType: 'dbType2', javaName: 'javaName2', javaType: 'javaType2'},
-                        {use: false, key: false, ak: false, dbName: 'name3', dbType: 'dbType3', javaName: 'javaName3', javaType: 'javaType3'}
-                    ]
-                },
-                {schemaName: 'Schema2 with very long name', use: false},
-                {schemaName: 'Schema2', use: false, tableName: 'Table2', keyClass: 'KeyClass2', valueClass: 'ValueClass2',
-                    fields: [
-                        {use: true, key: true, ak: true, dbName: 'name4', dbType: 'dbType4', javaName: 'javaName4', javaType: 'javaType4'},
-                        {use: true, key: false, ak: false, dbName: 'name5', dbType: 'dbType5', javaName: 'javaName5', javaType: 'javaType5'},
-                        {use: false, key: false, ak: false, dbName: 'name6', dbType: 'dbType6', javaName: 'javaName6', javaType: 'javaType6'}
-                    ]},
-                {schemaName: 'Schema2', use: false, tableName: 'Table3', keyClass: 'KeyClass3', valueClass: 'ValueClass3',
-                    fields: [
-                        {use: true, key: true, ak: true, dbName: 'name7', dbType: 'dbType7', javaName: 'javaName7', javaType: 'javaType7'},
-                        {use: true, key: false, ak: false, dbName: 'name8', dbType: 'dbType8', javaName: 'javaName8', javaType: 'javaType8'},
-                        {use: false, key: false, ak: false, dbName: 'name9', dbType: 'dbType9', javaName: 'javaName9', javaType: 'javaType9'},
-                        {use: false, key: false, ak: false, dbName: 'name10', dbType: 'dbType10', javaName: 'javaName10', javaType: 'javaType10'},
-                        {use: false, key: false, ak: false, dbName: 'name11', dbType: 'dbType11', javaName: 'javaName11', javaType: 'javaType11'},
-                        {use: false, key: false, ak: false, dbName: 'name12', dbType: 'dbType12', javaName: 'javaName12', javaType: 'javaType12'}
-                    ]}]
-        };
-
-        $scope.selectSchema = function (idx) {
-            var data = $scope.data;
-            var tables = data.tables;
-            var schemaName = tables[idx].schemaName;
-            var use = tables[idx].use;
-
-            for (var i = idx + 1; i < tables.length; i++) {
-                var item = tables[i];
-
-                if (item.schemaName == schemaName && item.tableName)
-                    item.use = use;
-                else
-                    break;
-            }
-
-            data.curTableIdx = -1;
-            data.curFieldIdx = -1;
-        };
-
-        $scope.selectTable = function (idx) {
-            var data = $scope.data;
-
-            data.curTableIdx = idx;
-            data.curFieldIdx = -1;
-
-            if (idx >= 0) {
-                var tbl = data.tables[idx];
-
-                data.curKeyClass = tbl.keyClass;
-                data.curValueClass = tbl.valueClass;
-            }
-        };
-
-        $scope.selectField = function (idx) {
-            var data = $scope.data;
-
-            data.curFieldIdx = idx;
-
-            if (idx >= 0) {
-                var fld = data.tables[data.curTableIdx].fields[idx];
-
-                data.curJavaName = fld.javaName;
-                data.curJavaType = fld.javaType;
-            }
-        };
-    }]
-);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/javascripts/controllers/summary.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/controllers/summary.js b/modules/web-control-center/nodejs/public/javascripts/controllers/summary.js
deleted file mode 100644
index 031807f..0000000
--- a/modules/web-control-center/nodejs/public/javascripts/controllers/summary.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-controlCenterModule.controller('summaryController', ['$scope', '$http', function ($scope, $http) {
-    $scope.generateJavaItems = [
-        { label: 'snippet',value: false},
-        { label: 'factory class',value: true}
-    ];
-
-    $scope.generateJavaClass = false;
-
-    $scope.javaData = undefined;
-    $scope.xmlData = undefined;
-    $scope.dockerData = undefined;
-
-    $http.post('/configuration/clusters/list').success(function (data) {
-        $scope.caches = data.caches;
-        $scope.spaces = data.spaces;
-        $scope.clusters = data.clusters;
-    });
-
-    $scope.selectItem = function (item) {
-        $scope.selectedItem = item;
-
-        $scope.generateConfig()
-    };
-
-    $scope.generateConfig = function() {
-        var lang = $scope.cfgLang;
-
-        if (lang == 'docker') {
-            $("<pre class='brush:plain' />").text($scope.dockerFile()).appendTo($('#dockerResultDiv').empty());
-
-            return;
-        }
-
-        var cluster = $scope.selectedItem;
-        
-        if (!cluster)
-            return;
-        
-        $scope.loading = true;
-
-        $http.post('/configuration/summary/generator', {_id: cluster._id, lang: lang, generateJavaClass: $scope.generateJavaClass})
-            .success(
-            function (data) {
-                if (lang == 'java') {
-                    $scope.javaData = data;
-
-                    $("<pre class='brush:java' />").text(data).appendTo($('#javaResultDiv').empty());
-                }
-                else if (lang == 'xml') {
-                    $scope.xmlData = data;
-
-                    $("<pre class='brush:xml' />").text(data).appendTo($('#xmlResultDiv').empty());
-                }
-
-                SyntaxHighlighter.highlight();
-
-                $scope.loading = false;
-            }).error(function (data) {
-                $scope.generateError = "Failed to generate config: " + data;
-
-                $scope.loading = false;
-            });
-    };
-
-    $scope.cfgLang = 'xml';
-
-    $scope.$watch('cfgLang', $scope.generateConfig);
-    $scope.$watch('generateJavaClass', $scope.generateConfig);
-
-    $scope.dockerArg = {};
-
-    $scope.download = function(text, fileName) {
-        if (text.length == 0)
-            return;
-        
-        var file = document.createElement('a');
-        file.setAttribute('href', 'data:application/octet-stream;charset=utf-8,' + encodeURIComponent(text));
-        file.setAttribute('download', fileName);
-
-        file.style.display = 'none';
-        document.body.appendChild(file);
-
-        file.click();
-
-        document.body.removeChild(file);
-    };
-
-    $scope.downloadJava = function() {
-        $scope.download($scope.javaData,
-            $scope.generateJavaClass ? 'ConfigurationFactory.java' : $scope.selectedItem.name + '.snipplet.txt');
-    };
-
-    $scope.downloadDocker = function() {
-        $scope.download($scope.dockerFile(), 'Dockerfile');
-    };
-
-    $scope.oss = ['debian:8', 'ubuntu:14.10'];
-    
-    $scope.dockerFile = function() {
-        if (!$scope.selectedItem || !$scope.dockerArg) {
-            return '';
-        }
-        
-        var os = $scope.dockerArg.os;
-        if (!os) {
-            os = 'debian:8'
-        }
-
-        return "" +
-            "# Start from a Debian image.\n"+
-            "FROM " + os + "\n"+
-            "\n"+
-            "# Install tools.\n"+
-            "RUN apt-get update && apt-get install -y --fix-missing \\\n"+
-            "  wget \\\n"+
-            "  dstat \\\n"+
-            "  maven \\\n"+
-            "  git\n"+
-            "\n"+
-            "# Install Oracle JDK.\n"+
-            "RUN mkdir /opt/jdk\n"+
-            "\n"+
-            "RUN wget --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \\\n"+
-            "  http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz\n"+
-            "\n"+
-            "RUN tar -zxf jdk-7u79-linux-x64.tar.gz -C /opt/jdk\n"+
-            "\n"+
-            "RUN rm jdk-7u79-linux-x64.tar.gz\n"+
-            "\n"+
-            "RUN update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.7.0_79/bin/java 100\n"+
-            "\n"+
-            "RUN update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.7.0_79/bin/javac 100\n"+
-            "\n"+
-            "# Sets java variables.\n"+
-            "ENV JAVA_HOME /opt/jdk/jdk1.7.0_79/\n"+
-            "\n"+
-            "# Create working directory\n"+
-            "WORKDIR /home\n"+
-            "\n"+
-            "RUN wget -O ignite.zip http://tiny.cc/updater/download_ignite.php && unzip ignite.zip && rm ignite.zip\n"+
-            "\n"+
-            "COPY *.xml /tmp/\n"+
-            "\n"+
-            "RUN mv /tmp/*.xml /home/$(ls)/config";
-    };
-
-    $scope.$watch('dockerArg.os', function() {
-        $("<pre class='brush:plain' />").text($scope.dockerFile()).appendTo($('#dockerResultDiv').empty());
-    });
-}]);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/javascripts/dataStructures.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/dataStructures.js b/modules/web-control-center/nodejs/public/javascripts/dataStructures.js
deleted file mode 100644
index 2462708..0000000
--- a/modules/web-control-center/nodejs/public/javascripts/dataStructures.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-eventGroups = {
-    EVTS_CHECKPOINT: ['EVT_CHECKPOINT_SAVED', 'EVT_CHECKPOINT_LOADED', 'EVT_CHECKPOINT_REMOVED'],
-    EVTS_DEPLOYMENT: ['EVT_CLASS_DEPLOYED', 'EVT_CLASS_UNDEPLOYED', 'EVT_CLASS_DEPLOY_FAILED', 'EVT_TASK_DEPLOYED',
-        'EVT_TASK_UNDEPLOYED', 'EVT_TASK_DEPLOY_FAILED'],
-    EVTS_ERROR: ['EVT_JOB_TIMEDOUT', 'EVT_JOB_FAILED', 'EVT_JOB_FAILED_OVER', 'EVT_JOB_REJECTED', 'EVT_JOB_CANCELLED',
-        'EVT_TASK_TIMEDOUT', 'EVT_TASK_FAILED', 'EVT_CLASS_DEPLOY_FAILED', 'EVT_TASK_DEPLOY_FAILED',
-        'EVT_TASK_DEPLOYED', 'EVT_TASK_UNDEPLOYED', 'EVT_CACHE_REBALANCE_STARTED', 'EVT_CACHE_REBALANCE_STOPPED'],
-    EVTS_DISCOVERY: ['EVT_NODE_JOINED', 'EVT_NODE_LEFT', 'EVT_NODE_FAILED', 'EVT_NODE_SEGMENTED',
-        'EVT_CLIENT_NODE_DISCONNECTED', 'EVT_CLIENT_NODE_RECONNECTED'],
-    EVTS_JOB_EXECUTION: ['EVT_JOB_MAPPED', 'EVT_JOB_RESULTED', 'EVT_JOB_FAILED_OVER', 'EVT_JOB_STARTED',
-        'EVT_JOB_FINISHED', 'EVT_JOB_TIMEDOUT', 'EVT_JOB_REJECTED', 'EVT_JOB_FAILED', 'EVT_JOB_QUEUED',
-        'EVT_JOB_CANCELLED'],
-    EVTS_TASK_EXECUTION: ['EVT_TASK_STARTED', 'EVT_TASK_FINISHED', 'EVT_TASK_FAILED', 'EVT_TASK_TIMEDOUT',
-        'EVT_TASK_SESSION_ATTR_SET', 'EVT_TASK_REDUCED'],
-    EVTS_CACHE: ['EVT_CACHE_ENTRY_CREATED', 'EVT_CACHE_ENTRY_DESTROYED', 'EVT_CACHE_OBJECT_PUT',
-        'EVT_CACHE_OBJECT_READ', 'EVT_CACHE_OBJECT_REMOVED', 'EVT_CACHE_OBJECT_LOCKED', 'EVT_CACHE_OBJECT_UNLOCKED',
-        'EVT_CACHE_OBJECT_SWAPPED', 'EVT_CACHE_OBJECT_UNSWAPPED', 'EVT_CACHE_OBJECT_EXPIRED'],
-    EVTS_CACHE_REBALANCE: ['EVT_CACHE_REBALANCE_STARTED', 'EVT_CACHE_REBALANCE_STOPPED',
-        'EVT_CACHE_REBALANCE_PART_LOADED', 'EVT_CACHE_REBALANCE_PART_UNLOADED', 'EVT_CACHE_REBALANCE_OBJECT_LOADED',
-        'EVT_CACHE_REBALANCE_OBJECT_UNLOADED', 'EVT_CACHE_REBALANCE_PART_DATA_LOST'],
-    EVTS_CACHE_LIFECYCLE: ['EVT_CACHE_STARTED', 'EVT_CACHE_STOPPED', 'EVT_CACHE_NODES_LEFT'],
-    EVTS_CACHE_QUERY: ['EVT_CACHE_QUERY_EXECUTED', 'EVT_CACHE_QUERY_OBJECT_READ'],
-    EVTS_SWAPSPACE: ['EVT_SWAP_SPACE_CLEARED', 'EVT_SWAP_SPACE_DATA_REMOVED', 'EVT_SWAP_SPACE_DATA_READ',
-        'EVT_SWAP_SPACE_DATA_STORED', 'EVT_SWAP_SPACE_DATA_EVICTED'],
-    EVTS_IGFS: ['EVT_IGFS_FILE_CREATED', 'EVT_IGFS_FILE_RENAMED', 'EVT_IGFS_FILE_DELETED', 'EVT_IGFS_FILE_OPENED_READ',
-        'EVT_IGFS_FILE_OPENED_WRITE', 'EVT_IGFS_FILE_CLOSED_WRITE', 'EVT_IGFS_FILE_CLOSED_READ', 'EVT_IGFS_FILE_PURGED',
-        'EVT_IGFS_META_UPDATED', 'EVT_IGFS_DIR_CREATED', 'EVT_IGFS_DIR_RENAMED', 'EVT_IGFS_DIR_DELETED']
-};
-
-jdbcTypes = {
-    BIT: {value: "BIT", code: -7, label: "BIT"},
-    TINYINT: {value: "TINYINT", code: -6, label: "TINYINT"},
-    SMALLINT: {value: "SMALLINT", code: 5, label: "SMALLINT"},
-    INTEGER: {value: "INTEGER", code: 4, label: "INTEGER"},
-    BIGINT: {value: "BIGINT", code: -5, label: "BIGINT"},
-    FLOAT: {value: "FLOAT", code: 6, label: "FLOAT"},
-    REAL: {value: "REAL", code: 7, label: "REAL"},
-    DOUBLE: {value: "DOUBLE", code: 8, label: "DOUBLE"},
-    NUMERIC: {value: "NUMERIC", code: 2, label: "NUMERIC"},
-    DECIMAL: {value: "DECIMAL", code: 3, label: "DECIMAL"},
-    CHAR: {value: "CHAR", code: 1, label: "CHAR"},
-    VARCHAR: {value: "VARCHAR", code: 12, label: "VARCHAR"},
-    DATE: {value: "DATE", code: 91, label: "DATE"},
-    TIME: {value: "TIME", code: 92, label: "TIME"},
-    TIMESTAMP: {value: "TIMESTAMP", code: 93, label: "TIMESTAMP"},
-    BINARY: {value: "BINARY", code: -2, label: "BINARY"}
-};
-
-javaTypes = {
-    INTEGER: {value: "java.lang.Integer", label: "Integer"},
-    LONG: {value: "java.lang.Long", label: "Long"},
-    BIGDECIMAL: {value: "java.math.BigDecimal", label: "BigDecimal"},
-    FLOAT: {value: "java.lang.Float", label: "Float"},
-    DOUBLE: {value: "java.lang.Double", label: "Double"},
-    STRING: {value: "java.lang.String", label: "String"},
-    BOOLEAN: {value: "java.lang.Boolean", label: "Boolean"},
-    BYTE_ARRAY: {value: "byte[]", label: "byte[]"},
-    DATE: {value: "java.sql.Date", label: "Date"},
-    TIME: {value: "java.sql.Time", label: "Time"},
-    TIMESTAMP: {value: "java.sql.Timestamp", label: "Timestamp"}
-};
-
-if (typeof window === 'undefined') {
-    exports.eventGroups = eventGroups;
-    exports.jdbcTypes = jdbcTypes;
-    exports.javaTypes = javaTypes;
-}


[2/6] incubator-ignite git commit: # ignite-843 Refactor

Posted by an...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/javascripts/xeditable.min.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/javascripts/xeditable.min.js b/modules/web-control-center/nodejs/public/javascripts/xeditable.min.js
deleted file mode 100644
index 6dbc447..0000000
--- a/modules/web-control-center/nodejs/public/javascripts/xeditable.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
-angular-xeditable - 0.1.8
-Edit-in-place for angular.js
-Build date: 2014-01-10 
-*/
-angular.module("xeditable",[]).value("editableOptions",{theme:"default",buttons:"right",blurElem:"cancel",blurForm:"ignore",activate:"focus"}),angular.module("xeditable").directive("editableBsdate",["editableDirectiveFactory",function(a){return a({directiveName:"editableBsdate",inputTpl:'<input type="text">'})}]),angular.module("xeditable").directive("editableBstime",["editableDirectiveFactory",function(a){return a({directiveName:"editableBstime",inputTpl:"<timepicker></timepicker>",render:function(){this.parent.render.call(this);var a=angular.element('<div class="well well-small" style="display:inline-block;"></div>');a.attr("ng-model",this.inputEl.attr("ng-model")),this.inputEl.removeAttr("ng-model"),this.attrs.eNgChange&&(a.attr("ng-change",this.inputEl.attr("ng-change")),this.inputEl.removeAttr("ng-change")),this.inputEl.wrap(a)}})}]),angular.module("xeditable").directive("editableCheckbox",["editableDirectiveFactory",function(a){return a({directiveName:"editableCheckbox",inputT
 pl:'<input type="checkbox">',render:function(){this.parent.render.call(this),this.attrs.eTitle&&(this.inputEl.wrap("<label></label>"),this.inputEl.after(angular.element("<span></span>").text(this.attrs.eTitle)))},autosubmit:function(){var a=this;a.inputEl.bind("change",function(){setTimeout(function(){a.scope.$apply(function(){a.scope.$form.$submit()})},500)})}})}]),angular.module("xeditable").directive("editableChecklist",["editableDirectiveFactory","editableNgOptionsParser",function(a,b){return a({directiveName:"editableChecklist",inputTpl:"<span></span>",useCopy:!0,render:function(){this.parent.render.call(this);var a=b(this.attrs.eNgOptions),c='<label ng-repeat="'+a.ngRepeat+'">'+'<input type="checkbox" checklist-model="$parent.$data" checklist-value="'+a.locals.valueFn+'">'+'<span ng-bind="'+a.locals.displayFn+'"></span></label>';this.inputEl.removeAttr("ng-model"),this.inputEl.removeAttr("ng-options"),this.inputEl.html(c)}})}]),function(){var a="text|email|tel|number|url|searc
 h|color|date|datetime|time|month|week".split("|");angular.forEach(a,function(a){var b="editable"+a.charAt(0).toUpperCase()+a.slice(1);angular.module("xeditable").directive(b,["editableDirectiveFactory",function(c){return c({directiveName:b,inputTpl:'<input type="'+a+'">'})}])}),angular.module("xeditable").directive("editableRange",["editableDirectiveFactory",function(a){return a({directiveName:"editableRange",inputTpl:'<input type="range" id="range" name="range">',render:function(){this.parent.render.call(this),this.inputEl.after("<output>{{$data}}</output>")}})}])}(),angular.module("xeditable").directive("editableRadiolist",["editableDirectiveFactory","editableNgOptionsParser",function(a,b){return a({directiveName:"editableRadiolist",inputTpl:"<span></span>",render:function(){this.parent.render.call(this);var a=b(this.attrs.eNgOptions),c='<label ng-repeat="'+a.ngRepeat+'">'+'<input type="radio" ng-model="$parent.$data" value="{{'+a.locals.valueFn+'}}">'+'<span ng-bind="'+a.locals.d
 isplayFn+'"></span></label>';this.inputEl.removeAttr("ng-model"),this.inputEl.removeAttr("ng-options"),this.inputEl.html(c)},autosubmit:function(){var a=this;a.inputEl.bind("change",function(){setTimeout(function(){a.scope.$apply(function(){a.scope.$form.$submit()})},500)})}})}]),angular.module("xeditable").directive("editableSelect",["editableDirectiveFactory",function(a){return a({directiveName:"editableSelect",inputTpl:"<select></select>",autosubmit:function(){var a=this;a.inputEl.bind("change",function(){a.scope.$apply(function(){a.scope.$form.$submit()})})}})}]),angular.module("xeditable").directive("editableTextarea",["editableDirectiveFactory",function(a){return a({directiveName:"editableTextarea",inputTpl:"<textarea></textarea>",addListeners:function(){var a=this;a.parent.addListeners.call(a),a.single&&"no"!==a.buttons&&a.autosubmit()},autosubmit:function(){var a=this;a.inputEl.bind("keydown",function(b){(b.ctrlKey||b.metaKey)&&13===b.keyCode&&a.scope.$apply(function(){a.sco
 pe.$form.$submit()})})}})}]),angular.module("xeditable").factory("editableController",["$q","editableUtils",function(a,b){function c(a,c,d,e,f,g,h,i,j){var k,l,m=this;m.scope=a,m.elem=d,m.attrs=c,m.inputEl=null,m.editorEl=null,m.single=!0,m.error="",m.theme=f[g.theme]||f["default"],m.parent={},m.inputTpl="",m.directiveName="",m.useCopy=!1,m.single=null,m.buttons="right",m.init=function(b){if(m.single=b,m.name=c.eName||c[m.directiveName],!c[m.directiveName])throw"You should provide value for `"+m.directiveName+"` in editable element!";k=e(c[m.directiveName]),m.buttons=m.single?m.attrs.buttons||g.buttons:"no",c.eName&&m.scope.$watch("$data",function(a){m.scope.$form.$data[c.eName]=a}),c.onshow&&(m.onshow=function(){return m.catchError(e(c.onshow)(a))}),c.onhide&&(m.onhide=function(){return e(c.onhide)(a)}),c.oncancel&&(m.oncancel=function(){return e(c.oncancel)(a)}),c.onbeforesave&&(m.onbeforesave=function(){return m.catchError(e(c.onbeforesave)(a))}),c.onaftersave&&(m.onaftersave=fun
 ction(){return m.catchError(e(c.onaftersave)(a))}),a.$parent.$watch(c[m.directiveName],function(){m.handleEmpty()})},m.render=function(){var a=m.theme;m.inputEl=angular.element(m.inputTpl),m.controlsEl=angular.element(a.controlsTpl),m.controlsEl.append(m.inputEl),"no"!==m.buttons&&(m.buttonsEl=angular.element(a.buttonsTpl),m.submitEl=angular.element(a.submitTpl),m.cancelEl=angular.element(a.cancelTpl),m.buttonsEl.append(m.submitEl).append(m.cancelEl),m.controlsEl.append(m.buttonsEl),m.inputEl.addClass("editable-has-buttons")),m.errorEl=angular.element(a.errorTpl),m.controlsEl.append(m.errorEl),m.editorEl=angular.element(m.single?a.formTpl:a.noformTpl),m.editorEl.append(m.controlsEl);for(var d in c.$attr)if(!(d.length<=1)){var e=!1,f=d.substring(1,2);if("e"===d.substring(0,1)&&f===f.toUpperCase()&&(e=d.substring(1),"Form"!==e&&"NgSubmit"!==e)){e=e.substring(0,1).toLowerCase()+b.camelToDash(e.substring(1));var h=""===c[d]?e:c[d];m.inputEl.attr(e,h)}}m.inputEl.addClass("editable-input"
 ),m.inputEl.attr("ng-model","$data"),m.editorEl.addClass(b.camelToDash(m.directiveName)),m.single&&(m.editorEl.attr("editable-form","$form"),m.editorEl.attr("blur",m.attrs.blur||("no"===m.buttons?"cancel":g.blurElem))),angular.isFunction(a.postrender)&&a.postrender.call(m)},m.setLocalValue=function(){m.scope.$data=m.useCopy?angular.copy(k(a.$parent)):k(a.$parent)},m.show=function(){return m.setLocalValue(),m.render(),d.after(m.editorEl),i(m.editorEl)(a),m.addListeners(),d.addClass("editable-hide"),m.onshow()},m.hide=function(){return m.editorEl.remove(),d.removeClass("editable-hide"),m.onhide()},m.cancel=function(){m.oncancel()},m.addListeners=function(){m.inputEl.bind("keyup",function(a){if(m.single)switch(a.keyCode){case 27:m.scope.$apply(function(){m.scope.$form.$cancel()})}}),m.single&&"no"===m.buttons&&m.autosubmit(),m.editorEl.bind("click",function(a){1===a.which&&m.scope.$form.$visible&&(m.scope.$form._clicked=!0)})},m.setWaiting=function(a){a?(l=!m.inputEl.attr("disabled")&&
 !m.inputEl.attr("ng-disabled")&&!m.inputEl.attr("ng-enabled"),l&&(m.inputEl.attr("disabled","disabled"),m.buttonsEl&&m.buttonsEl.find("button").attr("disabled","disabled"))):l&&(m.inputEl.removeAttr("disabled"),m.buttonsEl&&m.buttonsEl.find("button").removeAttr("disabled"))},m.activate=function(){setTimeout(function(){var a=m.inputEl[0];"focus"===g.activate&&a.focus&&a.focus(),"select"===g.activate&&a.select&&a.select()},0)},m.setError=function(b){angular.isObject(b)||(a.$error=b,m.error=b)},m.catchError=function(a,b){return angular.isObject(a)&&b!==!0?j.when(a).then(angular.bind(this,function(a){this.catchError(a,!0)}),angular.bind(this,function(a){this.catchError(a,!0)})):b&&angular.isObject(a)&&a.status&&200!==a.status&&a.data&&angular.isString(a.data)?(this.setError(a.data),a=a.data):angular.isString(a)&&this.setError(a),a},m.save=function(){k.assign(a.$parent,angular.copy(m.scope.$data))},m.handleEmpty=function(){var b=k(a.$parent),c=null===b||void 0===b||""===b||angular.isArra
 y(b)&&0===b.length;d.toggleClass("editable-empty",c)},m.autosubmit=angular.noop,m.onshow=angular.noop,m.onhide=angular.noop,m.oncancel=angular.noop,m.onbeforesave=angular.noop,m.onaftersave=angular.noop}return c.$inject=["$scope","$attrs","$element","$parse","editableThemes","editableOptions","$rootScope","$compile","$q"],c}]),angular.module("xeditable").factory("editableDirectiveFactory",["$parse","$compile","editableThemes","$rootScope","$document","editableController","editableFormController",function(a,b,c,d,e,f,g){return function(b){return{restrict:"A",scope:!0,require:[b.directiveName,"?^form"],controller:f,link:function(c,f,h,i){var j,k=i[0],l=!1;if(i[1])j=i[1],l=!0;else if(h.eForm){var m=a(h.eForm)(c);if(m)j=m,l=!0;else for(var n=0;n<e[0].forms.length;n++)if(e[0].forms[n].name===h.eForm){j=null,l=!0;break}}if(angular.forEach(b,function(a,b){void 0!==k[b]&&(k.parent[b]=k[b])}),angular.extend(k,b),k.init(!l),c.$editable=k,f.addClass("editable"),l)if(j){if(c.$form=j,!c.$form.$a
 ddEditable)throw"Form with editable elements should have `editable-form` attribute.";c.$form.$addEditable(k)}else d.$$editableBuffer=d.$$editableBuffer||{},d.$$editableBuffer[h.eForm]=d.$$editableBuffer[h.eForm]||[],d.$$editableBuffer[h.eForm].push(k),c.$form=null;else c.$form=g(),c.$form.$addEditable(k),h.eForm&&(c.$parent[h.eForm]=c.$form),h.eForm||(f.addClass("editable-click"),f.bind("click",function(a){a.preventDefault(),a.editable=k,c.$apply(function(){c.$form.$show()})}))}}}}]),angular.module("xeditable").factory("editableFormController",["$parse","$document","$rootScope","editablePromiseCollection","editableUtils",function(a,b,c,d,e){var f=[];b.bind("click",function(a){if(1===a.which){for(var b=[],d=[],e=0;e<f.length;e++)f[e]._clicked?f[e]._clicked=!1:f[e].$waiting||("cancel"===f[e]._blur&&b.push(f[e]),"submit"===f[e]._blur&&d.push(f[e]));(b.length||d.length)&&c.$apply(function(){angular.forEach(b,function(a){a.$cancel()}),angular.forEach(d,function(a){a.$submit()})})}});var 
 g={$addEditable:function(a){this.$editables.push(a),a.elem.bind("$destroy",angular.bind(this,this.$removeEditable,a)),a.scope.$form||(a.scope.$form=this),this.$visible&&a.catchError(a.show())},$removeEditable:function(a){for(var b=0;b<this.$editables.length;b++)if(this.$editables[b]===a)return this.$editables.splice(b,1),void 0},$show:function(){if(!this.$visible){this.$visible=!0;var a=d();a.when(this.$onshow()),this.$setError(null,""),angular.forEach(this.$editables,function(b){a.when(b.show())}),a.then({onWait:angular.bind(this,this.$setWaiting),onTrue:angular.bind(this,this.$activate),onFalse:angular.bind(this,this.$activate),onString:angular.bind(this,this.$activate)}),setTimeout(angular.bind(this,function(){this._clicked=!1,-1===e.indexOf(f,this)&&f.push(this)}),0)}},$activate:function(a){var b;if(this.$editables.length){if(angular.isString(a))for(b=0;b<this.$editables.length;b++)if(this.$editables[b].name===a)return this.$editables[b].activate(),void 0;for(b=0;b<this.$editabl
 es.length;b++)if(this.$editables[b].error)return this.$editables[b].activate(),void 0;this.$editables[0].activate()}},$hide:function(){this.$visible&&(this.$visible=!1,this.$onhide(),angular.forEach(this.$editables,function(a){a.hide()}),e.arrayRemove(f,this))},$cancel:function(){this.$visible&&(this.$oncancel(),angular.forEach(this.$editables,function(a){a.cancel()}),this.$hide())},$setWaiting:function(a){this.$waiting=!!a,angular.forEach(this.$editables,function(b){b.setWaiting(!!a)})},$setError:function(a,b){angular.forEach(this.$editables,function(c){a&&c.name!==a||c.setError(b)})},$submit:function(){function a(a){var b=d();b.when(this.$onbeforesave()),b.then({onWait:angular.bind(this,this.$setWaiting),onTrue:a?angular.bind(this,this.$save):angular.bind(this,this.$hide),onFalse:angular.bind(this,this.$hide),onString:angular.bind(this,this.$activate)})}if(!this.$waiting){this.$setError(null,"");var b=d();angular.forEach(this.$editables,function(a){b.when(a.onbeforesave())}),b.the
 n({onWait:angular.bind(this,this.$setWaiting),onTrue:angular.bind(this,a,!0),onFalse:angular.bind(this,a,!1),onString:angular.bind(this,this.$activate)})}},$save:function(){angular.forEach(this.$editables,function(a){a.save()});var a=d();a.when(this.$onaftersave()),angular.forEach(this.$editables,function(b){a.when(b.onaftersave())}),a.then({onWait:angular.bind(this,this.$setWaiting),onTrue:angular.bind(this,this.$hide),onFalse:angular.bind(this,this.$hide),onString:angular.bind(this,this.$activate)})},$onshow:angular.noop,$oncancel:angular.noop,$onhide:angular.noop,$onbeforesave:angular.noop,$onaftersave:angular.noop};return function(){return angular.extend({$editables:[],$visible:!1,$waiting:!1,$data:{},_clicked:!1,_blur:null},g)}}]),angular.module("xeditable").directive("editableForm",["$rootScope","$parse","editableFormController","editableOptions",function(a,b,c,d){return{restrict:"A",require:["form"],compile:function(){return{pre:function(b,d,e,f){var g,h=f[0];e.editableForm?b
 [e.editableForm]&&b[e.editableForm].$show?(g=b[e.editableForm],angular.extend(h,g)):(g=c(),b[e.editableForm]=g,angular.extend(g,h)):(g=c(),angular.extend(h,g));var i=a.$$editableBuffer,j=h.$name;j&&i&&i[j]&&(angular.forEach(i[j],function(a){g.$addEditable(a)}),delete i[j])},post:function(a,c,e,f){var g;g=e.editableForm&&a[e.editableForm]&&a[e.editableForm].$show?a[e.editableForm]:f[0],e.onshow&&(g.$onshow=angular.bind(g,b(e.onshow),a)),e.onhide&&(g.$onhide=angular.bind(g,b(e.onhide),a)),e.oncancel&&(g.$oncancel=angular.bind(g,b(e.oncancel),a)),e.shown&&b(e.shown)(a)&&g.$show(),g._blur=e.blur||d.blurForm,e.ngSubmit||e.submit||(e.onbeforesave&&(g.$onbeforesave=function(){return b(e.onbeforesave)(a,{$data:g.$data})}),e.onaftersave&&(g.$onaftersave=function(){return b(e.onaftersave)(a,{$data:g.$data})}),c.bind("submit",function(b){b.preventDefault(),a.$apply(function(){g.$submit()})})),c.bind("click",function(a){1===a.which&&g.$visible&&(g._clicked=!0)})}}}}}]),angular.module("xeditable
 ").factory("editablePromiseCollection",["$q",function(a){function b(){return{promises:[],hasFalse:!1,hasString:!1,when:function(b,c){if(b===!1)this.hasFalse=!0;else if(!c&&angular.isObject(b))this.promises.push(a.when(b));else{if(!angular.isString(b))return;this.hasString=!0}},then:function(b){function c(){h.hasString||h.hasFalse?!h.hasString&&h.hasFalse?e():f():d()}b=b||{};var d=b.onTrue||angular.noop,e=b.onFalse||angular.noop,f=b.onString||angular.noop,g=b.onWait||angular.noop,h=this;this.promises.length?(g(!0),a.all(this.promises).then(function(a){g(!1),angular.forEach(a,function(a){h.when(a,!0)}),c()},function(){g(!1),f()})):c()}}}return b}]),angular.module("xeditable").factory("editableUtils",[function(){return{indexOf:function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;c<a.length;c++)if(b===a[c])return c;return-1},arrayRemove:function(a,b){var c=this.indexOf(a,b);return c>=0&&a.splice(c,1),b},camelToDash:function(a){var b=/[A-Z]/g;return a.replace(b,function(a,b){return
 (b?"-":"")+a.toLowerCase()})},dashToCamel:function(a){var b=/([\:\-\_]+(.))/g,c=/^moz([A-Z])/;return a.replace(b,function(a,b,c,d){return d?c.toUpperCase():c}).replace(c,"Moz$1")}}}]),angular.module("xeditable").factory("editableNgOptionsParser",[function(){function a(a){var c;if(!(c=a.match(b)))throw"ng-options parse error";var d,e=c[2]||c[1],f=c[4]||c[6],g=c[5],h=(c[3]||"",c[2]?c[1]:f),i=c[7],j=c[8],k=j?c[8]:null;return void 0===g?(d=f+" in "+i,void 0!==j&&(d+=" track by "+k)):d="("+g+", "+f+") in "+i,{ngRepeat:d,locals:{valueName:f,keyName:g,valueFn:h,displayFn:e}}}var b=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/;return a}]),angular.module("xeditable").factory("editableThemes",function(){var a={"default":{formTpl:'<form class="editable-wrap"></form>',noformTpl:'<span class="editable-wrap"></span>',controlsTpl:'<span class="editable-controls"></span>'
 ,inputTpl:"",errorTpl:'<div class="editable-error" ng-show="$error" ng-bind="$error"></div>',buttonsTpl:'<span class="editable-buttons"></span>',submitTpl:'<button type="submit">save</button>',cancelTpl:'<button type="button" ng-click="$form.$cancel()">cancel</button>'},bs2:{formTpl:'<form class="form-inline editable-wrap" role="form"></form>',noformTpl:'<span class="editable-wrap"></span>',controlsTpl:'<div class="editable-controls controls control-group" ng-class="{\'error\': $error}"></div>',inputTpl:"",errorTpl:'<div class="editable-error help-block" ng-show="$error" ng-bind="$error"></div>',buttonsTpl:'<span class="editable-buttons"></span>',submitTpl:'<button type="submit" class="btn btn-primary"><span class="icon-ok icon-white"></span></button>',cancelTpl:'<button type="button" class="btn" ng-click="$form.$cancel()"><span class="icon-remove"></span></button>'},bs3:{formTpl:'<form class="form-inline editable-wrap" role="form"></form>',noformTpl:'<span class="editable-wrap"></s
 pan>',controlsTpl:'<div class="editable-controls form-group" ng-class="{\'has-error\': $error}"></div>',inputTpl:"",errorTpl:'<div class="editable-error help-block" ng-show="$error" ng-bind="$error"></div>',buttonsTpl:'<span class="editable-buttons"></span>',submitTpl:'<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>',cancelTpl:'<button type="button" class="btn btn-default" ng-click="$form.$cancel()"><span class="glyphicon glyphicon-remove"></span></button>',buttonsClass:"",inputClass:"",postrender:function(){switch(this.directiveName){case"editableText":case"editableSelect":case"editableTextarea":case"editableEmail":case"editableTel":case"editableNumber":case"editableUrl":case"editableSearch":case"editableDate":case"editableDatetime":case"editableTime":case"editableMonth":case"editableWeek":if(this.inputEl.addClass("form-control"),this.theme.inputClass){if(this.inputEl.attr("multiple")&&("input-sm"===this.theme.inputClass||"input-l
 g"===this.theme.inputClass))break;this.inputEl.addClass(this.theme.inputClass)}}this.buttonsEl&&this.theme.buttonsClass&&this.buttonsEl.find("button").addClass(this.theme.buttonsClass)}}};return a});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/libs/xeditable.min.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/libs/xeditable.min.js b/modules/web-control-center/nodejs/public/libs/xeditable.min.js
new file mode 100644
index 0000000..6dbc447
--- /dev/null
+++ b/modules/web-control-center/nodejs/public/libs/xeditable.min.js
@@ -0,0 +1,6 @@
+/*!
+angular-xeditable - 0.1.8
+Edit-in-place for angular.js
+Build date: 2014-01-10 
+*/
+angular.module("xeditable",[]).value("editableOptions",{theme:"default",buttons:"right",blurElem:"cancel",blurForm:"ignore",activate:"focus"}),angular.module("xeditable").directive("editableBsdate",["editableDirectiveFactory",function(a){return a({directiveName:"editableBsdate",inputTpl:'<input type="text">'})}]),angular.module("xeditable").directive("editableBstime",["editableDirectiveFactory",function(a){return a({directiveName:"editableBstime",inputTpl:"<timepicker></timepicker>",render:function(){this.parent.render.call(this);var a=angular.element('<div class="well well-small" style="display:inline-block;"></div>');a.attr("ng-model",this.inputEl.attr("ng-model")),this.inputEl.removeAttr("ng-model"),this.attrs.eNgChange&&(a.attr("ng-change",this.inputEl.attr("ng-change")),this.inputEl.removeAttr("ng-change")),this.inputEl.wrap(a)}})}]),angular.module("xeditable").directive("editableCheckbox",["editableDirectiveFactory",function(a){return a({directiveName:"editableCheckbox",inputT
 pl:'<input type="checkbox">',render:function(){this.parent.render.call(this),this.attrs.eTitle&&(this.inputEl.wrap("<label></label>"),this.inputEl.after(angular.element("<span></span>").text(this.attrs.eTitle)))},autosubmit:function(){var a=this;a.inputEl.bind("change",function(){setTimeout(function(){a.scope.$apply(function(){a.scope.$form.$submit()})},500)})}})}]),angular.module("xeditable").directive("editableChecklist",["editableDirectiveFactory","editableNgOptionsParser",function(a,b){return a({directiveName:"editableChecklist",inputTpl:"<span></span>",useCopy:!0,render:function(){this.parent.render.call(this);var a=b(this.attrs.eNgOptions),c='<label ng-repeat="'+a.ngRepeat+'">'+'<input type="checkbox" checklist-model="$parent.$data" checklist-value="'+a.locals.valueFn+'">'+'<span ng-bind="'+a.locals.displayFn+'"></span></label>';this.inputEl.removeAttr("ng-model"),this.inputEl.removeAttr("ng-options"),this.inputEl.html(c)}})}]),function(){var a="text|email|tel|number|url|searc
 h|color|date|datetime|time|month|week".split("|");angular.forEach(a,function(a){var b="editable"+a.charAt(0).toUpperCase()+a.slice(1);angular.module("xeditable").directive(b,["editableDirectiveFactory",function(c){return c({directiveName:b,inputTpl:'<input type="'+a+'">'})}])}),angular.module("xeditable").directive("editableRange",["editableDirectiveFactory",function(a){return a({directiveName:"editableRange",inputTpl:'<input type="range" id="range" name="range">',render:function(){this.parent.render.call(this),this.inputEl.after("<output>{{$data}}</output>")}})}])}(),angular.module("xeditable").directive("editableRadiolist",["editableDirectiveFactory","editableNgOptionsParser",function(a,b){return a({directiveName:"editableRadiolist",inputTpl:"<span></span>",render:function(){this.parent.render.call(this);var a=b(this.attrs.eNgOptions),c='<label ng-repeat="'+a.ngRepeat+'">'+'<input type="radio" ng-model="$parent.$data" value="{{'+a.locals.valueFn+'}}">'+'<span ng-bind="'+a.locals.d
 isplayFn+'"></span></label>';this.inputEl.removeAttr("ng-model"),this.inputEl.removeAttr("ng-options"),this.inputEl.html(c)},autosubmit:function(){var a=this;a.inputEl.bind("change",function(){setTimeout(function(){a.scope.$apply(function(){a.scope.$form.$submit()})},500)})}})}]),angular.module("xeditable").directive("editableSelect",["editableDirectiveFactory",function(a){return a({directiveName:"editableSelect",inputTpl:"<select></select>",autosubmit:function(){var a=this;a.inputEl.bind("change",function(){a.scope.$apply(function(){a.scope.$form.$submit()})})}})}]),angular.module("xeditable").directive("editableTextarea",["editableDirectiveFactory",function(a){return a({directiveName:"editableTextarea",inputTpl:"<textarea></textarea>",addListeners:function(){var a=this;a.parent.addListeners.call(a),a.single&&"no"!==a.buttons&&a.autosubmit()},autosubmit:function(){var a=this;a.inputEl.bind("keydown",function(b){(b.ctrlKey||b.metaKey)&&13===b.keyCode&&a.scope.$apply(function(){a.sco
 pe.$form.$submit()})})}})}]),angular.module("xeditable").factory("editableController",["$q","editableUtils",function(a,b){function c(a,c,d,e,f,g,h,i,j){var k,l,m=this;m.scope=a,m.elem=d,m.attrs=c,m.inputEl=null,m.editorEl=null,m.single=!0,m.error="",m.theme=f[g.theme]||f["default"],m.parent={},m.inputTpl="",m.directiveName="",m.useCopy=!1,m.single=null,m.buttons="right",m.init=function(b){if(m.single=b,m.name=c.eName||c[m.directiveName],!c[m.directiveName])throw"You should provide value for `"+m.directiveName+"` in editable element!";k=e(c[m.directiveName]),m.buttons=m.single?m.attrs.buttons||g.buttons:"no",c.eName&&m.scope.$watch("$data",function(a){m.scope.$form.$data[c.eName]=a}),c.onshow&&(m.onshow=function(){return m.catchError(e(c.onshow)(a))}),c.onhide&&(m.onhide=function(){return e(c.onhide)(a)}),c.oncancel&&(m.oncancel=function(){return e(c.oncancel)(a)}),c.onbeforesave&&(m.onbeforesave=function(){return m.catchError(e(c.onbeforesave)(a))}),c.onaftersave&&(m.onaftersave=fun
 ction(){return m.catchError(e(c.onaftersave)(a))}),a.$parent.$watch(c[m.directiveName],function(){m.handleEmpty()})},m.render=function(){var a=m.theme;m.inputEl=angular.element(m.inputTpl),m.controlsEl=angular.element(a.controlsTpl),m.controlsEl.append(m.inputEl),"no"!==m.buttons&&(m.buttonsEl=angular.element(a.buttonsTpl),m.submitEl=angular.element(a.submitTpl),m.cancelEl=angular.element(a.cancelTpl),m.buttonsEl.append(m.submitEl).append(m.cancelEl),m.controlsEl.append(m.buttonsEl),m.inputEl.addClass("editable-has-buttons")),m.errorEl=angular.element(a.errorTpl),m.controlsEl.append(m.errorEl),m.editorEl=angular.element(m.single?a.formTpl:a.noformTpl),m.editorEl.append(m.controlsEl);for(var d in c.$attr)if(!(d.length<=1)){var e=!1,f=d.substring(1,2);if("e"===d.substring(0,1)&&f===f.toUpperCase()&&(e=d.substring(1),"Form"!==e&&"NgSubmit"!==e)){e=e.substring(0,1).toLowerCase()+b.camelToDash(e.substring(1));var h=""===c[d]?e:c[d];m.inputEl.attr(e,h)}}m.inputEl.addClass("editable-input"
 ),m.inputEl.attr("ng-model","$data"),m.editorEl.addClass(b.camelToDash(m.directiveName)),m.single&&(m.editorEl.attr("editable-form","$form"),m.editorEl.attr("blur",m.attrs.blur||("no"===m.buttons?"cancel":g.blurElem))),angular.isFunction(a.postrender)&&a.postrender.call(m)},m.setLocalValue=function(){m.scope.$data=m.useCopy?angular.copy(k(a.$parent)):k(a.$parent)},m.show=function(){return m.setLocalValue(),m.render(),d.after(m.editorEl),i(m.editorEl)(a),m.addListeners(),d.addClass("editable-hide"),m.onshow()},m.hide=function(){return m.editorEl.remove(),d.removeClass("editable-hide"),m.onhide()},m.cancel=function(){m.oncancel()},m.addListeners=function(){m.inputEl.bind("keyup",function(a){if(m.single)switch(a.keyCode){case 27:m.scope.$apply(function(){m.scope.$form.$cancel()})}}),m.single&&"no"===m.buttons&&m.autosubmit(),m.editorEl.bind("click",function(a){1===a.which&&m.scope.$form.$visible&&(m.scope.$form._clicked=!0)})},m.setWaiting=function(a){a?(l=!m.inputEl.attr("disabled")&&
 !m.inputEl.attr("ng-disabled")&&!m.inputEl.attr("ng-enabled"),l&&(m.inputEl.attr("disabled","disabled"),m.buttonsEl&&m.buttonsEl.find("button").attr("disabled","disabled"))):l&&(m.inputEl.removeAttr("disabled"),m.buttonsEl&&m.buttonsEl.find("button").removeAttr("disabled"))},m.activate=function(){setTimeout(function(){var a=m.inputEl[0];"focus"===g.activate&&a.focus&&a.focus(),"select"===g.activate&&a.select&&a.select()},0)},m.setError=function(b){angular.isObject(b)||(a.$error=b,m.error=b)},m.catchError=function(a,b){return angular.isObject(a)&&b!==!0?j.when(a).then(angular.bind(this,function(a){this.catchError(a,!0)}),angular.bind(this,function(a){this.catchError(a,!0)})):b&&angular.isObject(a)&&a.status&&200!==a.status&&a.data&&angular.isString(a.data)?(this.setError(a.data),a=a.data):angular.isString(a)&&this.setError(a),a},m.save=function(){k.assign(a.$parent,angular.copy(m.scope.$data))},m.handleEmpty=function(){var b=k(a.$parent),c=null===b||void 0===b||""===b||angular.isArra
 y(b)&&0===b.length;d.toggleClass("editable-empty",c)},m.autosubmit=angular.noop,m.onshow=angular.noop,m.onhide=angular.noop,m.oncancel=angular.noop,m.onbeforesave=angular.noop,m.onaftersave=angular.noop}return c.$inject=["$scope","$attrs","$element","$parse","editableThemes","editableOptions","$rootScope","$compile","$q"],c}]),angular.module("xeditable").factory("editableDirectiveFactory",["$parse","$compile","editableThemes","$rootScope","$document","editableController","editableFormController",function(a,b,c,d,e,f,g){return function(b){return{restrict:"A",scope:!0,require:[b.directiveName,"?^form"],controller:f,link:function(c,f,h,i){var j,k=i[0],l=!1;if(i[1])j=i[1],l=!0;else if(h.eForm){var m=a(h.eForm)(c);if(m)j=m,l=!0;else for(var n=0;n<e[0].forms.length;n++)if(e[0].forms[n].name===h.eForm){j=null,l=!0;break}}if(angular.forEach(b,function(a,b){void 0!==k[b]&&(k.parent[b]=k[b])}),angular.extend(k,b),k.init(!l),c.$editable=k,f.addClass("editable"),l)if(j){if(c.$form=j,!c.$form.$a
 ddEditable)throw"Form with editable elements should have `editable-form` attribute.";c.$form.$addEditable(k)}else d.$$editableBuffer=d.$$editableBuffer||{},d.$$editableBuffer[h.eForm]=d.$$editableBuffer[h.eForm]||[],d.$$editableBuffer[h.eForm].push(k),c.$form=null;else c.$form=g(),c.$form.$addEditable(k),h.eForm&&(c.$parent[h.eForm]=c.$form),h.eForm||(f.addClass("editable-click"),f.bind("click",function(a){a.preventDefault(),a.editable=k,c.$apply(function(){c.$form.$show()})}))}}}}]),angular.module("xeditable").factory("editableFormController",["$parse","$document","$rootScope","editablePromiseCollection","editableUtils",function(a,b,c,d,e){var f=[];b.bind("click",function(a){if(1===a.which){for(var b=[],d=[],e=0;e<f.length;e++)f[e]._clicked?f[e]._clicked=!1:f[e].$waiting||("cancel"===f[e]._blur&&b.push(f[e]),"submit"===f[e]._blur&&d.push(f[e]));(b.length||d.length)&&c.$apply(function(){angular.forEach(b,function(a){a.$cancel()}),angular.forEach(d,function(a){a.$submit()})})}});var 
 g={$addEditable:function(a){this.$editables.push(a),a.elem.bind("$destroy",angular.bind(this,this.$removeEditable,a)),a.scope.$form||(a.scope.$form=this),this.$visible&&a.catchError(a.show())},$removeEditable:function(a){for(var b=0;b<this.$editables.length;b++)if(this.$editables[b]===a)return this.$editables.splice(b,1),void 0},$show:function(){if(!this.$visible){this.$visible=!0;var a=d();a.when(this.$onshow()),this.$setError(null,""),angular.forEach(this.$editables,function(b){a.when(b.show())}),a.then({onWait:angular.bind(this,this.$setWaiting),onTrue:angular.bind(this,this.$activate),onFalse:angular.bind(this,this.$activate),onString:angular.bind(this,this.$activate)}),setTimeout(angular.bind(this,function(){this._clicked=!1,-1===e.indexOf(f,this)&&f.push(this)}),0)}},$activate:function(a){var b;if(this.$editables.length){if(angular.isString(a))for(b=0;b<this.$editables.length;b++)if(this.$editables[b].name===a)return this.$editables[b].activate(),void 0;for(b=0;b<this.$editabl
 es.length;b++)if(this.$editables[b].error)return this.$editables[b].activate(),void 0;this.$editables[0].activate()}},$hide:function(){this.$visible&&(this.$visible=!1,this.$onhide(),angular.forEach(this.$editables,function(a){a.hide()}),e.arrayRemove(f,this))},$cancel:function(){this.$visible&&(this.$oncancel(),angular.forEach(this.$editables,function(a){a.cancel()}),this.$hide())},$setWaiting:function(a){this.$waiting=!!a,angular.forEach(this.$editables,function(b){b.setWaiting(!!a)})},$setError:function(a,b){angular.forEach(this.$editables,function(c){a&&c.name!==a||c.setError(b)})},$submit:function(){function a(a){var b=d();b.when(this.$onbeforesave()),b.then({onWait:angular.bind(this,this.$setWaiting),onTrue:a?angular.bind(this,this.$save):angular.bind(this,this.$hide),onFalse:angular.bind(this,this.$hide),onString:angular.bind(this,this.$activate)})}if(!this.$waiting){this.$setError(null,"");var b=d();angular.forEach(this.$editables,function(a){b.when(a.onbeforesave())}),b.the
 n({onWait:angular.bind(this,this.$setWaiting),onTrue:angular.bind(this,a,!0),onFalse:angular.bind(this,a,!1),onString:angular.bind(this,this.$activate)})}},$save:function(){angular.forEach(this.$editables,function(a){a.save()});var a=d();a.when(this.$onaftersave()),angular.forEach(this.$editables,function(b){a.when(b.onaftersave())}),a.then({onWait:angular.bind(this,this.$setWaiting),onTrue:angular.bind(this,this.$hide),onFalse:angular.bind(this,this.$hide),onString:angular.bind(this,this.$activate)})},$onshow:angular.noop,$oncancel:angular.noop,$onhide:angular.noop,$onbeforesave:angular.noop,$onaftersave:angular.noop};return function(){return angular.extend({$editables:[],$visible:!1,$waiting:!1,$data:{},_clicked:!1,_blur:null},g)}}]),angular.module("xeditable").directive("editableForm",["$rootScope","$parse","editableFormController","editableOptions",function(a,b,c,d){return{restrict:"A",require:["form"],compile:function(){return{pre:function(b,d,e,f){var g,h=f[0];e.editableForm?b
 [e.editableForm]&&b[e.editableForm].$show?(g=b[e.editableForm],angular.extend(h,g)):(g=c(),b[e.editableForm]=g,angular.extend(g,h)):(g=c(),angular.extend(h,g));var i=a.$$editableBuffer,j=h.$name;j&&i&&i[j]&&(angular.forEach(i[j],function(a){g.$addEditable(a)}),delete i[j])},post:function(a,c,e,f){var g;g=e.editableForm&&a[e.editableForm]&&a[e.editableForm].$show?a[e.editableForm]:f[0],e.onshow&&(g.$onshow=angular.bind(g,b(e.onshow),a)),e.onhide&&(g.$onhide=angular.bind(g,b(e.onhide),a)),e.oncancel&&(g.$oncancel=angular.bind(g,b(e.oncancel),a)),e.shown&&b(e.shown)(a)&&g.$show(),g._blur=e.blur||d.blurForm,e.ngSubmit||e.submit||(e.onbeforesave&&(g.$onbeforesave=function(){return b(e.onbeforesave)(a,{$data:g.$data})}),e.onaftersave&&(g.$onaftersave=function(){return b(e.onaftersave)(a,{$data:g.$data})}),c.bind("submit",function(b){b.preventDefault(),a.$apply(function(){g.$submit()})})),c.bind("click",function(a){1===a.which&&g.$visible&&(g._clicked=!0)})}}}}}]),angular.module("xeditable
 ").factory("editablePromiseCollection",["$q",function(a){function b(){return{promises:[],hasFalse:!1,hasString:!1,when:function(b,c){if(b===!1)this.hasFalse=!0;else if(!c&&angular.isObject(b))this.promises.push(a.when(b));else{if(!angular.isString(b))return;this.hasString=!0}},then:function(b){function c(){h.hasString||h.hasFalse?!h.hasString&&h.hasFalse?e():f():d()}b=b||{};var d=b.onTrue||angular.noop,e=b.onFalse||angular.noop,f=b.onString||angular.noop,g=b.onWait||angular.noop,h=this;this.promises.length?(g(!0),a.all(this.promises).then(function(a){g(!1),angular.forEach(a,function(a){h.when(a,!0)}),c()},function(){g(!1),f()})):c()}}}return b}]),angular.module("xeditable").factory("editableUtils",[function(){return{indexOf:function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;c<a.length;c++)if(b===a[c])return c;return-1},arrayRemove:function(a,b){var c=this.indexOf(a,b);return c>=0&&a.splice(c,1),b},camelToDash:function(a){var b=/[A-Z]/g;return a.replace(b,function(a,b){return
 (b?"-":"")+a.toLowerCase()})},dashToCamel:function(a){var b=/([\:\-\_]+(.))/g,c=/^moz([A-Z])/;return a.replace(b,function(a,b,c,d){return d?c.toUpperCase():c}).replace(c,"Moz$1")}}}]),angular.module("xeditable").factory("editableNgOptionsParser",[function(){function a(a){var c;if(!(c=a.match(b)))throw"ng-options parse error";var d,e=c[2]||c[1],f=c[4]||c[6],g=c[5],h=(c[3]||"",c[2]?c[1]:f),i=c[7],j=c[8],k=j?c[8]:null;return void 0===g?(d=f+" in "+i,void 0!==j&&(d+=" track by "+k)):d="("+g+", "+f+") in "+i,{ngRepeat:d,locals:{valueName:f,keyName:g,valueFn:h,displayFn:e}}}var b=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/;return a}]),angular.module("xeditable").factory("editableThemes",function(){var a={"default":{formTpl:'<form class="editable-wrap"></form>',noformTpl:'<span class="editable-wrap"></span>',controlsTpl:'<span class="editable-controls"></span>'
 ,inputTpl:"",errorTpl:'<div class="editable-error" ng-show="$error" ng-bind="$error"></div>',buttonsTpl:'<span class="editable-buttons"></span>',submitTpl:'<button type="submit">save</button>',cancelTpl:'<button type="button" ng-click="$form.$cancel()">cancel</button>'},bs2:{formTpl:'<form class="form-inline editable-wrap" role="form"></form>',noformTpl:'<span class="editable-wrap"></span>',controlsTpl:'<div class="editable-controls controls control-group" ng-class="{\'error\': $error}"></div>',inputTpl:"",errorTpl:'<div class="editable-error help-block" ng-show="$error" ng-bind="$error"></div>',buttonsTpl:'<span class="editable-buttons"></span>',submitTpl:'<button type="submit" class="btn btn-primary"><span class="icon-ok icon-white"></span></button>',cancelTpl:'<button type="button" class="btn" ng-click="$form.$cancel()"><span class="icon-remove"></span></button>'},bs3:{formTpl:'<form class="form-inline editable-wrap" role="form"></form>',noformTpl:'<span class="editable-wrap"></s
 pan>',controlsTpl:'<div class="editable-controls form-group" ng-class="{\'has-error\': $error}"></div>',inputTpl:"",errorTpl:'<div class="editable-error help-block" ng-show="$error" ng-bind="$error"></div>',buttonsTpl:'<span class="editable-buttons"></span>',submitTpl:'<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>',cancelTpl:'<button type="button" class="btn btn-default" ng-click="$form.$cancel()"><span class="glyphicon glyphicon-remove"></span></button>',buttonsClass:"",inputClass:"",postrender:function(){switch(this.directiveName){case"editableText":case"editableSelect":case"editableTextarea":case"editableEmail":case"editableTel":case"editableNumber":case"editableUrl":case"editableSearch":case"editableDate":case"editableDatetime":case"editableTime":case"editableMonth":case"editableWeek":if(this.inputEl.addClass("form-control"),this.theme.inputClass){if(this.inputEl.attr("multiple")&&("input-sm"===this.theme.inputClass||"input-l
 g"===this.theme.inputClass))break;this.inputEl.addClass(this.theme.inputClass)}}this.buttonsEl&&this.theme.buttonsClass&&this.buttonsEl.find("button").addClass(this.theme.buttonsClass)}}};return a});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/routes/admin.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/routes/admin.js b/modules/web-control-center/nodejs/routes/admin.js
index 87719b2..b15443e 100644
--- a/modules/web-control-center/nodejs/routes/admin.js
+++ b/modules/web-control-center/nodejs/routes/admin.js
@@ -17,12 +17,16 @@
 
 var router = require('express').Router();
 var db = require('../db');
-var uiUtils = require('../utils/ui-utils');
+var uiUtils = require('../helpers/ui-utils');
+
+router.get('/', function(req, res) {
+    res.render('admin/index');
+});
 
 /**
  * Get list of user accounts.
  */
-router.get('/ajax/list', function(req, res) {
+router.post('/list', function(req, res) {
     db.Account.find({}, function (err, users) {
         if (err)
             return res.status(500).send(err.message);
@@ -37,7 +41,7 @@ router.get('/ajax/list', function(req, res) {
     });
 });
 
-router.get('/ajax/remove', function(req, res) {
+router.post('/remove', function(req, res) {
     var userId = req.query.userId;
 
     db.Account.findByIdAndRemove(userId, function(err) {
@@ -48,7 +52,7 @@ router.get('/ajax/remove', function(req, res) {
     });
 });
 
-router.get('/ajax/setAdmin', function(req, res) {
+router.post('/save', function(req, res) {
     var userId = req.query.userId;
     var adminFlag = req.query.adminFlag;
 
@@ -60,12 +64,8 @@ router.get('/ajax/setAdmin', function(req, res) {
     });
 });
 
-router.get('/userList', function(req, res) {
-    res.render('admin/userList');
-});
-
-router.get('/become', function(req, res) {
-    var viewedUserId = req.query.viewedUserId;
+router.post('/become', function(req, res) {
+    var viewedUserId = req.body.viewedUserId;
 
     if (!viewedUserId) {
         req.session.viewedUser = null;
@@ -76,9 +76,8 @@ router.get('/become', function(req, res) {
     }
 
     db.Account.findById(viewedUserId, function(err, viewedUser) {
-        if (err) {
+        if (err)
             return res.sendStatus(404);
-        }
 
         req.session.viewedUser = {_id: viewedUser._id, username: viewedUser.username};
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/routes/generator/common.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/routes/generator/common.js b/modules/web-control-center/nodejs/routes/generator/common.js
new file mode 100644
index 0000000..763088c
--- /dev/null
+++ b/modules/web-control-center/nodejs/routes/generator/common.js
@@ -0,0 +1,287 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var _ = require('lodash');
+
+exports.mainComment = function() {
+    return 'This configuration was generated by Ignite Control Center ('
+        + formatDate(new Date()) + ')';
+};
+
+function addLeadingZero(numberStr, minSize) {
+    if (typeof (numberStr) != 'string')
+        numberStr = '' + numberStr;
+    
+    while (numberStr.length < minSize) {
+        numberStr = '0' + numberStr;
+    }
+    
+    return numberStr;
+}
+
+exports.formatDate = formatDate;
+
+function formatDate(date) {
+    var dd = addLeadingZero(date.getDate(), 2);
+    var mm = addLeadingZero(date.getMonth() + 1, 2);
+    
+    var yyyy = date.getFullYear();
+
+    return mm + '/' + dd + '/' + yyyy + ' ' + addLeadingZero(date.getHours(), 2) + ':' + addLeadingZero(date.getMinutes(), 2);
+}
+
+exports.builder = function () {
+    var res = [];
+
+    res.deep = 0;
+    res.lineStart = true;
+
+    res.append = function(s) {
+        if (this.lineStart) {
+            for (var i = 0; i < this.deep; i++)
+                this.push('    ');
+
+            this.lineStart = false;
+        }
+
+        this.push(s);
+
+        return this;
+    };
+
+    res.line = function(s) {
+        if (s)
+            this.append(s);
+
+        this.push('\n');
+        this.lineStart = true;
+
+        return this;
+    };
+
+    res.startBlock = function(s) {
+        if (s)
+            this.append(s);
+
+        this.push('\n');
+        this.lineStart = true;
+        this.deep++;
+
+        return this;
+    };
+
+    res.endBlock = function(s) {
+        this.deep--;
+
+        if (s)
+            this.append(s);
+
+        this.push('\n');
+        this.lineStart = true;
+
+        return this;
+    };
+
+    res.emptyLineIfNeeded = function() {
+        if (this.needEmptyLine) {
+            this.line();
+
+            this.needEmptyLine = false;
+            
+            return true;
+        }
+
+        return false;
+    };
+
+    res.imports = {};
+    
+    res.importClass = function(fullClassName) {
+        var dotIdx = fullClassName.lastIndexOf('.');
+        
+        var shortName;
+        
+        if (dotIdx > 0)
+            shortName = fullClassName.substr(dotIdx + 1);
+        else 
+            shortName = fullClassName;
+        
+        if (this.imports[shortName]) {
+            if (this.imports[shortName] != fullClassName)
+                throw "Class name conflict: " + this.imports[shortName] + ' and ' + fullClassName;
+        }
+        else {
+            this.imports[shortName] = fullClassName;
+        }
+        
+        return shortName;
+    };
+    
+    res.generateImports = function() {
+        var res = [];
+        
+        for (var clsName in this.imports) {
+            if (this.imports.hasOwnProperty(clsName))
+                res.push('import ' + this.imports[clsName] + ';');
+        }
+        
+        return res.join('\n')
+    };
+    
+    return res;
+};
+
+function ClassDescriptor(className, fields) {
+    this.className = className;
+
+    this.fields = fields;
+}
+
+exports.evictionPolicies = {
+    'LRU': new ClassDescriptor('org.apache.ignite.cache.eviction.lru.LruEvictionPolicy',
+        {batchSize: null, maxMemorySize: null, maxSize: null}),
+    'RND': new ClassDescriptor('org.apache.ignite.cache.eviction.random.RandomEvictionPolicy', {maxSize: null}),
+    'FIFO': new ClassDescriptor('org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy',
+        {batchSize: null, maxMemorySize: null, maxSize: null}),
+    'SORTED': new ClassDescriptor('org.apache.ignite.cache.eviction.sorted.SortedEvictionPolicy',
+        {batchSize: null, maxMemorySize: null, maxSize: null})
+};
+
+exports.knownClasses = {
+    Oracle: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.OracleDialect', {}),
+    DB2: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.DB2Dialect', {}),
+    SQLServer: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.SQLServerDialect', {}),
+    MySQL: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.MySQLDialect', {}),
+    PostgreSQL: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.BasicJdbcDialect', {}),
+    H2: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.H2Dialect', {})
+};
+
+exports.dataSources = {
+    Oracle: 'oracle.jdbc.pool.OracleDataSource',
+    DB2: 'com.ibm.db2.jcc.DB2ConnectionPoolDataSource',
+    SQLServer: 'com.microsoft.sqlserver.jdbc.SQLServerDataSource',
+    MySQL: 'com.mysql.jdbc.jdbc2.optional.MysqlDataSource',
+    PostgreSQL: 'org.postgresql.ds.PGPoolingDataSource',
+    H2: 'org.h2.jdbcx.JdbcDataSource'
+};
+
+exports.storeFactories = {
+    CacheJdbcPojoStoreFactory: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory', {
+        dataSourceBean: null,
+        dialect: {type: 'className'}
+    }),
+
+    CacheJdbcBlobStoreFactory: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.CacheJdbcBlobStoreFactory', {
+        user: null,
+        dataSourceBean: null,
+        initSchema: null,
+        createTableQuery: null,
+        loadQuery: null,
+        insertQuery: null,
+        updateQuery: null,
+        deleteQuery: null
+    }),
+
+    CacheHibernateBlobStoreFactory: new ClassDescriptor('org.apache.ignite.cache.store.hibernate.CacheHibernateBlobStoreFactory', {
+        hibernateProperties: {type: 'propertiesAsList', propVarName: 'props'}
+    })
+};
+
+exports.atomicConfiguration = new ClassDescriptor('org.apache.ignite.configuration.AtomicConfiguration', {
+    backups: null,
+    cacheMode: {type: 'enum', enumClass: 'CacheMode'},
+    atomicSequenceReserveSize: null
+});
+
+exports.swapSpaceSpi = new ClassDescriptor('org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpi', {
+    baseDirectory: null,
+    readStripesNumber: null,
+    maximumSparsity: {type: 'float'},
+    maxWriteQueueSize: null,
+    writeBufferSize: null
+});
+
+exports.transactionConfiguration = new ClassDescriptor('org.apache.ignite.configuration.TransactionConfiguration', {
+    defaultTxConcurrency: {type: 'enum', enumClass: 'TransactionConcurrency'},
+    transactionIsolation: {type: 'TransactionIsolation', setterName: 'defaultTxIsolation'},
+    defaultTxTimeout: null,
+    pessimisticTxLogLinger: null,
+    pessimisticTxLogSize: null,
+    txSerializableEnabled: null
+});
+
+exports.hasProperty = function(obj, props) {
+    for (var propName in props) {
+        if (props.hasOwnProperty(propName)) {
+            if (obj[propName])
+                return true;
+        }
+    }
+
+    return false;
+};
+
+/**
+ * Convert some name to valid java name.
+ *
+ * @param name to convert.
+ * @returns {string} Valid java name.
+ */
+exports.toJavaName = function(name) {
+    var javaName = name.replace(/[^A-Za-z_0-9]+/, '_');
+
+    return javaName.charAt(0).toLocaleUpperCase() + javaName.slice(1);
+};
+
+/**
+ * Generate properties file with properties stubs for stores data sources.
+ *
+ * @param cluster Configuration to process.
+ * @returns {string} Generated content.
+ */
+exports.generateProperties = function(cluster) {
+    var res = builder();
+
+    var datasources = [];
+
+    if (cluster.caches && cluster.caches.length > 0) {
+
+        _.foreach(cluster.caches, function (cache) {
+            if (cache.cacheStoreFactory && cache.cacheStoreFactory.kind) {
+                var storeFactory = cache.cacheStoreFactory[cache.cacheStoreFactory.kind];
+
+                if (storeFactory.dialect) {
+                    var beanId = storeFactory.dataSourceBean;
+
+                    if (!_.contains(datasources, beanId)) {
+                        datasources.push(beanId);
+
+                        res.line(beanId + '.jdbc.url=YOUR_JDBC_URL');
+                        res.line(beanId + '.jdbc.username=YOUR_USER_NAME');
+                        res.line(beanId + '.jdbc.password=YOUR_PASSWORD');
+                        res.line();
+                    }
+                }
+            }
+        });
+    }
+
+    if (datasources.length > 0)
+        return '# ' + mainComment() + '\n\n' + res.join();
+
+    return '';
+};

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/routes/generator/java.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/routes/generator/java.js b/modules/web-control-center/nodejs/routes/generator/java.js
new file mode 100644
index 0000000..037df10
--- /dev/null
+++ b/modules/web-control-center/nodejs/routes/generator/java.js
@@ -0,0 +1,608 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var _ = require('lodash');
+
+var generatorUtils = require("./common");
+
+exports.generateClusterConfiguration = function(cluster, generateJavaClass) {
+    var res = generatorUtils.builder();
+
+    res.datasourceBeans = [];
+
+    if (generateJavaClass) {
+        res.line('/**');
+        res.line(' * ' + generatorUtils.mainComment());
+        res.line(' */');
+        res.startBlock('public class ConfigurationFactory {');
+        res.line('/**');
+        res.line(' * Configure grid.');
+        res.line(' */');
+        res.startBlock('public IgniteConfiguration createConfiguration() {');
+    }
+    
+    res.importClass('org.apache.ignite.configuration.IgniteConfiguration');
+    
+    res.line('IgniteConfiguration cfg = new IgniteConfiguration();');
+    res.line();
+
+    if (cluster.discovery) {
+        var d = cluster.discovery;
+
+        res.importClass('org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi');
+        res.line('TcpDiscoverySpi discovery = new TcpDiscoverySpi();');
+
+        switch (d.kind) {
+            case 'Multicast':
+                addBeanWithProperties(res, d.Multicast, 'discovery', 'ipFinder', 'ipFinder',
+                    'org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder', {
+                        multicastGroup: null,
+                        multicastPort: null,
+                        responseWaitTime: null,
+                        addressRequestAttempts: null,
+                        localAddress: null
+                    }, true);
+
+                break;
+
+            case 'Vm':
+                addBeanWithProperties(res, d.Vm, 'discovery', 'ipFinder', 'ipFinder',
+                    'org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder', {
+                        addresses: {type: 'list'}
+                    }, true);
+
+                break;
+
+            case 'S3':
+                if (d.S3) {
+                    addBeanWithProperties(res, d.S3, 'discovery', 'ipFinder', 'ipFinder',
+                        'org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder', {bucketName: null}, 
+                        true);
+                }
+                else {
+                    res.importClass('org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder');
+                    
+                    res.line('discovery.setIpFinder(new TcpDiscoveryS3IpFinder());');
+                }
+
+                break;
+
+            case 'Cloud':
+                addBeanWithProperties(res, d.Cloud, 'discovery', 'ipFinder', 'ipFinder',
+                    'org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinder', {
+                        credential: null,
+                        credentialPath: null,
+                        identity: null,
+                        provider: null,
+                        regions: {type: 'list'},
+                        zones: {type: 'list'}
+                    }, true);
+
+                break;
+
+            case 'GoogleStorage':
+                addBeanWithProperties(res, d.GoogleStorage, 'discovery', 'ipFinder', 'ipFinder',
+                    'org.apache.ignite.spi.discovery.tcp.ipfinder.gce.TcpDiscoveryGoogleStorageIpFinder', {
+                        projectName: null,
+                        bucketName: null,
+                        serviceAccountP12FilePath: null
+                    }, true);
+
+                //if (d.GoogleStorage.addrReqAttempts) todo ????
+                //    res.line('<property name="serviceAccountP12FilePath" value="' + escapeAttr(d.GoogleStorage.addrReqAttempts) + '"/>');
+
+                break;
+
+            case 'Jdbc':
+                res.importClass('org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder');
+                
+                res.line();
+                res.line('TcpDiscoveryJdbcIpFinder ipFinder = new TcpDiscoveryJdbcIpFinder();');
+                res.line('ipFinder.setInitSchema(' + (d.Jdbc.initSchema != null || d.Jdbc.initSchema) + ');');
+                res.line('discovery.setIpFinder(ipFinder);');
+                res.needEmptyLine = true;
+
+                break;
+
+            case 'SharedFs':
+                addBeanWithProperties(res, d.SharedFs, 'discovery', 'ipFinder', 'ipFinder',
+                    'org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder', {path: null}, 
+                    true);
+
+                break;
+
+            default:
+                throw "Unknown discovery kind: " + d.kind;
+        }
+
+        res.emptyLineIfNeeded();
+
+        res.line('cfg.setDiscoverySpi(discovery);');
+
+        res.needEmptyLine = true;
+    }
+
+    if (cluster.caches && cluster.caches.length > 0) {
+        res.emptyLineIfNeeded();
+
+        var names = [];
+
+        for (var i = 0; i < cluster.caches.length; i++) {
+            res.emptyLineIfNeeded();
+
+            var cache = cluster.caches[i];
+
+            var cacheName = 'cache' + generatorUtils.toJavaName(cache.name);
+
+            names.push(cacheName);
+
+            generateCacheConfiguration(cache, cacheName, res);
+
+            res.needEmptyLine = true;
+        }
+
+        res.emptyLineIfNeeded();
+
+        res.append('cfg.setCacheConfiguration(');
+
+        for (i = 0; i < names.length; i++) {
+            if (i > 0)
+                res.append(', ');
+
+            res.append(names[i]);
+        }
+
+        res.line(');');
+
+        res.needEmptyLine = true;
+    }
+
+    addBeanWithProperties(res, cluster.atomicConfiguration, 'cfg', 'atomicConfiguration', 'atomicCfg',
+        generatorUtils.atomicConfiguration.className, generatorUtils.atomicConfiguration.fields);
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cluster, 'cfg', 'networkTimeout');
+    addProperty(res, cluster, 'cfg', 'networkSendRetryDelay');
+    addProperty(res, cluster, 'cfg', 'networkSendRetryCount');
+    addProperty(res, cluster, 'cfg', 'segmentCheckFrequency');
+    addProperty(res, cluster, 'cfg', 'waitForSegmentOnStart');
+    addProperty(res, cluster, 'cfg', 'discoveryStartupDelay');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cluster, 'cfg', 'deploymentMode', 'DeploymentMode');
+
+    res.needEmptyLine = true;
+
+    if (cluster.includeEventTypes && cluster.includeEventTypes.length > 0) {
+        res.emptyLineIfNeeded();
+        
+        if (cluster.includeEventTypes.length == 1) {
+            res.importClass('org.apache.ignite.events.EventType');
+            
+            res.line('cfg.setIncludeEventTypes(EventType.' + cluster.includeEventTypes[0] + ');');
+        }
+        else {
+            res.append('int[] events = new int[EventType.' + cluster.includeEventTypes[0] + '.length');
+            
+            for (i = 1; i < cluster.includeEventTypes.length; i++) {
+                res.line();
+                
+                res.append('    + EventType.' + cluster.includeEventTypes[i] + '.length');
+            }
+            
+            res.line('];');
+            res.line();
+            res.line('int k = 0;');
+
+            for (i = 0; i < cluster.includeEventTypes.length; i++) {
+                res.line();
+
+                var e = cluster.includeEventTypes[i];
+                
+                res.line('System.arraycopy(EventType.' + e + ', 0, events, k, EventType.' + e + '.length);');
+                res.line('k += EventType.' + e + '.length;');
+            }
+            
+            res.line();
+            res.line('cfg.setIncludeEventTypes(events);');
+        }
+
+        res.needEmptyLine = true;
+    }
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cluster, 'cfg', 'marshalLocalJobs');
+    addProperty(res, cluster, 'cfg', 'marshCacheKeepAliveTime');
+    addProperty(res, cluster, 'cfg', 'marshCachePoolSize');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cluster, 'cfg', 'metricsExpireTime');
+    addProperty(res, cluster, 'cfg', 'metricsHistorySize');
+    addProperty(res, cluster, 'cfg', 'metricsLogFrequency');
+    addProperty(res, cluster, 'cfg', 'metricsUpdateFrequency');
+    res.needEmptyLine = true;
+
+    addProperty(res, cluster, 'cfg', 'peerClassLoadingEnabled');
+    addMultiparamProperty(res, cluster, 'cfg', 'peerClassLoadingLocalClassPathExclude');
+    addProperty(res, cluster, 'cfg', 'peerClassLoadingMissedResourcesCacheSize');
+    addProperty(res, cluster, 'cfg', 'peerClassLoadingThreadPoolSize');
+    res.needEmptyLine = true;
+
+    if (cluster.swapSpaceSpi && cluster.swapSpaceSpi.kind == 'FileSwapSpaceSpi') {
+        addBeanWithProperties(res, cluster.swapSpaceSpi.FileSwapSpaceSpi, 'cfg', 'swapSpaceSpi', 'swapSpi',
+            generatorUtils.swapSpaceSpi.className, generatorUtils.swapSpaceSpi.fields, true);
+
+        res.needEmptyLine = true;
+    }
+
+    addProperty(res, cluster, 'cfg', 'clockSyncSamples');
+    addProperty(res, cluster, 'cfg', 'clockSyncFrequency');
+    addProperty(res, cluster, 'cfg', 'timeServerPortBase');
+    addProperty(res, cluster, 'cfg', 'timeServerPortRange');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cluster, 'cfg', 'publicThreadPoolSize');
+    addProperty(res, cluster, 'cfg', 'systemThreadPoolSize');
+    addProperty(res, cluster, 'cfg', 'managementThreadPoolSize');
+    addProperty(res, cluster, 'cfg', 'igfsThreadPoolSize');
+
+    res.needEmptyLine = true;
+
+    addBeanWithProperties(res, cluster.transactionConfiguration, 'cfg', 'transactionConfiguration',
+        'transactionConfiguration', generatorUtils.transactionConfiguration.className,
+        generatorUtils.transactionConfiguration.fields);
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cluster, 'cfg', 'cacheSanityCheckEnabled');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cluster, 'cfg', 'utilityCacheKeepAliveTime');
+    addProperty(res, cluster, 'cfg', 'utilityCachePoolSize');
+
+    if (generateJavaClass) {
+        res.line();
+        res.line('return cfg;');
+        res.endBlock('}');
+        res.endBlock('}');
+        
+        return res.generateImports() + '\n\n' + res.join('')
+    }
+    
+    return res.join('');
+};
+
+function createEvictionPolicy(res, evictionPolicy, varName, propertyName) {
+    if (evictionPolicy && evictionPolicy.kind) {
+        var e = generatorUtils.evictionPolicies[evictionPolicy.kind];
+
+        var obj = evictionPolicy[evictionPolicy.kind.toUpperCase()];
+
+        addBeanWithProperties(res, obj, varName, propertyName, propertyName, e.className, e.fields, true);
+    }
+}
+
+exports.generateCacheConfiguration = generateCacheConfiguration;
+
+/**
+ * Generate java code for cache configuration.
+ *
+ * @param cacheCfg Cache config.
+ * @param varName Variable name.
+ * @param res Result builder.
+ * @returns {*} Append generated java code to builder and return it.
+ */
+function generateCacheConfiguration(cacheCfg, varName, res) {
+    if (!res)
+        res = generatorUtils.builder();
+
+    res.emptyLineIfNeeded();
+
+    res.importClass('org.apache.ignite.configuration.CacheConfiguration');
+    
+    res.line('CacheConfiguration ' + varName + ' = new CacheConfiguration();');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, varName, 'name');
+    
+    addProperty(res, cacheCfg, varName, 'mode', 'CacheMode', 'cacheMode');
+
+    addProperty(res, cacheCfg, varName, 'atomicityMode', 'CacheAtomicityMode');
+    addProperty(res, cacheCfg, varName, 'backups');
+    addProperty(res, cacheCfg, varName, 'startSize');
+    addProperty(res, cacheCfg, varName, 'readFromBackup');
+
+    res.needEmptyLine = true;
+    
+    addProperty(res, cacheCfg, varName, 'memoryMode', 'CacheMemoryMode');
+    addProperty(res, cacheCfg, varName, 'offHeapMaxMemory');
+    addProperty(res, cacheCfg, varName, 'swapEnabled');
+    addProperty(res, cacheCfg, varName, 'copyOnRead');
+
+    res.needEmptyLine = true;
+
+    createEvictionPolicy(res, cacheCfg.evictionPolicy, varName, 'evictionPolicy');
+
+    if (cacheCfg.nearConfiguration && (cacheCfg.nearConfiguration.nearStartSize || cacheCfg.nearConfiguration.nearEvictionPolicy.kind)) {
+        res.needEmptyLine = true;
+
+        addBeanWithProperties(res, cacheCfg.nearConfiguration, varName, 'nearConfiguration', 'nearConfiguration',
+            'org.apache.ignite.configuration.NearCacheConfiguration',
+            {nearStartSize: null, atomicSequenceReserveSize: null}, true);
+
+        if (cacheCfg.nearConfiguration && cacheCfg.nearConfiguration.nearEvictionPolicy && cacheCfg.nearConfiguration.nearEvictionPolicy.kind) {
+            createEvictionPolicy(res, cacheCfg.nearConfiguration.nearEvictionPolicy, 'nearConfiguration', 'nearEvictionPolicy');
+        }
+    }
+
+    res.needEmptyLine = true;
+    
+    addProperty(res, cacheCfg, varName, 'sqlEscapeAll');
+    addProperty(res, cacheCfg, varName, 'sqlOnheapRowCacheSize');
+    addProperty(res, cacheCfg, varName, 'longQueryWarningTimeout');
+    
+    if (cacheCfg.indexedTypes && cacheCfg.indexedTypes.length > 0) {
+        res.emptyLineIfNeeded();
+        
+        res.append(varName + '.setIndexedTypes(');
+        
+        for (var i = 0; i < cacheCfg.indexedTypes.length; i++) {
+            if (i > 0)
+                res.append(', ');
+
+            var pair = cacheCfg.indexedTypes[i];
+            
+            res.append(toJavaCode(pair.keyClass, 'class')).append(', ').append(toJavaCode(pair.valueClass, 'class'))
+        }
+        
+        res.line(');');
+    }
+
+    addMultiparamProperty(res, cacheCfg, varName, 'sqlFunctionClasses', 'class');
+    
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, varName, 'rebalanceMode', 'CacheRebalanceMode');
+    addProperty(res, cacheCfg, varName, 'rebalanceThreadPoolSize');
+    addProperty(res, cacheCfg, varName, 'rebalanceBatchSize');
+    addProperty(res, cacheCfg, varName, 'rebalanceOrder');
+    addProperty(res, cacheCfg, varName, 'rebalanceDelay');
+    addProperty(res, cacheCfg, varName, 'rebalanceTimeout');
+    addProperty(res, cacheCfg, varName, 'rebalanceThrottle');
+
+    res.needEmptyLine = true;
+    
+    if (cacheCfg.cacheStoreFactory && cacheCfg.cacheStoreFactory.kind) {
+        var storeFactory = cacheCfg.cacheStoreFactory[cacheCfg.cacheStoreFactory.kind];
+        var data = generatorUtils.storeFactories[cacheCfg.cacheStoreFactory.kind];
+
+        var sfVarName = 'storeFactory' + generatorUtils.toJavaName(cacheCfg.name);
+        var dsVarName = 'none';
+
+        if (storeFactory.dialect) {
+            var dataSourceBean = storeFactory.dataSourceBean;
+
+            dsVarName = 'dataSource' + generatorUtils.toJavaName(dataSourceBean);
+
+            if (!_.contains(res.datasourceBeans, dataSourceBean)) {
+                res.datasourceBeans.push(dataSourceBean);
+
+                var dataSource = generatorUtils.dataSources[storeFactory.dialect];
+
+                res.line();
+                res.line(dataSource.className + ' ' + dsVarName + ' = new ' + dataSource.className + '();');
+                res.line(dsVarName + '.setURL(_URL_);');
+                res.line(dsVarName + '.setUsername(_User_Name_);');
+                res.line(dsVarName + '.setPassword(_Password_);');
+            }
+        }
+
+        addBeanWithProperties(res, storeFactory, varName, 'cacheStoreFactory', sfVarName, data.className,
+            data.fields, true);
+
+        if (dsVarName != 'none')
+            res.line(sfVarName + '.setDataSource(' + dsVarName + ');');
+    }
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, varName, 'loadPreviousValue');
+    addProperty(res, cacheCfg, varName, 'readThrough');
+    addProperty(res, cacheCfg, varName, 'writeThrough');
+
+    res.needEmptyLine = true;
+    
+    addProperty(res, cacheCfg, varName, 'invalidate');
+    addProperty(res, cacheCfg, varName, 'defaultLockTimeout');
+    addProperty(res, cacheCfg, varName, 'transactionManagerLookupClassName');
+    
+    res.needEmptyLine = true;
+    
+    addProperty(res, cacheCfg, varName, 'writeBehindEnabled');
+    addProperty(res, cacheCfg, varName, 'writeBehindBatchSize');
+    addProperty(res, cacheCfg, varName, 'writeBehindFlushSize');
+    addProperty(res, cacheCfg, varName, 'writeBehindFlushFrequency');
+    addProperty(res, cacheCfg, varName, 'writeBehindFlushThreadCount');
+    
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, varName, 'statisticsEnabled');
+    addProperty(res, cacheCfg, varName, 'managementEnabled');
+
+    res.needEmptyLine = true;
+
+    addProperty(res, cacheCfg, varName, 'maxConcurrentAsyncOperations');
+    
+    return res;
+}
+
+function toJavaCode(val, type) {
+    if (val == null)
+       return 'null';
+
+    if (type == 'float')
+        return val + 'f';
+    
+    if (type == 'class')
+        return val + '.class';
+    
+    if (type)
+        return type + '.' + val;
+    
+    if (typeof(val) == 'string')
+        return '"' + val.replace('"', '\\"') + '"';
+
+    if (typeof(val) == 'number' || typeof(val) == 'boolean')
+        return '' + val;
+
+    throw "Unknown type: " + typeof(val) + ' (' + val + ')';
+}
+
+function addProperty(res, obj, objVariableName, propName, enumType, setterName) {
+    var val = obj[propName];
+    
+    if (val) {
+        res.emptyLineIfNeeded();
+
+        res.line(objVariableName + '.' + getSetterName(setterName ? setterName : propName)
+            + '(' + toJavaCode(val, enumType)  + ');');
+    }
+}
+
+function getSetterName(propName) {
+    return 'set' + propName.charAt(0).toLocaleUpperCase() + propName.slice(1);
+}
+
+function addListProperty(res, obj, objVariableName, propName, enumType, setterName) {
+    var val = obj[propName];
+    
+    if (val && val.length > 0) {
+        res.append(objVariableName + '.' + getSetterName(setterName ? setterName : propName) + '(Arrays.asList(');
+
+        for (var i = 0; i < val.length; i++) {
+            if (i > 0)
+                res.append(', ');
+            
+            res.append(toJavaCode(val[i], enumType));
+        }
+        
+        res.line('));');
+    }
+}
+
+function addMultiparamProperty(res, obj, objVariableName, propName, type, setterName) {
+    var val = obj[propName];
+    
+    if (val && val.length > 0) {
+        res.append(objVariableName + '.' + getSetterName(setterName ? setterName : propName) + '(');
+
+        for (var i = 0; i < val.length; i++) {
+            if (i > 0)
+                res.append(', ');
+            
+            res.append(toJavaCode(val[i], type));
+        }
+        
+        res.line(');');
+    }
+}
+
+function addBeanWithProperties(res, bean, objVarName, beanPropName, beanVarName, beanClass, props, createBeanAlthoughNoProps) {
+    if (!bean)
+        return;
+    
+    if (generatorUtils.hasProperty(bean, props)) {
+        if (!res.emptyLineIfNeeded()) {
+            res.line();
+        }
+        
+        res.line(beanClass + ' ' + beanVarName + ' = new ' + beanClass + '();');
+
+        for (var propName in props) {
+            if (props.hasOwnProperty(propName)) {
+                var descr = props[propName];
+
+                if (descr) {
+                    switch (descr.type) {
+                        case 'list':
+                            addListProperty(res, bean, beanVarName, propName, descr.elementsType, descr.setterName);
+                            break;
+                        
+                        case 'enum':
+                            addProperty(res, bean, beanVarName, propName, descr.enumClass, descr.setterName);
+                            break;
+                        
+                        case 'float':
+                            addProperty(res, bean, beanVarName, propName, 'float', descr.setterName);
+                            break;
+                        
+                        case 'propertiesAsList':
+                            var val = bean[propName];
+                            
+                            if (val && val.length > 0) {
+                                res.line('Properties ' + descr.propVarName + ' = new Properties();');
+                                
+                                for (var i = 0; i < val.length; i++) {
+                                    var nameAndValue = val[i];
+                                    
+                                    var eqIndex = nameAndValue.indexOf('=');
+                                    if (eqIndex >= 0) {
+                                        res.line(descr.propVarName + '.setProperty(' 
+                                            + nameAndValue.substring(0, eqIndex) + ', ' 
+                                            + nameAndValue.substr(eqIndex + 1) + ');');
+                                    }
+
+                                }
+                                
+                                res.line(beanVarName + '.' + getSetterName(propName) + '(' + descr.propVarName + ');');
+                            }
+                            break;
+                        
+                        case 'className':
+                            if (bean[propName]) {
+                                res.line(beanVarName + '.' + getSetterName(propName) + '(new ' + generatorUtils.knownClasses[bean[propName]].className + '());');
+                            }
+
+                            break;
+                        
+                        default:
+                            addProperty(res, bean, beanVarName, propName, null, descr.setterName);
+                    }
+                }
+                else {
+                    addProperty(res, bean, beanVarName, propName);
+                }
+            }
+        }
+        
+        res.line(objVarName + '.' + getSetterName(beanPropName) + '(' + beanVarName + ');');
+        
+        res.needEmptyLine = true;
+    }
+    else if (createBeanAlthoughNoProps) {
+        res.emptyLineIfNeeded();
+        
+        res.line(objVarName + '.' + getSetterName(beanPropName) + '(new ' + beanClass + '());');
+    }
+}


[4/6] incubator-ignite git commit: # ignite-843 Refactor

Posted by an...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/generator/xml.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/generator/xml.js b/modules/web-control-center/nodejs/generator/xml.js
deleted file mode 100644
index 7f0d98f..0000000
--- a/modules/web-control-center/nodejs/generator/xml.js
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var _ = require('lodash');
-
-var generatorUtils = require("./common");
-var dataStructures = require("../public/javascripts/dataStructures.js");
-
-exports.generateClusterConfiguration = function(cluster) {
-    var res = generatorUtils.builder();
-
-    res.datasources = [];
-    res.deep = 1;
-
-    // Generate Ignite Configuration.
-    res.startBlock('<bean class="org.apache.ignite.configuration.IgniteConfiguration">');
-
-    // Generate discovery.
-    if (cluster.discovery) {
-        res.startBlock('<property name="discoverySpi">');
-        res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">');
-        res.startBlock('<property name="ipFinder">');
-
-        var d = cluster.discovery;
-
-        switch (d.kind) {
-            case 'Multicast':
-                res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">');
-
-                addProperty(res, d.Multicast, 'multicastGroup');
-                addProperty(res, d.Multicast, 'multicastPort');
-                addProperty(res, d.Multicast, 'responseWaitTime');
-                addProperty(res, d.Multicast, 'addressRequestAttempts');
-                addProperty(res, d.Multicast, 'localAddress');
-
-                res.endBlock('</bean>');
-
-                break;
-
-            case 'Vm':
-                if (d.Vm.addresses.length > 0) {
-                    res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">');
-
-                    addListProperty(res, d.Vm, 'addresses');
-
-                    res.endBlock('</bean>');
-                }
-                else {
-                    res.line('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"/>');
-                }
-
-                break;
-
-            case 'S3':
-                res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">');
-
-                if (d.S3 && d.S3.bucketName)
-                    res.line('<property name="bucketName" value="' + escapeAttr(d.S3.bucketName) + '" />');
-
-                res.endBlock('</bean>');
-
-                break;
-
-            case 'Cloud':
-                res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinder">');
-
-                addProperty(res, d.Cloud, 'credential');
-                addProperty(res, d.Cloud, 'credentialPath');
-                addProperty(res, d.Cloud, 'identity');
-                addProperty(res, d.Cloud, 'provider');
-                addListProperty(res, d.Cloud, 'regions');
-                addListProperty(res, d.Cloud, 'zones');
-
-                res.endBlock('</bean>');
-
-                break;
-
-            case 'GoogleStorage':
-                res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.gce.TcpDiscoveryGoogleStorageIpFinder">');
-
-                addProperty(res, d.GoogleStorage, 'projectName');
-                addProperty(res, d.GoogleStorage, 'bucketName');
-                addProperty(res, d.GoogleStorage, 'serviceAccountP12FilePath');
-
-                //if (d.GoogleStorage.addrReqAttempts) todo ????
-                //    res.line('<property name="serviceAccountP12FilePath" value="' + escapeAttr(d.GoogleStorage.addrReqAttempts) + '"/>');
-
-                res.endBlock('</bean>');
-
-                break;
-
-            case 'Jdbc':
-                res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder">');
-                res.line('<property name="initSchema" value="' + (d.Jdbc.initSchema != null || d.Jdbc.initSchema) + '"/>');
-                res.endBlock('</bean>');
-
-                break;
-
-            case 'SharedFs':
-                if (d.SharedFs.path) {
-                    res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder">');
-                    addProperty(res, d.SharedFs, 'path');
-                    res.endBlock('</bean>');
-                }
-                else {
-                    res.line('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder"/>');
-                }
-
-                break;
-
-            default:
-                throw "Unknown discovery kind: " + d.kind;
-        }
-
-        res.endBlock('</property>');
-        res.endBlock('</bean>');
-        res.endBlock('</property>');
-
-        res.needEmptyLine = true
-    }
-
-    // Generate atomics group.
-    addBeanWithProperties(res, cluster.atomicConfiguration, 'atomicConfiguration',
-        generatorUtils.atomicConfiguration.className, generatorUtils.atomicConfiguration.fields);
-    res.needEmptyLine = true;
-
-    // Generate communication group.
-    addProperty(res, cluster, 'networkTimeout');
-    addProperty(res, cluster, 'networkSendRetryDelay');
-    addProperty(res, cluster, 'networkSendRetryCount');
-    addProperty(res, cluster, 'segmentCheckFrequency');
-    addProperty(res, cluster, 'waitForSegmentOnStart');
-    addProperty(res, cluster, 'discoveryStartupDelay');
-    res.needEmptyLine = true;
-
-    // Generate deployment group.
-    addProperty(res, cluster, 'deploymentMode');
-    res.needEmptyLine = true;
-
-    // Generate events group.
-    if (cluster.includeEventTypes && cluster.includeEventTypes.length > 0) {
-        res.emptyLineIfNeeded();
-        
-        res.startBlock('<property name="includeEventTypes">');
-        
-        if (cluster.includeEventTypes.length == 1) {
-            res.line('<util:constant static-field="org.apache.ignite.events.EventType.' + cluster.includeEventTypes[0] + '"/>')
-        }
-        else {
-            res.startBlock('<array>');
-
-            for (i = 0; i < cluster.includeEventTypes.length; i++) {
-                if (i > 0)
-                    res.line();
-
-                var eventGroup = cluster.includeEventTypes[i];
-
-                res.line('<!-- EventType.' + eventGroup + ' -->');
-
-                var eventList = dataStructures.eventGroups[eventGroup];
-
-                for (var k = 0; k < eventList.length; k++) {
-                    res.line('<util:constant static-field="org.apache.ignite.events.EventType.' + eventList[k] + '"/>')
-                }
-            }
-
-            res.endBlock('</array>');
-        }
-        
-        res.endBlock('</property>');
-
-        res.needEmptyLine = true;
-    }
-
-    // Generate marshaller group.
-    addProperty(res, cluster, 'marshalLocalJobs');
-    addProperty(res, cluster, 'marshCacheKeepAliveTime');
-    addProperty(res, cluster, 'marshCachePoolSize');
-    res.needEmptyLine = true;
-
-    // Generate metrics group.
-    addProperty(res, cluster, 'metricsExpireTime');
-    addProperty(res, cluster, 'metricsHistorySize');
-    addProperty(res, cluster, 'metricsLogFrequency');
-    addProperty(res, cluster, 'metricsUpdateFrequency');
-    res.needEmptyLine = true;
-
-    // Generate PeerClassLoading group.
-    addProperty(res, cluster, 'peerClassLoadingEnabled');
-    addListProperty(res, cluster, 'peerClassLoadingLocalClassPathExclude');
-    addProperty(res, cluster, 'peerClassLoadingMissedResourcesCacheSize');
-    addProperty(res, cluster, 'peerClassLoadingThreadPoolSize');
-    res.needEmptyLine = true;
-
-    // Generate swap group.
-    if (cluster.swapSpaceSpi && cluster.swapSpaceSpi.kind == 'FileSwapSpaceSpi') {
-        addBeanWithProperties(res, cluster.swapSpaceSpi.FileSwapSpaceSpi, 'swapSpaceSpi',
-            generatorUtils.swapSpaceSpi.className, generatorUtils.swapSpaceSpi.fields, true);
-
-        res.needEmptyLine = true;
-    }
-
-    // Generate time group.
-    addProperty(res, cluster, 'clockSyncSamples');
-    addProperty(res, cluster, 'clockSyncFrequency');
-    addProperty(res, cluster, 'timeServerPortBase');
-    addProperty(res, cluster, 'timeServerPortRange');
-    res.needEmptyLine = true;
-
-    // Generate thread pools group.
-    addProperty(res, cluster, 'publicThreadPoolSize');
-    addProperty(res, cluster, 'systemThreadPoolSize');
-    addProperty(res, cluster, 'managementThreadPoolSize');
-    addProperty(res, cluster, 'igfsThreadPoolSize');
-    res.needEmptyLine = true;
-
-    // Generate transactions group.
-    addBeanWithProperties(res, cluster.transactionConfiguration, 'transactionConfiguration',
-        generatorUtils.transactionConfiguration.className, generatorUtils.transactionConfiguration.fields);
-    res.needEmptyLine = true;
-
-    // Generate utility group.
-    addProperty(res, cluster, 'utilityCacheKeepAliveTime');
-    addProperty(res, cluster, 'utilityCachePoolSize');
-
-    // Generate caches configs.
-    if (cluster.caches && cluster.caches.length > 0) {
-        res.emptyLineIfNeeded();
-
-        res.startBlock('<property name="cacheConfiguration">');
-        res.startBlock('<list>');
-
-        for (var i = 0; i < cluster.caches.length; i++) {
-            if (i > 0)
-                res.line();
-
-            generateCacheConfiguration(cluster.caches[i], res);
-        }
-
-        res.endBlock('</list>');
-        res.endBlock('</property>');
-
-        res.needEmptyLine = true;
-    }
-
-    res.endBlock('</bean>');
-
-    // Build final XML:
-    // 1. Add header.
-    var xml = '<?xml version="1.0" encoding="UTF-8"?>\n\n';
-
-    xml += '<!-- ' + generatorUtils.mainComment() + ' -->\n';
-    xml += '<beans xmlns="http://www.springframework.org/schema/beans"\n';
-    xml += '       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n';
-    xml += '       xmlns:util="http://www.springframework.org/schema/util"\n';
-    xml += '       xsi:schemaLocation="http://www.springframework.org/schema/beans\n';
-    xml += '                           http://www.springframework.org/schema/beans/spring-beans.xsd\n';
-    xml += '                           http://www.springframework.org/schema/util\n';
-    xml += '                           http://www.springframework.org/schema/util/spring-util.xsd">\n';
-
-    // 2. Add external property file and all data sources.
-    if (res.datasources.length > 0) {
-        xml += '    <!-- Load external properties file. -->\n';
-        xml += '    <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">\n';
-        xml += '        <property name="location" value="classpath:ignite.properties"/>\n';
-        xml += '    </bean>\n\n';
-
-        xml += '    <!-- Data source beans will be initialized from external properties file. -->\n';
-
-        _.forEach(res.datasources, function(item) {
-            var beanId = item.dataSourceBean;
-
-            xml += '    <bean id= "' + beanId + '" class="' + item.className + '">\n';
-            xml += '        <property name="URL" value="${' + beanId + '.jdbc.url}" />\n';
-            xml += '        <property name="user" value="${' + beanId + '.jdbc.username}" />\n';
-            xml += '        <property name="password" value="${' + beanId + '.jdbc.password}" />\n';
-            xml += '    </bean>\n\n';
-        });
-    }
-
-    // 3. Add main content.
-    xml += res.join('');
-
-    // 4. Add footer.
-    xml += '</beans>\n';
-
-    return xml;
-};
-
-function createEvictionPolicy(res, evictionPolicy, propertyName) {
-    if (evictionPolicy && evictionPolicy.kind) {
-        var e = generatorUtils.evictionPolicies[evictionPolicy.kind];
-
-        var obj = evictionPolicy[evictionPolicy.kind.toUpperCase()];
-
-        addBeanWithProperties(res, obj, propertyName, e.className, e.fields, true);
-    }
-}
-
-function generateCacheConfiguration(cacheCfg, res) {
-    if (!res)
-        res = generatorUtils.builder();
-
-    res.startBlock('<bean class="org.apache.ignite.configuration.CacheConfiguration">');
-
-    addProperty(res, cacheCfg, 'name');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, 'mode', 'cacheMode');
-
-    addProperty(res, cacheCfg, 'atomicityMode');
-    addProperty(res, cacheCfg, 'backups');
-    addProperty(res, cacheCfg, 'startSize');
-    addProperty(res, cacheCfg, 'readFromBackup');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, 'memoryMode');
-    addProperty(res, cacheCfg, 'offHeapMaxMemory');
-    addProperty(res, cacheCfg, 'swapEnabled');
-    addProperty(res, cacheCfg, 'copyOnRead');
-
-    res.needEmptyLine = true;
-
-    createEvictionPolicy(res, cacheCfg.evictionPolicy, 'evictionPolicy');
-
-    res.needEmptyLine = true;
-
-    if (cacheCfg.nearCacheEnabled) {
-        res.emptyLineIfNeeded();
-
-        res.startBlock('<property name="nearConfiguration">');
-        res.startBlock('<bean class="org.apache.ignite.configuration.NearCacheConfiguration">');
-
-        if (cacheCfg.nearConfiguration && cacheCfg.nearConfiguration.nearStartSize)
-            addProperty(res, cacheCfg.nearConfiguration, 'nearStartSize');
-
-        if (cacheCfg.nearConfiguration && cacheCfg.nearConfiguration.nearEvictionPolicy.kind)
-            createEvictionPolicy(res, cacheCfg.nearConfiguration.nearEvictionPolicy, 'nearEvictionPolicy');
-
-        res.endBlock('</bean>');
-        res.endBlock('</property>');
-    }
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, 'sqlEscapeAll');
-    addProperty(res, cacheCfg, 'sqlOnheapRowCacheSize');
-    addProperty(res, cacheCfg, 'longQueryWarningTimeout');
-
-    if (cacheCfg.indexedTypes && cacheCfg.indexedTypes.length > 0) {
-        res.startBlock('<property name="indexedTypes">');
-        res.startBlock('<array>');
-
-        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.endBlock('</array>');
-        res.endBlock('</property>');
-    }
-
-    addListProperty(res, cacheCfg, 'sqlFunctionClasses', 'array');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, 'rebalanceMode');
-    addProperty(res, cacheCfg, 'rebalanceThreadPoolSize');
-    addProperty(res, cacheCfg, 'rebalanceBatchSize');
-    addProperty(res, cacheCfg, 'rebalanceOrder');
-    addProperty(res, cacheCfg, 'rebalanceDelay');
-    addProperty(res, cacheCfg, 'rebalanceTimeout');
-    addProperty(res, cacheCfg, 'rebalanceThrottle');
-
-    res.needEmptyLine = true;
-
-    if (cacheCfg.cacheStoreFactory && cacheCfg.cacheStoreFactory.kind) {
-        var storeFactory = cacheCfg.cacheStoreFactory[cacheCfg.cacheStoreFactory.kind];
-        var data = generatorUtils.storeFactories[cacheCfg.cacheStoreFactory.kind];
-
-        addBeanWithProperties(res, storeFactory, 'cacheStoreFactory', data.className, data.fields, true);
-
-        if (storeFactory.dialect) {
-            if (_.findIndex(res.datasources, function (ds) {
-                    return ds.dataSourceBean == storeFactory.dataSourceBean;
-                }) < 0) {
-                res.datasources.push({
-                    dataSourceBean: storeFactory.dataSourceBean,
-                    className: generatorUtils.dataSources[storeFactory.dialect]
-                });
-            }
-        }
-    }
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, 'loadPreviousValue');
-    addProperty(res, cacheCfg, 'readThrough');
-    addProperty(res, cacheCfg, 'writeThrough');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, 'invalidate');
-    addProperty(res, cacheCfg, 'defaultLockTimeout');
-    addProperty(res, cacheCfg, 'transactionManagerLookupClassName');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, 'writeBehindEnabled');
-    addProperty(res, cacheCfg, 'writeBehindBatchSize');
-    addProperty(res, cacheCfg, 'writeBehindFlushSize');
-    addProperty(res, cacheCfg, 'writeBehindFlushFrequency');
-    addProperty(res, cacheCfg, 'writeBehindFlushThreadCount');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, 'statisticsEnabled');
-    addProperty(res, cacheCfg, 'managementEnabled');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, 'maxConcurrentAsyncOperations');
-    
-    res.endBlock('</bean>');
-
-    return res;
-}
-
-exports.generateCacheConfiguration = generateCacheConfiguration;
-
-function addProperty(res, obj, propName, setterName) {
-    var val = obj[propName];
-
-    if (val) {
-        res.emptyLineIfNeeded();
-
-        res.line('<property name="' + (setterName ? setterName : propName) + '" value="' + escapeAttr(val) + '"/>');
-    }
-}
-
-function addBeanWithProperties(res, bean, beanPropName, beanClass, props, createBeanAlthoughNoProps) {
-    if (!bean)
-        return;
-
-    if (generatorUtils.hasProperty(bean, props)) {
-        res.emptyLineIfNeeded();
-        res.startBlock('<property name="' + beanPropName + '">');
-        res.startBlock('<bean class="' + beanClass + '">');
-
-        for (var propName in props) {
-            if (props.hasOwnProperty(propName)) {
-                var descr = props[propName];
-
-                if (descr) {
-                    if (descr.type == 'list') {
-                        addListProperty(res, bean, propName, descr.setterName);
-                    }
-                    else if (descr.type == 'className') {
-                        if (bean[propName]) {
-                            res.startBlock('<property name="' + propName + '">');
-                            res.line('<bean class="' + generatorUtils.knownClasses[bean[propName]].className + '"/>');
-                            res.endBlock('</property>');
-                        }
-                    }
-                    else if (descr.type == 'propertiesAsList') {
-                        var val = bean[propName];
-
-                        if (val && val.length > 0) {
-                            res.startBlock('<property name="' + propName + '">');
-                            res.startBlock('<props>');
-
-                            for (var i = 0; i < val.length; i++) {
-                                var nameAndValue = val[i];
-
-                                var eqIndex = nameAndValue.indexOf('=');
-                                if (eqIndex >= 0) {
-                                    res.line('<prop key="' + escapeAttr(nameAndValue.substring(0, eqIndex)) + '">' +
-                                            + escape(nameAndValue.substr(eqIndex + 1)) + '</prop>');
-                                }
-                            }
-
-                            res.endBlock('</props>');
-                            res.endBlock('</property>');
-                        }
-                    }
-                    else {
-                        addProperty(res, bean, propName, descr.setterName);
-                    }
-                }
-                else {
-                    addProperty(res, bean, propName);
-                }
-            }
-        }
-
-        res.endBlock('</bean>');
-        res.endBlock('</property>');
-    }
-    else if (createBeanAlthoughNoProps) {
-        res.emptyLineIfNeeded();
-        res.line('<property name="' + beanPropName + '">');
-        res.line('    <bean class="' + beanClass + '"/>');
-        res.line('</property>');
-    }
-}
-function addListProperty(res, obj, propName, listType, rowFactory) {
-    var val = obj[propName];
-
-    if (val && val.length > 0) {
-        res.emptyLineIfNeeded();
-
-        if (!listType)
-            listType = 'list';
-
-        if (!rowFactory)
-            rowFactory = function(val) { return '<value>' + escape(val) + '</value>' };
-
-        res.startBlock('<property name="' + propName + '">');
-        res.startBlock('<' + listType + '>');
-
-        for (var i = 0; i < val.length; i++)
-            res.line(rowFactory(val[i]));
-
-        res.endBlock('</' + listType + '>');
-        res.endBlock('</property>');
-    }
-}
-
-function escapeAttr(s) {
-    if (typeof(s) != 'string')
-        return s;
-
-    return s.replace(/&/g, '&amp;').replace(/"/g, '&quot;');
-}
-
-function escape(s) {
-    if (typeof(s) != 'string')
-        return s;
-
-    return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/helpers/configuration-loader.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/helpers/configuration-loader.js b/modules/web-control-center/nodejs/helpers/configuration-loader.js
new file mode 100644
index 0000000..6dbb577
--- /dev/null
+++ b/modules/web-control-center/nodejs/helpers/configuration-loader.js
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var config = require('nconf');
+
+config.file({'file': 'config/default.json'});
+
+module.exports = config;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/helpers/data-structures.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/helpers/data-structures.js b/modules/web-control-center/nodejs/helpers/data-structures.js
new file mode 100644
index 0000000..2462708
--- /dev/null
+++ b/modules/web-control-center/nodejs/helpers/data-structures.js
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+eventGroups = {
+    EVTS_CHECKPOINT: ['EVT_CHECKPOINT_SAVED', 'EVT_CHECKPOINT_LOADED', 'EVT_CHECKPOINT_REMOVED'],
+    EVTS_DEPLOYMENT: ['EVT_CLASS_DEPLOYED', 'EVT_CLASS_UNDEPLOYED', 'EVT_CLASS_DEPLOY_FAILED', 'EVT_TASK_DEPLOYED',
+        'EVT_TASK_UNDEPLOYED', 'EVT_TASK_DEPLOY_FAILED'],
+    EVTS_ERROR: ['EVT_JOB_TIMEDOUT', 'EVT_JOB_FAILED', 'EVT_JOB_FAILED_OVER', 'EVT_JOB_REJECTED', 'EVT_JOB_CANCELLED',
+        'EVT_TASK_TIMEDOUT', 'EVT_TASK_FAILED', 'EVT_CLASS_DEPLOY_FAILED', 'EVT_TASK_DEPLOY_FAILED',
+        'EVT_TASK_DEPLOYED', 'EVT_TASK_UNDEPLOYED', 'EVT_CACHE_REBALANCE_STARTED', 'EVT_CACHE_REBALANCE_STOPPED'],
+    EVTS_DISCOVERY: ['EVT_NODE_JOINED', 'EVT_NODE_LEFT', 'EVT_NODE_FAILED', 'EVT_NODE_SEGMENTED',
+        'EVT_CLIENT_NODE_DISCONNECTED', 'EVT_CLIENT_NODE_RECONNECTED'],
+    EVTS_JOB_EXECUTION: ['EVT_JOB_MAPPED', 'EVT_JOB_RESULTED', 'EVT_JOB_FAILED_OVER', 'EVT_JOB_STARTED',
+        'EVT_JOB_FINISHED', 'EVT_JOB_TIMEDOUT', 'EVT_JOB_REJECTED', 'EVT_JOB_FAILED', 'EVT_JOB_QUEUED',
+        'EVT_JOB_CANCELLED'],
+    EVTS_TASK_EXECUTION: ['EVT_TASK_STARTED', 'EVT_TASK_FINISHED', 'EVT_TASK_FAILED', 'EVT_TASK_TIMEDOUT',
+        'EVT_TASK_SESSION_ATTR_SET', 'EVT_TASK_REDUCED'],
+    EVTS_CACHE: ['EVT_CACHE_ENTRY_CREATED', 'EVT_CACHE_ENTRY_DESTROYED', 'EVT_CACHE_OBJECT_PUT',
+        'EVT_CACHE_OBJECT_READ', 'EVT_CACHE_OBJECT_REMOVED', 'EVT_CACHE_OBJECT_LOCKED', 'EVT_CACHE_OBJECT_UNLOCKED',
+        'EVT_CACHE_OBJECT_SWAPPED', 'EVT_CACHE_OBJECT_UNSWAPPED', 'EVT_CACHE_OBJECT_EXPIRED'],
+    EVTS_CACHE_REBALANCE: ['EVT_CACHE_REBALANCE_STARTED', 'EVT_CACHE_REBALANCE_STOPPED',
+        'EVT_CACHE_REBALANCE_PART_LOADED', 'EVT_CACHE_REBALANCE_PART_UNLOADED', 'EVT_CACHE_REBALANCE_OBJECT_LOADED',
+        'EVT_CACHE_REBALANCE_OBJECT_UNLOADED', 'EVT_CACHE_REBALANCE_PART_DATA_LOST'],
+    EVTS_CACHE_LIFECYCLE: ['EVT_CACHE_STARTED', 'EVT_CACHE_STOPPED', 'EVT_CACHE_NODES_LEFT'],
+    EVTS_CACHE_QUERY: ['EVT_CACHE_QUERY_EXECUTED', 'EVT_CACHE_QUERY_OBJECT_READ'],
+    EVTS_SWAPSPACE: ['EVT_SWAP_SPACE_CLEARED', 'EVT_SWAP_SPACE_DATA_REMOVED', 'EVT_SWAP_SPACE_DATA_READ',
+        'EVT_SWAP_SPACE_DATA_STORED', 'EVT_SWAP_SPACE_DATA_EVICTED'],
+    EVTS_IGFS: ['EVT_IGFS_FILE_CREATED', 'EVT_IGFS_FILE_RENAMED', 'EVT_IGFS_FILE_DELETED', 'EVT_IGFS_FILE_OPENED_READ',
+        'EVT_IGFS_FILE_OPENED_WRITE', 'EVT_IGFS_FILE_CLOSED_WRITE', 'EVT_IGFS_FILE_CLOSED_READ', 'EVT_IGFS_FILE_PURGED',
+        'EVT_IGFS_META_UPDATED', 'EVT_IGFS_DIR_CREATED', 'EVT_IGFS_DIR_RENAMED', 'EVT_IGFS_DIR_DELETED']
+};
+
+jdbcTypes = {
+    BIT: {value: "BIT", code: -7, label: "BIT"},
+    TINYINT: {value: "TINYINT", code: -6, label: "TINYINT"},
+    SMALLINT: {value: "SMALLINT", code: 5, label: "SMALLINT"},
+    INTEGER: {value: "INTEGER", code: 4, label: "INTEGER"},
+    BIGINT: {value: "BIGINT", code: -5, label: "BIGINT"},
+    FLOAT: {value: "FLOAT", code: 6, label: "FLOAT"},
+    REAL: {value: "REAL", code: 7, label: "REAL"},
+    DOUBLE: {value: "DOUBLE", code: 8, label: "DOUBLE"},
+    NUMERIC: {value: "NUMERIC", code: 2, label: "NUMERIC"},
+    DECIMAL: {value: "DECIMAL", code: 3, label: "DECIMAL"},
+    CHAR: {value: "CHAR", code: 1, label: "CHAR"},
+    VARCHAR: {value: "VARCHAR", code: 12, label: "VARCHAR"},
+    DATE: {value: "DATE", code: 91, label: "DATE"},
+    TIME: {value: "TIME", code: 92, label: "TIME"},
+    TIMESTAMP: {value: "TIMESTAMP", code: 93, label: "TIMESTAMP"},
+    BINARY: {value: "BINARY", code: -2, label: "BINARY"}
+};
+
+javaTypes = {
+    INTEGER: {value: "java.lang.Integer", label: "Integer"},
+    LONG: {value: "java.lang.Long", label: "Long"},
+    BIGDECIMAL: {value: "java.math.BigDecimal", label: "BigDecimal"},
+    FLOAT: {value: "java.lang.Float", label: "Float"},
+    DOUBLE: {value: "java.lang.Double", label: "Double"},
+    STRING: {value: "java.lang.String", label: "String"},
+    BOOLEAN: {value: "java.lang.Boolean", label: "Boolean"},
+    BYTE_ARRAY: {value: "byte[]", label: "byte[]"},
+    DATE: {value: "java.sql.Date", label: "Date"},
+    TIME: {value: "java.sql.Time", label: "Time"},
+    TIMESTAMP: {value: "java.sql.Timestamp", label: "Timestamp"}
+};
+
+if (typeof window === 'undefined') {
+    exports.eventGroups = eventGroups;
+    exports.jdbcTypes = jdbcTypes;
+    exports.javaTypes = javaTypes;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/helpers/ui-utils.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/helpers/ui-utils.js b/modules/web-control-center/nodejs/helpers/ui-utils.js
new file mode 100644
index 0000000..e9e680b
--- /dev/null
+++ b/modules/web-control-center/nodejs/helpers/ui-utils.js
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+exports.filterUser = function (user) {
+    if (!user)
+        return null;
+
+    return {
+        _id: user._id,
+        username: user.username,
+        lastLogin: user.lastLogin,
+        admin: user.admin,
+        email: user.email
+    }
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/package.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/package.json b/modules/web-control-center/nodejs/package.json
index 52ee2ee..9cb3744 100644
--- a/modules/web-control-center/nodejs/package.json
+++ b/modules/web-control-center/nodejs/package.json
@@ -9,6 +9,7 @@
   "author": "Ignite",
   "license": "Apache License, Version 2.0",
   "dependencies": {
+    "adm-zip": "^0.4.7",
     "body-parser": "~1.12.0",
     "connect-flash": "^0.1.1",
     "connect-mongo": "^0.8.1",

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/public/form-models/caches.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/form-models/caches.json b/modules/web-control-center/nodejs/public/form-models/caches.json
deleted file mode 100644
index 22f5e43..0000000
--- a/modules/web-control-center/nodejs/public/form-models/caches.json
+++ /dev/null
@@ -1,876 +0,0 @@
-{
-  "general": [
-    {
-      "label": "Name",
-      "type": "text",
-      "model": "name",
-      "required": true,
-      "placeholder": "Input name"
-    },
-    {
-      "label": "Mode",
-      "type": "dropdown",
-      "model": "mode",
-      "placeholder": "PARTITIONED",
-      "items": "modes",
-      "tip": [
-        "Cache modes:",
-        "<ul>",
-        "  <li>Partitioned - in this mode the overall key set will be divided into partitions and all partitions will be split equally between participating nodes.</li>",
-        "  <li>Replicated - in this mode all the keys are distributed to all participating nodes.</li>",
-        "  <li>Local - in this mode caches residing on different grid nodes will not know about each other.</li>",
-        "</ul>"
-      ]
-    },
-    {
-      "label": "Atomicity",
-      "type": "dropdown",
-      "model": "atomicityMode",
-      "placeholder": "ATOMIC",
-      "items": "atomicities",
-      "tip": [
-        "Atomicity:",
-        "<ul>",
-        "  <li>Transactional - in this mode specified fully ACID-compliant transactional cache behavior.</li>",
-        "  <li>Atomic - in this mode distributed transactions and distributed locking are not supported.</li>",
-        "</ul>"
-      ]
-    },
-    {
-      "label": "Backups",
-      "type": "number",
-      "model": "backups",
-      "placeholder": 0,
-      "tip": [
-        "Number of nodes used to back up single partition for partitioned cache."
-      ]
-    },
-    {
-      "label": "Read from backup",
-      "type": "check",
-      "model": "readFromBackup",
-      "tip": [
-        "Flag indicating whether data can be read from backup.",
-        "If not set then always get data from primary node (never from backup)."
-      ]
-    }
-  ],
-  "advanced": [
-    {
-      "label": "Async back pressure control",
-      "tip": [
-        "Cache async back pressure settings."
-      ],
-      "fields": [
-        {
-          "label": "Max async concurrency",
-          "type": "number",
-          "model": "maxConcurrentAsyncOperations",
-          "placeholder": 500,
-          "tip": [
-            "Maximum number of allowed concurrent asynchronous operations.",
-            "If 0 then number of concurrent asynchronous operations is unlimited."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Memory",
-      "tip": [
-        "Cache memory settings."
-      ],
-      "fields": [
-        {
-          "label": "Mode",
-          "type": "dropdown",
-          "model": "memoryMode",
-          "placeholder": "ONHEAP_TIERED",
-          "items": "memoryModes",
-          "tip": [
-            "Memory modes:",
-            "<ul>",
-            "  <li>ONHEAP_TIERED - entries are cached on heap memory first.",
-            "    <ul>",
-            "      <li>If offheap memory is enabled and eviction policy evicts an entry from heap memory, entry will be moved to offheap memory. If offheap memory is disabled, then entry is simply discarded.</li>",
-            "      <li>If swap space is enabled and offheap memory fills up, then entry will be evicted into swap space. If swap space is disabled, then entry will be discarded. If swap is enabled and offheap memory is disabled, then entry will be evicted directly from heap memory into swap.</li>",
-            "    </ul>",
-            "  </li>",
-            "  <li>OFFHEAP_TIERED - works the same as ONHEAP_TIERED, except that entries never end up in heap memory and get stored in offheap memory right away. Entries get cached in offheap memory first and then get evicted to swap, if one is configured.</li>",
-            "  <li>OFFHEAP_VALUES - entry keys will be stored on heap memory, and values will be stored in offheap memory. Note that in this mode entries can be evicted only to swap.</li>",
-            "</ul>"
-          ]
-        },
-        {
-          "label": "Off-heap max memory",
-          "type": "number",
-          "model": "offHeapMaxMemory",
-          "min": -1,
-          "placeholder": -1,
-          "hide": "backupItem.memoryMode == 'OFFHEAP_VALUES'",
-          "tip": [
-            "Sets maximum amount of memory available to off-heap storage.",
-            "Possible values are:",
-            "<ul>",
-            "  <li>-1 - means that off-heap storage is disabled.</li>",
-            "  <li>0 - Ignite will not limit off-heap storage (it's up to user to properly add and remove entries from cache to ensure that off-heap storage does not grow infinitely.</li>",
-            "  <li>Any positive value specifies the limit of off-heap storage in bytes.</li>",
-            "</ul>"
-          ]
-        },
-        {
-          "label": "Eviction policy",
-          "type": "dropdown-details",
-          "path": "evictionPolicy",
-          "model": "kind",
-          "placeholder": "Choose eviction policy",
-          "items": "evictionPolicies",
-          "hide": "backupItem.memoryMode == 'OFFHEAP_TIERED'",
-          "tip": [
-            "Cache expiration policy."
-          ],
-          "details": {
-            "LRU": {
-              "expanded": false,
-              "fields": [
-                {
-                  "label": "Batch size",
-                  "type": "number",
-                  "path": "evictionPolicy.LRU",
-                  "model": "batchSize",
-                  "placeholder": 1,
-                  "tip": ["Number of entries to remove on shrink."]
-                },
-                {
-                  "label": "Max memory size",
-                  "type": "number",
-                  "path": "evictionPolicy.LRU",
-                  "model": "maxMemorySize",
-                  "placeholder": 0,
-                  "tip": [
-                    "Maximum allowed cache size in bytes."
-                  ]
-                },
-                {
-                  "label": "Max size",
-                  "type": "number",
-                  "path": "evictionPolicy.LRU",
-                  "model": "maxSize",
-                  "placeholder": 100000,
-                  "tip": [
-                    "Maximum allowed size of cache before entry will start getting evicted."
-                  ]
-                }
-              ]
-            },
-            "RND": {
-              "expanded": false,
-              "fields": [
-                {
-                  "label": "Max size",
-                  "type": "number",
-                  "path": "evictionPolicy.RND",
-                  "model": "maxSize",
-                  "placeholder": 100000,
-                  "tip": [
-                    "Maximum allowed size of cache before entry will start getting evicted."
-                  ]
-                }
-              ]
-            },
-            "FIFO": {
-              "expanded": false,
-              "fields": [
-                {
-                  "label": "Batch size",
-                  "type": "number",
-                  "path": "evictionPolicy.FIFO",
-                  "model": "batchSize",
-                  "placeholder": 1,
-                  "tip": ["Number of entries to remove on shrink."]
-                },
-                {
-                  "label": "Max memory size",
-                  "type": "number",
-                  "path": "evictionPolicy.FIFO",
-                  "model": "maxMemorySize",
-                  "placeholder": 0,
-                  "tip": [
-                    "Maximum allowed cache size in bytes."
-                  ]
-                },
-                {
-                  "label": "Max size",
-                  "type": "number",
-                  "path": "evictionPolicy.FIFO",
-                  "model": "maxSize",
-                  "placeholder": 100000,
-                  "tip": [
-                    "Maximum allowed size of cache before entry will start getting evicted."
-                  ]
-                }
-              ]
-            },
-            "SORTED": {
-              "expanded": false,
-              "fields": [
-                {
-                  "label": "Batch size",
-                  "type": "number",
-                  "path": "evictionPolicy.SORTED",
-                  "model": "batchSize",
-                  "placeholder": 1,
-                  "tip": ["Number of entries to remove on shrink."]
-                },
-                {
-                  "label": "Max memory size",
-                  "type": "number",
-                  "path": "evictionPolicy.SORTED",
-                  "model": "maxMemorySize",
-                  "placeholder": 0,
-                  "tip": [
-                    "Maximum allowed cache size in bytes."
-                  ]
-                },
-                {
-                  "label": "Max size",
-                  "type": "number",
-                  "path": "evictionPolicy.SORTED",
-                  "model": "maxSize",
-                  "placeholder": 100000,
-                  "tip": [
-                    "Maximum allowed size of cache before entry will start getting evicted."
-                  ]
-                }
-              ]
-            }
-          }
-        },
-        {
-          "label": "Start size",
-          "type": "number",
-          "model": "startSize",
-          "placeholder": 1500000,
-          "tip": ["Initial cache size which will be used to pre-create internal hash table after start."]
-        },
-        {
-          "label": "Swap enabled",
-          "type": "check",
-          "model": "swapEnabled",
-          "tip": [
-            "Flag indicating whether swap storage is enabled or not for this cache."
-          ]
-        },
-        {
-          "label": "Copy on read",
-          "type": "check",
-          "model": "copyOnRead",
-          "tip": [
-            "Flag indicating whether copy of of the value stored in cache should be created for cache operation implying return value.",
-            "Also if this flag is set copies are created for values passed to CacheInterceptor and to CacheEntryProcessor."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Near cache",
-      "tip": [
-        "Near cache settings.",
-        "Near cache is a small local cache that stores most recently or most frequently accessed data.",
-        "Should be used in case when it is impossible to send computations to remote nodes."
-      ],
-      "fields": [
-        {
-          "label": "Enabled",
-          "type": "check",
-          "model": "nearCacheEnabled",
-          "tip": [
-            "Flag indicating whether to configure near cache."
-          ]
-        },
-        {
-          "label": "Start size",
-          "type": "number",
-          "path": "nearConfiguration",
-          "model": "nearStartSize",
-          "placeholder": 375000,
-          "tip": [
-            "Initial cache size for near cache which will be used to pre-create internal hash table after start."
-          ]
-        },
-        {
-          "label": "Eviction policy",
-          "type": "dropdown-details",
-          "path": "nearConfiguration.nearEvictionPolicy",
-          "model": "kind",
-          "placeholder": "Choose eviction policy",
-          "items": "evictionPolicies",
-          "tip": [
-            "Cache expiration policy."
-          ],
-          "details": {
-            "LRU": {
-              "expanded": false,
-              "fields": [
-                {
-                  "label": "Batch size",
-                  "type": "number",
-                  "path": "nearConfiguration.nearEvictionPolicy.LRU",
-                  "model": "batchSize",
-                  "placeholder": 1,
-                  "tip": ["Number of entries to remove on shrink."]
-                },
-                {
-                  "label": "Max memory size",
-                  "type": "number",
-                  "path": "nearConfiguration.nearEvictionPolicy.LRU",
-                  "model": "maxMemorySize",
-                  "placeholder": 0,
-                  "tip": [
-                    "Maximum allowed cache size in bytes."
-                  ]
-                },
-                {
-                  "label": "Max size",
-                  "type": "number",
-                  "path": "nearConfiguration.nearEvictionPolicy.LRU",
-                  "model": "maxSize",
-                  "placeholder": 100000,
-                  "tip": [
-                    "Maximum allowed size of cache before entry will start getting evicted."
-                  ]
-                }
-              ]
-            },
-            "RND": {
-              "expanded": false,
-              "fields": [
-                {
-                  "label": "Max size",
-                  "type": "number",
-                  "path": "nearConfiguration.nearEvictionPolicy.RND",
-                  "model": "maxSize",
-                  "placeholder": 100000,
-                  "tip": [
-                    "Maximum allowed size of cache before entry will start getting evicted."
-                  ]
-                }
-              ]
-            },
-            "FIFO": {
-              "expanded": false,
-              "fields": [
-                {
-                  "label": "Batch size",
-                  "type": "number",
-                  "path": "nearConfiguration.nearEvictionPolicy.FIFO",
-                  "model": "batchSize",
-                  "placeholder": 1,
-                  "tip": ["Number of entries to remove on shrink."]
-                },
-                {
-                  "label": "Max memory size",
-                  "type": "number",
-                  "path": "nearConfiguration.nearEvictionPolicy.FIFO",
-                  "model": "maxMemorySize",
-                  "placeholder": 0,
-                  "tip": [
-                    "Maximum allowed cache size in bytes."
-                  ]
-                },
-                {
-                  "label": "Max size",
-                  "type": "number",
-                  "path": "nearConfiguration.nearEvictionPolicy.FIFO",
-                  "model": "maxSize",
-                  "placeholder": 100000,
-                  "tip": [
-                    "Maximum allowed size of cache before entry will start getting evicted."
-                  ]
-                }
-              ]
-            },
-            "SORTED": {
-              "expanded": false,
-              "fields": [
-                {
-                  "label": "Batch size",
-                  "type": "number",
-                  "path": "nearConfiguration.nearEvictionPolicy.SORTED",
-                  "model": "batchSize",
-                  "placeholder": 1,
-                  "tip": ["Number of entries to remove on shrink."]
-                },
-                {
-                  "label": "Max memory size",
-                  "type": "number",
-                  "path": "nearConfiguration.nearEvictionPolicy.SORTED",
-                  "model": "maxMemorySize",
-                  "placeholder": 0,
-                  "tip": [
-                    "Maximum allowed cache size in bytes."
-                  ]
-                },
-                {
-                  "label": "Max size",
-                  "type": "number",
-                  "path": "nearConfiguration.nearEvictionPolicy.SORTED",
-                  "model": "maxSize",
-                  "placeholder": 100000,
-                  "tip": [
-                    "Maximum allowed size of cache before entry will start getting evicted."
-                  ]
-                }
-              ]
-            }
-          }
-        }
-      ]
-    },
-    {
-      "label": "Query",
-      "tip": [
-        "Cache query settings."
-      ],
-      "fields": [
-        {
-          "label": "Escape all",
-          "type": "check",
-          "model": "sqlEscapeAll",
-          "tip": [
-            "If set then all the SQL table and field names will be escaped with double quotes.",
-            "This enforces case sensitivity for field names and also allows having special characters in table and field names."
-          ]
-        },
-        {
-          "label": "Cached rows",
-          "type": "number",
-          "model": "sqlOnheapRowCacheSize",
-          "placeholder": 10240,
-          "tip": [
-            "Number of SQL rows which will be cached onheap to avoid deserialization on each SQL index access."
-          ]
-        },
-        {
-          "label": "Long query timeout",
-          "type": "number",
-          "model": "longQueryWarningTimeout",
-          "placeholder": 3000,
-          "tip": [
-            "Timeout in milliseconds after which long query warning will be printed."
-          ]
-        },
-        {
-          "type": "indexedTypes",
-          "model": "indexedTypes",
-          "tip": [
-            "Collection of types to index."
-          ]
-        },
-        {
-          "label": "SQL functions",
-          "type": "table-simple",
-          "model": "sqlFunctionClasses",
-          "editIdx": -1,
-          "placeholder": "SQL function full class name",
-          "tableTip": [
-            "Collections of classes with user-defined functions for SQL queries."
-          ],
-          "tip": [
-            "Class with user-defined functions for SQL queries."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Rebalance",
-      "tip": [
-        "Cache rebalance settings."
-      ],
-      "fields": [
-        {
-          "label": "Mode",
-          "type": "dropdown",
-          "model": "rebalanceMode",
-          "placeholder": "ASYNC",
-          "items": "rebalanceModes",
-          "tip": [
-            "Rebalance modes:",
-            "<ul>",
-            "  <li>Synchronous - in this mode distributed caches will not start until all necessary data is loaded from other available grid nodes.</li>",
-            "  <li>Asynchronous - in this mode distributed caches will start immediately and will load all necessary data from other available grid nodes in the background.</li>",
-            "  <li>None - in this mode no rebalancing will take place which means that caches will be either loaded on demand from persistent store whenever data is accessed, or will be populated explicitly.</li>",
-            "</ul>"
-          ]
-        },
-        {
-          "label": "Pool size",
-          "type": "number",
-          "model": "rebalanceThreadPoolSize",
-          "placeholder": 2,
-          "tip": [
-            "Size of rebalancing thread pool.<br>",
-            "Note that size serves as a hint and implementation may create more threads for rebalancing than specified here (but never less threads)."
-          ]
-        },
-        {
-          "label": "Batch size",
-          "type": "number",
-          "model": "rebalanceBatchSize",
-          "placeholder": "512 * 1024",
-          "tip": [
-            "Size (in bytes) to be loaded within a single rebalance message.",
-            "Rebalancing algorithm will split total data set on every node into multiple batches prior to sending data."
-          ]
-        },
-        {
-          "label": "Order",
-          "type": "number",
-          "model": "rebalanceOrder",
-          "placeholder": 0,
-          "tip": [
-            "If cache rebalance order is positive, rebalancing for this cache will be started only when rebalancing for all caches with smaller rebalance order (except caches with rebalance order 0) will be completed."
-          ]
-        },
-        {
-          "label": "Delay",
-          "type": "number",
-          "model": "rebalanceDelay",
-          "placeholder": 0,
-          "tip": [
-            "Delay in milliseconds upon a node joining or leaving topology (or crash) after which rebalancing should be started automatically."
-          ]
-        },
-        {
-          "label": "Timeout",
-          "type": "number",
-          "model": "rebalanceTimeout",
-          "placeholder": 10000,
-          "tip": [
-            "Rebalance timeout in milliseconds."
-          ]
-        },
-        {
-          "label": "Throttle",
-          "type": "number",
-          "model": "rebalanceThrottle",
-          "placeholder": 0,
-          "tip": [
-            "Time in milliseconds to wait between rebalance messages to avoid overloading of CPU or network."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Statistics",
-      "tip": [
-        "Cache statistics and management settings."
-      ],
-      "fields": [
-        {
-          "label": "Statistics enabled",
-          "type": "check",
-          "model": "statisticsEnabled",
-          "tip": [
-            "Flag indicating whether statistics gathering is enabled on a cache."
-          ]
-        },
-        {
-          "label": "Management enabled",
-          "type": "check",
-          "model": "managementEnabled",
-          "tip": [
-            "Flag indicating whether management is enabled on this cache."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Store",
-      "tip": [
-        "Cache store settings."
-      ],
-      "fields": [
-        {
-          "label": "Store factory",
-          "type": "dropdown-details",
-          "path": "cacheStoreFactory",
-          "model": "kind",
-          "placeholder": "Choose store factory",
-          "items": "cacheStoreFactories",
-          "tip": [
-            "Factory for persistent storage for cache data."
-          ],
-          "details": {
-            "CacheJdbcPojoStoreFactory": {
-              "expanded": true,
-              "fields": [
-                {
-                  "label": "Data source bean",
-                  "type": "text",
-                  "path": "cacheStoreFactory.CacheJdbcPojoStoreFactory",
-                  "model": "dataSourceBean",
-                  "required": true,
-                  "placeholder": "Bean name in Spring context",
-                  "tip": [
-                    "Name of the data source bean in Spring context."
-                  ]
-                },
-                {
-                  "label": "Dialect",
-                  "type": "dropdown",
-                  "path": "cacheStoreFactory.CacheJdbcPojoStoreFactory",
-                  "model": "dialect",
-                  "required": true,
-                  "placeholder": "Choose JDBC dialect",
-                  "items": "cacheStoreJdbcDialects",
-                  "tip": [
-                    "Dialect of SQL implemented by a particular RDBMS:",
-                    "<ul>",
-                    "  <li>Generic JDBC dialect.</li>",
-                    "  <li>Oracle database.</li>",
-                    "  <li>IBM DB2.</li>",
-                    "  <li>Microsoft SQL Server.</li>",
-                    "  <li>My SQL.</li>",
-                    "  <li>H2 database.</li>",
-                    "</ul>"
-                  ]
-                }
-              ]
-            },
-            "CacheJdbcBlobStoreFactory": {
-              "expanded": true,
-              "fields": [
-                {
-                  "label": "user",
-                  "type": "text",
-                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
-                  "model": "user",
-                  "required": true,
-                  "tip": [
-                    "User name for database access."
-                  ]
-                },
-                {
-                  "label": "Data source bean",
-                  "type": "text",
-                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
-                  "model": "dataSourceBean",
-                  "required": true,
-                  "placeholder": "Bean name in Spring context",
-                  "tip": [
-                    "Name of the data source bean in Spring context."
-                  ]
-                },
-                {
-                  "label": "Init schema",
-                  "type": "check",
-                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
-                  "model": "initSchema",
-                  "tip": [
-                    "Flag indicating whether DB schema should be initialized by Ignite (default behaviour) or was explicitly created by user."
-                  ]
-                },
-                {
-                  "label": "Create query",
-                  "type": "text",
-                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
-                  "model": "createTableQuery",
-                  "placeholder": "SQL for table creation",
-                  "tip": [
-                    "Query for table creation in underlying database.",
-                    "Default value: create table if not exists ENTRIES (key binary primary key, val binary)"
-                  ]
-                },
-                {
-                  "label": "Load query",
-                  "type": "text",
-                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
-                  "model": "loadQuery",
-                  "placeholder": "SQL for load entry",
-                  "tip": [
-                    "Query for entry load from underlying database.",
-                    "Default value: select * from ENTRIES where key=?"
-                  ]
-                },
-                {
-                  "label": "Insert query",
-                  "type": "text",
-                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
-                  "model": "insertQuery",
-                  "placeholder": "SQL for insert entry",
-                  "tip": [
-                    "Query for insert entry into underlying database.",
-                    "Default value: insert into ENTRIES (key, val) values (?, ?)"
-                  ]
-                },
-                {
-                  "label": "Update query",
-                  "type": "text",
-                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
-                  "model": "updateQuery",
-                  "placeholder": "SQL for update entry",
-                  "tip": [
-                    "Query fpr update entry in underlying database.",
-                    "Default value: update ENTRIES set val=? where key=?"
-                  ]
-                },
-                {
-                  "label": "Delete query",
-                  "type": "text",
-                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
-                  "model": "deleteQuery",
-                  "placeholder": "SQL for delete entry",
-                  "tip": [
-                    "Query for delete entry from underlying database.",
-                    "Default value: delete from ENTRIES where key=?"
-                  ]
-                }
-              ]
-            },
-            "CacheHibernateBlobStoreFactory": {
-              "expanded": true,
-              "fields": [
-                {
-                  "label": "Hibernate properties",
-                  "type": "table-simple",
-                  "path": "cacheStoreFactory.CacheHibernateBlobStoreFactory",
-                  "model": "hibernateProperties",
-                  "editIdx": -1,
-                  "placeholder": "key=value",
-                  "tip": [
-                    "List of Hibernate properties.",
-                    "For example: connection.url=jdbc:h2:mem:"
-                  ]
-                }
-              ]
-            }
-          }
-        },
-        {
-          "label": "Load previous value",
-          "type": "check",
-          "model": "loadPreviousValue",
-          "tip": [
-            "Flag indicating whether value should be loaded from store if it is not in the cache for following cache operations:",
-            "<ul>",
-            "  <li>IgniteCache.putIfAbsent()</li>",
-            "  <li>IgniteCache.replace()</li>",
-            "  <li>IgniteCache.replace()</li>",
-            "  <li>IgniteCache.remove()</li>",
-            "  <li>IgniteCache.getAndPut()</li>",
-            "  <li>IgniteCache.getAndRemove()</li>",
-            "  <li>IgniteCache.getAndReplace()</li>",
-            "  <li>IgniteCache.getAndPutIfAbsent()</li>",
-            "</ul>"
-          ]
-        },
-        {
-          "label": "Read-through",
-          "type": "check",
-          "model": "readThrough",
-          "tip": [
-            "Flag indicating whether read-through caching should be used."
-          ]
-        },
-        {
-          "label": "Write-through",
-          "type": "check",
-          "model": "writeThrough",
-          "tip": [
-            "Flag indicating whether write-through caching should be used."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Transaction",
-      "tip": [
-        "Cache transactions settings."
-      ],
-      "fields": [
-        {
-          "label": "Invalidate",
-          "type": "check",
-          "model": "invalidate",
-          "tip": [
-            "Invalidation flag for near cache entries in transaction.",
-            "If set then values will be invalidated (nullified) upon commit in near cache."
-          ]
-        },
-        {
-          "label": "Default lock timeout",
-          "type": "number",
-          "model": "defaultLockTimeout",
-          "placeholder": 0,
-          "tip": [
-            "Default lock acquisition timeout.",
-            "If 0 then lock acquisition will never timeout."
-          ]
-        },
-        {
-          "label": "Manager finder",
-          "type": "text",
-          "model": "transactionManagerLookupClassName",
-          "tip": [
-            "Class name of transaction manager finder for integration for JEE app servers."
-          ]
-        }
-      ]
-    },
-    {
-      "label": "Write behind",
-      "tip": [
-        "Cache write behind settings.",
-        "Write-behind is a special mode when updates to cache accumulated and then asynchronously flushed to persistent store as a bulk operation."
-      ],
-      "fields": [
-        {
-          "label": "Enabled",
-          "type": "check",
-          "model": "writeBehindEnabled",
-          "tip": [
-            "Flag indicating whether Ignite should use write-behind behaviour for the cache store."
-          ]
-        },
-        {
-          "label": "Batch size",
-          "type": "number",
-          "model": "writeBehindBatchSize",
-          "placeholder": 512,
-          "tip": [
-            "Maximum batch size for write-behind cache store operations.",
-            "Store operations (get or remove) are combined in a batch of this size to be passed to cache store."
-          ]
-        },
-        {
-          "label": "Flush size",
-          "type": "number",
-          "model": "writeBehindFlushSize",
-          "placeholder": 10240,
-          "tip": [
-            "Maximum size of the write-behind cache.<br>",
-            "If cache size exceeds this value, all cached items are flushed to the cache store and write cache is cleared."
-          ]
-        },
-        {
-          "label": "Flush frequency",
-          "type": "number",
-          "model": "writeBehindFlushFrequency",
-          "placeholder": 5000,
-          "tip": [
-            "Frequency with which write-behind cache is flushed to the cache store in milliseconds."
-          ]
-        },
-        {
-          "label": "Flush threads count",
-          "type": "number",
-          "model": "writeBehindFlushThreadCount",
-          "placeholder": 1,
-          "tip": [
-            "Number of threads that will perform cache flushing."
-          ]
-        }
-      ]
-    }
-  ]
-}


[5/6] incubator-ignite git commit: # ignite-843 Refactor

Posted by an...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/controllers/models/clusters.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/models/clusters.json b/modules/web-control-center/nodejs/controllers/models/clusters.json
new file mode 100644
index 0000000..e6be772
--- /dev/null
+++ b/modules/web-control-center/nodejs/controllers/models/clusters.json
@@ -0,0 +1,891 @@
+{
+  "templateTip": [
+    "Use following template for add cluster:",
+    "<ul>",
+    "  <li>blank - Empty configuration.</li>",
+    "  <li>local - Configuration with static ips discovery and pre-configured list of IP addresses.</li>",
+    "  <li>multicast - Configuration with multicast discovery.</li>",
+    "</ul>"
+  ],
+  "general": [
+    {
+      "label": "Name",
+      "type": "text",
+      "model": "name",
+      "required": true,
+      "placeholder": "Input name"
+    },
+    {
+      "label": "Caches",
+      "type": "dropdown-multiple",
+      "model": "caches",
+      "placeholder": "Choose caches",
+      "items": "caches",
+      "tip": [
+        "Select caches to start in cluster."
+      ],
+      "addLink": {
+        "label": "Add cache(s)",
+        "ref": "/caches"
+      }
+    },
+    {
+      "label": "Discovery",
+      "type": "dropdown-details",
+      "path": "discovery",
+      "model": "kind",
+      "required": true,
+      "placeholder": "Choose discovery",
+      "items": "discoveries",
+      "tip": [
+        "Discovery allows to discover remote nodes in grid."
+      ],
+      "details": {
+        "Vm": {
+          "expanded": true,
+          "fields": [
+            {
+              "type": "table-simple",
+              "path": "discovery.Vm",
+              "model": "addresses",
+              "editIdx": -1,
+              "reordering": true,
+              "ipaddress": true,
+              "placeholder": "IP address:port",
+              "tip": [
+                "Addresses may be represented as follows:",
+                "<ul>",
+                "  <li>IP address (e.g. 127.0.0.1, 9.9.9.9, etc);</li>",
+                "  <li>IP address and port (e.g. 127.0.0.1:47500, 9.9.9.9:47501, etc);</li>",
+                "  <li>IP address and port range (e.g. 127.0.0.1:47500..47510, 9.9.9.9:47501..47504, etc);</li>",
+                "  <li>Hostname (e.g. host1.com, host2, etc);</li>",
+                "  <li>Hostname and port (e.g. host1.com:47500, host2:47502, etc).</li>",
+                "  <li>Hostname and port range (e.g. host1.com:47500..47510, host2:47502..47508, etc).</li>",
+                "</ul>",
+                "If port is 0 or not provided then default port will be used (depends on discovery SPI configuration).",
+                "If port range is provided (e.g. host:port1..port2) the following should be considered:",
+                "<ul>",
+                "  <li>port1 < port2 should be true;</li>",
+                "  <li>Both port1 and port2 should be greater than 0.</li>",
+                "</ul>"
+              ]
+            }
+          ]
+        },
+        "Multicast": {
+          "expanded": false,
+          "fields": [
+            {
+              "label": "IP address",
+              "type": "text",
+              "path": "discovery.Multicast",
+              "model": "multicastGroup",
+              "placeholder": "228.1.2.4",
+              "tip": [
+                "IP address of multicast group."
+              ]
+            },
+            {
+              "label": "Port number",
+              "type": "number",
+              "path": "discovery.Multicast",
+              "model": "multicastPort",
+              "max": 65535,
+              "placeholder": "47400",
+              "tip": [
+                "Port number which multicast messages are sent to."
+              ]
+            },
+            {
+              "label": "Waits for reply",
+              "type": "number",
+              "path": "discovery.Multicast",
+              "model": "responseWaitTime",
+              "placeholder": "500",
+              "tip": [
+                "Time in milliseconds IP finder waits for reply to multicast address request."
+              ]
+            },
+            {
+              "label": "Attempts count",
+              "type": "number",
+              "path": "discovery.Multicast",
+              "model": "addressRequestAttempts",
+              "placeholder": "2",
+              "tip": [
+                "Number of attempts to send multicast address request.",
+                "IP finder re-sends request only in case if no reply for previous request is received."
+              ]
+            },
+            {
+              "label": "Local address",
+              "type": "text",
+              "path": "discovery.Multicast",
+              "model": "localAddress",
+              "tip": [
+                "Local host address used by this IP finder.",
+                "If provided address is non-loopback then multicast socket is bound to this interface.",
+                "If local address is not set or is any local address then IP finder creates multicast sockets for all found non-loopback addresses."
+              ]
+            }
+          ]
+        },
+        "S3": {
+          "expanded": true,
+          "fields": [
+            {
+              "label": "Bucket name",
+              "type": "text",
+              "required": true,
+              "path": "discovery.S3",
+              "model": "bucketName",
+              "placeholder": "",
+              "tip": [
+                "Bucket name for IP finder."
+              ]
+            }
+          ]
+        },
+        "Cloud": {
+          "expanded": true,
+          "fields": [
+            {
+              "label": "Credential",
+              "type": "text",
+              "path": "discovery.Cloud",
+              "model": "credential",
+              "placeholder": "",
+              "tip": [
+                "Credential that is used during authentication on the cloud.",
+                "Depending on a cloud platform it can be a password or access key."
+              ]
+            },
+            {
+              "label": "Path to credential",
+              "type": "text",
+              "path": "discovery.Cloud",
+              "model": "credentialPath",
+              "placeholder": "",
+              "tip": [
+                "Path to a credential that is used during authentication on the cloud.",
+                "Access key or private key should be stored in a plain or PEM file without a passphrase."
+              ]
+            },
+            {
+              "label": "Identity",
+              "type": "text",
+              "required": true,
+              "path": "discovery.Cloud",
+              "model": "identity",
+              "placeholder": "",
+              "tip": [
+                "Identity that is used as a user name during a connection to the cloud.",
+                "Depending on a cloud platform it can be an email address, user name, etc."
+              ]
+            },
+            {
+              "label": "Provider",
+              "type": "text",
+              "required": true,
+              "path": "discovery.Cloud",
+              "model": "provider",
+              "placeholder": "",
+              "tip": [
+                "Cloud provider to use."
+              ]
+            },
+            {
+              "label": "Regions",
+              "type": "table-simple",
+              "path": "discovery.Cloud",
+              "model": "regions",
+              "editIdx": -1,
+              "placeholder": "",
+              "tableTip": [
+                "List of regions where VMs are located.",
+                "If the regions are not set then every region, that a cloud provider has, will be investigated. This could lead to significant performance degradation.",
+                "Note, that some cloud providers, like Google Compute Engine, doesn't have a notion of a region. For such providers a call to this method is redundant."
+              ],
+              "tip": [
+                "Region where VMs are located."
+              ]
+            },
+            {
+              "label": "Zones",
+              "type": "table-simple",
+              "path": "discovery.Cloud",
+              "model": "zones",
+              "editIdx": -1,
+              "placeholder": "",
+              "tableTip": [
+                "List of zones where VMs are located.",
+                "If the zones are not set then every zone from regions, set by {@link #setRegions(Collection)}}, will be taken into account.",
+                "Note, that some cloud providers, like Rackspace, doesn't have a notion of a zone. For such providers a call to this method is redundant."
+              ],
+              "tip": [
+                "Zone where VMs are located."
+              ]
+            }
+          ]
+        },
+        "GoogleStorage": {
+          "expanded": true,
+          "fields": [
+            {
+              "label": "Project name",
+              "type": "text",
+              "required": true,
+              "path": "discovery.GoogleStorage",
+              "model": "projectName",
+              "placeholder": "",
+              "tip": [
+                "Google Cloud Platforms project name.",
+                "Usually this is an auto generated project number (ex. 208709979073) that can be found in 'Overview' section of Google Developer Console."
+              ]
+            },
+            {
+              "label": "Bucket name",
+              "type": "text",
+              "required": true,
+              "path": "discovery.GoogleStorage",
+              "model": "bucketName",
+              "placeholder": "",
+              "tip": [
+                "Google Cloud Storage bucket name.",
+                "If the bucket doesn't exist Ignite will automatically create it.",
+                "However the name must be unique across whole Google Cloud Storage and Service Account Id must be authorized to perform this operation."
+              ]
+            },
+            {
+              "label": "Private key path",
+              "type": "text",
+              "required": true,
+              "path": "discovery.GoogleStorage",
+              "model": "serviceAccountP12FilePath",
+              "placeholder": "",
+              "tip": [
+                "Full path to the private key in PKCS12 format of the Service Account."
+              ]
+            },
+            {
+              "label": "Account id",
+              "type": "text",
+              "required": true,
+              "path": "discovery.GoogleStorage",
+              "model": "accountId",
+              "placeholder": "",
+              "tip": [
+                "Service account ID (typically an e-mail address)."
+              ]
+            }
+          ]
+        },
+        "Jdbc": {
+          "expanded": true,
+          "fields": [
+            {
+              "label": "DB schema should be initialized by Ignite",
+              "type": "check",
+              "path": "discovery.Jdbc",
+              "model": "initSchema",
+              "tip": [
+                "Flag indicating whether DB schema should be initialized by Ignite or was explicitly created by user."
+              ]
+            }
+          ]
+        },
+        "SharedFs": {
+          "expanded": false,
+          "fields": [
+            {
+              "label": "File path",
+              "type": "text",
+              "path": "discovery.SharedFs",
+              "model": "path",
+              "placeholder": "disco/tcp"
+            }
+          ]
+        }
+      }
+    }
+  ],
+  "advanced": [
+    {
+      "label": "Atomic configuration",
+      "tip": [
+        "Configuration for atomic data structures.",
+        "Atomics are distributed across the cluster, essentially enabling performing atomic operations (such as increment-and-get or compare-and-set) with the same globally-visible value."
+      ],
+      "fields": [
+        {
+          "label": "Backups",
+          "type": "number",
+          "path": "atomicConfiguration",
+          "model": "backups",
+          "placeholder": "0",
+          "tip": [
+            "Number of backup nodes."
+          ]
+        },
+        {
+          "label": "Cache mode",
+          "type": "dropdown",
+          "path": "atomicConfiguration",
+          "model": "cacheMode",
+          "placeholder": "PARTITIONED",
+          "items": "cacheModes",
+          "tip": [
+            "Cache modes:",
+            "<ul>",
+            "  <li>Partitioned - in this mode the overall key set will be divided into partitions and all partitions will be split equally between participating nodes.</li>",
+            "  <li>Replicated - in this mode all the keys are distributed to all participating nodes.</li>",
+            "  <li>Local - in this mode caches residing on different grid nodes will not know about each other.</li>",
+            "</ul>"
+          ]
+        },
+        {
+          "label": "Sequence reserve",
+          "type": "number",
+          "path": "atomicConfiguration",
+          "model": "atomicSequenceReserveSize",
+          "placeholder": "1,000",
+          "tip": [
+            "Default number of sequence values reserved for IgniteAtomicSequence instances.",
+            "After a certain number has been reserved, consequent increments of sequence will happen locally, without communication with other nodes, until the next reservation has to be made."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Communication",
+      "tip": [
+        "Cluster communication network properties."
+      ],
+      "fields": [
+        {
+          "label": "Timeout",
+          "type": "number",
+          "model": "networkTimeout",
+          "placeholder": "5,000",
+          "tip": [
+            "Maximum timeout in milliseconds for network requests."
+          ]
+        },
+        {
+          "label": "Send retry delay",
+          "type": "number",
+          "model": "networkSendRetryDelay",
+          "placeholder": "1,000",
+          "tip": [
+            "Interval in milliseconds between message send retries."
+          ]
+        },
+        {
+          "label": "Send retry count",
+          "type": "number",
+          "model": "networkSendRetryCount",
+          "placeholder": "3",
+          "tip": [
+            "Message send retries count."
+          ]
+        },
+        {
+          "label": "Segment check frequency",
+          "type": "number",
+          "model": "segmentCheckFrequency",
+          "placeholder": "10,000",
+          "tip": [
+            "Network segment check frequency in milliseconds.",
+            "If 0, periodic segment check is disabled and segment is checked only on topology changes (if segmentation resolvers are configured)."
+          ]
+        },
+        {
+          "label": "Wait for segment on start",
+          "type": "check",
+          "model": "waitForSegmentOnStart",
+          "tip": [
+            "Wait for segment on start flag.",
+            "<ul>",
+            "  <li>If enabled, node should wait for correct segment on start.</li>",
+            "  <li>If node detects that segment is incorrect on startup and enabled, node waits until segment becomes correct.</li>",
+            "  <li>If segment is incorrect on startup and disabled, exception is thrown.</li>",
+            "</ul>"
+          ]
+        },
+        {
+          "label": "Discovery startup delay",
+          "type": "number",
+          "model": "discoveryStartupDelay",
+          "placeholder": "600,000",
+          "tip": [
+            "This value is used to expire messages from waiting list whenever node discovery discrepancies happen."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Deployment",
+      "tip": [
+        "Task and resources deployment in cluster."
+      ],
+      "fields": [
+        {
+          "label": "Mode",
+          "type": "dropdown",
+          "model": "deploymentMode",
+          "placeholder": "SHARED",
+          "items": "deploymentModes",
+          "tip": [
+            "Task classes and resources sharing mode."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Events",
+      "tip": [
+        " Grid events are used for notification about what happens within the grid."
+      ],
+      "fields": [
+        {
+          "label": "Include type",
+          "type": "dropdown-multiple",
+          "model": "includeEventTypes",
+          "placeholder": "Choose recorded event types",
+          "items": "events",
+          "tip": [
+            "Array of event types, which will be recorded by GridEventStorageManager#record(Event).",
+            "Note, that either the include event types or the exclude event types can be established."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Marshaller",
+      "tip": [
+        "Marshaller allows to marshal or unmarshal objects in grid.",
+        "It provides serialization/deserialization mechanism for all instances that are sent across networks or are otherwise serialized."
+      ],
+      "fields": [
+        {
+          "label": "Marshaller",
+          "type": "dropdown-details",
+          "path": "marshaller",
+          "model": "kind",
+          "placeholder": "Choose marshaller",
+          "items": "marshallers",
+          "tip": [
+            "Instance of marshaller to use in grid. If not provided, OptimizedMarshaller will be used on Java HotSpot VM, and JdkMarshaller will be used on other VMs."
+          ],
+          "details": {
+            "OptimizedMarshaller": {
+              "expanded": false,
+              "fields": [
+                {
+                  "label": "Streams pool size",
+                  "type": "number",
+                  "path": "marshaller.OptimizedMarshaller",
+                  "model": "poolSize",
+                  "placeholder": "0",
+                  "tip": [
+                    "Specifies size of cached object streams used by marshaller.",
+                    "Object streams are cached for performance reason to avoid costly recreation for every serialization routine.",
+                    "If 0 (default), pool is not used and each thread has its own cached object stream which it keeps reusing.",
+                    "Since each stream has an internal buffer, creating a stream for each thread can lead to high memory consumption if many large messages are marshalled or unmarshalled concurrently.",
+                    "Consider using pool in this case. This will limit number of streams that can be created and, therefore, decrease memory consumption.",
+                    "NOTE: Using streams pool can decrease performance since streams will be shared between different threads which will lead to more frequent context switching."
+                  ]
+                },
+                {
+                  "label": "Require serializable",
+                  "type": "check",
+                  "path": "marshaller.OptimizedMarshaller",
+                  "model": "requireSerializable",
+                  "tip": [
+                    "Whether marshaller should require Serializable interface or not."
+                  ]
+                }
+              ]
+            }
+          }
+        },
+        {
+          "label": "Marshal local jobs",
+          "type": "check",
+          "model": "marshalLocalJobs",
+          "placeholder": "false",
+          "tip": [
+            "If this flag is enabled, jobs mapped to local node will be marshalled as if it was remote node."
+          ]
+        },
+        {
+          "label": "Keep alive time",
+          "type": "number",
+          "model": "marshallerCacheKeepAliveTime",
+          "placeholder": "10,000",
+          "tip": [
+            "Keep alive time of thread pool that is in charge of processing marshaller messages."
+          ]
+        },
+        {
+          "label": "Pool size",
+          "type": "number",
+          "model": "marshallerCacheThreadPoolSize",
+          "placeholder": "max(8, availableProcessors) * 2",
+          "tip": [
+            "Default size of thread pool that is in charge of processing marshaller messages."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Metrics",
+      "tip": ["Cluster runtime metrics settings."],
+      "fields": [
+        {
+          "label": "Elapsed time",
+          "type": "number",
+          "model": "metricsExpireTime",
+          "placeholder": "Long.MAX_VALUE",
+          "min": 1,
+          "tip": [
+            "Time in milliseconds after which a certain metric value is considered expired."
+          ]
+        },
+        {
+          "label": "History size",
+          "type": "number",
+          "model": "metricsHistorySize",
+          "placeholder": "10,000",
+          "min": 1,
+          "tip": [
+            "Number of metrics kept in history to compute totals and averages."
+          ]
+        },
+        {
+          "label": "Log frequency",
+          "type": "number",
+          "model": "metricsLogFrequency",
+          "placeholder": "60,000",
+          "tip": [
+            "Frequency of metrics log print out. To disable set to 0"
+          ]
+        },
+        {
+          "label": "Update frequency",
+          "type": "number",
+          "model": "metricsUpdateFrequency",
+          "placeholder": "60,000",
+          "tip": [
+            "Job metrics update frequency in milliseconds.",
+            "<ul>",
+            "  <li>If set to -1 job metrics are never updated.</li>",
+            "  <li>If set to 0 job metrics are updated on each job start and finish.</li>",
+            "  <li>Positive value defines the actual update frequency.</li>",
+            "</ul>"
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Peer Class Loading",
+      "tip": ["Cluster peer class loading settings."],
+      "fields": [
+        {
+          "label": "Enable peer class loading",
+          "type": "check",
+          "model": "peerClassLoadingEnabled",
+          "tip": [
+            "Enables/disables peer class loading."
+          ]
+        },
+        {
+          "label": "Local class path exclude",
+          "type": "text",
+          "model": "peerClassLoadingLocalClassPathExclude",
+          "placeholder": "[]",
+          "tip": [
+            "List of packages separated by comma from the system classpath that need to be peer-to-peer loaded from task originating node.",
+            "'*' is supported at the end of the package name which means that all sub-packages and their classes are included like in Java package import clause."
+          ]
+        },
+        {
+          "label": "Missed resources cache size",
+          "type": "number",
+          "model": "peerClassLoadingMissedResourcesCacheSize",
+          "placeholder": "100",
+          "tip": [
+            "If size greater than 0, missed resources will be cached and next resource request ignored.",
+            "If size is 0, then request for the resource will be sent to the remote node every time this resource is requested."
+          ]
+        },
+        {
+          "label": "Pool size",
+          "type": "number",
+          "model": "peerClassLoadingThreadPoolSize",
+          "placeholder": "availableProcessors",
+          "tip": [
+            "Thread pool size to use for peer class loading."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Swap",
+      "tip": ["Settings for overflow data to disk if it cannot fit in memory."],
+      "fields": [
+        {
+          "label": "Swap space SPI",
+          "type": "dropdown-details",
+          "path": "swapSpaceSpi",
+          "model": "kind",
+          "items": "swapSpaceSpis",
+          "placeholder": "Choose swap SPI",
+          "tip": [
+            "Provides a mechanism in grid for storing data on disk.",
+            "Ignite cache uses swap space to overflow data to disk if it cannot fit in memory."
+          ],
+          "details": {
+            "FileSwapSpaceSpi": {
+              "fields": [
+                {
+                  "label": "Base directory",
+                  "type": "text",
+                  "path": "swapSpaceSpi.FileSwapSpaceSpi",
+                  "model": "baseDirectory",
+                  "placeholder": "swapspace",
+                  "tip": [
+                    "Base directory where to write files."
+                  ]
+                },
+                {
+                  "label": "Read stripe size",
+                  "type": "number",
+                  "path": "swapSpaceSpi.FileSwapSpaceSpi",
+                  "model": "readStripesNumber",
+                  "placeholder": "available CPU cores",
+                  "tip": [
+                    "Read stripe size defines number of file channels to be used concurrently."
+                  ]
+                },
+                {
+                  "label": "Maximum sparsity",
+                  "type": "number",
+                  "path": "swapSpaceSpi.FileSwapSpaceSpi",
+                  "model": "maximumSparsity",
+                  "placeholder": "0.5",
+                  "tip": [
+                    "This property defines maximum acceptable wasted file space to whole file size ratio.",
+                    "When this ratio becomes higher than specified number compacting thread starts working."
+                  ]
+                },
+                {
+                  "label": "Max write queue size",
+                  "type": "number",
+                  "path": "swapSpaceSpi.FileSwapSpaceSpi",
+                  "model": "maxWriteQueueSize",
+                  "placeholder": "1024 * 1024",
+                  "tip": [
+                    "Max write queue size in bytes.",
+                    "If there are more values are waiting for being written to disk then specified size, SPI will block on store operation."
+                  ]
+                },
+                {
+                  "label": "Write buffer size",
+                  "type": "number",
+                  "path": "swapSpaceSpi.FileSwapSpaceSpi",
+                  "model": "writeBufferSize",
+                  "placeholder": "Available CPU cores",
+                  "tip": [
+                    "Write buffer size in bytes.",
+                    "Write to disk occurs only when this buffer is full."
+                  ]
+                }
+              ]
+            }
+          }
+        }
+      ]
+    },
+    {
+      "label": "Time configuration",
+      "tip": ["Time settings for CLOCK write ordering mode."],
+      "fields": [
+        {
+          "label": "Samples size",
+          "type": "number",
+          "model": "clockSyncSamples",
+          "placeholder": "8",
+          "tip": [
+            "Number of samples used to synchronize clocks between different nodes.",
+            "Clock synchronization is used for cache version assignment in CLOCK order mode."
+          ]
+        },
+        {
+          "label": "Frequency",
+          "type": "number",
+          "model": "clockSyncFrequency",
+          "placeholder": "120,000",
+          "tip": [
+            "Frequency at which clock is synchronized between nodes, in milliseconds.",
+            "Clock synchronization is used for cache version assignment in CLOCK order mode."
+          ]
+        },
+        {
+          "label": "Port base",
+          "type": "number",
+          "model": "timeServerPortBase",
+          "max": 65535,
+          "placeholder": "31100",
+          "tip": [
+            "Time server provides clock synchronization between nodes.",
+            "Base UPD port number for grid time server. Time server will be started on one of free ports in range."
+          ]
+        },
+        {
+          "label": "Port range",
+          "type": "number",
+          "model": "timeServerPortRange",
+          "placeholder": "100",
+          "tip": [
+            "Time server port range."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Thread pools size",
+      "tip": ["Settings for node thread pools."],
+      "fields": [
+        {
+          "label": "Public",
+          "type": "number",
+          "model": "publicThreadPoolSize",
+          "placeholder": "max(8, availableProcessors) * 2",
+          "tip": [
+            "Thread pool that is in charge of processing ComputeJob, GridJobs and user messages sent to node."
+          ]
+        },
+        {
+          "label": "System",
+          "type": "number",
+          "model": "systemThreadPoolSize",
+          "placeholder": "max(8, availableProcessors) * 2",
+          "tip": [
+            "Thread pool that is in charge of processing internal system messages."
+          ]
+        },
+        {
+          "label": "Management",
+          "type": "number",
+          "model": "managementThreadPoolSize",
+          "placeholder": "4",
+          "tip": [
+            "Thread pool that is in charge of processing internal and Visor ComputeJob, GridJobs."
+          ]
+        },
+        {
+          "label": "IGFS",
+          "type": "number",
+          "model": "igfsThreadPoolSize",
+          "placeholder": "availableProcessors",
+          "tip": [
+            "Thread pool that is in charge of processing outgoing IGFS messages."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Transactions",
+      "tip": ["Settings for transactions."],
+      "fields": [
+        {
+          "label": "Cache concurrency",
+          "type": "dropdown",
+          "path": "transactionConfiguration",
+          "model": "defaultTxConcurrency",
+          "placeholder": "PESSIMISTIC",
+          "items": "transactionConcurrency",
+          "tip": [
+            "Cache transaction concurrency to use when one is not explicitly specified."
+          ]
+        },
+        {
+          "label": "Isolation",
+          "type": "dropdown",
+          "path": "transactionConfiguration",
+          "model": "transactionIsolation",
+          "placeholder": "REPEATABLE_READ",
+          "items": "transactionIsolation",
+          "tip": [
+            "Default transaction isolation."
+          ]
+        },
+        {
+          "label": "Default timeout",
+          "type": "number",
+          "path": "transactionConfiguration",
+          "model": "defaultTxTimeout",
+          "placeholder": "0",
+          "tip": [
+            "Default transaction timeout."
+          ]
+        },
+        {
+          "label": "Pessimistic log cleanup delay",
+          "type": "number",
+          "path": "transactionConfiguration",
+          "model": "pessimisticTxLogLinger",
+          "placeholder": "10,000",
+          "tip": [
+            "Delay, in milliseconds, after which pessimistic recovery entries will be cleaned up for failed node."
+          ]
+        },
+        {
+          "label": "Pessimistic log size",
+          "type": "number",
+          "path": "transactionConfiguration",
+          "model": "pessimisticTxLogSize",
+          "placeholder": "0",
+          "tip": [
+            "Size of pessimistic transactions log stored on node in order to recover transaction commit if originating node has left grid before it has sent all messages to transaction nodes."
+          ]
+        },
+        {
+          "label": "Enable serializable cache transactions",
+          "type": "check",
+          "path": "transactionConfiguration",
+          "model": "txSerializableEnabled",
+          "tip": [
+            "Flag to enable/disable isolation level for cache transactions.",
+            "Serializable level does carry certain overhead and if not used, should be disabled."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Utility",
+      "tip": ["Settings for utility messages processing."],
+      "fields": [
+        {
+          "label": "Keep alive time",
+          "type": "number",
+          "model": "utilityCacheKeepAliveTime",
+          "placeholder": "10,000",
+          "tip": [
+            "Keep alive time of thread pool that is in charge of processing utility cache messages."
+          ]
+        },
+        {
+          "label": "Pool size",
+          "type": "number",
+          "model": "utilityCachePoolSize",
+          "placeholder": "max(8, availableProcessors) * 2",
+          "tip": [
+            "Thread pool that is in charge of processing utility cache messages."
+          ]
+        }
+      ]
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/controllers/models/persistence.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/models/persistence.json b/modules/web-control-center/nodejs/controllers/models/persistence.json
new file mode 100644
index 0000000..edf5344
--- /dev/null
+++ b/modules/web-control-center/nodejs/controllers/models/persistence.json
@@ -0,0 +1,66 @@
+{
+  "connection": [
+    {
+      "label": "Name",
+      "type": "text",
+      "model": "name",
+      "required": true
+    },
+    {
+      "label": "Database type",
+      "type": "dropdown",
+      "model": "dbType",
+      "placeholder": "Choose database",
+      "items": "databases",
+      "tip": [
+        "Select database type to connect for loading tables metadata."
+      ]
+    },
+    {
+      "label": "Database name",
+      "type": "text",
+      "model": "dbName",
+      "tip": [
+        "Database name to connect for loading tables metadata."
+      ]
+    },
+    {
+      "label": "Host",
+      "type": "text",
+      "model": "host",
+      "placeholder": "IP address or host",
+      "tip": [
+        "IP address or host name where database server deployed."
+      ]
+    },
+    {
+      "label": "Port",
+      "type": "number",
+      "model": "port",
+      "max": 65535,
+      "placeholder": "",
+      "tip": [
+        "Port number for connecting to database."
+      ]
+    },
+    {
+      "label": "User",
+      "type": "text",
+      "model": "user",
+      "placeholder": "",
+      "tip": [
+        "User name for connecting to database."
+      ]
+    },
+    {
+      "label": "Password",
+      "type": "password",
+      "model": "password",
+      "placeholder": "",
+      "tip": [
+        "Password for connecting to database.",
+        "Note, password would not be saved."
+      ]
+    }
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/controllers/persistences-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/persistences-controller.js b/modules/web-control-center/nodejs/controllers/persistences-controller.js
new file mode 100644
index 0000000..566c857
--- /dev/null
+++ b/modules/web-control-center/nodejs/controllers/persistences-controller.js
@@ -0,0 +1,212 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+controlCenterModule.controller('persistenceController', ['$scope', '$alert', '$http', 'commonFunctions', function ($scope, $alert, $http, commonFunctions) {
+        $scope.joinTip = commonFunctions.joinTip;
+        $scope.getModel = commonFunctions.getModel;
+        $scope.errorMessage = commonFunctions.errorMessage;
+
+        $scope.databases = [
+            {value: 'oracle', label: 'Oracle database'},
+            {value: 'db2', label: 'IBM DB2'},
+            {value: 'mssql', label: 'MS SQL Server'},
+            {value: 'postgre', label: 'PostgreSQL'},
+            {value: 'mysql', label: 'MySQL'},
+            {value: 'h2', label: 'H2 database'}
+        ];
+
+        $scope.connection = [];
+
+        $http.get('/models/persistence.json')
+            .success(function (data) {
+                $scope.connection = data.connection;
+            })
+            .error(function (errMsg) {
+                $alert({title: $scope.errorMessage(errMsg)});
+            });
+
+        $scope.persistences = [];
+
+        // When landing on the page, get persistences and show them.
+        $http.post('list')
+            .success(function (data) {
+                $scope.spaces = data.spaces;
+                $scope.persistences = data.persistences;
+
+                var restoredItem = angular.fromJson(sessionStorage.persistenceBackupItem);
+
+                if (restoredItem) {
+                    var idx = _.findIndex($scope.persistences, function (persistence) {
+                        return persistence._id == restoredItem._id;
+                    });
+
+                    if (idx >= 0) {
+                        $scope.selectedItem = $scope.persistences[idx];
+
+                        $scope.backupItem = restoredItem;
+                    }
+                    else
+                        sessionStorage.removeItem('persistenceBackupItem');
+                }
+
+                $scope.$watch('backupItem', function (val) {
+                    if (val)
+                        sessionStorage.persistenceBackupItem = angular.toJson(val);
+                }, true);
+            })
+            .error(function (errMsg) {
+                $alert({title: $scope.errorMessage(errMsg)});
+            });
+
+        $scope.selectItem = function (item) {
+            $scope.selectedItem = item;
+            $scope.backupItem = angular.copy(item);
+        };
+
+        // Add new persistence.
+        $scope.createItem = function () {
+            $scope.backupItem = {database: 'oracle'};
+            $scope.backupItem.space = $scope.spaces[0]._id;
+        };
+
+        // Save persistence in db.
+        $scope.saveItem = function () {
+            var item = $scope.backupItem;
+
+            $http.post('save', item)
+                .success(function (_id) {
+                    var i = _.findIndex($scope.persistences, function (persistence) {
+                        return persistence._id == _id;
+                    });
+
+                    if (i >= 0)
+                        angular.extend($scope.persistences[i], item);
+                    else {
+                        item._id = _id;
+
+                        $scope.persistences.push(item);
+                    }
+
+                    $scope.selectItem(item);
+                })
+                .error(function (errMsg) {
+                    $alert({title: $scope.errorMessage(errMsg)});
+                });
+        };
+
+        $scope.removeItem = function () {
+            var _id = $scope.selectedItem._id;
+
+            $http.post('remove', {_id: _id})
+                .success(function () {
+                    var i = _.findIndex($scope.persistences, function (persistence) {
+                        return persistence._id == _id;
+                    });
+
+                    if (i >= 0) {
+                        $scope.persistences.splice(i, 1);
+
+                        $scope.selectedItem = undefined;
+                        $scope.backupItem = undefined;
+                    }
+                })
+                .error(function (errMsg) {
+                    $alert({title: $scope.errorMessage(errMsg)});
+                });
+        };
+
+        $scope.data = {
+            curTableIdx: -1,
+            curFieldIdx: -1,
+            curKeyClass: '',
+            curValueClass: '',
+            curJavaName: '',
+            curJavaType: '',
+            tables: [
+                {schemaName: 'Schema1', use: true},
+                {schemaName: 'Schema1', use: true, tableName: 'Table1', keyClass: 'KeyClass1', valueClass: 'ValueClass1',
+                    fields: [
+                        {use: true, key: true, ak: true, dbName: 'name1', dbType: 'dbType1', javaName: 'javaName1', javaType: 'javaType1'},
+                        {use: true, key: false, ak: false, dbName: 'name2', dbType: 'dbType2', javaName: 'javaName2', javaType: 'javaType2'},
+                        {use: false, key: false, ak: false, dbName: 'name3', dbType: 'dbType3', javaName: 'javaName3', javaType: 'javaType3'}
+                    ]
+                },
+                {schemaName: 'Schema2 with very long name', use: false},
+                {schemaName: 'Schema2', use: false, tableName: 'Table2', keyClass: 'KeyClass2', valueClass: 'ValueClass2',
+                    fields: [
+                        {use: true, key: true, ak: true, dbName: 'name4', dbType: 'dbType4', javaName: 'javaName4', javaType: 'javaType4'},
+                        {use: true, key: false, ak: false, dbName: 'name5', dbType: 'dbType5', javaName: 'javaName5', javaType: 'javaType5'},
+                        {use: false, key: false, ak: false, dbName: 'name6', dbType: 'dbType6', javaName: 'javaName6', javaType: 'javaType6'}
+                    ]},
+                {schemaName: 'Schema2', use: false, tableName: 'Table3', keyClass: 'KeyClass3', valueClass: 'ValueClass3',
+                    fields: [
+                        {use: true, key: true, ak: true, dbName: 'name7', dbType: 'dbType7', javaName: 'javaName7', javaType: 'javaType7'},
+                        {use: true, key: false, ak: false, dbName: 'name8', dbType: 'dbType8', javaName: 'javaName8', javaType: 'javaType8'},
+                        {use: false, key: false, ak: false, dbName: 'name9', dbType: 'dbType9', javaName: 'javaName9', javaType: 'javaType9'},
+                        {use: false, key: false, ak: false, dbName: 'name10', dbType: 'dbType10', javaName: 'javaName10', javaType: 'javaType10'},
+                        {use: false, key: false, ak: false, dbName: 'name11', dbType: 'dbType11', javaName: 'javaName11', javaType: 'javaType11'},
+                        {use: false, key: false, ak: false, dbName: 'name12', dbType: 'dbType12', javaName: 'javaName12', javaType: 'javaType12'}
+                    ]}]
+        };
+
+        $scope.selectSchema = function (idx) {
+            var data = $scope.data;
+            var tables = data.tables;
+            var schemaName = tables[idx].schemaName;
+            var use = tables[idx].use;
+
+            for (var i = idx + 1; i < tables.length; i++) {
+                var item = tables[i];
+
+                if (item.schemaName == schemaName && item.tableName)
+                    item.use = use;
+                else
+                    break;
+            }
+
+            data.curTableIdx = -1;
+            data.curFieldIdx = -1;
+        };
+
+        $scope.selectTable = function (idx) {
+            var data = $scope.data;
+
+            data.curTableIdx = idx;
+            data.curFieldIdx = -1;
+
+            if (idx >= 0) {
+                var tbl = data.tables[idx];
+
+                data.curKeyClass = tbl.keyClass;
+                data.curValueClass = tbl.valueClass;
+            }
+        };
+
+        $scope.selectField = function (idx) {
+            var data = $scope.data;
+
+            data.curFieldIdx = idx;
+
+            if (idx >= 0) {
+                var fld = data.tables[data.curTableIdx].fields[idx];
+
+                data.curJavaName = fld.javaName;
+                data.curJavaType = fld.javaType;
+            }
+        };
+    }]
+);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/controllers/summary-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/summary-controller.js b/modules/web-control-center/nodejs/controllers/summary-controller.js
new file mode 100644
index 0000000..f979dac
--- /dev/null
+++ b/modules/web-control-center/nodejs/controllers/summary-controller.js
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+controlCenterModule.controller('summaryController', ['$scope', '$http', function ($scope, $http) {
+    $scope.generateJavaItems = [
+        { label: 'snippet',value: false},
+        { label: 'factory class',value: true}
+    ];
+
+    $scope.generateJavaClass = false;
+
+    $scope.javaData = undefined;
+    $scope.xmlData = undefined;
+    $scope.dockerData = undefined;
+
+    $http.post('/configuration/clusters/list').success(function (data) {
+        $scope.clusters = data.clusters;
+    });
+
+    $scope.selectItem = function (item) {
+        $scope.selectedItem = item;
+
+        $scope.generate()
+    };
+
+    $scope.cfgLang = 'xml';
+
+    $scope.generate = function() {
+        var cluster = $scope.selectedItem;
+        
+        if (!cluster)
+            return;
+
+        var lang = $scope.cfgLang;
+        
+        $scope.loading = true;
+
+        $http.post('/configuration/summary/generator', {_id: cluster._id, lang: lang, generateJavaClass: $scope.generateJavaClass})
+            .success(
+            function (data) {
+                switch (lang) {
+                    case 'java':
+                        $scope.javaData = data;
+
+                        $("<pre class='brush:java' />").text(data).appendTo($('#javaResultDiv').empty());
+
+                        break;
+
+                    case 'xml':
+                        $scope.xmlData = data;
+
+                        $("<pre class='brush:xml' />").text(data).appendTo($('#xmlResultDiv').empty());
+
+                        break;
+
+                    case 'docker':
+                        $scope.dockerData = data;
+
+                        $("<pre class='brush:plain' />").text($scope.dockerFile()).appendTo($('#dockerResultDiv').empty());
+
+                        break;
+                }
+
+                SyntaxHighlighter.highlight();
+
+                $scope.loading = false;
+            }).error(function (data) {
+                $scope.generateError = "Failed to generate config: " + data;
+
+                $scope.loading = false;
+            });
+    };
+
+    $scope.$watch('cfgLang', $scope.generate);
+    $scope.$watch('generateJavaClass', $scope.generate);
+
+    $scope.dockerArg = {};
+
+    $scope.download = function(text, fileName) {
+        if (text.length == 0)
+            return;
+        
+        var file = document.createElement('a');
+        file.setAttribute('href', 'data:application/octet-stream;charset=utf-8,' + encodeURIComponent(text));
+        file.setAttribute('download', fileName);
+
+        file.style.display = 'none';
+        document.body.appendChild(file);
+
+        file.click();
+
+        document.body.removeChild(file);
+    };
+
+    $scope.downloadJava = function() {
+        $scope.download($scope.javaData,
+            $scope.generateJavaClass ? 'ConfigurationFactory.java' : $scope.selectedItem.name + '.snipplet.txt');
+    };
+
+    $scope.downloadDocker = function() {
+        $scope.download($scope.dockerFile(), 'Dockerfile');
+    };
+
+    $scope.oss = ['debian:8', 'ubuntu:14.10'];
+    
+    $scope.dockerFile = function() {
+        if (!$scope.selectedItem || !$scope.dockerArg) {
+            return '';
+        }
+        
+        var os = $scope.dockerArg.os;
+
+        if (!os)
+            os = 'debian:8';
+
+        return "" +
+            "# Start from a Debian image.\n"+
+            "FROM " + os + "\n"+
+            "\n"+
+            "# Install tools.\n"+
+            "RUN apt-get update && apt-get install -y --fix-missing \\\n"+
+            "  wget \\\n"+
+            "  dstat \\\n"+
+            "  maven \\\n"+
+            "  git\n"+
+            "\n"+
+            "# Install Oracle JDK.\n"+
+            "RUN mkdir /opt/jdk\n"+
+            "\n"+
+            "RUN wget --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \\\n"+
+            "  http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz\n"+
+            "\n"+
+            "RUN tar -zxf jdk-7u79-linux-x64.tar.gz -C /opt/jdk\n"+
+            "\n"+
+            "RUN rm jdk-7u79-linux-x64.tar.gz\n"+
+            "\n"+
+            "RUN update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.7.0_79/bin/java 100\n"+
+            "\n"+
+            "RUN update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.7.0_79/bin/javac 100\n"+
+            "\n"+
+            "# Sets java variables.\n"+
+            "ENV JAVA_HOME /opt/jdk/jdk1.7.0_79/\n"+
+            "\n"+
+            "# Create working directory\n"+
+            "WORKDIR /home\n"+
+            "\n"+
+            "RUN wget -O ignite.zip http://tiny.cc/updater/download_ignite.php && unzip ignite.zip && rm ignite.zip\n"+
+            "\n"+
+            "COPY *.xml /tmp/\n"+
+            "\n"+
+            "RUN mv /tmp/*.xml /home/$(ls)/config";
+    };
+
+    $scope.$watch('dockerArg.os', function() {
+        $("<pre class='brush:plain' />").text($scope.dockerFile()).appendTo($('#dockerResultDiv').empty());
+    });
+}]);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/db.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/db.js b/modules/web-control-center/nodejs/db.js
index c0f145e..9630303 100644
--- a/modules/web-control-center/nodejs/db.js
+++ b/modules/web-control-center/nodejs/db.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-var config = require('./configuration.js');
+var config = require('./helpers/configuration-loader.js');
 
 // Mongoose for mongodb.
 var mongoose = require('mongoose'),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/generator/common.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/generator/common.js b/modules/web-control-center/nodejs/generator/common.js
deleted file mode 100644
index 763088c..0000000
--- a/modules/web-control-center/nodejs/generator/common.js
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var _ = require('lodash');
-
-exports.mainComment = function() {
-    return 'This configuration was generated by Ignite Control Center ('
-        + formatDate(new Date()) + ')';
-};
-
-function addLeadingZero(numberStr, minSize) {
-    if (typeof (numberStr) != 'string')
-        numberStr = '' + numberStr;
-    
-    while (numberStr.length < minSize) {
-        numberStr = '0' + numberStr;
-    }
-    
-    return numberStr;
-}
-
-exports.formatDate = formatDate;
-
-function formatDate(date) {
-    var dd = addLeadingZero(date.getDate(), 2);
-    var mm = addLeadingZero(date.getMonth() + 1, 2);
-    
-    var yyyy = date.getFullYear();
-
-    return mm + '/' + dd + '/' + yyyy + ' ' + addLeadingZero(date.getHours(), 2) + ':' + addLeadingZero(date.getMinutes(), 2);
-}
-
-exports.builder = function () {
-    var res = [];
-
-    res.deep = 0;
-    res.lineStart = true;
-
-    res.append = function(s) {
-        if (this.lineStart) {
-            for (var i = 0; i < this.deep; i++)
-                this.push('    ');
-
-            this.lineStart = false;
-        }
-
-        this.push(s);
-
-        return this;
-    };
-
-    res.line = function(s) {
-        if (s)
-            this.append(s);
-
-        this.push('\n');
-        this.lineStart = true;
-
-        return this;
-    };
-
-    res.startBlock = function(s) {
-        if (s)
-            this.append(s);
-
-        this.push('\n');
-        this.lineStart = true;
-        this.deep++;
-
-        return this;
-    };
-
-    res.endBlock = function(s) {
-        this.deep--;
-
-        if (s)
-            this.append(s);
-
-        this.push('\n');
-        this.lineStart = true;
-
-        return this;
-    };
-
-    res.emptyLineIfNeeded = function() {
-        if (this.needEmptyLine) {
-            this.line();
-
-            this.needEmptyLine = false;
-            
-            return true;
-        }
-
-        return false;
-    };
-
-    res.imports = {};
-    
-    res.importClass = function(fullClassName) {
-        var dotIdx = fullClassName.lastIndexOf('.');
-        
-        var shortName;
-        
-        if (dotIdx > 0)
-            shortName = fullClassName.substr(dotIdx + 1);
-        else 
-            shortName = fullClassName;
-        
-        if (this.imports[shortName]) {
-            if (this.imports[shortName] != fullClassName)
-                throw "Class name conflict: " + this.imports[shortName] + ' and ' + fullClassName;
-        }
-        else {
-            this.imports[shortName] = fullClassName;
-        }
-        
-        return shortName;
-    };
-    
-    res.generateImports = function() {
-        var res = [];
-        
-        for (var clsName in this.imports) {
-            if (this.imports.hasOwnProperty(clsName))
-                res.push('import ' + this.imports[clsName] + ';');
-        }
-        
-        return res.join('\n')
-    };
-    
-    return res;
-};
-
-function ClassDescriptor(className, fields) {
-    this.className = className;
-
-    this.fields = fields;
-}
-
-exports.evictionPolicies = {
-    'LRU': new ClassDescriptor('org.apache.ignite.cache.eviction.lru.LruEvictionPolicy',
-        {batchSize: null, maxMemorySize: null, maxSize: null}),
-    'RND': new ClassDescriptor('org.apache.ignite.cache.eviction.random.RandomEvictionPolicy', {maxSize: null}),
-    'FIFO': new ClassDescriptor('org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy',
-        {batchSize: null, maxMemorySize: null, maxSize: null}),
-    'SORTED': new ClassDescriptor('org.apache.ignite.cache.eviction.sorted.SortedEvictionPolicy',
-        {batchSize: null, maxMemorySize: null, maxSize: null})
-};
-
-exports.knownClasses = {
-    Oracle: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.OracleDialect', {}),
-    DB2: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.DB2Dialect', {}),
-    SQLServer: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.SQLServerDialect', {}),
-    MySQL: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.MySQLDialect', {}),
-    PostgreSQL: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.BasicJdbcDialect', {}),
-    H2: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.dialect.H2Dialect', {})
-};
-
-exports.dataSources = {
-    Oracle: 'oracle.jdbc.pool.OracleDataSource',
-    DB2: 'com.ibm.db2.jcc.DB2ConnectionPoolDataSource',
-    SQLServer: 'com.microsoft.sqlserver.jdbc.SQLServerDataSource',
-    MySQL: 'com.mysql.jdbc.jdbc2.optional.MysqlDataSource',
-    PostgreSQL: 'org.postgresql.ds.PGPoolingDataSource',
-    H2: 'org.h2.jdbcx.JdbcDataSource'
-};
-
-exports.storeFactories = {
-    CacheJdbcPojoStoreFactory: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory', {
-        dataSourceBean: null,
-        dialect: {type: 'className'}
-    }),
-
-    CacheJdbcBlobStoreFactory: new ClassDescriptor('org.apache.ignite.cache.store.jdbc.CacheJdbcBlobStoreFactory', {
-        user: null,
-        dataSourceBean: null,
-        initSchema: null,
-        createTableQuery: null,
-        loadQuery: null,
-        insertQuery: null,
-        updateQuery: null,
-        deleteQuery: null
-    }),
-
-    CacheHibernateBlobStoreFactory: new ClassDescriptor('org.apache.ignite.cache.store.hibernate.CacheHibernateBlobStoreFactory', {
-        hibernateProperties: {type: 'propertiesAsList', propVarName: 'props'}
-    })
-};
-
-exports.atomicConfiguration = new ClassDescriptor('org.apache.ignite.configuration.AtomicConfiguration', {
-    backups: null,
-    cacheMode: {type: 'enum', enumClass: 'CacheMode'},
-    atomicSequenceReserveSize: null
-});
-
-exports.swapSpaceSpi = new ClassDescriptor('org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpi', {
-    baseDirectory: null,
-    readStripesNumber: null,
-    maximumSparsity: {type: 'float'},
-    maxWriteQueueSize: null,
-    writeBufferSize: null
-});
-
-exports.transactionConfiguration = new ClassDescriptor('org.apache.ignite.configuration.TransactionConfiguration', {
-    defaultTxConcurrency: {type: 'enum', enumClass: 'TransactionConcurrency'},
-    transactionIsolation: {type: 'TransactionIsolation', setterName: 'defaultTxIsolation'},
-    defaultTxTimeout: null,
-    pessimisticTxLogLinger: null,
-    pessimisticTxLogSize: null,
-    txSerializableEnabled: null
-});
-
-exports.hasProperty = function(obj, props) {
-    for (var propName in props) {
-        if (props.hasOwnProperty(propName)) {
-            if (obj[propName])
-                return true;
-        }
-    }
-
-    return false;
-};
-
-/**
- * Convert some name to valid java name.
- *
- * @param name to convert.
- * @returns {string} Valid java name.
- */
-exports.toJavaName = function(name) {
-    var javaName = name.replace(/[^A-Za-z_0-9]+/, '_');
-
-    return javaName.charAt(0).toLocaleUpperCase() + javaName.slice(1);
-};
-
-/**
- * Generate properties file with properties stubs for stores data sources.
- *
- * @param cluster Configuration to process.
- * @returns {string} Generated content.
- */
-exports.generateProperties = function(cluster) {
-    var res = builder();
-
-    var datasources = [];
-
-    if (cluster.caches && cluster.caches.length > 0) {
-
-        _.foreach(cluster.caches, function (cache) {
-            if (cache.cacheStoreFactory && cache.cacheStoreFactory.kind) {
-                var storeFactory = cache.cacheStoreFactory[cache.cacheStoreFactory.kind];
-
-                if (storeFactory.dialect) {
-                    var beanId = storeFactory.dataSourceBean;
-
-                    if (!_.contains(datasources, beanId)) {
-                        datasources.push(beanId);
-
-                        res.line(beanId + '.jdbc.url=YOUR_JDBC_URL');
-                        res.line(beanId + '.jdbc.username=YOUR_USER_NAME');
-                        res.line(beanId + '.jdbc.password=YOUR_PASSWORD');
-                        res.line();
-                    }
-                }
-            }
-        });
-    }
-
-    if (datasources.length > 0)
-        return '# ' + mainComment() + '\n\n' + res.join();
-
-    return '';
-};

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/generator/java.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/generator/java.js b/modules/web-control-center/nodejs/generator/java.js
deleted file mode 100644
index 037df10..0000000
--- a/modules/web-control-center/nodejs/generator/java.js
+++ /dev/null
@@ -1,608 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var _ = require('lodash');
-
-var generatorUtils = require("./common");
-
-exports.generateClusterConfiguration = function(cluster, generateJavaClass) {
-    var res = generatorUtils.builder();
-
-    res.datasourceBeans = [];
-
-    if (generateJavaClass) {
-        res.line('/**');
-        res.line(' * ' + generatorUtils.mainComment());
-        res.line(' */');
-        res.startBlock('public class ConfigurationFactory {');
-        res.line('/**');
-        res.line(' * Configure grid.');
-        res.line(' */');
-        res.startBlock('public IgniteConfiguration createConfiguration() {');
-    }
-    
-    res.importClass('org.apache.ignite.configuration.IgniteConfiguration');
-    
-    res.line('IgniteConfiguration cfg = new IgniteConfiguration();');
-    res.line();
-
-    if (cluster.discovery) {
-        var d = cluster.discovery;
-
-        res.importClass('org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi');
-        res.line('TcpDiscoverySpi discovery = new TcpDiscoverySpi();');
-
-        switch (d.kind) {
-            case 'Multicast':
-                addBeanWithProperties(res, d.Multicast, 'discovery', 'ipFinder', 'ipFinder',
-                    'org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder', {
-                        multicastGroup: null,
-                        multicastPort: null,
-                        responseWaitTime: null,
-                        addressRequestAttempts: null,
-                        localAddress: null
-                    }, true);
-
-                break;
-
-            case 'Vm':
-                addBeanWithProperties(res, d.Vm, 'discovery', 'ipFinder', 'ipFinder',
-                    'org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder', {
-                        addresses: {type: 'list'}
-                    }, true);
-
-                break;
-
-            case 'S3':
-                if (d.S3) {
-                    addBeanWithProperties(res, d.S3, 'discovery', 'ipFinder', 'ipFinder',
-                        'org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder', {bucketName: null}, 
-                        true);
-                }
-                else {
-                    res.importClass('org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder');
-                    
-                    res.line('discovery.setIpFinder(new TcpDiscoveryS3IpFinder());');
-                }
-
-                break;
-
-            case 'Cloud':
-                addBeanWithProperties(res, d.Cloud, 'discovery', 'ipFinder', 'ipFinder',
-                    'org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinder', {
-                        credential: null,
-                        credentialPath: null,
-                        identity: null,
-                        provider: null,
-                        regions: {type: 'list'},
-                        zones: {type: 'list'}
-                    }, true);
-
-                break;
-
-            case 'GoogleStorage':
-                addBeanWithProperties(res, d.GoogleStorage, 'discovery', 'ipFinder', 'ipFinder',
-                    'org.apache.ignite.spi.discovery.tcp.ipfinder.gce.TcpDiscoveryGoogleStorageIpFinder', {
-                        projectName: null,
-                        bucketName: null,
-                        serviceAccountP12FilePath: null
-                    }, true);
-
-                //if (d.GoogleStorage.addrReqAttempts) todo ????
-                //    res.line('<property name="serviceAccountP12FilePath" value="' + escapeAttr(d.GoogleStorage.addrReqAttempts) + '"/>');
-
-                break;
-
-            case 'Jdbc':
-                res.importClass('org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder');
-                
-                res.line();
-                res.line('TcpDiscoveryJdbcIpFinder ipFinder = new TcpDiscoveryJdbcIpFinder();');
-                res.line('ipFinder.setInitSchema(' + (d.Jdbc.initSchema != null || d.Jdbc.initSchema) + ');');
-                res.line('discovery.setIpFinder(ipFinder);');
-                res.needEmptyLine = true;
-
-                break;
-
-            case 'SharedFs':
-                addBeanWithProperties(res, d.SharedFs, 'discovery', 'ipFinder', 'ipFinder',
-                    'org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder', {path: null}, 
-                    true);
-
-                break;
-
-            default:
-                throw "Unknown discovery kind: " + d.kind;
-        }
-
-        res.emptyLineIfNeeded();
-
-        res.line('cfg.setDiscoverySpi(discovery);');
-
-        res.needEmptyLine = true;
-    }
-
-    if (cluster.caches && cluster.caches.length > 0) {
-        res.emptyLineIfNeeded();
-
-        var names = [];
-
-        for (var i = 0; i < cluster.caches.length; i++) {
-            res.emptyLineIfNeeded();
-
-            var cache = cluster.caches[i];
-
-            var cacheName = 'cache' + generatorUtils.toJavaName(cache.name);
-
-            names.push(cacheName);
-
-            generateCacheConfiguration(cache, cacheName, res);
-
-            res.needEmptyLine = true;
-        }
-
-        res.emptyLineIfNeeded();
-
-        res.append('cfg.setCacheConfiguration(');
-
-        for (i = 0; i < names.length; i++) {
-            if (i > 0)
-                res.append(', ');
-
-            res.append(names[i]);
-        }
-
-        res.line(');');
-
-        res.needEmptyLine = true;
-    }
-
-    addBeanWithProperties(res, cluster.atomicConfiguration, 'cfg', 'atomicConfiguration', 'atomicCfg',
-        generatorUtils.atomicConfiguration.className, generatorUtils.atomicConfiguration.fields);
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cluster, 'cfg', 'networkTimeout');
-    addProperty(res, cluster, 'cfg', 'networkSendRetryDelay');
-    addProperty(res, cluster, 'cfg', 'networkSendRetryCount');
-    addProperty(res, cluster, 'cfg', 'segmentCheckFrequency');
-    addProperty(res, cluster, 'cfg', 'waitForSegmentOnStart');
-    addProperty(res, cluster, 'cfg', 'discoveryStartupDelay');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cluster, 'cfg', 'deploymentMode', 'DeploymentMode');
-
-    res.needEmptyLine = true;
-
-    if (cluster.includeEventTypes && cluster.includeEventTypes.length > 0) {
-        res.emptyLineIfNeeded();
-        
-        if (cluster.includeEventTypes.length == 1) {
-            res.importClass('org.apache.ignite.events.EventType');
-            
-            res.line('cfg.setIncludeEventTypes(EventType.' + cluster.includeEventTypes[0] + ');');
-        }
-        else {
-            res.append('int[] events = new int[EventType.' + cluster.includeEventTypes[0] + '.length');
-            
-            for (i = 1; i < cluster.includeEventTypes.length; i++) {
-                res.line();
-                
-                res.append('    + EventType.' + cluster.includeEventTypes[i] + '.length');
-            }
-            
-            res.line('];');
-            res.line();
-            res.line('int k = 0;');
-
-            for (i = 0; i < cluster.includeEventTypes.length; i++) {
-                res.line();
-
-                var e = cluster.includeEventTypes[i];
-                
-                res.line('System.arraycopy(EventType.' + e + ', 0, events, k, EventType.' + e + '.length);');
-                res.line('k += EventType.' + e + '.length;');
-            }
-            
-            res.line();
-            res.line('cfg.setIncludeEventTypes(events);');
-        }
-
-        res.needEmptyLine = true;
-    }
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cluster, 'cfg', 'marshalLocalJobs');
-    addProperty(res, cluster, 'cfg', 'marshCacheKeepAliveTime');
-    addProperty(res, cluster, 'cfg', 'marshCachePoolSize');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cluster, 'cfg', 'metricsExpireTime');
-    addProperty(res, cluster, 'cfg', 'metricsHistorySize');
-    addProperty(res, cluster, 'cfg', 'metricsLogFrequency');
-    addProperty(res, cluster, 'cfg', 'metricsUpdateFrequency');
-    res.needEmptyLine = true;
-
-    addProperty(res, cluster, 'cfg', 'peerClassLoadingEnabled');
-    addMultiparamProperty(res, cluster, 'cfg', 'peerClassLoadingLocalClassPathExclude');
-    addProperty(res, cluster, 'cfg', 'peerClassLoadingMissedResourcesCacheSize');
-    addProperty(res, cluster, 'cfg', 'peerClassLoadingThreadPoolSize');
-    res.needEmptyLine = true;
-
-    if (cluster.swapSpaceSpi && cluster.swapSpaceSpi.kind == 'FileSwapSpaceSpi') {
-        addBeanWithProperties(res, cluster.swapSpaceSpi.FileSwapSpaceSpi, 'cfg', 'swapSpaceSpi', 'swapSpi',
-            generatorUtils.swapSpaceSpi.className, generatorUtils.swapSpaceSpi.fields, true);
-
-        res.needEmptyLine = true;
-    }
-
-    addProperty(res, cluster, 'cfg', 'clockSyncSamples');
-    addProperty(res, cluster, 'cfg', 'clockSyncFrequency');
-    addProperty(res, cluster, 'cfg', 'timeServerPortBase');
-    addProperty(res, cluster, 'cfg', 'timeServerPortRange');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cluster, 'cfg', 'publicThreadPoolSize');
-    addProperty(res, cluster, 'cfg', 'systemThreadPoolSize');
-    addProperty(res, cluster, 'cfg', 'managementThreadPoolSize');
-    addProperty(res, cluster, 'cfg', 'igfsThreadPoolSize');
-
-    res.needEmptyLine = true;
-
-    addBeanWithProperties(res, cluster.transactionConfiguration, 'cfg', 'transactionConfiguration',
-        'transactionConfiguration', generatorUtils.transactionConfiguration.className,
-        generatorUtils.transactionConfiguration.fields);
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cluster, 'cfg', 'cacheSanityCheckEnabled');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cluster, 'cfg', 'utilityCacheKeepAliveTime');
-    addProperty(res, cluster, 'cfg', 'utilityCachePoolSize');
-
-    if (generateJavaClass) {
-        res.line();
-        res.line('return cfg;');
-        res.endBlock('}');
-        res.endBlock('}');
-        
-        return res.generateImports() + '\n\n' + res.join('')
-    }
-    
-    return res.join('');
-};
-
-function createEvictionPolicy(res, evictionPolicy, varName, propertyName) {
-    if (evictionPolicy && evictionPolicy.kind) {
-        var e = generatorUtils.evictionPolicies[evictionPolicy.kind];
-
-        var obj = evictionPolicy[evictionPolicy.kind.toUpperCase()];
-
-        addBeanWithProperties(res, obj, varName, propertyName, propertyName, e.className, e.fields, true);
-    }
-}
-
-exports.generateCacheConfiguration = generateCacheConfiguration;
-
-/**
- * Generate java code for cache configuration.
- *
- * @param cacheCfg Cache config.
- * @param varName Variable name.
- * @param res Result builder.
- * @returns {*} Append generated java code to builder and return it.
- */
-function generateCacheConfiguration(cacheCfg, varName, res) {
-    if (!res)
-        res = generatorUtils.builder();
-
-    res.emptyLineIfNeeded();
-
-    res.importClass('org.apache.ignite.configuration.CacheConfiguration');
-    
-    res.line('CacheConfiguration ' + varName + ' = new CacheConfiguration();');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, varName, 'name');
-    
-    addProperty(res, cacheCfg, varName, 'mode', 'CacheMode', 'cacheMode');
-
-    addProperty(res, cacheCfg, varName, 'atomicityMode', 'CacheAtomicityMode');
-    addProperty(res, cacheCfg, varName, 'backups');
-    addProperty(res, cacheCfg, varName, 'startSize');
-    addProperty(res, cacheCfg, varName, 'readFromBackup');
-
-    res.needEmptyLine = true;
-    
-    addProperty(res, cacheCfg, varName, 'memoryMode', 'CacheMemoryMode');
-    addProperty(res, cacheCfg, varName, 'offHeapMaxMemory');
-    addProperty(res, cacheCfg, varName, 'swapEnabled');
-    addProperty(res, cacheCfg, varName, 'copyOnRead');
-
-    res.needEmptyLine = true;
-
-    createEvictionPolicy(res, cacheCfg.evictionPolicy, varName, 'evictionPolicy');
-
-    if (cacheCfg.nearConfiguration && (cacheCfg.nearConfiguration.nearStartSize || cacheCfg.nearConfiguration.nearEvictionPolicy.kind)) {
-        res.needEmptyLine = true;
-
-        addBeanWithProperties(res, cacheCfg.nearConfiguration, varName, 'nearConfiguration', 'nearConfiguration',
-            'org.apache.ignite.configuration.NearCacheConfiguration',
-            {nearStartSize: null, atomicSequenceReserveSize: null}, true);
-
-        if (cacheCfg.nearConfiguration && cacheCfg.nearConfiguration.nearEvictionPolicy && cacheCfg.nearConfiguration.nearEvictionPolicy.kind) {
-            createEvictionPolicy(res, cacheCfg.nearConfiguration.nearEvictionPolicy, 'nearConfiguration', 'nearEvictionPolicy');
-        }
-    }
-
-    res.needEmptyLine = true;
-    
-    addProperty(res, cacheCfg, varName, 'sqlEscapeAll');
-    addProperty(res, cacheCfg, varName, 'sqlOnheapRowCacheSize');
-    addProperty(res, cacheCfg, varName, 'longQueryWarningTimeout');
-    
-    if (cacheCfg.indexedTypes && cacheCfg.indexedTypes.length > 0) {
-        res.emptyLineIfNeeded();
-        
-        res.append(varName + '.setIndexedTypes(');
-        
-        for (var i = 0; i < cacheCfg.indexedTypes.length; i++) {
-            if (i > 0)
-                res.append(', ');
-
-            var pair = cacheCfg.indexedTypes[i];
-            
-            res.append(toJavaCode(pair.keyClass, 'class')).append(', ').append(toJavaCode(pair.valueClass, 'class'))
-        }
-        
-        res.line(');');
-    }
-
-    addMultiparamProperty(res, cacheCfg, varName, 'sqlFunctionClasses', 'class');
-    
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, varName, 'rebalanceMode', 'CacheRebalanceMode');
-    addProperty(res, cacheCfg, varName, 'rebalanceThreadPoolSize');
-    addProperty(res, cacheCfg, varName, 'rebalanceBatchSize');
-    addProperty(res, cacheCfg, varName, 'rebalanceOrder');
-    addProperty(res, cacheCfg, varName, 'rebalanceDelay');
-    addProperty(res, cacheCfg, varName, 'rebalanceTimeout');
-    addProperty(res, cacheCfg, varName, 'rebalanceThrottle');
-
-    res.needEmptyLine = true;
-    
-    if (cacheCfg.cacheStoreFactory && cacheCfg.cacheStoreFactory.kind) {
-        var storeFactory = cacheCfg.cacheStoreFactory[cacheCfg.cacheStoreFactory.kind];
-        var data = generatorUtils.storeFactories[cacheCfg.cacheStoreFactory.kind];
-
-        var sfVarName = 'storeFactory' + generatorUtils.toJavaName(cacheCfg.name);
-        var dsVarName = 'none';
-
-        if (storeFactory.dialect) {
-            var dataSourceBean = storeFactory.dataSourceBean;
-
-            dsVarName = 'dataSource' + generatorUtils.toJavaName(dataSourceBean);
-
-            if (!_.contains(res.datasourceBeans, dataSourceBean)) {
-                res.datasourceBeans.push(dataSourceBean);
-
-                var dataSource = generatorUtils.dataSources[storeFactory.dialect];
-
-                res.line();
-                res.line(dataSource.className + ' ' + dsVarName + ' = new ' + dataSource.className + '();');
-                res.line(dsVarName + '.setURL(_URL_);');
-                res.line(dsVarName + '.setUsername(_User_Name_);');
-                res.line(dsVarName + '.setPassword(_Password_);');
-            }
-        }
-
-        addBeanWithProperties(res, storeFactory, varName, 'cacheStoreFactory', sfVarName, data.className,
-            data.fields, true);
-
-        if (dsVarName != 'none')
-            res.line(sfVarName + '.setDataSource(' + dsVarName + ');');
-    }
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, varName, 'loadPreviousValue');
-    addProperty(res, cacheCfg, varName, 'readThrough');
-    addProperty(res, cacheCfg, varName, 'writeThrough');
-
-    res.needEmptyLine = true;
-    
-    addProperty(res, cacheCfg, varName, 'invalidate');
-    addProperty(res, cacheCfg, varName, 'defaultLockTimeout');
-    addProperty(res, cacheCfg, varName, 'transactionManagerLookupClassName');
-    
-    res.needEmptyLine = true;
-    
-    addProperty(res, cacheCfg, varName, 'writeBehindEnabled');
-    addProperty(res, cacheCfg, varName, 'writeBehindBatchSize');
-    addProperty(res, cacheCfg, varName, 'writeBehindFlushSize');
-    addProperty(res, cacheCfg, varName, 'writeBehindFlushFrequency');
-    addProperty(res, cacheCfg, varName, 'writeBehindFlushThreadCount');
-    
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, varName, 'statisticsEnabled');
-    addProperty(res, cacheCfg, varName, 'managementEnabled');
-
-    res.needEmptyLine = true;
-
-    addProperty(res, cacheCfg, varName, 'maxConcurrentAsyncOperations');
-    
-    return res;
-}
-
-function toJavaCode(val, type) {
-    if (val == null)
-       return 'null';
-
-    if (type == 'float')
-        return val + 'f';
-    
-    if (type == 'class')
-        return val + '.class';
-    
-    if (type)
-        return type + '.' + val;
-    
-    if (typeof(val) == 'string')
-        return '"' + val.replace('"', '\\"') + '"';
-
-    if (typeof(val) == 'number' || typeof(val) == 'boolean')
-        return '' + val;
-
-    throw "Unknown type: " + typeof(val) + ' (' + val + ')';
-}
-
-function addProperty(res, obj, objVariableName, propName, enumType, setterName) {
-    var val = obj[propName];
-    
-    if (val) {
-        res.emptyLineIfNeeded();
-
-        res.line(objVariableName + '.' + getSetterName(setterName ? setterName : propName)
-            + '(' + toJavaCode(val, enumType)  + ');');
-    }
-}
-
-function getSetterName(propName) {
-    return 'set' + propName.charAt(0).toLocaleUpperCase() + propName.slice(1);
-}
-
-function addListProperty(res, obj, objVariableName, propName, enumType, setterName) {
-    var val = obj[propName];
-    
-    if (val && val.length > 0) {
-        res.append(objVariableName + '.' + getSetterName(setterName ? setterName : propName) + '(Arrays.asList(');
-
-        for (var i = 0; i < val.length; i++) {
-            if (i > 0)
-                res.append(', ');
-            
-            res.append(toJavaCode(val[i], enumType));
-        }
-        
-        res.line('));');
-    }
-}
-
-function addMultiparamProperty(res, obj, objVariableName, propName, type, setterName) {
-    var val = obj[propName];
-    
-    if (val && val.length > 0) {
-        res.append(objVariableName + '.' + getSetterName(setterName ? setterName : propName) + '(');
-
-        for (var i = 0; i < val.length; i++) {
-            if (i > 0)
-                res.append(', ');
-            
-            res.append(toJavaCode(val[i], type));
-        }
-        
-        res.line(');');
-    }
-}
-
-function addBeanWithProperties(res, bean, objVarName, beanPropName, beanVarName, beanClass, props, createBeanAlthoughNoProps) {
-    if (!bean)
-        return;
-    
-    if (generatorUtils.hasProperty(bean, props)) {
-        if (!res.emptyLineIfNeeded()) {
-            res.line();
-        }
-        
-        res.line(beanClass + ' ' + beanVarName + ' = new ' + beanClass + '();');
-
-        for (var propName in props) {
-            if (props.hasOwnProperty(propName)) {
-                var descr = props[propName];
-
-                if (descr) {
-                    switch (descr.type) {
-                        case 'list':
-                            addListProperty(res, bean, beanVarName, propName, descr.elementsType, descr.setterName);
-                            break;
-                        
-                        case 'enum':
-                            addProperty(res, bean, beanVarName, propName, descr.enumClass, descr.setterName);
-                            break;
-                        
-                        case 'float':
-                            addProperty(res, bean, beanVarName, propName, 'float', descr.setterName);
-                            break;
-                        
-                        case 'propertiesAsList':
-                            var val = bean[propName];
-                            
-                            if (val && val.length > 0) {
-                                res.line('Properties ' + descr.propVarName + ' = new Properties();');
-                                
-                                for (var i = 0; i < val.length; i++) {
-                                    var nameAndValue = val[i];
-                                    
-                                    var eqIndex = nameAndValue.indexOf('=');
-                                    if (eqIndex >= 0) {
-                                        res.line(descr.propVarName + '.setProperty(' 
-                                            + nameAndValue.substring(0, eqIndex) + ', ' 
-                                            + nameAndValue.substr(eqIndex + 1) + ');');
-                                    }
-
-                                }
-                                
-                                res.line(beanVarName + '.' + getSetterName(propName) + '(' + descr.propVarName + ');');
-                            }
-                            break;
-                        
-                        case 'className':
-                            if (bean[propName]) {
-                                res.line(beanVarName + '.' + getSetterName(propName) + '(new ' + generatorUtils.knownClasses[bean[propName]].className + '());');
-                            }
-
-                            break;
-                        
-                        default:
-                            addProperty(res, bean, beanVarName, propName, null, descr.setterName);
-                    }
-                }
-                else {
-                    addProperty(res, bean, beanVarName, propName);
-                }
-            }
-        }
-        
-        res.line(objVarName + '.' + getSetterName(beanPropName) + '(' + beanVarName + ');');
-        
-        res.needEmptyLine = true;
-    }
-    else if (createBeanAlthoughNoProps) {
-        res.emptyLineIfNeeded();
-        
-        res.line(objVarName + '.' + getSetterName(beanPropName) + '(new ' + beanClass + '());');
-    }
-}


[6/6] incubator-ignite git commit: # ignite-843 Refactor

Posted by an...@apache.org.
# ignite-843 Refactor


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

Branch: refs/heads/ignite-843
Commit: 36063e13395c448c5e98912019f292367c6fccf0
Parents: 6f91bb8
Author: Andrey <an...@gridgain.com>
Authored: Thu Jul 9 13:00:06 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jul 9 13:00:06 2015 +0700

----------------------------------------------------------------------
 modules/web-control-center/nodejs/.gitignore    |   4 +-
 modules/web-control-center/nodejs/app.js        |   4 +-
 modules/web-control-center/nodejs/bin/www       |   2 +-
 .../web-control-center/nodejs/configuration.js  |  22 -
 .../nodejs/controllers/admin-controller.js      |  63 ++
 .../nodejs/controllers/caches-controller.js     | 253 ++++++
 .../nodejs/controllers/clusters-controller.js   | 218 +++++
 .../nodejs/controllers/common-module.js         | 191 ++++
 .../nodejs/controllers/models/caches.json       | 876 ++++++++++++++++++
 .../nodejs/controllers/models/clusters.json     | 891 +++++++++++++++++++
 .../nodejs/controllers/models/persistence.json  |  66 ++
 .../controllers/persistences-controller.js      | 212 +++++
 .../nodejs/controllers/summary-controller.js    | 171 ++++
 modules/web-control-center/nodejs/db.js         |   2 +-
 .../nodejs/generator/common.js                  | 287 ------
 .../web-control-center/nodejs/generator/java.js | 608 -------------
 .../web-control-center/nodejs/generator/xml.js  | 559 ------------
 .../nodejs/helpers/configuration-loader.js      |  22 +
 .../nodejs/helpers/data-structures.js           |  84 ++
 .../nodejs/helpers/ui-utils.js                  |  29 +
 modules/web-control-center/nodejs/package.json  |   1 +
 .../nodejs/public/form-models/caches.json       | 876 ------------------
 .../nodejs/public/form-models/clusters.json     | 891 -------------------
 .../nodejs/public/form-models/persistence.json  |  66 --
 .../nodejs/public/javascripts/bundle.js         |  18 -
 .../javascripts/controllers/adminController.js  |  66 --
 .../public/javascripts/controllers/caches.js    | 253 ------
 .../public/javascripts/controllers/clusters.js  | 218 -----
 .../public/javascripts/controllers/common.js    | 191 ----
 .../javascripts/controllers/persistences.js     | 212 -----
 .../public/javascripts/controllers/summary.js   | 167 ----
 .../nodejs/public/javascripts/dataStructures.js |  84 --
 .../nodejs/public/javascripts/xeditable.min.js  |   6 -
 .../nodejs/public/libs/xeditable.min.js         |   6 +
 .../web-control-center/nodejs/routes/admin.js   |  23 +-
 .../nodejs/routes/generator/common.js           | 287 ++++++
 .../nodejs/routes/generator/java.js             | 608 +++++++++++++
 .../nodejs/routes/generator/xml.js              | 559 ++++++++++++
 .../nodejs/routes/persistences.js               |   2 +-
 .../web-control-center/nodejs/routes/profile.js |   2 +-
 .../web-control-center/nodejs/routes/summary.js |   4 +-
 .../nodejs/test/routes/persistence.js           |  32 -
 .../nodejs/tests/routes/persistence.js          |  32 +
 .../web-control-center/nodejs/utils/ui-utils.js |  29 -
 .../nodejs/views/admin/index.jade               |  21 +
 .../nodejs/views/admin/userList.jade            |  21 -
 .../web-control-center/nodejs/views/caches.jade |   4 +-
 .../nodejs/views/clients.jade                   |   4 +-
 .../nodejs/views/clusters.jade                  |   4 +-
 .../web-control-center/nodejs/views/error.jade  |   2 +-
 .../nodejs/views/includes/header.jade           |   2 +-
 .../web-control-center/nodejs/views/index.jade  |   2 +-
 .../nodejs/views/layout-sidebar.jade            |  37 -
 .../web-control-center/nodejs/views/layout.jade |  59 --
 .../nodejs/views/persistence.jade               |   4 +-
 .../nodejs/views/profile.jade                   |   2 +-
 .../web-control-center/nodejs/views/sql.jade    |   2 +-
 .../nodejs/views/summary.jade                   |   5 +-
 .../nodejs/views/templates/layout-sidebar.jade  |  37 +
 .../nodejs/views/templates/layout.jade          |  58 ++
 60 files changed, 4724 insertions(+), 4737 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/.gitignore
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/.gitignore b/modules/web-control-center/nodejs/.gitignore
index b512c09..b17fddc 100644
--- a/modules/web-control-center/nodejs/.gitignore
+++ b/modules/web-control-center/nodejs/.gitignore
@@ -1 +1,3 @@
-node_modules
\ No newline at end of file
+node_modules
+*.idea
+*.log
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/app.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/app.js b/modules/web-control-center/nodejs/app.js
index 1bb5ccf..fe5b032 100644
--- a/modules/web-control-center/nodejs/app.js
+++ b/modules/web-control-center/nodejs/app.js
@@ -33,7 +33,7 @@ var summary = require('./routes/summary');
 var adminRouter = require('./routes/admin');
 var profileRouter = require('./routes/profile');
 
-var uiUtils = require('./utils/ui-utils');
+var uiUtils = require('./helpers/ui-utils');
 
 var passport = require('passport');
 
@@ -60,6 +60,8 @@ app.use(require('less-middleware')(path.join(__dirname, 'public'), {
 }));
 
 app.use(express.static(path.join(__dirname, 'public')));
+app.use(express.static(path.join(__dirname, 'controllers')));
+app.use(express.static(path.join(__dirname, 'helpers')));
 
 app.use(cookieParser('keyboard cat'));
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/bin/www
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/bin/www b/modules/web-control-center/nodejs/bin/www
index 1e02a86..4cf0583 100644
--- a/modules/web-control-center/nodejs/bin/www
+++ b/modules/web-control-center/nodejs/bin/www
@@ -4,7 +4,7 @@
  * Module dependencies.
  */
 var app = require('../app');
-var config = require('../configuration.js');
+var config = require('../helpers/configuration-loader.js');
 var debug = require('debug')('ignite-web-control-center:server');
 var http = require('http');
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/configuration.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/configuration.js b/modules/web-control-center/nodejs/configuration.js
deleted file mode 100644
index 6dbb577..0000000
--- a/modules/web-control-center/nodejs/configuration.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var config = require('nconf');
-
-config.file({'file': 'config/default.json'});
-
-module.exports = config;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/controllers/admin-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/admin-controller.js b/modules/web-control-center/nodejs/controllers/admin-controller.js
new file mode 100644
index 0000000..8ee89ee
--- /dev/null
+++ b/modules/web-control-center/nodejs/controllers/admin-controller.js
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+controlCenterModule.controller('adminController', ['$scope', '$alert', '$http', function ($scope, $alert, $http) {
+        $scope.userList = null;
+
+        function reload() {
+            $http.post('admin/list')
+                .success(function (data) {
+                    $scope.userList = data;
+                })
+                .error(function (errMsg) {
+                    $alert({title: $scope.errorMessage(errMsg)});
+                });
+        }
+
+        reload();
+
+        $scope.removeUser = function (user) {
+            if (!confirm("You are going to delete user " + user.username + ". Please, confirm it."))
+                return false;
+
+            $http.post('admin/remove', {params: {userId: user._id}}).success(
+                function (data) {
+                    $scope.alertStr = "User has been removed: " + user.username;
+                    $scope.alertType = 'success';
+
+                    reload();
+                }).error(function (err) {
+                    $scope.alertStr = "Failed to remove user: " + err;
+                });
+
+            return false;
+        };
+        
+        $scope.toggleAdmin = function(user) {
+            if (user.adminChanging)
+                return;
+            
+            user.adminChanging = true;
+
+            $http.post('admin/save', {params: {userId: user._id, adminFlag: user.admin}}).success(
+                function (data) {
+                    reload();
+                }).error(function (err) {
+                    $scope.alertStr = "Failed to update user: " + err;
+                });
+        }
+    }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/caches-controller.js b/modules/web-control-center/nodejs/controllers/caches-controller.js
new file mode 100644
index 0000000..9d572ba
--- /dev/null
+++ b/modules/web-control-center/nodejs/controllers/caches-controller.js
@@ -0,0 +1,253 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+controlCenterModule.controller('cachesController', ['$scope', '$alert', '$http', 'commonFunctions', function ($scope, $alert, $http, commonFunctions) {
+        $scope.swapSimpleItems = commonFunctions.swapSimpleItems;
+        $scope.joinTip = commonFunctions.joinTip;
+        $scope.getModel = commonFunctions.getModel;
+        $scope.errorMessage = commonFunctions.errorMessage;
+
+        $scope.atomicities = [
+            {value: 'ATOMIC', label: 'ATOMIC'},
+            {value: 'TRANSACTIONAL', label: 'TRANSACTIONAL'}
+        ];
+
+        $scope.modes = [
+            {value: 'PARTITIONED', label: 'PARTITIONED'},
+            {value: 'REPLICATED', label: 'REPLICATED'},
+            {value: 'LOCAL', label: 'LOCAL'}
+        ];
+
+        $scope.atomicWriteOrderModes = [
+            {value: 'CLOCK', label: 'CLOCK'},
+            {value: 'PRIMARY', label: 'PRIMARY'}
+        ];
+
+        $scope.memoryModes = [
+            {value: 'ONHEAP_TIERED', label: 'ONHEAP_TIERED'},
+            {value: 'OFFHEAP_TIERED', label: 'OFFHEAP_TIERED'},
+            {value: 'OFFHEAP_VALUES', label: 'OFFHEAP_VALUES'}
+        ];
+
+        $scope.evictionPolicies = [
+            {value: 'LRU', label: 'LRU'},
+            {value: 'RND', label: 'Random'},
+            {value: 'FIFO', label: 'FIFO'},
+            {value: 'SORTED', label: 'Sorted'},
+            {value: undefined, label: 'Not set'}
+        ];
+
+        $scope.rebalanceModes = [
+            {value: 'SYNC', label: 'SYNC'},
+            {value: 'ASYNC', label: 'ASYNC'},
+            {value: 'NONE', label: 'NONE'}
+        ];
+
+        $scope.cacheStoreFactories = [
+            {value: 'CacheJdbcPojoStoreFactory', label: 'JDBC POJO store factory'},
+            {value: 'CacheJdbcBlobStoreFactory', label: 'JDBC BLOB store factory'},
+            {value: 'CacheHibernateBlobStoreFactory', label: 'Hibernate BLOB store factory'},
+            {value: undefined, label: 'Not set'}
+        ];
+
+        $scope.cacheStoreJdbcDialects = [
+            {value: 'Oracle', label: 'Oracle'},
+            {value: 'DB2', label: 'IBM DB2'},
+            {value: 'SQLServer', label: 'Microsoft SQL Server'},
+            {value: 'MySQL', label: 'My SQL'},
+            {value: 'PostgreSQL', label: 'Postgre SQL'},
+            {value: 'H2', label: 'H2 database'}
+        ];
+
+        $scope.general = [];
+        $scope.advanced = [];
+
+        $scope.showError = function (msg) {
+            if ($scope.alert)
+                $scope.alert.hide();
+
+            $scope.alert = $alert({title: $scope.errorMessage(msg)});
+        };
+
+        $scope.showInfo = function (msg) {
+            if ($scope.alert)
+                $scope.alert.hide();
+
+            $scope.alert = $alert({
+                type: 'success',
+                title: msg,
+                duration: 2
+            });
+        };
+
+        $http.get('/models/caches.json')
+            .success(function (data) {
+                $scope.general = data.general;
+                $scope.advanced = data.advanced;
+            })
+            .error(function (errMsg) {
+                $scope.showError(errMsg);
+            });
+
+        $scope.caches = [];
+
+        // When landing on the page, get caches and show them.
+        $http.post('caches/list')
+            .success(function (data) {
+                $scope.spaces = data.spaces;
+                $scope.caches = data.caches;
+
+                var restoredItem = angular.fromJson(sessionStorage.cacheBackupItem);
+
+                if (restoredItem) {
+                    var idx = _.findIndex($scope.caches, function (cache) {
+                        return cache._id == restoredItem._id;
+                    });
+
+                    if (idx >= 0) {
+                        $scope.selectedItem = $scope.caches[idx];
+
+                        $scope.backupItem = restoredItem;
+                    }
+                    else
+                        sessionStorage.removeItem('cacheBackupItem');
+                }
+
+                $scope.$watch('backupItem', function (val) {
+                    if (val)
+                        sessionStorage.cacheBackupItem = angular.toJson(val);
+                }, true);
+            })
+            .error(function (errMsg) {
+                $scope.showError(errMsg);
+            });
+
+        $scope.selectItem = function (item) {
+            $scope.selectedItem = item;
+
+            $scope.backupItem = angular.copy(item);
+        };
+
+        // Add new cache.
+        $scope.createItem = function () {
+            $scope.backupItem = {mode: 'PARTITIONED', atomicityMode: 'ATOMIC', readFromBackup: true};
+            $scope.backupItem.space = $scope.spaces[0]._id;
+        };
+
+        // Save cache in db.
+        $scope.saveItem = function () {
+            var item = $scope.backupItem;
+
+            if (item.cacheStoreFactory && item.cacheStoreFactory.kind && !(item.readThrough || item.writeThrough)) {
+                $scope.showError('Store is configured but read/write through are not enabled!');
+
+                return;
+            }
+
+            if ((item.readThrough || item.writeThrough) && (!item.cacheStoreFactory || !item.cacheStoreFactory.kind)) {
+                $scope.showError('Read / write through are enabled but strore is not configured!');
+
+                return;
+            }
+
+            $http.post('caches/save', item)
+                .success(function (_id) {
+                    var idx = _.findIndex($scope.caches, function (cache) {
+                        return cache._id == _id;
+                    });
+
+                    if (idx >= 0)
+                        angular.extend($scope.caches[idx], item);
+                    else {
+                        item._id = _id;
+
+                        $scope.caches.push(item);
+                    }
+
+                    $scope.selectItem(item);
+
+                    $scope.showInfo('Cache "' + item.name + '" saved.');
+                })
+                .error(function (errMsg) {
+                    $scope.showError(errMsg);
+                });
+        };
+
+        $scope.removeItem = function () {
+            var _id = $scope.selectedItem._id;
+
+            $http.post('caches/remove', {_id: _id})
+                .success(function () {
+                    var i = _.findIndex($scope.caches, function (cache) {
+                        return cache._id == _id;
+                    });
+
+                    if (i >= 0) {
+                        $scope.caches.splice(i, 1);
+
+                        $scope.selectedItem = undefined;
+                        $scope.backupItem = undefined;
+                    }
+                })
+                .error(function (errMsg) {
+                    $scope.showError(errMsg);
+                });
+        };
+
+        $scope.checkIndexedTypes = function (keyCls, valCls) {
+            if (!keyCls) {
+                $scope.showError('Key class name should be non empty!');
+
+                return false;
+            }
+
+            if (!valCls) {
+                $scope.showError('Value class name should be non empty!');
+
+                return false;
+            }
+
+            return true;
+        };
+
+        $scope.addIndexedTypes = function (keyCls, valCls) {
+            if (!$scope.checkIndexedTypes(keyCls, valCls))
+                return;
+
+            var idxTypes = $scope.backupItem.indexedTypes;
+
+            var newItem = {keyClass: keyCls, valueClass: valCls};
+
+            if (idxTypes)
+                idxTypes.push(newItem);
+            else
+                $scope.backupItem.indexedTypes = [newItem];
+        };
+
+        $scope.saveIndexedType = function (idx, keyCls, valCls) {
+            if (!$scope.checkIndexedTypes(keyCls, valCls))
+                return idx;
+
+            var idxType = $scope.backupItem.indexedTypes[idx];
+
+            idxType.keyClass = keyCls;
+            idxType.valueClass = valCls;
+
+            return -1;
+        };
+    }]
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/clusters-controller.js b/modules/web-control-center/nodejs/controllers/clusters-controller.js
new file mode 100644
index 0000000..c41ab9e
--- /dev/null
+++ b/modules/web-control-center/nodejs/controllers/clusters-controller.js
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+controlCenterModule.controller('clustersController', ['$scope', '$alert', '$http', 'commonFunctions', function ($scope, $alert, $http, commonFunctions) {
+        $scope.swapSimpleItems = commonFunctions.swapSimpleItems;
+        $scope.joinTip = commonFunctions.joinTip;
+        $scope.getModel = commonFunctions.getModel;
+        $scope.errorMessage = commonFunctions.errorMessage;
+        $scope.console = console;
+
+        $scope.templates = [
+            {value: {discovery: {Vm: {addresses: ['127.0.0.1:47500..47510']}}}, label: 'none'},
+            {value: {discovery: {kind: 'Vm', Vm: {addresses: ['127.0.0.1:47500..47510']}}}, label: 'local'},
+            {value: {discovery: {kind: 'Multicast', Vm: {addresses: ['127.0.0.1:47500..47510']}, Multicast: {}}}, label: 'multicast'}
+        ];
+
+        $scope.discoveries = [
+            {value: 'Vm', label: 'static IPs'},
+            {value: 'Multicast', label: 'multicast'},
+            {value: 'S3', label: 'AWS S3'},
+            {value: 'Cloud', label: 'apache jclouds'},
+            {value: 'GoogleStorage', label: 'google cloud storage'},
+            {value: 'Jdbc', label: 'JDBC'},
+            {value: 'SharedFs', label: 'shared filesystem'}
+        ];
+
+        $scope.swapSpaceSpis = [
+            {value: 'FileSwapSpaceSpi', label: 'File-based swap'},
+            {value: undefined, label: 'Not set'}
+        ];
+
+        $scope.events = [];
+
+        for (var eventGroupName in eventGroups) {
+            if (eventGroups.hasOwnProperty(eventGroupName)) {
+                $scope.events.push({value: eventGroupName, label: eventGroupName});
+            }
+        }
+
+        $scope.cacheModes = [
+            {value: 'LOCAL', label: 'LOCAL'},
+            {value: 'REPLICATED', label: 'REPLICATED'},
+            {value: 'PARTITIONED', label: 'PARTITIONED'}
+        ];
+
+        $scope.deploymentModes = [
+            {value: 'PRIVATE', label: 'PRIVATE'},
+            {value: 'ISOLATED', label: 'ISOLATED'},
+            {value: 'SHARED', label: 'SHARED'},
+            {value: 'CONTINUOUS', label: 'CONTINUOUS'}
+        ];
+
+        $scope.transactionConcurrency = [
+            {value: 'OPTIMISTIC', label: 'OPTIMISTIC'},
+            {value: 'PESSIMISTIC', label: 'PESSIMISTIC'}
+        ];
+
+        $scope.transactionIsolation = [
+            {value: 'READ_COMMITTED', label: 'READ_COMMITTED'},
+            {value: 'REPEATABLE_READ', label: 'REPEATABLE_READ'},
+            {value: 'SERIALIZABLE', label: 'SERIALIZABLE'}
+        ];
+
+        $scope.segmentationPolicy = [
+            {value: 'RESTART_JVM', label: 'RESTART_JVM'},
+            {value: 'STOP', label: 'STOP'},
+            {value: 'NOOP', label: 'NOOP'}
+        ];
+
+        $scope.marshallers = [
+            {value: 'JdkMarshaller', label: 'JdkMarshaller'},
+            {value: 'OptimizedMarshaller', label: 'OptimizedMarshaller'}
+        ];
+
+        $scope.clusters = [];
+
+        $http.get('/models/clusters.json')
+            .success(function (data) {
+                $scope.templateTip = data.templateTip;
+
+                $scope.general = data.general;
+                $scope.advanced = data.advanced;
+            })
+            .error(function (errMsg) {
+                $alert({title: $scope.errorMessage(errMsg)});
+            });
+
+        // When landing on the page, get clusters and show them.
+        $http.post('clusters/list')
+            .success(function (data) {
+                $scope.caches = data.caches;
+                $scope.spaces = data.spaces;
+                $scope.clusters = data.clusters;
+
+                var restoredItem = angular.fromJson(sessionStorage.clusterBackupItem);
+
+                if (restoredItem) {
+                    var idx = _.findIndex($scope.clusters, function (cluster) {
+                        return cluster._id == restoredItem._id;
+                    });
+
+                    if (idx >= 0) {
+                        $scope.selectedItem = $scope.clusters[idx];
+
+                        $scope.backupItem = restoredItem;
+                    }
+                    else
+                        sessionStorage.removeItem('clusterBackupItem');
+                }
+
+                $scope.$watch('backupItem', function (val) {
+                    if (val)
+                        sessionStorage.clusterBackupItem = angular.toJson(val);
+                }, true);
+            })
+            .error(function (errMsg) {
+                $alert({title: $scope.errorMessage(errMsg)});
+            });
+
+        $scope.selectItem = function (item) {
+            $scope.selectedItem = item;
+
+            $scope.backupItem = angular.copy(item);
+        };
+
+        // Add new cluster.
+        $scope.createItem = function () {
+            $scope.backupItem = angular.copy($scope.create.template);
+
+            $scope.backupItem.space = $scope.spaces[0]._id;
+        };
+
+        // Save cluster in db.
+        $scope.saveItem = function () {
+            var item = $scope.backupItem;
+
+            if (!item.swapSpaceSpi || !item.swapSpaceSpi.kind) {
+                for (var cacheId in item.caches) {
+                    var idx = _.findIndex($scope.caches, function (cache) {
+                        return cache._id == cacheId.value;
+                    });
+
+                    if (idx >= 0) {
+                        var cache = $scope.caches[idx];
+
+                        if (cache.swapEnabled) {
+                            $alert({title: 'Swap space SPI is not configured, but cache "' + cache.label + '" configured to use swap!'});
+
+                            return;
+                        }
+                    }
+                }
+            }
+
+            $http.post('clusters/save', item)
+                .success(function (_id) {
+                    var idx = _.findIndex($scope.clusters, function (cluster) {
+                        return cluster._id == _id;
+                    });
+
+                    if (idx >= 0)
+                        angular.extend($scope.clusters[idx], item);
+                    else {
+                        item._id = _id;
+
+                        $scope.clusters.push(item);
+                    }
+
+                    $scope.selectItem(item);
+
+                    $alert({
+                        type: 'success',
+                        title: 'Cluster "' + item.name + '" saved.',
+                        duration: 2,
+                        container: '#save-btn'
+                    });
+                })
+                .error(function (errMsg) {
+                    $alert({title: $scope.errorMessage(errMsg)});
+                });
+        };
+
+        $scope.removeItem = function () {
+            var _id = $scope.selectedItem._id;
+
+            $http.post('clusters/remove', {_id: _id})
+                .success(function () {
+                    var i = _.findIndex($scope.clusters, function (cluster) {
+                        return cluster._id == _id;
+                    });
+
+                    if (i >= 0) {
+                        $scope.clusters.splice(i, 1);
+
+                        $scope.selectedItem = undefined;
+                        $scope.backupItem = undefined;
+                    }
+                })
+                .error(function (errMsg) {
+                    $alert({title: $scope.errorMessage(errMsg)});
+                });
+        };
+    }]
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/common-module.js b/modules/web-control-center/nodejs/controllers/common-module.js
new file mode 100644
index 0000000..228181a
--- /dev/null
+++ b/modules/web-control-center/nodejs/controllers/common-module.js
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var controlCenterModule = angular.module('ignite-web-control-center', ['smart-table', 'mgcrea.ngStrap', 'ngSanitize']);
+
+controlCenterModule.service('commonFunctions', function () {
+    return {
+        getModel: function (obj, path) {
+            if (!path)
+                return obj;
+
+            path = path.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties
+            path = path.replace(/^\./, '');           // strip a leading dot
+
+            var segs = path.split('.');
+            var root = obj;
+
+            while (segs.length > 0) {
+                var pathStep = segs.shift();
+
+                if (typeof root[pathStep] === 'undefined')
+                    root[pathStep] = {};
+
+                root = root[pathStep];
+            }
+
+            return root;
+        },
+        swapSimpleItems: function (a, ix1, ix2) {
+            var tmp = a[ix1];
+
+            a[ix1] = a[ix2];
+            a[ix2] = tmp;
+        },
+        joinTip: function (arr) {
+            if (!arr) {
+                return arr;
+            }
+
+            var lines = arr.map(function (line) {
+                var rtrimmed = line.replace(/\s+$/g, '');
+
+                if (rtrimmed.indexOf('>', this.length - 1) == -1) {
+                    rtrimmed = rtrimmed + '<br/>';
+                }
+
+                return rtrimmed;
+            });
+
+            return lines.join("");
+        },
+        errorMessage: function (errMsg) {
+            return errMsg ? errMsg : 'Internal server error.';
+        }
+    }
+});
+
+controlCenterModule.config(function ($tooltipProvider) {
+    angular.extend($tooltipProvider.defaults, {
+        container: 'body',
+        placement: 'right',
+        html: 'true',
+        trigger: 'click hover'
+    });
+});
+
+controlCenterModule.config(function ($selectProvider) {
+    angular.extend($selectProvider.defaults, {
+        maxLength: '1',
+        allText: 'Select All',
+        noneText: 'Clear All',
+        template: '/select'
+    });
+});
+
+// Alert settings
+controlCenterModule.config(function ($alertProvider) {
+    angular.extend($alertProvider.defaults, {
+        container: 'body',
+        placement: 'top-right',
+        duration: '5',
+        type: 'danger'
+    });
+});
+
+// Decode name using map(value, label).
+controlCenterModule.filter('displayValue', function () {
+    return function (v, m, dflt) {
+        var i = _.findIndex(m, function (item) {
+            return item.value == v;
+        });
+
+        if (i >= 0) {
+            return m[i].label;
+        }
+
+        if (dflt) {
+            return dflt;
+        }
+
+        return 'Unknown value';
+    }
+});
+
+/**
+ * Replaces all occurrences of {@code org.apache.ignite.} with {@code o.a.i.},
+ * {@code org.apache.ignite.internal.} with {@code o.a.i.i.},
+ * {@code org.apache.ignite.internal.visor.} with {@code o.a.i.i.v.} and
+ * {@code org.apache.ignite.scalar.} with {@code o.a.i.s.}.
+ *
+ * @param s String to replace in.
+ * @return Replaces string.
+ */
+controlCenterModule.filter('compact', function () {
+    return function (s) {
+        return s.replace("org.apache.ignite.internal.visor.", "o.a.i.i.v.").
+            replace("org.apache.ignite.internal.", "o.a.i.i.").
+            replace("org.apache.ignite.scalar.", "o.a.i.s.").
+            replace("org.apache.ignite.", "o.a.i.");
+    }
+});
+
+controlCenterModule.directive('ipaddress', function () {
+    const ip = '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])';
+    const port = '([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])';
+    const portRange = '(:' + port + '(..' + port + ')?)?';
+    const host = '(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])';
+
+    return {
+        require: 'ngModel',
+        link: function (scope, elem, attrs, ctrl) {
+            ctrl.$validators.ipaddress = function (modelValue, viewValue) {
+                if (ctrl.$isEmpty(modelValue) || !attrs['ipaddress'])
+                    return true;
+
+                return viewValue.match(new RegExp('(^' + ip + portRange + '$)|(^' + host + portRange + '$)')) != null;
+            }
+        }
+    }
+});
+
+controlCenterModule.controller('activeLink', [
+    '$scope', function ($scope) {
+        $scope.isActive = function (path) {
+            return window.location.pathname.substr(0, path.length) == path;
+        };
+    }]);
+
+controlCenterModule.controller('auth', [
+    '$scope', '$modal', '$alert', '$http', '$window', 'commonFunctions',
+    function ($scope, $modal, $alert, $http, $window, commonFunctions) {
+        $scope.errorMessage = commonFunctions.errorMessage;
+
+        $scope.action = 'login';
+
+        $scope.valid = false;
+
+        // Pre-fetch an external template populated with a custom scope
+        var authModal = $modal({scope: $scope, template: '/login', show: false});
+
+        $scope.login = function () {
+            // Show when some event occurs (use $promise property to ensure the template has been loaded)
+            authModal.$promise.then(authModal.show);
+        };
+
+        $scope.auth = function (action, user_info) {
+            $http.post('/' + action, user_info)
+                .success(function (data) {
+                    authModal.hide();
+
+                    $window.location = '/configuration/clusters';
+                })
+                .error(function (data) {
+                    $alert({placement: 'top', container: '#errors-container', title: $scope.errorMessage(data)});
+                });
+        };
+    }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36063e13/modules/web-control-center/nodejs/controllers/models/caches.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/models/caches.json b/modules/web-control-center/nodejs/controllers/models/caches.json
new file mode 100644
index 0000000..22f5e43
--- /dev/null
+++ b/modules/web-control-center/nodejs/controllers/models/caches.json
@@ -0,0 +1,876 @@
+{
+  "general": [
+    {
+      "label": "Name",
+      "type": "text",
+      "model": "name",
+      "required": true,
+      "placeholder": "Input name"
+    },
+    {
+      "label": "Mode",
+      "type": "dropdown",
+      "model": "mode",
+      "placeholder": "PARTITIONED",
+      "items": "modes",
+      "tip": [
+        "Cache modes:",
+        "<ul>",
+        "  <li>Partitioned - in this mode the overall key set will be divided into partitions and all partitions will be split equally between participating nodes.</li>",
+        "  <li>Replicated - in this mode all the keys are distributed to all participating nodes.</li>",
+        "  <li>Local - in this mode caches residing on different grid nodes will not know about each other.</li>",
+        "</ul>"
+      ]
+    },
+    {
+      "label": "Atomicity",
+      "type": "dropdown",
+      "model": "atomicityMode",
+      "placeholder": "ATOMIC",
+      "items": "atomicities",
+      "tip": [
+        "Atomicity:",
+        "<ul>",
+        "  <li>Transactional - in this mode specified fully ACID-compliant transactional cache behavior.</li>",
+        "  <li>Atomic - in this mode distributed transactions and distributed locking are not supported.</li>",
+        "</ul>"
+      ]
+    },
+    {
+      "label": "Backups",
+      "type": "number",
+      "model": "backups",
+      "placeholder": 0,
+      "tip": [
+        "Number of nodes used to back up single partition for partitioned cache."
+      ]
+    },
+    {
+      "label": "Read from backup",
+      "type": "check",
+      "model": "readFromBackup",
+      "tip": [
+        "Flag indicating whether data can be read from backup.",
+        "If not set then always get data from primary node (never from backup)."
+      ]
+    }
+  ],
+  "advanced": [
+    {
+      "label": "Async back pressure control",
+      "tip": [
+        "Cache async back pressure settings."
+      ],
+      "fields": [
+        {
+          "label": "Max async concurrency",
+          "type": "number",
+          "model": "maxConcurrentAsyncOperations",
+          "placeholder": 500,
+          "tip": [
+            "Maximum number of allowed concurrent asynchronous operations.",
+            "If 0 then number of concurrent asynchronous operations is unlimited."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Memory",
+      "tip": [
+        "Cache memory settings."
+      ],
+      "fields": [
+        {
+          "label": "Mode",
+          "type": "dropdown",
+          "model": "memoryMode",
+          "placeholder": "ONHEAP_TIERED",
+          "items": "memoryModes",
+          "tip": [
+            "Memory modes:",
+            "<ul>",
+            "  <li>ONHEAP_TIERED - entries are cached on heap memory first.",
+            "    <ul>",
+            "      <li>If offheap memory is enabled and eviction policy evicts an entry from heap memory, entry will be moved to offheap memory. If offheap memory is disabled, then entry is simply discarded.</li>",
+            "      <li>If swap space is enabled and offheap memory fills up, then entry will be evicted into swap space. If swap space is disabled, then entry will be discarded. If swap is enabled and offheap memory is disabled, then entry will be evicted directly from heap memory into swap.</li>",
+            "    </ul>",
+            "  </li>",
+            "  <li>OFFHEAP_TIERED - works the same as ONHEAP_TIERED, except that entries never end up in heap memory and get stored in offheap memory right away. Entries get cached in offheap memory first and then get evicted to swap, if one is configured.</li>",
+            "  <li>OFFHEAP_VALUES - entry keys will be stored on heap memory, and values will be stored in offheap memory. Note that in this mode entries can be evicted only to swap.</li>",
+            "</ul>"
+          ]
+        },
+        {
+          "label": "Off-heap max memory",
+          "type": "number",
+          "model": "offHeapMaxMemory",
+          "min": -1,
+          "placeholder": -1,
+          "hide": "backupItem.memoryMode == 'OFFHEAP_VALUES'",
+          "tip": [
+            "Sets maximum amount of memory available to off-heap storage.",
+            "Possible values are:",
+            "<ul>",
+            "  <li>-1 - means that off-heap storage is disabled.</li>",
+            "  <li>0 - Ignite will not limit off-heap storage (it's up to user to properly add and remove entries from cache to ensure that off-heap storage does not grow infinitely.</li>",
+            "  <li>Any positive value specifies the limit of off-heap storage in bytes.</li>",
+            "</ul>"
+          ]
+        },
+        {
+          "label": "Eviction policy",
+          "type": "dropdown-details",
+          "path": "evictionPolicy",
+          "model": "kind",
+          "placeholder": "Choose eviction policy",
+          "items": "evictionPolicies",
+          "hide": "backupItem.memoryMode == 'OFFHEAP_TIERED'",
+          "tip": [
+            "Cache expiration policy."
+          ],
+          "details": {
+            "LRU": {
+              "expanded": false,
+              "fields": [
+                {
+                  "label": "Batch size",
+                  "type": "number",
+                  "path": "evictionPolicy.LRU",
+                  "model": "batchSize",
+                  "placeholder": 1,
+                  "tip": ["Number of entries to remove on shrink."]
+                },
+                {
+                  "label": "Max memory size",
+                  "type": "number",
+                  "path": "evictionPolicy.LRU",
+                  "model": "maxMemorySize",
+                  "placeholder": 0,
+                  "tip": [
+                    "Maximum allowed cache size in bytes."
+                  ]
+                },
+                {
+                  "label": "Max size",
+                  "type": "number",
+                  "path": "evictionPolicy.LRU",
+                  "model": "maxSize",
+                  "placeholder": 100000,
+                  "tip": [
+                    "Maximum allowed size of cache before entry will start getting evicted."
+                  ]
+                }
+              ]
+            },
+            "RND": {
+              "expanded": false,
+              "fields": [
+                {
+                  "label": "Max size",
+                  "type": "number",
+                  "path": "evictionPolicy.RND",
+                  "model": "maxSize",
+                  "placeholder": 100000,
+                  "tip": [
+                    "Maximum allowed size of cache before entry will start getting evicted."
+                  ]
+                }
+              ]
+            },
+            "FIFO": {
+              "expanded": false,
+              "fields": [
+                {
+                  "label": "Batch size",
+                  "type": "number",
+                  "path": "evictionPolicy.FIFO",
+                  "model": "batchSize",
+                  "placeholder": 1,
+                  "tip": ["Number of entries to remove on shrink."]
+                },
+                {
+                  "label": "Max memory size",
+                  "type": "number",
+                  "path": "evictionPolicy.FIFO",
+                  "model": "maxMemorySize",
+                  "placeholder": 0,
+                  "tip": [
+                    "Maximum allowed cache size in bytes."
+                  ]
+                },
+                {
+                  "label": "Max size",
+                  "type": "number",
+                  "path": "evictionPolicy.FIFO",
+                  "model": "maxSize",
+                  "placeholder": 100000,
+                  "tip": [
+                    "Maximum allowed size of cache before entry will start getting evicted."
+                  ]
+                }
+              ]
+            },
+            "SORTED": {
+              "expanded": false,
+              "fields": [
+                {
+                  "label": "Batch size",
+                  "type": "number",
+                  "path": "evictionPolicy.SORTED",
+                  "model": "batchSize",
+                  "placeholder": 1,
+                  "tip": ["Number of entries to remove on shrink."]
+                },
+                {
+                  "label": "Max memory size",
+                  "type": "number",
+                  "path": "evictionPolicy.SORTED",
+                  "model": "maxMemorySize",
+                  "placeholder": 0,
+                  "tip": [
+                    "Maximum allowed cache size in bytes."
+                  ]
+                },
+                {
+                  "label": "Max size",
+                  "type": "number",
+                  "path": "evictionPolicy.SORTED",
+                  "model": "maxSize",
+                  "placeholder": 100000,
+                  "tip": [
+                    "Maximum allowed size of cache before entry will start getting evicted."
+                  ]
+                }
+              ]
+            }
+          }
+        },
+        {
+          "label": "Start size",
+          "type": "number",
+          "model": "startSize",
+          "placeholder": 1500000,
+          "tip": ["Initial cache size which will be used to pre-create internal hash table after start."]
+        },
+        {
+          "label": "Swap enabled",
+          "type": "check",
+          "model": "swapEnabled",
+          "tip": [
+            "Flag indicating whether swap storage is enabled or not for this cache."
+          ]
+        },
+        {
+          "label": "Copy on read",
+          "type": "check",
+          "model": "copyOnRead",
+          "tip": [
+            "Flag indicating whether copy of of the value stored in cache should be created for cache operation implying return value.",
+            "Also if this flag is set copies are created for values passed to CacheInterceptor and to CacheEntryProcessor."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Near cache",
+      "tip": [
+        "Near cache settings.",
+        "Near cache is a small local cache that stores most recently or most frequently accessed data.",
+        "Should be used in case when it is impossible to send computations to remote nodes."
+      ],
+      "fields": [
+        {
+          "label": "Enabled",
+          "type": "check",
+          "model": "nearCacheEnabled",
+          "tip": [
+            "Flag indicating whether to configure near cache."
+          ]
+        },
+        {
+          "label": "Start size",
+          "type": "number",
+          "path": "nearConfiguration",
+          "model": "nearStartSize",
+          "placeholder": 375000,
+          "tip": [
+            "Initial cache size for near cache which will be used to pre-create internal hash table after start."
+          ]
+        },
+        {
+          "label": "Eviction policy",
+          "type": "dropdown-details",
+          "path": "nearConfiguration.nearEvictionPolicy",
+          "model": "kind",
+          "placeholder": "Choose eviction policy",
+          "items": "evictionPolicies",
+          "tip": [
+            "Cache expiration policy."
+          ],
+          "details": {
+            "LRU": {
+              "expanded": false,
+              "fields": [
+                {
+                  "label": "Batch size",
+                  "type": "number",
+                  "path": "nearConfiguration.nearEvictionPolicy.LRU",
+                  "model": "batchSize",
+                  "placeholder": 1,
+                  "tip": ["Number of entries to remove on shrink."]
+                },
+                {
+                  "label": "Max memory size",
+                  "type": "number",
+                  "path": "nearConfiguration.nearEvictionPolicy.LRU",
+                  "model": "maxMemorySize",
+                  "placeholder": 0,
+                  "tip": [
+                    "Maximum allowed cache size in bytes."
+                  ]
+                },
+                {
+                  "label": "Max size",
+                  "type": "number",
+                  "path": "nearConfiguration.nearEvictionPolicy.LRU",
+                  "model": "maxSize",
+                  "placeholder": 100000,
+                  "tip": [
+                    "Maximum allowed size of cache before entry will start getting evicted."
+                  ]
+                }
+              ]
+            },
+            "RND": {
+              "expanded": false,
+              "fields": [
+                {
+                  "label": "Max size",
+                  "type": "number",
+                  "path": "nearConfiguration.nearEvictionPolicy.RND",
+                  "model": "maxSize",
+                  "placeholder": 100000,
+                  "tip": [
+                    "Maximum allowed size of cache before entry will start getting evicted."
+                  ]
+                }
+              ]
+            },
+            "FIFO": {
+              "expanded": false,
+              "fields": [
+                {
+                  "label": "Batch size",
+                  "type": "number",
+                  "path": "nearConfiguration.nearEvictionPolicy.FIFO",
+                  "model": "batchSize",
+                  "placeholder": 1,
+                  "tip": ["Number of entries to remove on shrink."]
+                },
+                {
+                  "label": "Max memory size",
+                  "type": "number",
+                  "path": "nearConfiguration.nearEvictionPolicy.FIFO",
+                  "model": "maxMemorySize",
+                  "placeholder": 0,
+                  "tip": [
+                    "Maximum allowed cache size in bytes."
+                  ]
+                },
+                {
+                  "label": "Max size",
+                  "type": "number",
+                  "path": "nearConfiguration.nearEvictionPolicy.FIFO",
+                  "model": "maxSize",
+                  "placeholder": 100000,
+                  "tip": [
+                    "Maximum allowed size of cache before entry will start getting evicted."
+                  ]
+                }
+              ]
+            },
+            "SORTED": {
+              "expanded": false,
+              "fields": [
+                {
+                  "label": "Batch size",
+                  "type": "number",
+                  "path": "nearConfiguration.nearEvictionPolicy.SORTED",
+                  "model": "batchSize",
+                  "placeholder": 1,
+                  "tip": ["Number of entries to remove on shrink."]
+                },
+                {
+                  "label": "Max memory size",
+                  "type": "number",
+                  "path": "nearConfiguration.nearEvictionPolicy.SORTED",
+                  "model": "maxMemorySize",
+                  "placeholder": 0,
+                  "tip": [
+                    "Maximum allowed cache size in bytes."
+                  ]
+                },
+                {
+                  "label": "Max size",
+                  "type": "number",
+                  "path": "nearConfiguration.nearEvictionPolicy.SORTED",
+                  "model": "maxSize",
+                  "placeholder": 100000,
+                  "tip": [
+                    "Maximum allowed size of cache before entry will start getting evicted."
+                  ]
+                }
+              ]
+            }
+          }
+        }
+      ]
+    },
+    {
+      "label": "Query",
+      "tip": [
+        "Cache query settings."
+      ],
+      "fields": [
+        {
+          "label": "Escape all",
+          "type": "check",
+          "model": "sqlEscapeAll",
+          "tip": [
+            "If set then all the SQL table and field names will be escaped with double quotes.",
+            "This enforces case sensitivity for field names and also allows having special characters in table and field names."
+          ]
+        },
+        {
+          "label": "Cached rows",
+          "type": "number",
+          "model": "sqlOnheapRowCacheSize",
+          "placeholder": 10240,
+          "tip": [
+            "Number of SQL rows which will be cached onheap to avoid deserialization on each SQL index access."
+          ]
+        },
+        {
+          "label": "Long query timeout",
+          "type": "number",
+          "model": "longQueryWarningTimeout",
+          "placeholder": 3000,
+          "tip": [
+            "Timeout in milliseconds after which long query warning will be printed."
+          ]
+        },
+        {
+          "type": "indexedTypes",
+          "model": "indexedTypes",
+          "tip": [
+            "Collection of types to index."
+          ]
+        },
+        {
+          "label": "SQL functions",
+          "type": "table-simple",
+          "model": "sqlFunctionClasses",
+          "editIdx": -1,
+          "placeholder": "SQL function full class name",
+          "tableTip": [
+            "Collections of classes with user-defined functions for SQL queries."
+          ],
+          "tip": [
+            "Class with user-defined functions for SQL queries."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Rebalance",
+      "tip": [
+        "Cache rebalance settings."
+      ],
+      "fields": [
+        {
+          "label": "Mode",
+          "type": "dropdown",
+          "model": "rebalanceMode",
+          "placeholder": "ASYNC",
+          "items": "rebalanceModes",
+          "tip": [
+            "Rebalance modes:",
+            "<ul>",
+            "  <li>Synchronous - in this mode distributed caches will not start until all necessary data is loaded from other available grid nodes.</li>",
+            "  <li>Asynchronous - in this mode distributed caches will start immediately and will load all necessary data from other available grid nodes in the background.</li>",
+            "  <li>None - in this mode no rebalancing will take place which means that caches will be either loaded on demand from persistent store whenever data is accessed, or will be populated explicitly.</li>",
+            "</ul>"
+          ]
+        },
+        {
+          "label": "Pool size",
+          "type": "number",
+          "model": "rebalanceThreadPoolSize",
+          "placeholder": 2,
+          "tip": [
+            "Size of rebalancing thread pool.<br>",
+            "Note that size serves as a hint and implementation may create more threads for rebalancing than specified here (but never less threads)."
+          ]
+        },
+        {
+          "label": "Batch size",
+          "type": "number",
+          "model": "rebalanceBatchSize",
+          "placeholder": "512 * 1024",
+          "tip": [
+            "Size (in bytes) to be loaded within a single rebalance message.",
+            "Rebalancing algorithm will split total data set on every node into multiple batches prior to sending data."
+          ]
+        },
+        {
+          "label": "Order",
+          "type": "number",
+          "model": "rebalanceOrder",
+          "placeholder": 0,
+          "tip": [
+            "If cache rebalance order is positive, rebalancing for this cache will be started only when rebalancing for all caches with smaller rebalance order (except caches with rebalance order 0) will be completed."
+          ]
+        },
+        {
+          "label": "Delay",
+          "type": "number",
+          "model": "rebalanceDelay",
+          "placeholder": 0,
+          "tip": [
+            "Delay in milliseconds upon a node joining or leaving topology (or crash) after which rebalancing should be started automatically."
+          ]
+        },
+        {
+          "label": "Timeout",
+          "type": "number",
+          "model": "rebalanceTimeout",
+          "placeholder": 10000,
+          "tip": [
+            "Rebalance timeout in milliseconds."
+          ]
+        },
+        {
+          "label": "Throttle",
+          "type": "number",
+          "model": "rebalanceThrottle",
+          "placeholder": 0,
+          "tip": [
+            "Time in milliseconds to wait between rebalance messages to avoid overloading of CPU or network."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Statistics",
+      "tip": [
+        "Cache statistics and management settings."
+      ],
+      "fields": [
+        {
+          "label": "Statistics enabled",
+          "type": "check",
+          "model": "statisticsEnabled",
+          "tip": [
+            "Flag indicating whether statistics gathering is enabled on a cache."
+          ]
+        },
+        {
+          "label": "Management enabled",
+          "type": "check",
+          "model": "managementEnabled",
+          "tip": [
+            "Flag indicating whether management is enabled on this cache."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Store",
+      "tip": [
+        "Cache store settings."
+      ],
+      "fields": [
+        {
+          "label": "Store factory",
+          "type": "dropdown-details",
+          "path": "cacheStoreFactory",
+          "model": "kind",
+          "placeholder": "Choose store factory",
+          "items": "cacheStoreFactories",
+          "tip": [
+            "Factory for persistent storage for cache data."
+          ],
+          "details": {
+            "CacheJdbcPojoStoreFactory": {
+              "expanded": true,
+              "fields": [
+                {
+                  "label": "Data source bean",
+                  "type": "text",
+                  "path": "cacheStoreFactory.CacheJdbcPojoStoreFactory",
+                  "model": "dataSourceBean",
+                  "required": true,
+                  "placeholder": "Bean name in Spring context",
+                  "tip": [
+                    "Name of the data source bean in Spring context."
+                  ]
+                },
+                {
+                  "label": "Dialect",
+                  "type": "dropdown",
+                  "path": "cacheStoreFactory.CacheJdbcPojoStoreFactory",
+                  "model": "dialect",
+                  "required": true,
+                  "placeholder": "Choose JDBC dialect",
+                  "items": "cacheStoreJdbcDialects",
+                  "tip": [
+                    "Dialect of SQL implemented by a particular RDBMS:",
+                    "<ul>",
+                    "  <li>Generic JDBC dialect.</li>",
+                    "  <li>Oracle database.</li>",
+                    "  <li>IBM DB2.</li>",
+                    "  <li>Microsoft SQL Server.</li>",
+                    "  <li>My SQL.</li>",
+                    "  <li>H2 database.</li>",
+                    "</ul>"
+                  ]
+                }
+              ]
+            },
+            "CacheJdbcBlobStoreFactory": {
+              "expanded": true,
+              "fields": [
+                {
+                  "label": "user",
+                  "type": "text",
+                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
+                  "model": "user",
+                  "required": true,
+                  "tip": [
+                    "User name for database access."
+                  ]
+                },
+                {
+                  "label": "Data source bean",
+                  "type": "text",
+                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
+                  "model": "dataSourceBean",
+                  "required": true,
+                  "placeholder": "Bean name in Spring context",
+                  "tip": [
+                    "Name of the data source bean in Spring context."
+                  ]
+                },
+                {
+                  "label": "Init schema",
+                  "type": "check",
+                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
+                  "model": "initSchema",
+                  "tip": [
+                    "Flag indicating whether DB schema should be initialized by Ignite (default behaviour) or was explicitly created by user."
+                  ]
+                },
+                {
+                  "label": "Create query",
+                  "type": "text",
+                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
+                  "model": "createTableQuery",
+                  "placeholder": "SQL for table creation",
+                  "tip": [
+                    "Query for table creation in underlying database.",
+                    "Default value: create table if not exists ENTRIES (key binary primary key, val binary)"
+                  ]
+                },
+                {
+                  "label": "Load query",
+                  "type": "text",
+                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
+                  "model": "loadQuery",
+                  "placeholder": "SQL for load entry",
+                  "tip": [
+                    "Query for entry load from underlying database.",
+                    "Default value: select * from ENTRIES where key=?"
+                  ]
+                },
+                {
+                  "label": "Insert query",
+                  "type": "text",
+                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
+                  "model": "insertQuery",
+                  "placeholder": "SQL for insert entry",
+                  "tip": [
+                    "Query for insert entry into underlying database.",
+                    "Default value: insert into ENTRIES (key, val) values (?, ?)"
+                  ]
+                },
+                {
+                  "label": "Update query",
+                  "type": "text",
+                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
+                  "model": "updateQuery",
+                  "placeholder": "SQL for update entry",
+                  "tip": [
+                    "Query fpr update entry in underlying database.",
+                    "Default value: update ENTRIES set val=? where key=?"
+                  ]
+                },
+                {
+                  "label": "Delete query",
+                  "type": "text",
+                  "path": "cacheStoreFactory.CacheJdbcBlobStoreFactory",
+                  "model": "deleteQuery",
+                  "placeholder": "SQL for delete entry",
+                  "tip": [
+                    "Query for delete entry from underlying database.",
+                    "Default value: delete from ENTRIES where key=?"
+                  ]
+                }
+              ]
+            },
+            "CacheHibernateBlobStoreFactory": {
+              "expanded": true,
+              "fields": [
+                {
+                  "label": "Hibernate properties",
+                  "type": "table-simple",
+                  "path": "cacheStoreFactory.CacheHibernateBlobStoreFactory",
+                  "model": "hibernateProperties",
+                  "editIdx": -1,
+                  "placeholder": "key=value",
+                  "tip": [
+                    "List of Hibernate properties.",
+                    "For example: connection.url=jdbc:h2:mem:"
+                  ]
+                }
+              ]
+            }
+          }
+        },
+        {
+          "label": "Load previous value",
+          "type": "check",
+          "model": "loadPreviousValue",
+          "tip": [
+            "Flag indicating whether value should be loaded from store if it is not in the cache for following cache operations:",
+            "<ul>",
+            "  <li>IgniteCache.putIfAbsent()</li>",
+            "  <li>IgniteCache.replace()</li>",
+            "  <li>IgniteCache.replace()</li>",
+            "  <li>IgniteCache.remove()</li>",
+            "  <li>IgniteCache.getAndPut()</li>",
+            "  <li>IgniteCache.getAndRemove()</li>",
+            "  <li>IgniteCache.getAndReplace()</li>",
+            "  <li>IgniteCache.getAndPutIfAbsent()</li>",
+            "</ul>"
+          ]
+        },
+        {
+          "label": "Read-through",
+          "type": "check",
+          "model": "readThrough",
+          "tip": [
+            "Flag indicating whether read-through caching should be used."
+          ]
+        },
+        {
+          "label": "Write-through",
+          "type": "check",
+          "model": "writeThrough",
+          "tip": [
+            "Flag indicating whether write-through caching should be used."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Transaction",
+      "tip": [
+        "Cache transactions settings."
+      ],
+      "fields": [
+        {
+          "label": "Invalidate",
+          "type": "check",
+          "model": "invalidate",
+          "tip": [
+            "Invalidation flag for near cache entries in transaction.",
+            "If set then values will be invalidated (nullified) upon commit in near cache."
+          ]
+        },
+        {
+          "label": "Default lock timeout",
+          "type": "number",
+          "model": "defaultLockTimeout",
+          "placeholder": 0,
+          "tip": [
+            "Default lock acquisition timeout.",
+            "If 0 then lock acquisition will never timeout."
+          ]
+        },
+        {
+          "label": "Manager finder",
+          "type": "text",
+          "model": "transactionManagerLookupClassName",
+          "tip": [
+            "Class name of transaction manager finder for integration for JEE app servers."
+          ]
+        }
+      ]
+    },
+    {
+      "label": "Write behind",
+      "tip": [
+        "Cache write behind settings.",
+        "Write-behind is a special mode when updates to cache accumulated and then asynchronously flushed to persistent store as a bulk operation."
+      ],
+      "fields": [
+        {
+          "label": "Enabled",
+          "type": "check",
+          "model": "writeBehindEnabled",
+          "tip": [
+            "Flag indicating whether Ignite should use write-behind behaviour for the cache store."
+          ]
+        },
+        {
+          "label": "Batch size",
+          "type": "number",
+          "model": "writeBehindBatchSize",
+          "placeholder": 512,
+          "tip": [
+            "Maximum batch size for write-behind cache store operations.",
+            "Store operations (get or remove) are combined in a batch of this size to be passed to cache store."
+          ]
+        },
+        {
+          "label": "Flush size",
+          "type": "number",
+          "model": "writeBehindFlushSize",
+          "placeholder": 10240,
+          "tip": [
+            "Maximum size of the write-behind cache.<br>",
+            "If cache size exceeds this value, all cached items are flushed to the cache store and write cache is cleared."
+          ]
+        },
+        {
+          "label": "Flush frequency",
+          "type": "number",
+          "model": "writeBehindFlushFrequency",
+          "placeholder": 5000,
+          "tip": [
+            "Frequency with which write-behind cache is flushed to the cache store in milliseconds."
+          ]
+        },
+        {
+          "label": "Flush threads count",
+          "type": "number",
+          "model": "writeBehindFlushThreadCount",
+          "placeholder": 1,
+          "tip": [
+            "Number of threads that will perform cache flushing."
+          ]
+        }
+      ]
+    }
+  ]
+}