You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/03/13 09:46:15 UTC

[01/50] [abbrv] ignite git commit: Merge branches 'ignite-1.9' and 'master'.

Repository: ignite
Updated Branches:
  refs/heads/ignite-4705-2 9db6989d1 -> 8ec5c8e0a


Merge branches 'ignite-1.9' and 'master'.


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

Branch: refs/heads/ignite-4705-2
Commit: 5a4c12b68bc6acd82aab9bc031b500f16ca03426
Parents: cc6257f
Author: Alexey Kuznetsov <ak...@gridgain.com>
Authored: Wed Mar 1 21:56:21 2017 +0700
Committer: Alexey Kuznetsov <ak...@gridgain.com>
Committed: Wed Mar 1 21:56:21 2017 +0700

----------------------------------------------------------------------
 .../ignite/internal/processors/query/h2/IgniteH2Indexing.java   | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5a4c12b6/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 247b5a6..fbdcbf9 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -1286,11 +1286,6 @@ public class IgniteH2Indexing implements GridQueryIndexing {
 
         runs.put(run.id(), run);
 
-        GridRunningQueryInfo run = new GridRunningQueryInfo(qryIdGen.incrementAndGet(), qry, SQL, spaceName,
-            U.currentTimeMillis(), null, true);
-
-        runs.put(run.id(), run);
-
         try {
             ResultSet rs = executeSqlQueryWithTimer(spaceName, conn, sql, params, true, 0, cancel);
 


[46/50] [abbrv] ignite git commit: Minor refactoring in GridQueryProcessor.

Posted by sb...@apache.org.
Minor refactoring in GridQueryProcessor.


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

Branch: refs/heads/ignite-4705-2
Commit: 86fad9823dff03d486abe86b9040f809bd7be25b
Parents: 6fda2c2
Author: devozerov <vo...@gridgain.com>
Authored: Fri Mar 10 15:28:41 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Mar 10 15:28:41 2017 +0300

----------------------------------------------------------------------
 .../processors/query/GridQueryProcessor.java    | 38 ++++++--------------
 1 file changed, 11 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/86fad982/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 176178c..8223fef 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -663,12 +663,10 @@ public class GridQueryProcessor extends GridProcessorAdapter {
         try {
             final GridCacheContext<?, ?> cctx = ctx.cache().internalCache(space).context();
 
-            return executeQuery(GridCacheQueryType.SQL_FIELDS, clause, cctx, new IgniteOutClosureX<GridCloseableIterator<IgniteBiTuple<K, V>>>() {
+            return executeQuery(GridCacheQueryType.SQL_FIELDS, clause, cctx,
+                new IgniteOutClosureX<GridCloseableIterator<IgniteBiTuple<K, V>>>() {
                 @Override public GridCloseableIterator<IgniteBiTuple<K, V>> applyx() throws IgniteCheckedException {
-                    QueryTypeDescriptorImpl type = typesByName.get(new QueryTypeNameKey(space, resType));
-
-                    if (type == null || !type.registered())
-                        throw new CacheException("Failed to find SQL table for type: " + resType);
+                    QueryTypeDescriptorImpl type = type(space, resType);
 
                     return idx.queryLocalSql(space, clause, null, params, type, filters);
                 }
@@ -754,13 +752,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                         String sqlQry = qry.getSql();
                         Object[] params = qry.getArgs();
 
-                        QueryTypeDescriptorImpl typeDesc = typesByName.get(
-                            new QueryTypeNameKey(
-                                space,
-                                type));
-
-                        if (typeDesc == null || !typeDesc.registered())
-                            throw new CacheException("Failed to find SQL table for type: " + type);
+                        QueryTypeDescriptorImpl typeDesc = type(space, type);
 
                         final GridCloseableIterator<IgniteBiTuple<K, V>> i = idx.queryLocalSql(
                             space,
@@ -1056,16 +1048,9 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             return executeQuery(GridCacheQueryType.TEXT, clause, cctx,
                 new IgniteOutClosureX<GridCloseableIterator<IgniteBiTuple<K, V>>>() {
                     @Override public GridCloseableIterator<IgniteBiTuple<K, V>> applyx() throws IgniteCheckedException {
-                        QueryTypeDescriptorImpl type = typesByName.get(new QueryTypeNameKey(space, resType));
+                        QueryTypeDescriptorImpl type = type(space, resType);
 
-                        if (type == null || !type.registered())
-                            throw new CacheException("Failed to find SQL table for type: " + resType);
-
-                        return idx.queryLocalText(
-                            space,
-                            clause,
-                            type,
-                            filters);
+                        return idx.queryLocalText(space, clause, type, filters);
                     }
                 }, true);
         }
@@ -1629,8 +1614,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * @return Descriptors.
      */
     public Collection<GridQueryTypeDescriptor> types(@Nullable String space) {
-        Collection<GridQueryTypeDescriptor> spaceTypes = new ArrayList<>(
-            Math.min(10, types.size()));
+        Collection<GridQueryTypeDescriptor> spaceTypes = new ArrayList<>();
 
         for (Map.Entry<QueryTypeIdKey, QueryTypeDescriptorImpl> e : types.entrySet()) {
             QueryTypeDescriptorImpl desc = e.getValue();
@@ -1650,11 +1634,11 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * @return Type descriptor.
      * @throws IgniteCheckedException If failed.
      */
-    public GridQueryTypeDescriptor type(@Nullable String space, String typeName) throws IgniteCheckedException {
+    public QueryTypeDescriptorImpl type(@Nullable String space, String typeName) throws IgniteCheckedException {
         QueryTypeDescriptorImpl type = typesByName.get(new QueryTypeNameKey(space, typeName));
 
         if (type == null || !type.registered())
-            throw new IgniteCheckedException("Failed to find type descriptor for type name: " + typeName);
+            throw new IgniteCheckedException("Failed to find SQL table for type: " + typeName);
 
         return type;
     }
@@ -1666,8 +1650,8 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * @param clo Closure.
      * @param complete Complete.
      */
-    public <R> R executeQuery(GridCacheQueryType qryType, String qry, GridCacheContext<?, ?> cctx, IgniteOutClosureX<R> clo, boolean complete)
-        throws IgniteCheckedException {
+    public <R> R executeQuery(GridCacheQueryType qryType, String qry, GridCacheContext<?, ?> cctx,
+        IgniteOutClosureX<R> clo, boolean complete) throws IgniteCheckedException {
         final long startTime = U.currentTimeMillis();
 
         Throwable err = null;


[08/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/sql/sql.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/sql.tpl.pug b/modules/web-console/frontend/views/sql/sql.tpl.pug
new file mode 100644
index 0000000..931d632
--- /dev/null
+++ b/modules/web-console/frontend/views/sql/sql.tpl.pug
@@ -0,0 +1,278 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+include /app/components/ui-grid-settings/ui-grid-settings
+
+mixin btn-toolbar(btn, click, tip, focusId)
+    i.btn.btn-default.fa(class=btn ng-click=click bs-tooltip='' data-title=tip ignite-on-click-focus=focusId data-trigger='hover' data-placement='bottom')
+
+mixin btn-toolbar-data(btn, kind, tip)
+    i.btn.btn-default.fa(class=btn ng-click=`setResult(paragraph, '${kind}')` ng-class=`{active: resultEq(paragraph, '${kind}')}` bs-tooltip='' data-title=tip data-trigger='hover' data-placement='bottom')
+
+mixin result-toolbar
+    .btn-group(ng-model='paragraph.result' ng-click='$event.stopPropagation()' style='left: 50%; margin: 0 0 0 -70px;display: block;')
+        +btn-toolbar-data('fa-table', 'table', 'Show data in tabular form')
+        +btn-toolbar-data('fa-bar-chart', 'bar', 'Show bar chart<br/>By default first column - X values, second column - Y values<br/>In case of one column it will be treated as Y values')
+        +btn-toolbar-data('fa-pie-chart', 'pie', 'Show pie chart<br/>By default first column - pie labels, second column - pie values<br/>In case of one column it will be treated as pie values')
+        +btn-toolbar-data('fa-line-chart', 'line', 'Show line chart<br/>By default first column - X values, second column - Y values<br/>In case of one column it will be treated as Y values')
+        +btn-toolbar-data('fa-area-chart', 'area', 'Show area chart<br/>By default first column - X values, second column - Y values<br/>In case of one column it will be treated as Y values')
+
+mixin chart-settings
+    .total.row
+        .col-xs-4
+            .chart-settings-link(ng-show='paragraph.chart && paragraph.chartColumns.length > 0')
+                a(title='Click to show chart settings dialog' ng-click='$event.stopPropagation()' bs-popover data-template-url='{{ $ctrl.chartSettingsTemplateUrl }}' data-placement='bottom' data-auto-close='1' data-trigger='click')
+                    i.fa.fa-bars
+                    | Chart settings
+                div(ng-show='paragraphTimeSpanVisible(paragraph)')
+                    label Show
+                    button.select-manual-caret.btn.btn-default(ng-model='paragraph.timeLineSpan' ng-change='applyChartSettings(paragraph)' bs-options='item for item in timeLineSpans' bs-select data-caret-html='<span class="caret"></span>')
+                    label min
+        .col-xs-4
+            +result-toolbar
+
+mixin notebook-rename
+    .docs-header.notebook-header
+        h1.col-sm-6(ng-hide='notebook.edit')
+            label(style='max-width: calc(100% - 60px)') {{notebook.name}}
+            .btn-group(ng-if='!demo')
+                +btn-toolbar('fa-pencil', 'notebook.edit = true;notebook.editName = notebook.name', 'Rename notebook')
+                +btn-toolbar('fa-trash', 'removeNotebook(notebook)', 'Remove notebook')
+        h1.col-sm-6(ng-show='notebook.edit')
+            i.btn.fa.fa-floppy-o(ng-show='notebook.editName' ng-click='renameNotebook(notebook.editName)' bs-tooltip data-title='Save notebook name' data-trigger='hover')
+            .input-tip
+                input.form-control(ng-model='notebook.editName' required ignite-on-enter='renameNotebook(notebook.editName)' ignite-on-escape='notebook.edit = false;')
+        h1.pull-right
+            a.dropdown-toggle(style='margin-right: 20px' data-toggle='dropdown' bs-dropdown='scrollParagraphs' data-placement='bottom-right') Scroll to query
+                span.caret
+            button.btn.btn-default(style='margin-top: 2px' ng-click='addQuery()' ignite-on-click-focus=focusId)
+                i.fa.fa-fw.fa-plus
+                | Add query
+
+            button.btn.btn-default(style='margin-top: 2px' ng-click='addScan()' ignite-on-click-focus=focusId)
+                i.fa.fa-fw.fa-plus
+                | Add scan
+
+mixin notebook-error
+    h2 Failed to load notebook
+    label.col-sm-12 Notebook not accessible any more. Go back to configuration or open to another notebook.
+    button.h3.btn.btn-primary(ui-sref='base.configuration.clusters') Back to configuration
+
+mixin paragraph-rename
+    .col-sm-6(ng-hide='paragraph.edit')
+        i.fa(ng-class='paragraphExpanded(paragraph) ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
+        label {{paragraph.name}}
+
+        .btn-group(ng-hide='notebook.paragraphs.length > 1')
+            +btn-toolbar('fa-pencil', 'paragraph.edit = true; paragraph.editName = paragraph.name; $event.stopPropagation();', 'Rename query', 'paragraph-name-{{paragraph.id}}')
+
+        .btn-group(ng-show='notebook.paragraphs.length > 1' ng-click='$event.stopPropagation();')
+            +btn-toolbar('fa-pencil', 'paragraph.edit = true; paragraph.editName = paragraph.name;', 'Rename query', 'paragraph-name-{{paragraph.id}}')
+            +btn-toolbar('fa-remove', 'removeParagraph(paragraph)', 'Remove query')
+
+    .col-sm-6(ng-show='paragraph.edit')
+        i.tipLabel.fa(style='float: left;' ng-class='paragraphExpanded(paragraph) ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
+        i.tipLabel.fa.fa-floppy-o(style='float: right;' ng-show='paragraph.editName' ng-click='renameParagraph(paragraph, paragraph.editName); $event.stopPropagation();' bs-tooltip data-title='Save query name' data-trigger='hover')
+        .input-tip
+            input.form-control(id='paragraph-name-{{paragraph.id}}' ng-model='paragraph.editName' required ng-click='$event.stopPropagation();' ignite-on-enter='renameParagraph(paragraph, paragraph.editName)' ignite-on-escape='paragraph.edit = false')
+
+mixin query-settings
+    label.tipLabel(bs-tooltip data-placement='bottom' data-title='Configure periodical execution of last successfully executed query') Refresh rate:
+        button.btn.btn-default.fa.fa-clock-o.tipLabel(ng-class='{"btn-info": paragraph.rate && paragraph.rate.installed}' bs-popover data-template-url='{{ $ctrl.paragraphRateTemplateUrl }}' data-placement='left' data-auto-close='1' data-trigger='click') {{rateAsString(paragraph)}}
+
+    label.tipLabel(bs-tooltip data-placement='bottom' data-title='Max number of rows to show in query result as one page') Page size:
+        button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.pageSize' bs-select bs-options='item for item in pageSizes')
+
+    label.tipLabel(bs-tooltip data-placement='bottom' data-title='Limit query max results to specified number of pages') Max pages:
+        button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.maxPages' bs-select bs-options='item.value as item.label for item in maxPages')
+
+    label.tipLabel(ng-if='nonCollocatedJoinsAvailable(paragraph)' bs-tooltip data-placement='bottom' data-title='Non-collocated joins is a special mode that allow to join data across cluster without collocation.<br/>\
+        Nested joins are not supported for now.<br/>\
+        <b>NOTE</b>: In some cases it may consume more heap memory or may take a long time than collocated joins.' data-trigger='hover')
+        input(type='checkbox' ng-model='paragraph.nonCollocatedJoins')
+        span Allow non-collocated joins
+
+mixin query-actions
+    button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, true)' ng-click='execute(paragraph)') Execute
+    button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, true)' ng-click='execute(paragraph, true)') Execute on selected node
+
+    a.btn.btn-default(ng-disabled='!actionAvailable(paragraph, true)' ng-click='explain(paragraph)' data-placement='bottom' bs-tooltip='' data-title='{{actionTooltip(paragraph, "explain", true)}}') Explain
+
+mixin table-result-heading-query
+    .total.row
+        .col-xs-4
+            +ui-grid-settings
+            label Page: #[b {{paragraph.page}}]
+            label.margin-left-dflt Results so far: #[b {{paragraph.rows.length + paragraph.total}}]
+            label.margin-left-dflt Duration: #[b {{paragraph.duration | duration}}]
+        .col-xs-4
+            div(ng-if='paragraph.qryType === "query"')
+                +result-toolbar
+        .col-xs-4
+            .pull-right
+                .btn-group(ng-disabled='paragraph.loading')
+                    button.btn.btn-primary(ng-click='exportCsv(paragraph)' bs-tooltip data-title='{{actionTooltip(paragraph, "export", false)}}') Export
+                    button.btn.btn-primary.dropdown-toggle(id='export-item-dropdown' data-toggle='dropdown' data-container='body' bs-dropdown='exportDropdown' data-placement='bottom-right')
+                        span.caret
+
+mixin table-result-heading-scan
+    .total.row
+        .col-xs-4
+            +ui-grid-settings
+            label Page: #[b {{paragraph.page}}]
+            label.margin-left-dflt Results so far: #[b {{paragraph.rows.length + paragraph.total}}]
+            label.margin-left-dflt Duration: #[b {{paragraph.duration | duration}}]
+        .col-xs-4
+            div(ng-if='paragraph.qryType === "query"')
+                +result-toolbar
+        .col-xs-4
+            .pull-right
+                .btn-group(ng-disabled='paragraph.loading')
+                    button.btn.btn-primary(ng-click='exportCsv(paragraph)' bs-tooltip data-title='{{actionTooltip(paragraph, "export", false)}}') Export
+                    button.btn.btn-primary.dropdown-toggle(id='export-item-dropdown' data-toggle='dropdown' data-container='body' bs-dropdown='exportDropdown' data-placement='bottom-right')
+                        span.caret
+
+mixin table-result-body
+    .grid(ui-grid='paragraph.gridOptions' ui-grid-resize-columns ui-grid-exporter)
+
+mixin chart-result
+    div(ng-hide='paragraph.scanExplain()')
+        +chart-settings
+        .empty(ng-show='paragraph.chartColumns.length > 0 && !paragraph.chartColumnsConfigured()') Cannot display chart. Please configure axis using #[b Chart settings]
+        .empty(ng-show='paragraph.chartColumns.length == 0') Cannot display chart. Result set must contain Java build-in type columns. Please change query and execute it again.
+        div(ng-show='paragraph.chartColumnsConfigured()')
+            div(ng-show='paragraph.timeLineSupported() || !paragraph.chartTimeLineEnabled()')
+                div(ng-repeat='chart in paragraph.charts')
+                    nvd3(options='chart.options' data='chart.data' api='chart.api')
+            .empty(ng-show='!paragraph.timeLineSupported() && paragraph.chartTimeLineEnabled()') Pie chart does not support 'TIME_LINE' column for X-axis. Please use another column for X-axis or switch to another chart.
+    .empty(ng-show='paragraph.scanExplain()')
+        .row
+            .col-xs-4.col-xs-offset-4
+                +result-toolbar
+        label.margin-top-dflt Charts do not support #[b Explain] and #[b Scan] query
+
+mixin paragraph-scan
+    .panel-heading(bs-collapse-toggle)
+        .row
+            +paragraph-rename
+    .panel-collapse(role='tabpanel' bs-collapse-target)
+        .col-sm-12.sql-controls
+            .col-sm-3
+                +dropdown-required('Cache:', 'paragraph.cacheName', '"cache"', 'true', 'false', 'Choose cache', 'caches')
+            .col-sm-3
+                +text-enabled('Filter:', 'paragraph.filter', '"filter"', true, false, 'Enter filter')
+                    label.btn.btn-default.ignite-form-field__btn(ng-click='paragraph.caseSensitive = !paragraph.caseSensitive')
+                        input(type='checkbox' ng-model='paragraph.caseSensitive')
+                        span(bs-tooltip data-title='Select this checkbox for case sensitive search') Cs
+            label.tipLabel(bs-tooltip data-placement='bottom' data-title='Max number of rows to show in query result as one page') Page size:
+                button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.pageSize' bs-select bs-options='item for item in pageSizes')
+
+        .col-sm-12.sql-controls
+            button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, false)' ng-click='scan(paragraph)')
+                | Scan
+            button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, false)' ng-click='scan(paragraph, true)')
+                | Scan on selected node
+
+        .col-sm-12.sql-result(ng-if='paragraph.queryExecuted()' ng-switch='paragraph.resultType()')
+            .error(ng-switch-when='error') Error: {{paragraph.errMsg}}
+            .empty(ng-switch-when='empty') Result set is empty
+            .table(ng-switch-when='table')
+                +table-result-heading-scan
+                +table-result-body
+            .footer.clearfix()
+                .pull-left
+                    | Showing results for scan of #[b {{ paragraph.queryArgs.cacheName | defaultName }}]
+                    span(ng-if='paragraph.queryArgs.filter') &nbsp; with filter: #[b {{ paragraph.queryArgs.filter }}]
+                    span(ng-if='paragraph.queryArgs.localNid') &nbsp; on node: #[b {{ paragraph.queryArgs.localNid | limitTo:8 }}]
+
+                -var nextVisibleCondition = 'paragraph.resultType() != "error" && paragraph.queryId && paragraph.nonRefresh() && (paragraph.table() || paragraph.chart() && !paragraph.scanExplain())'
+
+                .pull-right(ng-show=`${nextVisibleCondition}` ng-class='{disabled: paragraph.loading}' ng-click='!paragraph.loading && nextPage(paragraph)')
+                    i.fa.fa-chevron-circle-right
+                    a Next
+
+mixin paragraph-query
+    .row.panel-heading(bs-collapse-toggle)
+        +paragraph-rename
+    .panel-collapse(role='tabpanel' bs-collapse-target)
+        .col-sm-12
+            .col-xs-8.col-sm-9(style='border-right: 1px solid #eee')
+                .sql-editor(ignite-ace='{onLoad: aceInit(paragraph), theme: "chrome", mode: "sql", require: ["ace/ext/language_tools"],' +
+                'advanced: {enableSnippets: false, enableBasicAutocompletion: true, enableLiveAutocompletion: true}}'
+                ng-model='paragraph.query')
+            .col-xs-4.col-sm-3
+                div(ng-show='caches.length > 0' style='padding: 5px 10px' st-table='displayedCaches' st-safe-src='caches')
+                    lable.labelField.labelFormField Caches:
+                    i.fa.fa-database.tipField(title='Click to show cache types metadata dialog' bs-popover data-template-url='{{ $ctrl.cacheMetadataTemplateUrl }}' data-placement='bottom' data-trigger='click' data-container='#{{ paragraph.id }}')
+                    .input-tip
+                        input.form-control(type='text' st-search='label' placeholder='Filter caches...')
+                    table.links
+                        tbody.scrollable-y(style='max-height: 15em; display: block;')
+                            tr(ng-repeat='cache in displayedCaches track by cache.name')
+                                td(style='width: 100%')
+                                    input.labelField(id='cache_{{ [paragraph.id, $index].join("_") }}' type='radio' value='{{cache.name}}' ng-model='paragraph.cacheName')
+                                    label(for='cache_{{ [paragraph.id, $index].join("_") }} ' ng-bind-html='cache.label')
+                .empty-caches(ng-show='displayedCaches.length == 0 && caches.length != 0')
+                    label Wrong caches filter
+                .empty-caches(ng-show='caches.length == 0')
+                    label No caches
+        .col-sm-12.sql-controls
+            +query-actions
+
+            .pull-right
+                +query-settings
+        .col-sm-12.sql-result(ng-if='paragraph.queryExecuted()' ng-switch='paragraph.resultType()')
+            .error(ng-switch-when='error') Error: {{paragraph.errMsg}}
+            .empty(ng-switch-when='empty') Result set is empty
+            .table(ng-switch-when='table')
+                +table-result-heading-query
+                +table-result-body
+            .chart(ng-switch-when='chart')
+                +chart-result
+            .footer.clearfix
+                a.pull-left(ng-click='showResultQuery(paragraph)') Show query
+
+                -var nextVisibleCondition = 'paragraph.resultType() != "error" && paragraph.queryId && paragraph.nonRefresh() && (paragraph.table() || paragraph.chart() && !paragraph.scanExplain())'
+
+                .pull-right(ng-show=`${nextVisibleCondition}` ng-class='{disabled: paragraph.loading}' ng-click='!paragraph.loading && nextPage(paragraph)')
+                    i.fa.fa-chevron-circle-right
+                    a Next
+
+.row
+    .docs-content
+        .row(ng-if='notebook' bs-affix style='margin-bottom: 20px;')
+            +notebook-rename
+
+        ignite-information(data-title='With query notebook you can' style='margin-top: 0; margin-bottom: 30px')
+            ul
+                li Create any number of queries
+                li Execute and explain SQL queries
+                li Execute scan queries
+                li View data in tabular form and as charts
+
+        div(ng-if='notebookLoadFailed' style='text-align: center')
+            +notebook-error
+
+        div(ng-if='notebook' ignite-loading='sqlLoading' ignite-loading-text='{{ loadingText }}' ignite-loading-position='top')
+            .docs-body.paragraphs
+                .panel-group(bs-collapse ng-model='notebook.expandedParagraphs' data-allow-multiple='true' data-start-collapsed='false')
+
+                    .panel-paragraph(ng-repeat='paragraph in notebook.paragraphs' id='{{paragraph.id}}' ng-form='form_{{paragraph.id}}')
+                        .panel.panel-default(ng-if='paragraph.qryType === "scan"')
+                            +paragraph-scan
+                        .panel.panel-default(ng-if='paragraph.qryType === "query"')
+                            +paragraph-query

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/agent-download.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/agent-download.jade b/modules/web-console/frontend/views/templates/agent-download.jade
deleted file mode 100644
index b913636..0000000
--- a/modules/web-console/frontend/views/templates/agent-download.jade
+++ /dev/null
@@ -1,50 +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.
-
-.modal.center(tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            #errors-container.modal-header.header
-                h4.modal-title
-                    i.fa.fa-download
-                    span(ng-if='!hasAgents') Connection to Ignite Web Agent is not established
-                    span(ng-if='hasAgents') Connection to Ignite Node is not established
-            .agent-download(ng-if='!hasAgents')
-                p Please download and run #[a(href='/api/v1/agent/download/zip' target='_self') ignite-web-agent] in order to {{::agentGoal}}
-                p For run:
-                ul
-                    li Download and unzip #[a(href='/api/v1/agent/download/zip' target='_self') ignite-web-agent] archive
-                    li Run shell file #[b ignite-web-agent.{sh|bat}]
-                p Refer to #[b README.txt] in agent folder for more information
-                .modal-advanced-options
-                    i.fa.fa-chevron-circle-down(ng-show='agentLoad.showToken' ng-click='agentLoad.showToken = ! agentLoad.showToken')
-                    i.fa.fa-chevron-circle-right(ng-show='!agentLoad.showToken' ng-click='agentLoad.showToken = ! agentLoad.showToken')
-                    a(ng-click='agentLoad.showToken = ! agentLoad.showToken') {{agentLoad.showToken ? 'Hide security token...' : 'Show security token...'}}
-                .details-row(ng-show='agentLoad.showToken')
-                    label.labelField Security token: {{user.becameToken || user.token}}
-                    i.tipLabel.fa.fa-clipboard(ignite-copy-to-clipboard='{{user.becameToken || user.token}}' bs-tooltip='' data-title='Copy security token to clipboard')
-                    i.tipLabel.icon-help(ng-if=lines bs-tooltip='' data-title='The security token is used for authorization of web agent')
-            .agent-download(ng-if='hasAgents')
-                p Connection to Ignite Web Agent is established, but agent failed to connect to Ignite Node
-                p Please check the following:
-                ul
-                    li Ignite Grid is up and Ignite REST server started (copy "ignite-rest-http" folder from libs/optional/ to libs/)
-                    li In agent settings check URI for connect to Ignite REST server
-                    li Check agent logs for errors
-                    li Refer to #[b README.txt] in agent folder for more information
-            .modal-footer
-                button.btn.btn-default(ng-click='back()') {{::backText}}
-                a.btn.btn-primary(ng-if='!hasAgents' href='/api/v1/agent/download/zip' target='_self') Download agent

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/agent-download.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/agent-download.tpl.pug b/modules/web-console/frontend/views/templates/agent-download.tpl.pug
new file mode 100644
index 0000000..b913636
--- /dev/null
+++ b/modules/web-console/frontend/views/templates/agent-download.tpl.pug
@@ -0,0 +1,50 @@
+//-
+    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.
+
+.modal.center(tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            #errors-container.modal-header.header
+                h4.modal-title
+                    i.fa.fa-download
+                    span(ng-if='!hasAgents') Connection to Ignite Web Agent is not established
+                    span(ng-if='hasAgents') Connection to Ignite Node is not established
+            .agent-download(ng-if='!hasAgents')
+                p Please download and run #[a(href='/api/v1/agent/download/zip' target='_self') ignite-web-agent] in order to {{::agentGoal}}
+                p For run:
+                ul
+                    li Download and unzip #[a(href='/api/v1/agent/download/zip' target='_self') ignite-web-agent] archive
+                    li Run shell file #[b ignite-web-agent.{sh|bat}]
+                p Refer to #[b README.txt] in agent folder for more information
+                .modal-advanced-options
+                    i.fa.fa-chevron-circle-down(ng-show='agentLoad.showToken' ng-click='agentLoad.showToken = ! agentLoad.showToken')
+                    i.fa.fa-chevron-circle-right(ng-show='!agentLoad.showToken' ng-click='agentLoad.showToken = ! agentLoad.showToken')
+                    a(ng-click='agentLoad.showToken = ! agentLoad.showToken') {{agentLoad.showToken ? 'Hide security token...' : 'Show security token...'}}
+                .details-row(ng-show='agentLoad.showToken')
+                    label.labelField Security token: {{user.becameToken || user.token}}
+                    i.tipLabel.fa.fa-clipboard(ignite-copy-to-clipboard='{{user.becameToken || user.token}}' bs-tooltip='' data-title='Copy security token to clipboard')
+                    i.tipLabel.icon-help(ng-if=lines bs-tooltip='' data-title='The security token is used for authorization of web agent')
+            .agent-download(ng-if='hasAgents')
+                p Connection to Ignite Web Agent is established, but agent failed to connect to Ignite Node
+                p Please check the following:
+                ul
+                    li Ignite Grid is up and Ignite REST server started (copy "ignite-rest-http" folder from libs/optional/ to libs/)
+                    li In agent settings check URI for connect to Ignite REST server
+                    li Check agent logs for errors
+                    li Refer to #[b README.txt] in agent folder for more information
+            .modal-footer
+                button.btn.btn-default(ng-click='back()') {{::backText}}
+                a.btn.btn-primary(ng-if='!hasAgents' href='/api/v1/agent/download/zip' target='_self') Download agent

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/alert.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/alert.jade b/modules/web-console/frontend/views/templates/alert.jade
deleted file mode 100644
index d30d2fd..0000000
--- a/modules/web-console/frontend/views/templates/alert.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.
-
-.alert(ng-show='type' ng-class='[type ? "alert-" + type : null]')
-    button.close(type='button', ng-if='dismissable', ng-click='$hide()') &times;
-    i.alert-icon(ng-if='icon' ng-class='[icon]')
-    span.alert-title(ng-bind-html='title')
-    span.alert-content(ng-bind-html='content')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/alert.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/alert.tpl.pug b/modules/web-console/frontend/views/templates/alert.tpl.pug
new file mode 100644
index 0000000..d30d2fd
--- /dev/null
+++ b/modules/web-console/frontend/views/templates/alert.tpl.pug
@@ -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.
+
+.alert(ng-show='type' ng-class='[type ? "alert-" + type : null]')
+    button.close(type='button', ng-if='dismissable', ng-click='$hide()') &times;
+    i.alert-icon(ng-if='icon' ng-class='[icon]')
+    span.alert-title(ng-bind-html='title')
+    span.alert-content(ng-bind-html='content')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/batch-confirm.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/batch-confirm.jade b/modules/web-console/frontend/views/templates/batch-confirm.jade
deleted file mode 100644
index 0b74a4e..0000000
--- a/modules/web-console/frontend/views/templates/batch-confirm.jade
+++ /dev/null
@@ -1,34 +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.
-
-.modal(tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            .modal-header
-                button.close(ng-click='cancel()' aria-hidden='true') &times;
-                h4.modal-title 
-                    i.icon-confirm
-                    | Confirmation
-            .modal-body(ng-show='content')
-                p(ng-bind-html='content' style='text-align: center')
-            .modal-footer
-                .checkbox.labelField
-                    label
-                        input(type='checkbox' ng-model='applyToAll')
-                        | Apply to all
-                button.btn.btn-default(id='batch-confirm-btn-cancel' ng-click='cancel()') Cancel
-                button.btn.btn-default(id='batch-confirm-btn-skip' ng-click='skip(applyToAll)') Skip
-                button.btn.btn-primary(id='batch-confirm-btn-overwrite' ng-click='overwrite(applyToAll)') Overwrite

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/batch-confirm.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/batch-confirm.tpl.pug b/modules/web-console/frontend/views/templates/batch-confirm.tpl.pug
new file mode 100644
index 0000000..0b74a4e
--- /dev/null
+++ b/modules/web-console/frontend/views/templates/batch-confirm.tpl.pug
@@ -0,0 +1,34 @@
+//-
+    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.
+
+.modal(tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            .modal-header
+                button.close(ng-click='cancel()' aria-hidden='true') &times;
+                h4.modal-title 
+                    i.icon-confirm
+                    | Confirmation
+            .modal-body(ng-show='content')
+                p(ng-bind-html='content' style='text-align: center')
+            .modal-footer
+                .checkbox.labelField
+                    label
+                        input(type='checkbox' ng-model='applyToAll')
+                        | Apply to all
+                button.btn.btn-default(id='batch-confirm-btn-cancel' ng-click='cancel()') Cancel
+                button.btn.btn-default(id='batch-confirm-btn-skip' ng-click='skip(applyToAll)') Skip
+                button.btn.btn-primary(id='batch-confirm-btn-overwrite' ng-click='overwrite(applyToAll)') Overwrite

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/clone.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/clone.jade b/modules/web-console/frontend/views/templates/clone.jade
deleted file mode 100644
index 99ec58b..0000000
--- a/modules/web-console/frontend/views/templates/clone.jade
+++ /dev/null
@@ -1,39 +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.
-
-include /app/helpers/jade/mixins.jade
-
-.modal(tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            .modal-header
-                button.close(ng-click='$hide()') &times;
-                h4.modal-title 
-                    i.fa.fa-clone
-                    | Clone
-            form.form-horizontal.modal-body.row(name='ui.inputForm' novalidate)
-                div
-                    .col-sm-2
-                        label.required.labelFormField New name:&nbsp;
-                    .col-sm-10
-                        .input-tip
-                            +ignite-form-field-input('"copy-new-name"','newName', false, 'true', 'Enter new name')(
-                                data-ignite-form-field-input-autofocus='true'
-                                ignite-on-enter='form.$valid && ok(newName)'
-                            )
-            .modal-footer
-                button.btn.btn-default(id='copy-btn-cancel' ng-click='$hide()') Cancel
-                button.btn.btn-primary(id='copy-btn-confirm' ng-disabled='ui.inputForm.$invalid' ng-click='ok(newName)') Confirm

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/clone.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/clone.tpl.pug b/modules/web-console/frontend/views/templates/clone.tpl.pug
new file mode 100644
index 0000000..e62cb18
--- /dev/null
+++ b/modules/web-console/frontend/views/templates/clone.tpl.pug
@@ -0,0 +1,39 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+.modal(tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            .modal-header
+                button.close(ng-click='$hide()') &times;
+                h4.modal-title 
+                    i.fa.fa-clone
+                    | Clone
+            form.form-horizontal.modal-body.row(name='ui.inputForm' novalidate)
+                div
+                    .col-sm-2
+                        label.required.labelFormField New name:&nbsp;
+                    .col-sm-10
+                        .input-tip
+                            +ignite-form-field-input('"copy-new-name"','newName', false, 'true', 'Enter new name')(
+                                data-ignite-form-field-input-autofocus='true'
+                                ignite-on-enter='form.$valid && ok(newName)'
+                            )
+            .modal-footer
+                button.btn.btn-default(id='copy-btn-cancel' ng-click='$hide()') Cancel
+                button.btn.btn-primary(id='copy-btn-confirm' ng-disabled='ui.inputForm.$invalid' ng-click='ok(newName)') Confirm

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/confirm.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/confirm.jade b/modules/web-console/frontend/views/templates/confirm.jade
deleted file mode 100644
index 0031498..0000000
--- a/modules/web-console/frontend/views/templates/confirm.jade
+++ /dev/null
@@ -1,33 +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.
-
-.modal(tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            .modal-header
-                button.close(ng-click='confirmCancel()' aria-hidden='true') &times;
-                h4.modal-title 
-                    i.icon-confirm
-                    | Confirmation
-            .modal-body(ng-show='content')
-                p(ng-bind-html='content' style='text-align: center;')
-            .modal-footer
-                button#confirm-btn-cancel.btn.btn-default(ng-click='confirmCancel()') Cancel
-
-                button#confirm-btn-no.btn.btn-default(ng-if='yesNo' ng-click='confirmNo()') No
-                button#confirm-btn-yes.btn.btn-primary(ng-if='yesNo' ng-click='confirmYes()') Yes
-
-                button#confirm-btn-ok.btn.btn-primary(ng-if='!yesNo' ng-click='confirmYes()') Confirm

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/confirm.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/confirm.tpl.pug b/modules/web-console/frontend/views/templates/confirm.tpl.pug
new file mode 100644
index 0000000..0031498
--- /dev/null
+++ b/modules/web-console/frontend/views/templates/confirm.tpl.pug
@@ -0,0 +1,33 @@
+//-
+    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.
+
+.modal(tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            .modal-header
+                button.close(ng-click='confirmCancel()' aria-hidden='true') &times;
+                h4.modal-title 
+                    i.icon-confirm
+                    | Confirmation
+            .modal-body(ng-show='content')
+                p(ng-bind-html='content' style='text-align: center;')
+            .modal-footer
+                button#confirm-btn-cancel.btn.btn-default(ng-click='confirmCancel()') Cancel
+
+                button#confirm-btn-no.btn.btn-default(ng-if='yesNo' ng-click='confirmNo()') No
+                button#confirm-btn-yes.btn.btn-primary(ng-if='yesNo' ng-click='confirmYes()') Yes
+
+                button#confirm-btn-ok.btn.btn-primary(ng-if='!yesNo' ng-click='confirmYes()') Confirm

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/demo-info.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/demo-info.jade b/modules/web-console/frontend/views/templates/demo-info.jade
deleted file mode 100644
index 44c091c..0000000
--- a/modules/web-console/frontend/views/templates/demo-info.jade
+++ /dev/null
@@ -1,47 +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.
-
-.modal.center(role='dialog')
-    .modal-dialog
-        .modal-content
-            #errors-container.modal-header.header
-                button.close(ng-click='close()' aria-hidden='true') &times;
-                h4.modal-title
-                    i.fa.fa-info-circle
-                    | {{title}}
-            .modal-body
-                div(ng-bind-html='message')
-                div(ng-hide='hasAgents')
-                    p &nbsp;
-                    div
-                        h4
-                            i.fa.fa-download.fa-cursor-default
-                            | &nbsp;How To Start Demo
-                        ul
-                            li
-                                a(ng-click='downloadAgent()') #[b Download]
-                                | &nbsp; and unzip ignite-web-agent archive
-                            li #[b Run] shell file ignite-web-agent.{sh|bat}
-                div(ng-show='hasAgents')
-                    h4
-                        i.fa.fa-star-o.fa-cursor-default
-                        | &nbsp;Start Demo
-                    ul
-                        li Web Agent is already started
-                        li Close dialog and try Web Console
-            .modal-footer
-                button.btn.btn-default(ng-class='hasAgents ? "btn-primary" : "btn-default"' ng-click='close()') Close
-                button.btn.btn-primary(ng-hide='hasAgents' ng-click='downloadAgent()') Download agent

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/demo-info.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/demo-info.tpl.pug b/modules/web-console/frontend/views/templates/demo-info.tpl.pug
new file mode 100644
index 0000000..44c091c
--- /dev/null
+++ b/modules/web-console/frontend/views/templates/demo-info.tpl.pug
@@ -0,0 +1,47 @@
+//-
+    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.
+
+.modal.center(role='dialog')
+    .modal-dialog
+        .modal-content
+            #errors-container.modal-header.header
+                button.close(ng-click='close()' aria-hidden='true') &times;
+                h4.modal-title
+                    i.fa.fa-info-circle
+                    | {{title}}
+            .modal-body
+                div(ng-bind-html='message')
+                div(ng-hide='hasAgents')
+                    p &nbsp;
+                    div
+                        h4
+                            i.fa.fa-download.fa-cursor-default
+                            | &nbsp;How To Start Demo
+                        ul
+                            li
+                                a(ng-click='downloadAgent()') #[b Download]
+                                | &nbsp; and unzip ignite-web-agent archive
+                            li #[b Run] shell file ignite-web-agent.{sh|bat}
+                div(ng-show='hasAgents')
+                    h4
+                        i.fa.fa-star-o.fa-cursor-default
+                        | &nbsp;Start Demo
+                    ul
+                        li Web Agent is already started
+                        li Close dialog and try Web Console
+            .modal-footer
+                button.btn.btn-default(ng-class='hasAgents ? "btn-primary" : "btn-default"' ng-click='close()') Close
+                button.btn.btn-primary(ng-hide='hasAgents' ng-click='downloadAgent()') Download agent

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/dropdown.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/dropdown.jade b/modules/web-console/frontend/views/templates/dropdown.jade
deleted file mode 100644
index 2ee8616..0000000
--- a/modules/web-console/frontend/views/templates/dropdown.jade
+++ /dev/null
@@ -1,24 +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.
-
-ul.dropdown-menu(tabindex='-1' role='menu' ng-show='content && content.length')
-    li(role='presentation' ui-sref-active='active' ng-class='{divider: item.divider, active: item.active}' ng-repeat='item in content')
-        a(role='menuitem' tabindex='-1' ui-sref='{{item.sref}}' ng-if='!item.action && !item.divider && item.sref' ng-bind='item.text')
-        a(role='menuitem' tabindex='-1' ng-href='{{item.href}}' ng-if='!item.action && !item.divider && item.href' target='{{item.target || ""}}' ng-bind='item.text')
-        a(role='menuitem' tabindex='-1' href='javascript:void(0)' ng-if='!item.action && !item.divider && item.click' ng-click='$eval(item.click);$hide()' ng-bind='item.text')
-        div(role='menuitem' ng-if='item.action')
-            i.fa.pull-right(class='{{ item.action.icon }}' ng-click='item.action.click(item.data)' bs-tooltip data-title='{{ item.action.tooltip }}' data-trigger='hover' data-placement='bottom')
-            div: a(ui-sref='{{ item.sref }}' ng-bind='item.text')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/dropdown.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/dropdown.tpl.pug b/modules/web-console/frontend/views/templates/dropdown.tpl.pug
new file mode 100644
index 0000000..2ee8616
--- /dev/null
+++ b/modules/web-console/frontend/views/templates/dropdown.tpl.pug
@@ -0,0 +1,24 @@
+//-
+    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.
+
+ul.dropdown-menu(tabindex='-1' role='menu' ng-show='content && content.length')
+    li(role='presentation' ui-sref-active='active' ng-class='{divider: item.divider, active: item.active}' ng-repeat='item in content')
+        a(role='menuitem' tabindex='-1' ui-sref='{{item.sref}}' ng-if='!item.action && !item.divider && item.sref' ng-bind='item.text')
+        a(role='menuitem' tabindex='-1' ng-href='{{item.href}}' ng-if='!item.action && !item.divider && item.href' target='{{item.target || ""}}' ng-bind='item.text')
+        a(role='menuitem' tabindex='-1' href='javascript:void(0)' ng-if='!item.action && !item.divider && item.click' ng-click='$eval(item.click);$hide()' ng-bind='item.text')
+        div(role='menuitem' ng-if='item.action')
+            i.fa.pull-right(class='{{ item.action.icon }}' ng-click='item.action.click(item.data)' bs-tooltip data-title='{{ item.action.tooltip }}' data-trigger='hover' data-placement='bottom')
+            div: a(ui-sref='{{ item.sref }}' ng-bind='item.text')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/getting-started.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/getting-started.jade b/modules/web-console/frontend/views/templates/getting-started.jade
deleted file mode 100644
index 3a89035..0000000
--- a/modules/web-console/frontend/views/templates/getting-started.jade
+++ /dev/null
@@ -1,34 +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.
-
-.modal.center(role='dialog')
-    .modal-dialog
-        .modal-content
-            #errors-container.modal-header.header
-                button.close(ng-click='close()' aria-hidden='true') &times;
-                h4.modal-title 
-                    i.fa.fa-book
-                    | {{title}}
-            .getting-started
-                .col-xs-12(ng-bind-html='message')
-            .modal-footer
-                .checkbox
-                    label
-                        input(type='checkbox' ng-model='ui.showGettingStarted')
-                        | Show getting started on next login
-                a.btn.btn-primary(ng-disabled='isFirst()' ng-click='!isFirst() && prev()') Prev
-                a.btn.btn-primary(ng-disabled='isLast()' ng-click='!isLast() && next()') Next
-                a.btn.btn-primary(ng-click='close()') Close

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/getting-started.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/getting-started.tpl.pug b/modules/web-console/frontend/views/templates/getting-started.tpl.pug
new file mode 100644
index 0000000..3a89035
--- /dev/null
+++ b/modules/web-console/frontend/views/templates/getting-started.tpl.pug
@@ -0,0 +1,34 @@
+//-
+    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.
+
+.modal.center(role='dialog')
+    .modal-dialog
+        .modal-content
+            #errors-container.modal-header.header
+                button.close(ng-click='close()' aria-hidden='true') &times;
+                h4.modal-title 
+                    i.fa.fa-book
+                    | {{title}}
+            .getting-started
+                .col-xs-12(ng-bind-html='message')
+            .modal-footer
+                .checkbox
+                    label
+                        input(type='checkbox' ng-model='ui.showGettingStarted')
+                        | Show getting started on next login
+                a.btn.btn-primary(ng-disabled='isFirst()' ng-click='!isFirst() && prev()') Prev
+                a.btn.btn-primary(ng-disabled='isLast()' ng-click='!isLast() && next()') Next
+                a.btn.btn-primary(ng-click='close()') Close

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/message.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/message.jade b/modules/web-console/frontend/views/templates/message.jade
deleted file mode 100644
index 6eff74b..0000000
--- a/modules/web-console/frontend/views/templates/message.jade
+++ /dev/null
@@ -1,28 +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.
-
-.modal(tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            .modal-header
-                button.close(ng-click='$hide()' aria-hidden='true') &times;
-                h4.modal-title
-                    i.fa.fa-info-circle
-                    | {{title}}
-            .modal-body(ng-show='content')
-                p(ng-bind-html='content.join("<br/>")' style='text-align: left;')
-            .modal-footer
-                button.btn.btn-primary(id='confirm-btn-confirm' ng-click='$hide()') Ok

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/message.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/message.tpl.pug b/modules/web-console/frontend/views/templates/message.tpl.pug
new file mode 100644
index 0000000..6eff74b
--- /dev/null
+++ b/modules/web-console/frontend/views/templates/message.tpl.pug
@@ -0,0 +1,28 @@
+//-
+    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.
+
+.modal(tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            .modal-header
+                button.close(ng-click='$hide()' aria-hidden='true') &times;
+                h4.modal-title
+                    i.fa.fa-info-circle
+                    | {{title}}
+            .modal-body(ng-show='content')
+                p(ng-bind-html='content.join("<br/>")' style='text-align: left;')
+            .modal-footer
+                button.btn.btn-primary(id='confirm-btn-confirm' ng-click='$hide()') Ok

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/pagination.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/pagination.jade b/modules/web-console/frontend/views/templates/pagination.jade
deleted file mode 100644
index 08ced60..0000000
--- a/modules/web-console/frontend/views/templates/pagination.jade
+++ /dev/null
@@ -1,32 +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.
-
-nav(ng-if='numPages && pages.length >= 2')
-    ul.pagination
-        li(ng-if='currentPage > 1')
-            a(href='javascript:void(0);' ng-click='selectPage(1)' bs-tooltip='' data-title='First page' data-placement='bottom')
-                i.fa.fa-angle-double-left
-        li(ng-if='currentPage > 1')
-            a(href='javascript:void(0);' ng-click='selectPage(currentPage-1)' bs-tooltip='' data-title='Previous page' data-placement='bottom')
-                i.fa.fa-angle-left
-        li(ng-repeat='page in pages' ng-class='{active: page==currentPage}')
-            a(href='javascript:void(0);' ng-click='selectPage(page)') {{page}}
-        li(ng-if='currentPage < numPages')
-            a(href='javascript:void(0);' ng-click='selectPage(currentPage+1)' bs-tooltip='' data-title='Next page' data-placement='bottom')
-                i.fa.fa-angle-right
-        li(ng-if='currentPage < numPages')
-            a(href='javascript:void(0);' ng-click='selectPage(numPages)' bs-tooltip='' data-title='Last page' data-placement='bottom')
-                i.fa.fa-angle-double-right
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/select.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/select.jade b/modules/web-console/frontend/views/templates/select.jade
deleted file mode 100644
index aa6a2ef..0000000
--- a/modules/web-console/frontend/views/templates/select.jade
+++ /dev/null
@@ -1,26 +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.
-
-ul.select.dropdown-menu(tabindex='-1' ng-show='$isVisible()' role='select')
-    li(ng-if='$showAllNoneButtons || ($isMultiple && $matches.length > 2)')
-        a(id='li-dropdown-select-all' ng-click='$selectAll()') {{$allText}} ({{$matches.length}})
-        a(id='li-dropdown-select-none' ng-click='$selectNone()') {{$noneText}}
-        hr(style='margin: 5px 0')
-    li(role='presentation' ng-repeat='match in $matches')
-        hr(ng-if='match.value == undefined' style='margin: 5px 0')
-        a(id='li-dropdown-item-{{$index}}'  role='menuitem' tabindex='-1' ng-class='{active: $isActive($index)}' ng-click='$select($index, $event)' bs-tooltip='widthIsSufficient && !widthIsSufficient("li-dropdown-item-{{$index}}", $index, match.label) ? match.label : ""' data-placement='right auto')
-            i(class='{{$iconCheckmark}}' ng-if='$isActive($index)' ng-class='{active: $isActive($index)}')
-            span(ng-bind-html='match.label')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/select.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/select.tpl.pug b/modules/web-console/frontend/views/templates/select.tpl.pug
new file mode 100644
index 0000000..aa6a2ef
--- /dev/null
+++ b/modules/web-console/frontend/views/templates/select.tpl.pug
@@ -0,0 +1,26 @@
+//-
+    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.
+
+ul.select.dropdown-menu(tabindex='-1' ng-show='$isVisible()' role='select')
+    li(ng-if='$showAllNoneButtons || ($isMultiple && $matches.length > 2)')
+        a(id='li-dropdown-select-all' ng-click='$selectAll()') {{$allText}} ({{$matches.length}})
+        a(id='li-dropdown-select-none' ng-click='$selectNone()') {{$noneText}}
+        hr(style='margin: 5px 0')
+    li(role='presentation' ng-repeat='match in $matches')
+        hr(ng-if='match.value == undefined' style='margin: 5px 0')
+        a(id='li-dropdown-item-{{$index}}'  role='menuitem' tabindex='-1' ng-class='{active: $isActive($index)}' ng-click='$select($index, $event)' bs-tooltip='widthIsSufficient && !widthIsSufficient("li-dropdown-item-{{$index}}", $index, match.label) ? match.label : ""' data-placement='right auto')
+            i(class='{{$iconCheckmark}}' ng-if='$isActive($index)' ng-class='{active: $isActive($index)}')
+            span(ng-bind-html='match.label')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/validation-error.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/validation-error.jade b/modules/web-console/frontend/views/templates/validation-error.jade
deleted file mode 100644
index 13deb9b..0000000
--- a/modules/web-console/frontend/views/templates/validation-error.jade
+++ /dev/null
@@ -1,25 +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.
-
-.popover.validation-error
-    .arrow
-    .popover-content
-        table
-            tr
-                td
-                    label {{content}}&nbsp&nbsp
-                td
-                    button.close(id='popover-btn-close' ng-click='$hide()') &times;

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/templates/validation-error.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/validation-error.tpl.pug b/modules/web-console/frontend/views/templates/validation-error.tpl.pug
new file mode 100644
index 0000000..13deb9b
--- /dev/null
+++ b/modules/web-console/frontend/views/templates/validation-error.tpl.pug
@@ -0,0 +1,25 @@
+//-
+    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.
+
+.popover.validation-error
+    .arrow
+    .popover-content
+        table
+            tr
+                td
+                    label {{content}}&nbsp&nbsp
+                td
+                    button.close(id='popover-btn-close' ng-click='$hide()') &times;


[40/50] [abbrv] ignite git commit: Merge remote-tracking branch 'origin/master'

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/ignite-4705-2
Commit: b84d4b1e8a19f4335f18eb66636ba37be5968d59
Parents: 37a5f92 d6be1e0
Author: sboikov <sb...@gridgain.com>
Authored: Fri Mar 10 10:45:51 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Mar 10 10:45:51 2017 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/query/h2/IgniteH2Indexing.java       | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------



[47/50] [abbrv] ignite git commit: Merge branch 'ignite-2.0' into ignite-2.0-merge

Posted by sb...@apache.org.
Merge branch 'ignite-2.0' into ignite-2.0-merge

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java


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

Branch: refs/heads/ignite-4705-2
Commit: a6b077a782a72e45d59810c7449f0dd4a01a8169
Parents: e18fcda 86fad98
Author: devozerov <vo...@gridgain.com>
Authored: Fri Mar 10 17:33:20 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Mar 10 17:33:20 2017 +0300

----------------------------------------------------------------------
 .../processors/query/GridQueryProcessor.java    | 31 +++++---------------
 1 file changed, 8 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a6b077a7/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index f107386,8223fef..cc91f43
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@@ -648,14 -642,20 +648,13 @@@ public class GridQueryProcessor extend
                  INDEXING.module() + " to classpath or moving it from 'optional' to 'libs' folder).");
      }
  
- 
      /**
 -     * @param space Space.
 -     * @param clause Clause.
 -     * @param params Parameters collection.
 -     * @param resType Result type.
 -     * @param filters Filters.
 -     * @return Key/value rows.
 -     * @throws IgniteCheckedException If failed.
 +     * @param cctx Cache context.
 +     * @param qry Query.
 +     * @return Cursor.
       */
 -    @SuppressWarnings("unchecked")
 -    public <K, V> GridCloseableIterator<IgniteBiTuple<K, V>> query(final String space, final String clause,
 -        final Collection<Object> params, final String resType, final IndexingQueryFilter filters)
 -        throws IgniteCheckedException {
 -        checkEnabled();
 +    public QueryCursor<List<?>> queryTwoStep(final GridCacheContext<?,?> cctx, final SqlFieldsQuery qry) {
 +        checkxEnabled();
  
          if (!busyLock.enterBusy())
              throw new IllegalStateException("Failed to execute query (grid is stopping).");
@@@ -748,25 -745,48 +747,19 @@@
  
          try {
              return executeQuery(GridCacheQueryType.SQL, qry.getSql(), cctx,
 -                new IgniteOutClosureX<Iterator<Cache.Entry<K, V>>>() {
 -                    @Override public Iterator<Cache.Entry<K, V>> applyx() throws IgniteCheckedException {
 -                        String space = cctx.name();
 +                new IgniteOutClosureX<QueryCursor<Cache.Entry<K, V>>>() {
 +                    @Override public QueryCursor<Cache.Entry<K, V>> applyx() throws IgniteCheckedException {
                          String type = qry.getType();
 -                        String sqlQry = qry.getSql();
 -                        Object[] params = qry.getArgs();
  
-                         QueryTypeDescriptorImpl typeDesc = typesByName.get(
-                             new QueryTypeNameKey(
-                                 cctx.name(),
-                                 type));
- 
-                         if (typeDesc == null || !typeDesc.registered())
-                             throw new CacheException("Failed to find SQL table for type: " + type);
 -                        QueryTypeDescriptorImpl typeDesc = type(space, type);
++                        QueryTypeDescriptorImpl typeDesc = type(cctx.name(), type);
  
 -                        final GridCloseableIterator<IgniteBiTuple<K, V>> i = idx.queryLocalSql(
 -                            space,
 -                            qry.getSql(),
 -                            qry.getAlias(),
 -                            F.asList(params),
 -                            typeDesc,
 -                            idx.backupFilter(requestTopVer.get(), null));
 +                        qry.setType(typeDesc.name());
  
                          sendQueryExecutedEvent(
 -                            sqlQry,
 -                            params);
 -
 -                        return new ClIter<Cache.Entry<K, V>>() {
 -                            @Override public void close() throws Exception {
 -                                i.close();
 -                            }
 -
 -                            @Override public boolean hasNext() {
 -                                return i.hasNext();
 -                            }
 -
 -                            @Override public Cache.Entry<K, V> next() {
 -                                IgniteBiTuple<K, V> t = i.next();
 -
 -                                return new CacheEntryImpl<>(
 -                                    (K)cctx.unwrapBinaryIfNeeded(t.getKey(), keepBinary, false),
 -                                    (V)cctx.unwrapBinaryIfNeeded(t.getValue(), keepBinary, false));
 -                            }
 -
 -                            @Override public void remove() {
 -                                throw new UnsupportedOperationException();
 -                            }
 -                        };
 +                            qry.getSql(),
 +                            qry.getArgs());
 +
 +                        return idx.queryLocalSql(cctx, qry, idx.backupFilter(requestTopVer.get(), null), keepBinary);
                      }
                  }, true);
          }


[05/50] [abbrv] ignite git commit: Improved affinityRun documentation

Posted by sb...@apache.org.
Improved affinityRun documentation


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

Branch: refs/heads/ignite-4705-2
Commit: 7618b5869e490148a8f13d4ea55ae4d08c741c3e
Parents: a7f77d4
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Mar 1 13:16:42 2017 -0800
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Mar 1 13:16:42 2017 -0800

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCompute.java   | 44 ++++++++++++--------
 1 file changed, 26 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7618b586/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java b/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
index 212849a..b5c6261 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
@@ -123,8 +123,10 @@ public interface IgniteCompute extends IgniteAsyncSupport {
 
     /**
      * Executes given job on the node where data for provided affinity key is located
-     * (a.k.a. affinity co-location). The data of the partition where affKey is stored
-     * will not be migrated from the target node while the job is executed.
+     * (a.k.a. affinity co-location).
+     * </p>
+     * It's guaranteed that the data of the whole partition, the affinity key belongs to,
+     * will present on the destination node throughout the job execution.
      *
      * @param cacheName Name of the cache to use for affinity co-location.
      * @param affKey Affinity key.
@@ -136,11 +138,13 @@ public interface IgniteCompute extends IgniteAsyncSupport {
 
     /**
      * Executes given job on the node where data for provided affinity key is located
-     * (a.k.a. affinity co-location). The data of the partition where affKey is stored
-     * will not be migrated from the target node while the job is executed. The data
-     * of the extra caches' partitions with the same partition number also will not be migrated.
+     * (a.k.a. affinity co-location).
+     * </p>
+     * It's guaranteed that the data of all the partitions of all participating caches,
+     * the affinity key belongs to, will present on the destination node throughout the job execution.
      *
-     * @param cacheNames Names of the caches to to reserve the partition. The first cache uses for affinity co-location.
+     * @param cacheNames Names of the caches to to reserve the partition. The first cache is used for
+     *                   affinity co-location.
      * @param affKey Affinity key.
      * @param job Job which will be co-located on the node with given affinity key.
      * @throws IgniteException If job failed.
@@ -151,11 +155,12 @@ public interface IgniteCompute extends IgniteAsyncSupport {
 
     /**
      * Executes given job on the node where partition is located (the partition is primary on the node)
-     * The data of the partition will not be migrated from the target node
-     * while the job is executed. The data of the extra caches' partitions with the same partition number
-     * also will not be migrated.
+     * </p>
+     * It's guaranteed that the data of all the partitions of all participating caches,
+     * the affinity key belongs to, will present on the destination node throughout the job execution.
      *
-     * @param cacheNames Names of the caches to to reserve the partition. The first cache uses for affinity co-location.
+     * @param cacheNames Names of the caches to to reserve the partition. The first cache is used for
+     *                   affinity co-location.
      * @param partId Partition number.
      * @param job Job which will be co-located on the node with given affinity key.
      * @throws IgniteException If job failed.
@@ -166,8 +171,10 @@ public interface IgniteCompute extends IgniteAsyncSupport {
 
     /**
      * Executes given job on the node where data for provided affinity key is located
-     * (a.k.a. affinity co-location). The data of the partition where affKey is stored
-     * will not be migrated from the target node while the job is executed.
+     * (a.k.a. affinity co-location).
+     * </p>
+     * It's guaranteed that the data of the whole partition, the affinity key belongs to,
+     * will present on the destination node throughout the job execution.
      *
      * @param cacheName Name of the cache to use for affinity co-location.
      * @param affKey Affinity key.
@@ -180,9 +187,10 @@ public interface IgniteCompute extends IgniteAsyncSupport {
 
     /**
      * Executes given job on the node where data for provided affinity key is located
-     * (a.k.a. affinity co-location). The data of the partition where affKey is stored
-     * will not be migrated from the target node while the job is executed. The data
-     * of the extra caches' partitions with the same partition number also will not be migrated.
+     * (a.k.a. affinity co-location).
+     * </p>
+     * It's guaranteed that the data of all the partitions of all participating caches,
+     * the affinity key belongs to, will present on the destination node throughout the job execution.
      *
      * @param cacheNames Names of the caches to to reserve the partition. The first cache uses for affinity co-location.
      * @param affKey Affinity key.
@@ -196,9 +204,9 @@ public interface IgniteCompute extends IgniteAsyncSupport {
 
     /**
      * Executes given job on the node where partition is located (the partition is primary on the node)
-     * The data of the partition will not be migrated from the target node
-     * while the job is executed. The data of the extra caches' partitions with the same partition number
-     * also will not be migrated.
+     * </p>
+     * It's guaranteed that the data of all the partitions of all participating caches,
+     * the affinity key belongs to, will present on the destination node throughout the job execution.
      *
      * @param cacheNames Names of the caches to to reserve the partition. The first cache uses for affinity co-location.
      * @param partId Partition to reserve.


[44/50] [abbrv] ignite git commit: Fixes after merge master -> 2.0 merge.

Posted by sb...@apache.org.
Fixes after merge master -> 2.0 merge.


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

Branch: refs/heads/ignite-4705-2
Commit: e18fcda7f9c76c398db0fd3ddaed653967a6e3e6
Parents: d1b2c01
Author: devozerov <vo...@gridgain.com>
Authored: Fri Mar 10 14:17:33 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Mar 10 14:17:33 2017 +0300

----------------------------------------------------------------------
 .../processors/query/GridQueryProcessor.java    |  2 +-
 .../query/h2/DmlStatementsProcessor.java        | 27 ++++++++------------
 .../query/h2/twostep/GridMapQueryExecutor.java  |  8 +++---
 3 files changed, 15 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e18fcda7/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 1069e55..f107386 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -754,7 +754,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
 
                         QueryTypeDescriptorImpl typeDesc = typesByName.get(
                             new QueryTypeNameKey(
-                                space,
+                                cctx.name(),
                                 type));
 
                         if (typeDesc == null || !typeDesc.registered())

http://git-wip-us.apache.org/repos/asf/ignite/blob/e18fcda7/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DmlStatementsProcessor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DmlStatementsProcessor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DmlStatementsProcessor.java
index 9ab7704..a502479 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DmlStatementsProcessor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DmlStatementsProcessor.java
@@ -60,7 +60,6 @@ import org.apache.ignite.internal.processors.query.GridQueryProperty;
 import org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor;
 import org.apache.ignite.internal.processors.query.IgniteSQLException;
 import org.apache.ignite.internal.processors.query.h2.dml.FastUpdateArguments;
-import org.apache.ignite.internal.processors.query.h2.dml.KeyValueSupplier;
 import org.apache.ignite.internal.processors.query.h2.dml.UpdateMode;
 import org.apache.ignite.internal.processors.query.h2.dml.UpdatePlan;
 import org.apache.ignite.internal.processors.query.h2.dml.UpdatePlanBuilder;
@@ -75,7 +74,6 @@ import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.spi.indexing.IndexingQueryFilter;
 import org.h2.command.Prepared;
-import org.h2.jdbc.JdbcPreparedStatement;
 import org.h2.table.Column;
 import org.h2.value.DataType;
 import org.h2.value.Value;
@@ -235,7 +233,7 @@ public class DmlStatementsProcessor {
         throws IgniteCheckedException {
         args = U.firstNotNull(args, X.EMPTY_OBJECT_ARRAY);
 
-        Prepared p = GridSqlQueryParser.prepared((JdbcPreparedStatement)stmt);
+        Prepared p = GridSqlQueryParser.prepared(stmt);
 
         assert p != null;
 
@@ -276,11 +274,8 @@ public class DmlStatementsProcessor {
                 }
             }, null);
 
-            GridH2RowDescriptor desc = plan.tbl.rowDescriptor();
-
             if (plan.rowsNum == 1) {
-                IgniteBiTuple t = rowToKeyValue(cctx, cur.iterator().next().toArray(), plan.colNames, plan.colTypes,
-                    plan.keySupplier, plan.valSupplier, plan.keyColIdx, plan.valColIdx, desc);
+                IgniteBiTuple t = rowToKeyValue(cctx, cur.iterator().next(), plan);
 
                 streamer.addData(t.getKey(), t.getValue());
 
@@ -290,8 +285,7 @@ public class DmlStatementsProcessor {
             Map<Object, Object> rows = new LinkedHashMap<>(plan.rowsNum);
 
             for (List<?> row : cur) {
-                final IgniteBiTuple t = rowToKeyValue(cctx, row.toArray(), plan.colNames, plan.colTypes,
-                    plan.keySupplier, plan.valSupplier, plan.keyColIdx, plan.valColIdx, desc);
+                final IgniteBiTuple t = rowToKeyValue(cctx, row, plan);
 
                 rows.put(t.getKey(), t.getValue());
             }
@@ -391,7 +385,7 @@ public class DmlStatementsProcessor {
     @SuppressWarnings({"unchecked", "ConstantConditions"})
     private UpdatePlan getPlanForStatement(String spaceName, PreparedStatement prepStmt,
         @Nullable Integer errKeysPos) throws IgniteCheckedException {
-        Prepared p = GridSqlQueryParser.prepared((JdbcPreparedStatement) prepStmt);
+        Prepared p = GridSqlQueryParser.prepared(prepStmt);
 
         spaceName = F.isEmpty(spaceName) ? "default" : spaceName;
 
@@ -894,7 +888,7 @@ public class DmlStatementsProcessor {
      * @param rows Rows to process.
      * @return Triple [number of rows actually changed; keys that failed to update (duplicates or concurrently
      *     updated ones); chain of exceptions for all keys whose processing resulted in error, or null for no errors].
-     * @throws IgniteCheckedException
+     * @throws IgniteCheckedException If failed.
      */
     @SuppressWarnings({"unchecked", "ConstantConditions"})
     private static PageProcessingResult processPage(GridCacheContext cctx,
@@ -927,17 +921,17 @@ public class DmlStatementsProcessor {
         Object key = plan.keySupplier.apply(row);
 
         if (GridQueryProcessor.isSqlType(desc.keyClass())) {
-            assert keyColIdx != -1;
+            assert plan.keyColIdx != -1;
 
-            key = convert(key, rowDesc, desc.keyClass(), plan.colTypes[keyColIdx]);
+            key = convert(key, rowDesc, desc.keyClass(), plan.colTypes[plan.keyColIdx]);
         }
 
         Object val = plan.valSupplier.apply(row);
 
         if (GridQueryProcessor.isSqlType(desc.valueClass())) {
-            assert valColIdx != -1;
+            assert plan.valColIdx != -1;
 
-            val = convert(val, rowDesc, desc.valueClass(), plan.colTypes[valColIdx]);
+            val = convert(val, rowDesc, desc.valueClass(), plan.colTypes[plan.valColIdx]);
         }
 
         if (key == null)
@@ -960,8 +954,7 @@ public class DmlStatementsProcessor {
 
             Class<?> expCls = prop.type();
 
-            newColVals.put(colName, convert(row.get(i), plan.colNames[i],
-                rowDesc, expCls, plan.colTypes[i]));
+            newColVals.put(colName, convert(row.get(i), rowDesc, expCls, plan.colTypes[i]));
         }
 
         // We update columns in the order specified by the table for a reason - table's

http://git-wip-us.apache.org/repos/asf/ignite/blob/e18fcda7/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index 4dcf331..8fadfeb 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@ -45,7 +45,6 @@ import org.apache.ignite.events.Event;
 import org.apache.ignite.events.EventType;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.GridTopic;
-import org.apache.ignite.internal.managers.communication.GridIoPolicy;
 import org.apache.ignite.internal.managers.communication.GridMessageListener;
 import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
@@ -85,6 +84,7 @@ import org.jsr166.ConcurrentHashMap8;
 
 import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_EXECUTED;
 import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_OBJECT_READ;
+import static org.apache.ignite.internal.managers.communication.GridIoPolicy.QUERY_POOL;
 import static org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion.NONE;
 import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.OWNING;
 import static org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.setupConnection;
@@ -709,7 +709,7 @@ public class GridMapQueryExecutor {
                 h2.reduceQueryExecutor().onMessage(ctx.localNodeId(), msg);
             }
             else
-                ctx.io().sendToGridTopic(node, GridTopic.TOPIC_QUERY, msg, GridIoPolicy.QUERY_POOL);
+                ctx.io().sendToGridTopic(node, GridTopic.TOPIC_QUERY, msg, QUERY_POOL);
         }
         catch (Exception e) {
             e.addSuppressed(err);
@@ -787,7 +787,7 @@ public class GridMapQueryExecutor {
             if (loc)
                 h2.reduceQueryExecutor().onMessage(ctx.localNodeId(), msg);
             else
-                ctx.io().sendToGridTopic(node, GridTopic.TOPIC_QUERY, msg, GridIoPolicy.QUERY_POOL);
+                ctx.io().sendToGridTopic(node, GridTopic.TOPIC_QUERY, msg, QUERY_POOL);
         }
         catch (IgniteCheckedException e) {
             log.error("Failed to send message.", e);
@@ -815,7 +815,7 @@ public class GridMapQueryExecutor {
             if (loc)
                 h2.reduceQueryExecutor().onMessage(ctx.localNodeId(), msg);
             else
-                ctx.io().sendToGridTopic(node, GridTopic.TOPIC_QUERY, msg, GridIoPolicy.QUERY_POOL);
+                ctx.io().sendToGridTopic(node, GridTopic.TOPIC_QUERY, msg, QUERY_POOL);
         }
         catch (Exception e) {
             U.warn(log, "Failed to send retry message: " + e.getMessage());


[19/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/client-near-cache.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/client-near-cache.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/client-near-cache.pug
new file mode 100644
index 0000000..cd5bcc8
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/client-near-cache.pug
@@ -0,0 +1,50 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'clientNearCache'
+-var model = 'backupItem.clientNearConfiguration'
+
+.panel.panel-default(ng-form=form novalidate ng-show='backupItem.cacheMode === "PARTITIONED"')
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Client near cache
+        ignite-form-field-tooltip.tipLabel
+            | Near cache settings for client nodes#[br]
+            | Near cache is a small local cache that stores most recently or most frequently accessed data#[br]
+            | Should be used in case when it is impossible to send computations to remote nodes
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                -var enabled = `${model}.clientNearCacheEnabled`
+
+                .settings-row
+                    +checkbox('Enabled', enabled, '"clientNacheEnabled"', 'Flag indicating whether to configure near cache')
+                .settings-row
+                    +number('Start size:', `${model}.nearStartSize`, '"clientNearStartSize"', enabled, '375000', '0',
+                        'Initial cache size for near cache which will be used to pre-create internal hash table after start')
+                .settings-row
+                    +evictionPolicy(`${model}.nearEvictionPolicy`, '"clientNearCacheEvictionPolicy"', enabled, 'false',
+                        'Near cache eviction policy\
+                        <ul>\
+                            <li>Least Recently Used (LRU) - Eviction policy based on LRU algorithm and supports batch eviction</li>\
+                            <li>First In First Out (FIFO) - Eviction policy based on FIFO algorithm and supports batch eviction</li>\
+                            <li>SORTED - Eviction policy which will select the minimum cache entry for eviction</li>\
+                        </ul>')
+            .col-sm-6
+                +preview-xml-java('backupItem', 'cacheClientNearCache')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/concurrency.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/concurrency.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/concurrency.jade
deleted file mode 100644
index ffcd568..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/concurrency.jade
+++ /dev/null
@@ -1,65 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'concurrency'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Concurrency control
-        ignite-form-field-tooltip.tipLabel
-            | Cache concurrent asynchronous operations settings
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +number('Max async operations:', model + '.maxConcurrentAsyncOperations', '"maxConcurrentAsyncOperations"', 'true', '500', '0',
-                        'Maximum number of allowed concurrent asynchronous operations<br/>\
-                        If <b>0</b> then number of concurrent asynchronous operations is unlimited')
-                .settings-row
-                    +number('Default lock timeout:', model + '.defaultLockTimeout', '"defaultLockTimeout"', 'true', '0', '0',
-                        'Default lock acquisition timeout in milliseconds<br/>\
-                        If <b>0</b> then lock acquisition will never timeout')
-                .settings-row(ng-hide='#{model}.atomicityMode === "TRANSACTIONAL"')
-                    +dropdown('Entry versioning:', model + '.atomicWriteOrderMode', '"atomicWriteOrderMode"', 'true', 'Choose versioning',
-                        '[\
-                            {value: "CLOCK", label: "CLOCK"},\
-                            {value: "PRIMARY", label: "PRIMARY"}\
-                        ]',
-                        'Write ordering mode determines which node assigns the write version, sender or the primary node\
-                        <ul>\
-                            <li>CLOCK - in this mode write versions are assigned on a sender node which generally leads to better performance</li>\
-                            <li>PRIMARY - in this mode version is assigned only on primary node. This means that sender will only send write request to primary node, which in turn will assign write version and forward it to backups</li>\
-                        </ul>')
-                .settings-row
-                    +dropdown('Write synchronization mode:', model + '.writeSynchronizationMode', '"writeSynchronizationMode"', 'true', 'PRIMARY_SYNC',
-                        '[\
-                            {value: "FULL_SYNC", label: "FULL_SYNC"},\
-                            {value: "FULL_ASYNC", label: "FULL_ASYNC"},\
-                            {value: "PRIMARY_SYNC", label: "PRIMARY_SYNC"}\
-                        ]',
-                        'Write synchronization mode\
-                        <ul>\
-                            <li>FULL_SYNC - Ignite will wait for write or commit replies from all nodes</li>\
-                            <li>FULL_ASYNC - Ignite will not wait for write or commit responses from participating nodes</li>\
-                            <li>PRIMARY_SYNC - Makes sense for PARTITIONED mode. Ignite will wait for write or commit to complete on primary node</li>\
-                        </ul>')
-            .col-sm-6
-                +preview-xml-java(model, 'cacheConcurrency')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/concurrency.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/concurrency.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/concurrency.pug
new file mode 100644
index 0000000..6458fbb
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/concurrency.pug
@@ -0,0 +1,65 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'concurrency'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Concurrency control
+        ignite-form-field-tooltip.tipLabel
+            | Cache concurrent asynchronous operations settings
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +number('Max async operations:', `${model}.maxConcurrentAsyncOperations`, '"maxConcurrentAsyncOperations"', 'true', '500', '0',
+                        'Maximum number of allowed concurrent asynchronous operations<br/>\
+                        If <b>0</b> then number of concurrent asynchronous operations is unlimited')
+                .settings-row
+                    +number('Default lock timeout:', `${model}.defaultLockTimeout`, '"defaultLockTimeout"', 'true', '0', '0',
+                        'Default lock acquisition timeout in milliseconds<br/>\
+                        If <b>0</b> then lock acquisition will never timeout')
+                .settings-row(ng-hide=`${model}.atomicityMode === 'TRANSACTIONAL'`)
+                    +dropdown('Entry versioning:', `${model}.atomicWriteOrderMode`, '"atomicWriteOrderMode"', 'true', 'Choose versioning',
+                        '[\
+                            {value: "CLOCK", label: "CLOCK"},\
+                            {value: "PRIMARY", label: "PRIMARY"}\
+                        ]',
+                        'Write ordering mode determines which node assigns the write version, sender or the primary node\
+                        <ul>\
+                            <li>CLOCK - in this mode write versions are assigned on a sender node which generally leads to better performance</li>\
+                            <li>PRIMARY - in this mode version is assigned only on primary node. This means that sender will only send write request to primary node, which in turn will assign write version and forward it to backups</li>\
+                        </ul>')
+                .settings-row
+                    +dropdown('Write synchronization mode:', `${model}.writeSynchronizationMode`, '"writeSynchronizationMode"', 'true', 'PRIMARY_SYNC',
+                        '[\
+                            {value: "FULL_SYNC", label: "FULL_SYNC"},\
+                            {value: "FULL_ASYNC", label: "FULL_ASYNC"},\
+                            {value: "PRIMARY_SYNC", label: "PRIMARY_SYNC"}\
+                        ]',
+                        'Write synchronization mode\
+                        <ul>\
+                            <li>FULL_SYNC - Ignite will wait for write or commit replies from all nodes</li>\
+                            <li>FULL_ASYNC - Ignite will not wait for write or commit responses from participating nodes</li>\
+                            <li>PRIMARY_SYNC - Makes sense for PARTITIONED mode. Ignite will wait for write or commit to complete on primary node</li>\
+                        </ul>')
+            .col-sm-6
+                +preview-xml-java(model, 'cacheConcurrency')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/general.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/general.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/general.jade
deleted file mode 100644
index 14f3ab4..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/general.jade
+++ /dev/null
@@ -1,69 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'general'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle)
-        ignite-form-panel-chevron
-        label General
-        ignite-form-field-tooltip.tipLabel
-            | Common cache configuration#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/data-grid" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id='general')
-        .panel-body
-            .col-sm-6
-                .settings-row
-                    +text('Name:', model + '.name', '"cacheName"', 'true', 'Input name', 'Cache name')
-                .settings-row
-                    +clusters(model, 'Associate clusters with the current cache')
-                .settings-row
-                    +dropdown-multiple('<span>Domain models:</span><a ui-sref="base.configuration.domains({linkId: linkId()})"> (add)</a>',
-                        model + '.domains', '"domains"', true, 'Choose domain models', 'No valid domain models configured', 'domains',
-                        'Select domain models to describe types in cache')
-                .settings-row
-                    +cacheMode('Mode:', model + '.cacheMode', '"cacheMode"', 'PARTITIONED')
-                .settings-row
-                    +dropdown('Atomicity:', model + '.atomicityMode', '"atomicityMode"', 'true', 'ATOMIC',
-                        '[\
-                            {value: "ATOMIC", label: "ATOMIC"},\
-                            {value: "TRANSACTIONAL", label: "TRANSACTIONAL"}\
-                        ]',
-                        'Atomicity:\
-                        <ul>\
-                            <li>ATOMIC - in this mode distributed transactions and distributed locking are not supported</li>\
-                            <li>TRANSACTIONAL - in this mode specified fully ACID-compliant transactional cache behavior</li>\
-                        </ul>')
-                .settings-row(data-ng-show='#{model}.cacheMode === "PARTITIONED"')
-                    +number('Backups:', model + '.backups', '"backups"', 'true', '0', '0', 'Number of nodes used to back up single partition for partitioned cache')
-                .settings-row(data-ng-show='#{model}.cacheMode === "PARTITIONED" && #{model}.backups')
-                    +checkbox('Read from backup', model + '.readFromBackup', '"readFromBackup"',
-                        'Flag indicating whether data can be read from backup<br/>\
-                        If not set then always get data from primary node (never from backup)')
-                .settings-row
-                    +checkbox('Copy on read', model + '.copyOnRead', '"copyOnRead"',
-                        'Flag indicating whether copy of the value stored in cache should be created for cache operation implying return value<br/>\
-                        Also if this flag is set copies are created for values passed to CacheInterceptor and to CacheEntryProcessor')
-                .settings-row(ng-show='#{model}.cacheMode === "PARTITIONED" && #{model}.atomicityMode === "TRANSACTIONAL"')
-                    +checkbox('Invalidate near cache', model + '.invalidate', '"invalidate"',
-                        'Invalidation flag for near cache entries in transaction<br/>\
-                        If set then values will be invalidated (nullified) upon commit in near cache')
-            .col-sm-6
-                +preview-xml-java(model, 'cacheGeneral')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/general.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/general.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/general.pug
new file mode 100644
index 0000000..89676f2
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/general.pug
@@ -0,0 +1,69 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'general'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle)
+        ignite-form-panel-chevron
+        label General
+        ignite-form-field-tooltip.tipLabel
+            | Common cache configuration#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/data-grid" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id='general')
+        .panel-body
+            .col-sm-6
+                .settings-row
+                    +text('Name:', `${model}.name`, '"cacheName"', 'true', 'Input name', 'Cache name')
+                .settings-row
+                    +clusters(model, 'Associate clusters with the current cache')
+                .settings-row
+                    +dropdown-multiple('<span>Domain models:</span><a ui-sref="base.configuration.domains({linkId: linkId()})"> (add)</a>',
+                        `${model}.domains`, '"domains"', true, 'Choose domain models', 'No valid domain models configured', 'domains',
+                        'Select domain models to describe types in cache')
+                .settings-row
+                    +cacheMode('Mode:', `${model}.cacheMode`, '"cacheMode"', 'PARTITIONED')
+                .settings-row
+                    +dropdown('Atomicity:', `${model}.atomicityMode`, '"atomicityMode"', 'true', 'ATOMIC',
+                        '[\
+                            {value: "ATOMIC", label: "ATOMIC"},\
+                            {value: "TRANSACTIONAL", label: "TRANSACTIONAL"}\
+                        ]',
+                        'Atomicity:\
+                        <ul>\
+                            <li>ATOMIC - in this mode distributed transactions and distributed locking are not supported</li>\
+                            <li>TRANSACTIONAL - in this mode specified fully ACID-compliant transactional cache behavior</li>\
+                        </ul>')
+                .settings-row(data-ng-show=`${model}.cacheMode === 'PARTITIONED'`)
+                    +number('Backups:', `${model}.backups`, '"backups"', 'true', '0', '0', 'Number of nodes used to back up single partition for partitioned cache')
+                .settings-row(data-ng-show=`${model}.cacheMode === 'PARTITIONED' && ${model}.backups`)
+                    +checkbox('Read from backup', `${model}.readFromBackup`, '"readFromBackup"',
+                        'Flag indicating whether data can be read from backup<br/>\
+                        If not set then always get data from primary node (never from backup)')
+                .settings-row
+                    +checkbox('Copy on read', `${model}.copyOnRead`, '"copyOnRead"',
+                        'Flag indicating whether copy of the value stored in cache should be created for cache operation implying return value<br/>\
+                        Also if this flag is set copies are created for values passed to CacheInterceptor and to CacheEntryProcessor')
+                .settings-row(ng-show=`${model}.cacheMode === 'PARTITIONED' && ${model}.atomicityMode === 'TRANSACTIONAL'`)
+                    +checkbox('Invalidate near cache', `${model}.invalidate`, '"invalidate"',
+                        'Invalidation flag for near cache entries in transaction<br/>\
+                        If set then values will be invalidated (nullified) upon commit in near cache')
+            .col-sm-6
+                +preview-xml-java(model, 'cacheGeneral')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/memory.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/memory.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/memory.jade
deleted file mode 100644
index e8dfb3a..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/memory.jade
+++ /dev/null
@@ -1,109 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'memory'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Memory
-        ignite-form-field-tooltip.tipLabel
-            | Cache memory settings#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/off-heap-memory" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown('Mode:', model + '.memoryMode', '"memoryMode"', 'true', 'ONHEAP_TIERED',
-                        '[\
-                            {value: "ONHEAP_TIERED", label: "ONHEAP_TIERED"},\
-                            {value: "OFFHEAP_TIERED", label: "OFFHEAP_TIERED"},\
-                            {value: "OFFHEAP_VALUES", label: "OFFHEAP_VALUES"}\
-                        ]',
-                        'Memory modes control whether value is stored in on-heap memory, off-heap memory, or swap space\
-                        <ul>\
-                            <li>\
-                                ONHEAP_TIERED - entries are cached on heap memory first<br/>\
-                                <ul>\
-                                    <li>\
-                                        If offheap memory is enabled and eviction policy evicts an entry from heap memory, entry will be moved to offheap memory<br/>\
-                                        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<br/>\
-                                        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<br/>\
-                                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<br/>\
-                                Note that in this mode entries can be evicted only to swap\
-                            </li>\
-                        </ul>')
-                .settings-row(ng-show=model + '.memoryMode !== "OFFHEAP_VALUES"')
-                    +dropdown-required('Off-heap memory:', model + '.offHeapMode', '"offHeapMode"', 'true',
-                        model + '.memoryMode === "OFFHEAP_TIERED"',
-                        'Disabled',
-                        '[\
-                            {value: -1, label: "Disabled"},\
-                            {value: 1, label: "Limited"},\
-                            {value: 0, label: "Unlimited"}\
-                        ]',
-                        'Off-heap storage mode\
-                        <ul>\
-                            <li>Disabled - Off-heap storage is disabled</li>\
-                            <li>Limited - Off-heap storage has limited size</li>\
-                            <li>Unlimited - Off-heap storage grow infinitely (it is up to user to properly add and remove entries from cache to ensure that off-heap storage does not grow infinitely)</li>\
-                        </ul>')
-                .settings-row(ng-if=model + '.offHeapMode === 1 && ' + model + '.memoryMode !== "OFFHEAP_VALUES"')
-                    +number-required('Off-heap memory max size:', model + '.offHeapMaxMemory', '"offHeapMaxMemory"', 'true',
-                        model + '.offHeapMode === 1', 'Enter off-heap memory size', '1',
-                        'Maximum amount of memory available to off-heap storage in bytes')
-                .settings-row
-                    -var onHeapTired = model + '.memoryMode === "ONHEAP_TIERED"'
-                    -var swapEnabled = model + '.swapEnabled'
-                    -var offHeapMaxMemory = model + '.offHeapMaxMemory'
-
-                    +evictionPolicy(model + '.evictionPolicy', '"evictionPolicy"', 'true',
-                        onHeapTired  + ' && (' + swapEnabled + '|| _.isNumber(' + offHeapMaxMemory + ') &&' + offHeapMaxMemory + ' >= 0)',
-                        'Optional cache eviction policy<br/>\
-                        Must be set for entries to be evicted from on-heap to off-heap or swap\
-                        <ul>\
-                            <li>Least Recently Used(LRU) - Eviction policy based on LRU algorithm and supports batch eviction</li>\
-                            <li>First In First Out (FIFO) - Eviction policy based on FIFO algorithm and supports batch eviction</li>\
-                            <li>SORTED - Eviction policy which will select the minimum cache entry for eviction</li>\
-                        </ul>')
-                .settings-row
-                    +number('Start size:', model + '.startSize', '"startSize"', 'true', '1500000', '0',
-                        'In terms of size and capacity, Ignite internal cache map acts exactly like a normal Java HashMap: it has some initial capacity\
-                        (which is pretty small by default), which doubles as data arrives. The process of internal cache map resizing is CPU-intensive\
-                        and time-consuming, and if you load a huge dataset into cache (which is a normal use case), the map will have to resize a lot of times.\
-                        To avoid that, you can specify the initial cache map capacity, comparable to the expected size of your dataset.\
-                        This will save a lot of CPU resources during the load time, because the map would not have to resize.\
-                        For example, if you expect to load 10 million entries into cache, you can set this property to 10 000 000.\
-                        This will save you from cache internal map resizes.')
-                .settings-row
-                    +checkbox('Swap enabled', model + '.swapEnabled', '"swapEnabled"', 'Flag indicating whether swap storage is enabled or not for this cache')
-            .col-sm-6
-                +preview-xml-java(model, 'cacheMemory')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/memory.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/memory.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/memory.pug
new file mode 100644
index 0000000..38482a7
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/memory.pug
@@ -0,0 +1,108 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'memory'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Memory
+        ignite-form-field-tooltip.tipLabel
+            | Cache memory settings#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/off-heap-memory" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown('Mode:', `${model}.memoryMode`, '"memoryMode"', 'true', 'ONHEAP_TIERED',
+                        '[\
+                            {value: "ONHEAP_TIERED", label: "ONHEAP_TIERED"},\
+                            {value: "OFFHEAP_TIERED", label: "OFFHEAP_TIERED"},\
+                            {value: "OFFHEAP_VALUES", label: "OFFHEAP_VALUES"}\
+                        ]',
+                        'Memory modes control whether value is stored in on-heap memory, off-heap memory, or swap space\
+                        <ul>\
+                            <li>\
+                                ONHEAP_TIERED - entries are cached on heap memory first<br/>\
+                                <ul>\
+                                    <li>\
+                                        If offheap memory is enabled and eviction policy evicts an entry from heap memory, entry will be moved to offheap memory<br/>\
+                                        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<br/>\
+                                        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<br/>\
+                                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<br/>\
+                                Note that in this mode entries can be evicted only to swap\
+                            </li>\
+                        </ul>')
+                .settings-row(ng-show=`${model}.memoryMode !== 'OFFHEAP_VALUES'`)
+                    +dropdown-required('Off-heap memory:', `${model}.offHeapMode`, '"offHeapMode"', 'true', `${model}.memoryMode === 'OFFHEAP_TIERED'`,
+                        'Disabled',
+                        '[\
+                            {value: -1, label: "Disabled"},\
+                            {value: 1, label: "Limited"},\
+                            {value: 0, label: "Unlimited"}\
+                        ]',
+                        'Off-heap storage mode\
+                        <ul>\
+                            <li>Disabled - Off-heap storage is disabled</li>\
+                            <li>Limited - Off-heap storage has limited size</li>\
+                            <li>Unlimited - Off-heap storage grow infinitely (it is up to user to properly add and remove entries from cache to ensure that off-heap storage does not grow infinitely)</li>\
+                        </ul>')
+                .settings-row(ng-if=`${model}.offHeapMode === 1 && ${model}.memoryMode !== 'OFFHEAP_VALUES'`)
+                    +number-required('Off-heap memory max size:', `${model}.offHeapMaxMemory`, '"offHeapMaxMemory"', 'true',
+                        `${model}.offHeapMode === 1`, 'Enter off-heap memory size', '1',
+                        'Maximum amount of memory available to off-heap storage in bytes')
+                .settings-row
+                    -var onHeapTired = model + '.memoryMode === "ONHEAP_TIERED"'
+                    -var swapEnabled = model + '.swapEnabled'
+                    -var offHeapMaxMemory = model + '.offHeapMaxMemory'
+
+                    +evictionPolicy(`${model}.evictionPolicy`, '"evictionPolicy"', 'true',
+                        onHeapTired  + ' && (' + swapEnabled + '|| _.isNumber(' + offHeapMaxMemory + ') &&' + offHeapMaxMemory + ' >= 0)',
+                        'Optional cache eviction policy<br/>\
+                        Must be set for entries to be evicted from on-heap to off-heap or swap\
+                        <ul>\
+                            <li>Least Recently Used(LRU) - Eviction policy based on LRU algorithm and supports batch eviction</li>\
+                            <li>First In First Out (FIFO) - Eviction policy based on FIFO algorithm and supports batch eviction</li>\
+                            <li>SORTED - Eviction policy which will select the minimum cache entry for eviction</li>\
+                        </ul>')
+                .settings-row
+                    +number('Start size:', `${model}.startSize`, '"startSize"', 'true', '1500000', '0',
+                        'In terms of size and capacity, Ignite internal cache map acts exactly like a normal Java HashMap: it has some initial capacity\
+                        (which is pretty small by default), which doubles as data arrives. The process of internal cache map resizing is CPU-intensive\
+                        and time-consuming, and if you load a huge dataset into cache (which is a normal use case), the map will have to resize a lot of times.\
+                        To avoid that, you can specify the initial cache map capacity, comparable to the expected size of your dataset.\
+                        This will save a lot of CPU resources during the load time, because the map would not have to resize.\
+                        For example, if you expect to load 10 million entries into cache, you can set this property to 10 000 000.\
+                        This will save you from cache internal map resizes.')
+                .settings-row
+                    +checkbox('Swap enabled', `${model}.swapEnabled`, '"swapEnabled"', 'Flag indicating whether swap storage is enabled or not for this cache')
+            .col-sm-6
+                +preview-xml-java(model, 'cacheMemory')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-client.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-client.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-client.jade
deleted file mode 100644
index 56f7e64..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-client.jade
+++ /dev/null
@@ -1,51 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'clientNearCache'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate ng-show='backupItem.cacheMode === "PARTITIONED"')
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Near cache on client node
-        ignite-form-field-tooltip.tipLabel
-            | Near cache settings for client nodes#[br]
-            | Near cache is a small local cache that stores most recently or most frequently accessed data#[br]
-            | Should be used in case when it is impossible to send computations to remote nodes
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                -var nearCfg = model + '.clientNearConfiguration'
-                -var enabled = nearCfg + '.enabled'
-
-                .settings-row
-                    +checkbox('Enabled', enabled, '"clientNearEnabled"', 'Flag indicating whether to configure near cache')
-                .settings-row
-                    +number('Start size:', nearCfg + '.nearStartSize', '"clientNearStartSize"', enabled, '375000', '0',
-                        'Initial cache size for near cache which will be used to pre-create internal hash table after start')
-                .settings-row
-                    +evictionPolicy(nearCfg + '.nearEvictionPolicy', '"clientNearCacheEvictionPolicy"', enabled, 'false',
-                        'Near cache eviction policy\
-                        <ul>\
-                            <li>Least Recently Used (LRU) - Eviction policy based on LRU algorithm and supports batch eviction</li>\
-                            <li>First In First Out (FIFO) - Eviction policy based on FIFO algorithm and supports batch eviction</li>\
-                            <li>SORTED - Eviction policy which will select the minimum cache entry for eviction</li>\
-                        </ul>')
-            .col-sm-6
-                +preview-xml-java(model, 'cacheNearClient')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-client.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-client.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-client.pug
new file mode 100644
index 0000000..499dd2d
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-client.pug
@@ -0,0 +1,51 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'clientNearCache'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate ng-show=`${model}.cacheMode === 'PARTITIONED'`)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Near cache on client node
+        ignite-form-field-tooltip.tipLabel
+            | Near cache settings for client nodes#[br]
+            | Near cache is a small local cache that stores most recently or most frequently accessed data#[br]
+            | Should be used in case when it is impossible to send computations to remote nodes
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                -var nearCfg = `${model}.clientNearConfiguration`
+                -var enabled = `${nearCfg}.enabled`
+
+                .settings-row
+                    +checkbox('Enabled', enabled, '"clientNearEnabled"', 'Flag indicating whether to configure near cache')
+                .settings-row
+                    +number('Start size:', `${nearCfg}.nearStartSize`, '"clientNearStartSize"', enabled, '375000', '0',
+                        'Initial cache size for near cache which will be used to pre-create internal hash table after start')
+                .settings-row
+                    +evictionPolicy(`${nearCfg}.nearEvictionPolic`, '"clientNearCacheEvictionPolicy"', enabled, 'false',
+                        'Near cache eviction policy\
+                        <ul>\
+                            <li>Least Recently Used (LRU) - Eviction policy based on LRU algorithm and supports batch eviction</li>\
+                            <li>First In First Out (FIFO) - Eviction policy based on FIFO algorithm and supports batch eviction</li>\
+                            <li>SORTED - Eviction policy which will select the minimum cache entry for eviction</li>\
+                        </ul>')
+            .col-sm-6
+                +preview-xml-java(model, 'cacheNearClient')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-server.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-server.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-server.jade
deleted file mode 100644
index 9895281..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-server.jade
+++ /dev/null
@@ -1,52 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'serverNearCache'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate ng-show='#{model}.cacheMode === "PARTITIONED"')
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Near cache on server node
-        ignite-form-field-tooltip.tipLabel
-            | Near cache settings#[br]
-            | Near cache is a small local cache that stores most recently or most frequently accessed data#[br]
-            | Should be used in case when it is impossible to send computations to remote nodes#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/near-caches" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                -var nearCfg = model + '.nearConfiguration'
-                -var enabled = nearCfg + '.enabled'
-
-                .settings-row
-                    +checkbox('Enabled', enabled, '"nearCacheEnabled"', 'Flag indicating whether to configure near cache')
-                .settings-row
-                    +number('Start size:', nearCfg + '.nearStartSize', '"nearStartSize"', enabled, '375000', '0',
-                        'Initial cache size for near cache which will be used to pre-create internal hash table after start')
-                .settings-row
-                    +evictionPolicy(model + '.nearConfiguration.nearEvictionPolicy', '"nearCacheEvictionPolicy"', enabled, 'false',
-                        'Near cache eviction policy\
-                        <ul>\
-                            <li>Least Recently Used (LRU) - Eviction policy based on LRU algorithm and supports batch eviction</li>\
-                            <li>First In First Out (FIFO) - Eviction policy based on FIFO algorithm and supports batch eviction</li>\
-                            <li>SORTED - Eviction policy which will select the minimum cache entry for eviction</li>\
-                        </ul>')
-            .col-sm-6
-                +preview-xml-java(model, 'cacheNearServer')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-server.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-server.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-server.pug
new file mode 100644
index 0000000..2efe43a
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/near-cache-server.pug
@@ -0,0 +1,52 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'serverNearCache'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate ng-show=`${model}.cacheMode === 'PARTITIONED'`)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Near cache on server node
+        ignite-form-field-tooltip.tipLabel
+            | Near cache settings#[br]
+            | Near cache is a small local cache that stores most recently or most frequently accessed data#[br]
+            | Should be used in case when it is impossible to send computations to remote nodes#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/near-caches" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                -var nearCfg = `${model}.nearConfiguration`
+                -var enabled = `${nearCfg}.enabled`
+
+                .settings-row
+                    +checkbox('Enabled', enabled, '"nearCacheEnabled"', 'Flag indicating whether to configure near cache')
+                .settings-row
+                    +number('Start size:', `${nearCfg}.nearStartSize`, '"nearStartSize"', enabled, '375000', '0',
+                        'Initial cache size for near cache which will be used to pre-create internal hash table after start')
+                .settings-row
+                    +evictionPolicy(`${model}.nearConfiguration.nearEvictionPolicy`, '"nearCacheEvictionPolicy"', enabled, 'false',
+                        'Near cache eviction policy\
+                        <ul>\
+                            <li>Least Recently Used (LRU) - Eviction policy based on LRU algorithm and supports batch eviction</li>\
+                            <li>First In First Out (FIFO) - Eviction policy based on FIFO algorithm and supports batch eviction</li>\
+                            <li>SORTED - Eviction policy which will select the minimum cache entry for eviction</li>\
+                        </ul>')
+            .col-sm-6
+                +preview-xml-java(model, 'cacheNearServer')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.jade
deleted file mode 100644
index bcac5ad..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'nodeFilter'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label(id='nodeFilter-title') Node filter
-        ignite-form-field-tooltip.tipLabel
-            | Determines on what nodes the cache should be started
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    -var nodeFilter = model + '.nodeFilter';
-                    -var nodeFilterKind = nodeFilter + '.kind';
-
-                    +dropdown('Node filter:', nodeFilterKind, '"nodeFilter"', 'true', 'Not set',
-                        '[\
-                            {value: "IGFS", label: "IGFS nodes"},\
-                            {value: "Custom", label: "Custom"},\
-                            {value: undefined, label: "Not set"}\
-                        ]',
-                        'Node filter variant'
-                    )
-                .settings-row(ng-show=nodeFilterKind)
-                    div(ng-show='#{nodeFilterKind} === "IGFS"')
-                        -var igfsNodeFilter = nodeFilter + '.IGFS'
-                        -var required = nodeFilterKind + ' === "IGFS"'
-
-                        //(lbl, model, name, enabled, required, placeholder, options, tip)
-                        +dropdown-required-empty('IGFS:', igfsNodeFilter + '.igfs', '"igfsNodeFilter"', 'true', required,
-                            'Choose IGFS', 'No IGFS configured', 'igfss', 'Select IGFS to filter nodes')
-                    div(ng-show='#{nodeFilterKind} === "Custom"')
-                        -var customNodeFilter = nodeFilter + '.Custom'
-                        -var required = nodeFilterKind + ' === "Custom"'
-
-                        +java-class('Class name:', customNodeFilter + '.className', '"customNodeFilter"',
-                            'true', required, 'Class name of custom node filter implementation', required)
-            .col-sm-6
-                +preview-xml-java(model, 'cacheNodeFilter', 'igfss')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.pug
new file mode 100644
index 0000000..6715dcd
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.pug
@@ -0,0 +1,59 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'nodeFilter'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label(id='nodeFilter-title') Node filter
+        ignite-form-field-tooltip.tipLabel
+            | Determines on what nodes the cache should be started
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    -var nodeFilter = model + '.nodeFilter';
+                    -var nodeFilterKind = nodeFilter + '.kind';
+
+                    +dropdown('Node filter:', nodeFilterKind, '"nodeFilter"', 'true', 'Not set',
+                        '[\
+                            {value: "IGFS", label: "IGFS nodes"},\
+                            {value: "Custom", label: "Custom"},\
+                            {value: undefined, label: "Not set"}\
+                        ]',
+                        'Node filter variant'
+                    )
+                .settings-row(ng-show=nodeFilterKind)
+                    div(ng-show=`${nodeFilterKind} === 'IGFS'`)
+                        -var igfsNodeFilter = `${nodeFilter}.IGFS`
+                        -var required = `${nodeFilterKind} === 'IGFS'`
+
+                        //(lbl, model, name, enabled, required, placeholder, options, tip)
+                        +dropdown-required-empty('IGFS:', `${igfsNodeFilter}.igfs`, '"igfsNodeFilter"', 'true', required,
+                            'Choose IGFS', 'No IGFS configured', 'igfss', 'Select IGFS to filter nodes')
+                    div(ng-show=`${nodeFilterKind} === 'Custom'`)
+                        -var customNodeFilter = `${nodeFilter}.Custom`
+                        -var required = `${nodeFilterKind} === 'Custom'`
+
+                        +java-class('Class name:', `${customNodeFilter}.className`, '"customNodeFilter"',
+                            'true', required, 'Class name of custom node filter implementation', required)
+            .col-sm-6
+                +preview-xml-java(model, 'cacheNodeFilter', 'igfss')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/query.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/query.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/query.jade
deleted file mode 100644
index cfbaf12..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/query.jade
+++ /dev/null
@@ -1,114 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'query'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Queries & Indexing
-        ignite-form-field-tooltip.tipLabel
-            | Cache queries settings#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/sql-queries" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +text('SQL schema name:', model + '.sqlSchema', '"sqlSchema"', 'false', 'Input schema name',
-                        'Specify any custom name to be used as SQL schema for current cache. This name will correspond to SQL ANSI-99 standard.\
-                        Nonquoted identifiers are not case sensitive. Quoted identifiers are case sensitive.\
-                        When SQL schema is not specified, quoted cache name should used instead.<br/>\
-                        For example:\
-                        <ul>\
-                            <li>\
-                                Query without schema names (quoted cache names will be used):\
-                                SELECT * FROM "PersonsCache".Person p INNER JOIN "OrganizationsCache".Organization o on p.org = o.id\
-                            </li>\
-                            <li>\
-                                The same query using schema names "Persons" and "Organizations":\
-                                SELECT * FROM Persons.Person p INNER JOIN Organizations.Organization o on p.org = o.id\
-                            </li>\
-                        </ul>')
-                .settings-row
-                    +number('On-heap cache for off-heap indexes:', model + '.sqlOnheapRowCacheSize', '"sqlOnheapRowCacheSize"', 'true', '10240', '1',
-                        'Number of SQL rows which will be cached onheap to avoid deserialization on each SQL index access')
-                .settings-row
-                    +number('Long query timeout:', model + '.longQueryWarningTimeout', '"longQueryWarningTimeout"', 'true', '3000', '0',
-                        'Timeout in milliseconds after which long query warning will be printed')
-                .settings-row
-                    +number('History size:', model + '.queryDetailMetricsSize', '"queryDetailMetricsSize"', 'true', '0', '0',
-                        'Size of queries detail metrics that will be stored in memory for monitoring purposes')
-                .settings-row
-                    -var form = 'querySqlFunctionClasses';
-                    -var sqlFunctionClasses = model + '.sqlFunctionClasses';
-
-                    +ignite-form-group(ng-form=form ng-model=sqlFunctionClasses)
-                        ignite-form-field-label
-                            | SQL functions
-                        ignite-form-group-tooltip
-                            | Collections of classes with user-defined functions for SQL queries
-                        ignite-form-group-add(ng-click='group.add = [{}]')
-                            | Add new user-defined functions for SQL queries
-
-                        -var uniqueTip = 'SQL function with such class name already exists!'
-
-                        .group-content(ng-if='#{sqlFunctionClasses}.length')
-                            -var model = 'obj.model';
-                            -var name = '"edit" + $index'
-                            -var valid = form + '[' + name + '].$valid'
-                            -var save = sqlFunctionClasses + '[$index] = ' + model
-
-                            div(ng-repeat='model in #{sqlFunctionClasses} track by $index' ng-init='obj = {}')
-                                label.col-xs-12.col-sm-12.col-md-12
-                                    .indexField
-                                        | {{ $index+1 }})
-                                    +table-remove-button(sqlFunctionClasses, 'Remove user-defined function')
-
-                                    span(ng-hide='field.edit')
-                                        a.labelFormField(ng-click='field.edit = true; #{model} = model;') {{ model }}
-                                    span(ng-if='field.edit')
-                                        +table-java-class-field('SQL function', name, model, sqlFunctionClasses, valid, save, false)
-                                            +table-save-button(valid, save, false)
-                                            +unique-feedback(name, uniqueTip)
-
-                        .group-content(ng-repeat='field in group.add')
-                            -var model = 'new';
-                            -var name = '"new"'
-                            -var valid = form + '[' + name + '].$valid'
-                            -var save = sqlFunctionClasses + '.push(' + model + ')'
-
-                            div
-                                label.col-xs-12.col-sm-12.col-md-12
-                                    +table-java-class-field('SQL function', name, model, sqlFunctionClasses, valid, save, true)
-                                        +table-save-button(valid, save, true)
-                                        +unique-feedback(name, uniqueTip)
-
-                        .group-content-empty(ng-if='!(#{sqlFunctionClasses}.length) && !group.add.length')
-                            | Not defined
-                .settings-row
-                    +checkbox('Snapshotable index', model + '.snapshotableIndex', '"snapshotableIndex"',
-                        'Flag indicating whether SQL indexes should support snapshots')
-                .settings-row
-                    +checkbox('Escape table and filed names', model + '.sqlEscapeAll', '"sqlEscapeAll"',
-                        'If enabled than all schema, table and field names will be escaped with double quotes (for example: "tableName"."fieldName").<br/>\
-                        This enforces case sensitivity for field names and also allows having special characters in table and field names.<br/>\
-                        Escaped names will be used for creation internal structures in Ignite SQL engine.')
-            .col-sm-6
-                +preview-xml-java(model, 'cacheQuery', 'domains')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/query.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/query.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/query.pug
new file mode 100644
index 0000000..5bb515a
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/query.pug
@@ -0,0 +1,114 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'query'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Queries & Indexing
+        ignite-form-field-tooltip.tipLabel
+            | Cache queries settings#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/sql-queries" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +text('SQL schema name:', `${model}.sqlSchema`, '"sqlSchema"', 'false', 'Input schema name',
+                        'Specify any custom name to be used as SQL schema for current cache. This name will correspond to SQL ANSI-99 standard.\
+                        Nonquoted identifiers are not case sensitive. Quoted identifiers are case sensitive.\
+                        When SQL schema is not specified, quoted cache name should used instead.<br/>\
+                        For example:\
+                        <ul>\
+                            <li>\
+                                Query without schema names (quoted cache names will be used):\
+                                SELECT * FROM "PersonsCache".Person p INNER JOIN "OrganizationsCache".Organization o on p.org = o.id\
+                            </li>\
+                            <li>\
+                                The same query using schema names "Persons" and "Organizations":\
+                                SELECT * FROM Persons.Person p INNER JOIN Organizations.Organization o on p.org = o.id\
+                            </li>\
+                        </ul>')
+                .settings-row
+                    +number('On-heap cache for off-heap indexes:', `${model}.sqlOnheapRowCacheSize`, '"sqlOnheapRowCacheSize"', 'true', '10240', '1',
+                        'Number of SQL rows which will be cached onheap to avoid deserialization on each SQL index access')
+                .settings-row
+                    +number('Long query timeout:', `${model}.longQueryWarningTimeout`, '"longQueryWarningTimeout"', 'true', '3000', '0',
+                        'Timeout in milliseconds after which long query warning will be printed')
+                .settings-row
+                    +number('History size:', `${model}.queryDetailMetricsSize`, '"queryDetailMetricsSize"', 'true', '0', '0',
+                        'Size of queries detail metrics that will be stored in memory for monitoring purposes')
+                .settings-row
+                    -var form = 'querySqlFunctionClasses';
+                    -var sqlFunctionClasses = `${model}.sqlFunctionClasses`;
+
+                    +ignite-form-group(ng-form=form ng-model=`${sqlFunctionClasses}`)
+                        ignite-form-field-label
+                            | SQL functions
+                        ignite-form-group-tooltip
+                            | Collections of classes with user-defined functions for SQL queries
+                        ignite-form-group-add(ng-click='group.add = [{}]')
+                            | Add new user-defined functions for SQL queries
+
+                        -var uniqueTip = 'SQL function with such class name already exists!'
+
+                        .group-content(ng-if=`${sqlFunctionClasses}.length`)
+                            -var model = 'obj.model';
+                            -var name = '"edit" + $index'
+                            -var valid = `${form}[${name}].$valid`
+                            -var save = `${sqlFunctionClasses}[$index] = ${model}`
+
+                            div(ng-repeat=`model in ${sqlFunctionClasses} track by $index` ng-init='obj = {}')
+                                label.col-xs-12.col-sm-12.col-md-12
+                                    .indexField
+                                        | {{ $index+1 }})
+                                    +table-remove-button(sqlFunctionClasses, 'Remove user-defined function')
+
+                                    span(ng-hide='field.edit')
+                                        a.labelFormField(ng-click=`field.edit = true; ${model} = model;`) {{ model }}
+                                    span(ng-if='field.edit')
+                                        +table-java-class-field('SQL function', name, model, sqlFunctionClasses, valid, save, false)
+                                            +table-save-button(valid, save, false)
+                                            +unique-feedback(name, uniqueTip)
+
+                        .group-content(ng-repeat='field in group.add')
+                            -var model = 'new';
+                            -var name = '"new"'
+                            -var valid = `${form}[${name}].$valid`
+                            -var save = `${sqlFunctionClasses}.push(${model})`
+
+                            div
+                                label.col-xs-12.col-sm-12.col-md-12
+                                    +table-java-class-field('SQL function', name, model, sqlFunctionClasses, valid, save, true)
+                                        +table-save-button(valid, save, true)
+                                        +unique-feedback(name, uniqueTip)
+
+                        .group-content-empty(ng-if=`!(${sqlFunctionClasses}.length) && !group.add.length`)
+                            | Not defined
+                .settings-row
+                    +checkbox('Snapshotable index', `${model}.snapshotableIndex`, '"snapshotableIndex"',
+                        'Flag indicating whether SQL indexes should support snapshots')
+                .settings-row
+                    +checkbox('Escape table and filed names', `${model}.sqlEscapeAll`, '"sqlEscapeAll"',
+                        'If enabled than all schema, table and field names will be escaped with double quotes (for example: "tableName"."fieldName").<br/>\
+                        This enforces case sensitivity for field names and also allows having special characters in table and field names.<br/>\
+                        Escaped names will be used for creation internal structures in Ignite SQL engine.')
+            .col-sm-6
+                +preview-xml-java(model, 'cacheQuery', 'domains')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/rebalance.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/rebalance.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/rebalance.jade
deleted file mode 100644
index d8ef3ad..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/rebalance.jade
+++ /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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'rebalance'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate ng-hide='#{model}.cacheMode === "LOCAL"')
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Rebalance
-        ignite-form-field-tooltip.tipLabel
-            | Cache rebalance settings#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/rebalancing" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown('Mode:', model + '.rebalanceMode', '"rebalanceMode"', 'true', 'ASYNC',
-                        '[\
-                            {value: "SYNC", label: "SYNC"},\
-                            {value: "ASYNC", label: "ASYNC"},\
-                            {value: "NONE", label: "NONE"}\
-                        ]',
-                        '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>')
-                    .settings-row
-                        +number('Batch size:', model + '.rebalanceBatchSize', '"rebalanceBatchSize"', 'true', '512 * 1024', '1',
-                            'Size (in bytes) to be loaded within a single rebalance message<br/>\
-                            Rebalancing algorithm will split total data set on every node into multiple batches prior to sending data')
-                    .settings-row
-                        +number('Batches prefetch count:', model + '.rebalanceBatchesPrefetchCount', '"rebalanceBatchesPrefetchCount"', 'true', '2', '1',
-                            'Number of batches generated by supply node at rebalancing start')
-                    .settings-row
-                        +number('Order:', model + '.rebalanceOrder', '"rebalanceOrder"', 'true', '0', Number.MIN_SAFE_INTEGER,
-                            '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')
-                    .settings-row
-                        +number('Delay:', model + '.rebalanceDelay', '"rebalanceDelay"', 'true', '0', '0',
-                            'Delay in milliseconds upon a node joining or leaving topology (or crash) after which rebalancing should be started automatically')
-                    .settings-row
-                        +number('Timeout:', model + '.rebalanceTimeout', '"rebalanceTimeout"', 'true', '10000', '0',
-                            'Rebalance timeout in milliseconds')
-                    .settings-row
-                        +number('Throttle:', model + '.rebalanceThrottle', '"rebalanceThrottle"', 'true', '0', '0',
-                            'Time in milliseconds to wait between rebalance messages to avoid overloading of CPU or network')
-            .col-sm-6
-                +preview-xml-java(model, 'cacheRebalance')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/rebalance.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/rebalance.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/rebalance.pug
new file mode 100644
index 0000000..9850d17
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/rebalance.pug
@@ -0,0 +1,66 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'rebalance'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate ng-hide=`${model}.cacheMode === "LOCAL"`)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Rebalance
+        ignite-form-field-tooltip.tipLabel
+            | Cache rebalance settings#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/rebalancing" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown('Mode:', `${model}.rebalanceMode`, '"rebalanceMode"', 'true', 'ASYNC',
+                        '[\
+                            {value: "SYNC", label: "SYNC"},\
+                            {value: "ASYNC", label: "ASYNC"},\
+                            {value: "NONE", label: "NONE"}\
+                        ]',
+                        '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>')
+                    .settings-row
+                        +number('Batch size:', `${model}.rebalanceBatchSize`, '"rebalanceBatchSize"', 'true', '512 * 1024', '1',
+                            'Size (in bytes) to be loaded within a single rebalance message<br/>\
+                            Rebalancing algorithm will split total data set on every node into multiple batches prior to sending data')
+                    .settings-row
+                        +number('Batches prefetch count:', `${model}.rebalanceBatchesPrefetchCount`, '"rebalanceBatchesPrefetchCount"', 'true', '2', '1',
+                            'Number of batches generated by supply node at rebalancing start')
+                    .settings-row
+                        +number('Order:', `${model}.rebalanceOrder`, '"rebalanceOrder"', 'true', '0', Number.MIN_SAFE_INTEGER,
+                            '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')
+                    .settings-row
+                        +number('Delay:', `${model}.rebalanceDelay`, '"rebalanceDelay"', 'true', '0', '0',
+                            'Delay in milliseconds upon a node joining or leaving topology (or crash) after which rebalancing should be started automatically')
+                    .settings-row
+                        +number('Timeout:', `${model}.rebalanceTimeout`, '"rebalanceTimeout"', 'true', '10000', '0',
+                            'Rebalance timeout in milliseconds')
+                    .settings-row
+                        +number('Throttle:', `${model}.rebalanceThrottle`, '"rebalanceThrottle"', 'true', '0', '0',
+                            'Time in milliseconds to wait between rebalance messages to avoid overloading of CPU or network')
+            .col-sm-6
+                +preview-xml-java(model, 'cacheRebalance')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/statistics.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/statistics.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/statistics.jade
deleted file mode 100644
index 9f7a346..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/statistics.jade
+++ /dev/null
@@ -1,39 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'statistics'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Statistics
-        ignite-form-field-tooltip.tipLabel
-            | Cache statistics and management settings
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +checkbox('Statistics enabled', model + '.statisticsEnabled', '"statisticsEnabled"', 'Flag indicating whether statistics gathering is enabled on this cache')
-                .settings-row
-                    +checkbox('Management enabled', model + '.managementEnabled', '"managementEnabled"',
-                    'Flag indicating whether management is enabled on this cache<br/>\
-                    If enabled the CacheMXBean for each cache is registered in the platform MBean server')
-            .col-sm-6
-                +preview-xml-java(model, 'cacheStatistics')


[06/50] [abbrv] ignite git commit: Implemented support for enforce join order flag. (cherry picked from commit a7f77d4)

Posted by sb...@apache.org.
Implemented support for enforce join order flag.
(cherry picked from commit a7f77d4)


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

Branch: refs/heads/ignite-4705-2
Commit: bc9fcf7f6aaeba826df6a35f1a9aacb17a562337
Parents: bea863f
Author: Alexey Kuznetsov <ak...@gridgain.com>
Authored: Wed Mar 1 22:09:40 2017 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Mar 2 14:12:05 2017 +0700

----------------------------------------------------------------------
 .../internal/visor/query/VisorQueryArgV3.java   | 51 ++++++++++++++++++++
 .../internal/visor/query/VisorQueryJob.java     |  6 +--
 .../resources/META-INF/classnames.properties    |  1 +
 3 files changed, 55 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bc9fcf7f/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArgV3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArgV3.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArgV3.java
new file mode 100644
index 0000000..f32c00a
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArgV3.java
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.visor.query;
+
+/**
+ * Arguments for {@link VisorQueryTask}.
+ */
+public class VisorQueryArgV3 extends VisorQueryArgV2 {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Enforce join order flag. */
+    private final boolean enforceJoinOrder;
+
+    /**
+     * @param cacheName Cache name for query.
+     * @param qryTxt Query text.
+     * @param distributedJoins If {@code true} then distributed joins enabled.
+     * @param enforceJoinOrder If {@code true} then enforce join order.
+     * @param loc Flag whether to execute query locally.
+     * @param pageSize Result batch size.
+     */
+    public VisorQueryArgV3(String cacheName, String qryTxt,
+        boolean distributedJoins, boolean enforceJoinOrder, boolean loc, int pageSize) {
+        super(cacheName, qryTxt, distributedJoins, loc, pageSize);
+
+        this.enforceJoinOrder = enforceJoinOrder;
+    }
+
+    /**
+     * @return Enforce join order flag.
+     */
+    public boolean enforceJoinOrder() {
+        return enforceJoinOrder;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/bc9fcf7f/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
index c66b2dd..1ac90ad 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
@@ -131,9 +131,8 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
                 if (scanWithFilter) {
                     boolean caseSensitive = qryTxt.startsWith(SCAN_CACHE_WITH_FILTER_CASE_SENSITIVE);
 
-                    String ptrn = caseSensitive
-                        ? qryTxt.substring(SCAN_CACHE_WITH_FILTER_CASE_SENSITIVE.length())
-                        : qryTxt.substring(SCAN_CACHE_WITH_FILTER.length());
+                    String ptrn = qryTxt.substring(
+                        caseSensitive ? SCAN_CACHE_WITH_FILTER_CASE_SENSITIVE.length() : SCAN_CACHE_WITH_FILTER.length());
 
                     filter = new VisorQueryScanSubstringFilter(caseSensitive, ptrn);
                 }
@@ -162,6 +161,7 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
                 qry.setPageSize(arg.pageSize());
                 qry.setLocal(arg.local());
                 qry.setDistributedJoins(arg instanceof VisorQueryArgV2 && ((VisorQueryArgV2)arg).distributedJoins());
+                qry.setEnforceJoinOrder(arg instanceof VisorQueryArgV3 && ((VisorQueryArgV3)arg).enforceJoinOrder());
 
                 long start = U.currentTimeMillis();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/bc9fcf7f/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties
index c0a6407..8cfed3a 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -1822,6 +1822,7 @@ org.apache.ignite.internal.visor.node.VisorSpisConfiguration
 org.apache.ignite.internal.visor.node.VisorTransactionConfiguration
 org.apache.ignite.internal.visor.query.VisorQueryArg
 org.apache.ignite.internal.visor.query.VisorQueryArgV2
+org.apache.ignite.internal.visor.query.VisorQueryArgV3
 org.apache.ignite.internal.visor.query.VisorQueryCleanupTask
 org.apache.ignite.internal.visor.query.VisorQueryCleanupTask$VisorQueryCleanupJob
 org.apache.ignite.internal.visor.query.VisorQueryField


[50/50] [abbrv] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-2.0' into ignite-4705-2

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-2.0' into ignite-4705-2

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
#	modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java


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

Branch: refs/heads/ignite-4705-2
Commit: 8ec5c8e0a244d442ee07b8ad75538c90770a82c5
Parents: 9db6989 aab4f30
Author: sboikov <sb...@gridgain.com>
Authored: Mon Mar 13 12:45:54 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Mar 13 12:45:54 2017 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |    2 +-
 RELEASE_NOTES.txt                               |   20 +
 assembly/dependencies-hadoop.xml                |    3 +
 assembly/release-base.xml                       |    5 -
 assembly/release-fabric-base.xml                |    5 +
 assembly/release-sources.xml                    |    3 +-
 config/example-kube.xml                         |   53 +
 doap_Ignite.rdf                                 |    1 -
 examples/pom-standalone-lgpl.xml                |   12 +
 examples/pom-standalone.xml                     |   12 +
 examples/pom.xml                                |   14 +
 .../examples/java8/spark/SharedRDDExample.java  |  110 --
 .../ignite/examples/spark/SharedRDDExample.java |  127 ++
 .../ignite/examples/spark/package-info.java     |   22 +
 .../examples/SharedRDDExampleSelfTest.java      |   36 -
 .../IgniteExamplesJ8SelfTestSuite.java          |    2 -
 .../examples/SharedRDDExampleSelfTest.java      |   36 +
 .../IgniteExamplesSparkSelfTestSuite.java       |   46 +
 modules/clients/src/test/config/jdbc-config.xml |    2 +-
 .../jdbc2/JdbcAbstractDmlStatementSelfTest.java |   49 +-
 .../jdbc2/JdbcInsertStatementSelfTest.java      |   51 +
 .../jdbc2/JdbcMergeStatementSelfTest.java       |   51 +
 .../internal/jdbc2/JdbcStreamingSelfTest.java   |  187 ++
 .../jdbc2/JdbcUpdateStatementSelfTest.java      |   50 +
 .../tcp/redis/RedisProtocolSelfTest.java        |   13 +-
 .../jdbc/suite/IgniteJdbcDriverTestSuite.java   |    1 +
 .../src/main/java/org/apache/ignite/Ignite.java |    1 +
 .../java/org/apache/ignite/IgniteCompute.java   |   44 +-
 .../org/apache/ignite/IgniteJdbcDriver.java     |   30 +
 .../apache/ignite/IgniteSystemProperties.java   |   38 +
 .../configuration/CacheConfiguration.java       |   41 +
 .../ignite/internal/binary/BinaryContext.java   |    3 +
 .../ignite/internal/binary/BinaryTreeMap.java   |    6 +-
 .../ignite/internal/jdbc2/JdbcConnection.java   |   72 +-
 .../internal/jdbc2/JdbcPreparedStatement.java   |   34 +-
 .../ignite/internal/jdbc2/JdbcStatement.java    |   20 +-
 .../jdbc2/JdbcStreamedPreparedStatement.java    |   59 +
 .../internal/managers/discovery/DiscoCache.java |  310 ++++
 .../discovery/GridDiscoveryManager.java         |  568 ++----
 .../eventstorage/DiscoveryEventListener.java    |   33 +
 .../eventstorage/GridEventStorageManager.java   |  162 +-
 .../affinity/GridAffinityAssignmentCache.java   |    7 +-
 .../cache/CacheAffinitySharedManager.java       |   35 +-
 .../processors/cache/EntryGetResult.java        |   40 +-
 .../processors/cache/EntryGetWithTtlResult.java |   58 +
 .../processors/cache/GridCacheAdapter.java      |   69 +-
 .../cache/GridCacheAffinityManager.java         |    3 +-
 .../processors/cache/GridCacheContext.java      |  122 +-
 .../processors/cache/GridCacheEntryEx.java      |    2 +-
 .../processors/cache/GridCacheMapEntry.java     |   29 +-
 .../GridCachePartitionExchangeManager.java      |   64 +-
 .../processors/cache/GridCacheProcessor.java    |    3 +
 .../processors/cache/IgniteCacheProxy.java      |    6 +-
 .../dht/GridClientPartitionTopology.java        |   20 +-
 .../dht/GridDhtAssignmentFetchFuture.java       |    7 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |    4 +-
 .../cache/distributed/dht/GridDhtGetFuture.java |   24 +-
 .../distributed/dht/GridDhtGetSingleFuture.java |   24 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |   44 +-
 .../dht/GridPartitionedGetFuture.java           |   19 +-
 .../dht/GridPartitionedSingleGetFuture.java     |    7 +-
 .../dht/atomic/GridDhtAtomicCache.java          |   12 +-
 .../dht/colocated/GridDhtColocatedCache.java    |   15 +-
 .../GridDhtPartitionsExchangeFuture.java        |   33 +-
 .../distributed/near/GridNearGetFuture.java     |    9 +-
 .../cache/distributed/near/GridNearTxLocal.java |   10 +-
 .../local/atomic/GridLocalAtomicCache.java      |   13 +-
 .../cache/query/GridCacheQueryManager.java      |   18 -
 .../cache/query/GridCacheSqlQuery.java          |  127 +-
 .../transactions/IgniteTxLocalAdapter.java      |   65 +-
 .../closure/GridClosureProcessor.java           |    2 +-
 .../processors/cluster/GridUpdateNotifier.java  |    2 +-
 .../datastructures/DataStructuresProcessor.java |    3 +-
 .../datastructures/GridCacheLockImpl.java       |   17 +-
 .../processors/query/GridQueryIndexing.java     |   66 +-
 .../processors/query/GridQueryProcessor.java    |  312 +---
 .../messages/GridQueryNextPageRequest.java      |   29 +-
 .../messages/GridQueryNextPageResponse.java     |   29 +-
 .../handlers/cache/GridCacheCommandHandler.java |   27 +-
 .../redis/GridRedisRestCommandHandler.java      |   36 +
 .../string/GridRedisSetCommandHandler.java      |   43 +-
 .../service/GridServiceProcessor.java           |   21 +-
 .../ignite/internal/util/IgniteUtils.java       |   14 +-
 .../visor/cache/VisorCacheClearTask.java        |   57 +-
 .../internal/visor/query/VisorQueryArgV3.java   |   51 +
 .../internal/visor/query/VisorQueryJob.java     |    6 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   25 +
 .../resources/META-INF/classnames.properties    |    7 +-
 .../internal/GridCacheRecreateLockTest.java     |   78 +
 .../cache/CacheGetEntryAbstractTest.java        |   16 +-
 .../CacheSerializableTransactionsTest.java      |  173 +-
 .../processors/cache/CacheTxFastFinishTest.java |    2 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   20 +-
 .../processors/cache/GridCacheTestEntryEx.java  |    2 +-
 ...sExchangeOnDiscoveryHistoryOverflowTest.java |  190 ++
 .../CacheLockReleaseNodeLeaveTest.java          |   64 +-
 .../GridCacheRebalancingSyncSelfTest.java       |   69 +-
 .../IgniteCacheExpiryPolicyAbstractTest.java    |   42 +
 .../GridMarshallerPerformanceTest.java          |    4 +
 .../tcp/TcpCommunicationSpiDropNodesTest.java   |    3 +-
 .../TcpCommunicationSpiFaultyClientTest.java    |    3 +-
 .../junits/common/GridCommonAbstractTest.java   |   77 +
 .../testsuites/IgniteCacheTestSuite5.java       |    3 +
 .../testsuites/IgniteComputeGridTestSuite.java  |    2 +
 modules/docker/1.9.0/Dockerfile                 |   46 +
 modules/docker/1.9.0/run.sh                     |   51 +
 modules/docker/Dockerfile                       |    4 +-
 modules/flink/pom.xml                           |    2 +-
 .../query/h2/opt/GridH2SpatialIndex.java        |   56 +-
 .../query/h2/GridH2IndexingGeoSelfTest.java     |  409 +++--
 .../h2/GridH2IndexingSegmentedGeoSelfTest.java  |   37 +
 .../testsuites/GeoSpatialIndexingTestSuite.java |    2 +
 .../hadoop/shuffle/HadoopShuffleJob.java        |    1 -
 .../cache/query/GridCacheTwoStepQuery.java      |   17 +
 .../query/h2/DmlStatementsProcessor.java        |  272 ++-
 .../processors/query/h2/IgniteH2Indexing.java   |  415 +++--
 .../query/h2/dml/UpdatePlanBuilder.java         |    2 +-
 .../query/h2/opt/DistributedJoinMode.java       |   51 +
 .../query/h2/opt/GridH2CollocationModel.java    |   82 +-
 .../query/h2/opt/GridH2IndexBase.java           |  350 +++-
 .../query/h2/opt/GridH2QueryContext.java        |   84 +-
 .../query/h2/opt/GridH2RowDescriptor.java       |    5 -
 .../query/h2/opt/GridH2ScanIndex.java           |  273 +++
 .../processors/query/h2/opt/GridH2Table.java    |  277 +--
 .../query/h2/opt/GridH2TreeIndex.java           |  158 +-
 .../processors/query/h2/sql/DmlAstUtils.java    |   54 +-
 .../processors/query/h2/sql/GridSqlAlias.java   |   13 +-
 .../processors/query/h2/sql/GridSqlArray.java   |    8 +-
 .../processors/query/h2/sql/GridSqlAst.java     |   61 +
 .../processors/query/h2/sql/GridSqlColumn.java  |   85 +-
 .../processors/query/h2/sql/GridSqlConst.java   |    6 +-
 .../processors/query/h2/sql/GridSqlElement.java |   43 +-
 .../query/h2/sql/GridSqlFunction.java           |   18 +-
 .../processors/query/h2/sql/GridSqlJoin.java    |   35 +-
 .../processors/query/h2/sql/GridSqlKeyword.java |    3 +-
 .../query/h2/sql/GridSqlOperation.java          |    6 +-
 .../query/h2/sql/GridSqlOperationType.java      |    4 +-
 .../query/h2/sql/GridSqlParameter.java          |    4 +-
 .../query/h2/sql/GridSqlPlaceholder.java        |    2 +-
 .../processors/query/h2/sql/GridSqlQuery.java   |   91 +-
 .../query/h2/sql/GridSqlQueryParser.java        |  248 ++-
 .../query/h2/sql/GridSqlQuerySplitter.java      | 1684 +++++++++++++++---
 .../processors/query/h2/sql/GridSqlSelect.java  |  121 +-
 .../query/h2/sql/GridSqlSortColumn.java         |   41 +
 .../query/h2/sql/GridSqlStatement.java          |   11 +-
 .../query/h2/sql/GridSqlSubquery.java           |   31 +-
 .../processors/query/h2/sql/GridSqlTable.java   |   19 +-
 .../processors/query/h2/sql/GridSqlType.java    |    6 +-
 .../processors/query/h2/sql/GridSqlUnion.java   |   66 +-
 .../processors/query/h2/sql/GridSqlValue.java   |   25 -
 .../query/h2/twostep/GridMapQueryExecutor.java  |  321 +++-
 .../query/h2/twostep/GridMergeIndex.java        |  647 +++++--
 .../query/h2/twostep/GridMergeIndexSorted.java  |  380 ++++
 .../h2/twostep/GridMergeIndexUnsorted.java      |  101 +-
 .../query/h2/twostep/GridMergeTable.java        |   70 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |  211 ++-
 .../query/h2/twostep/GridResultPage.java        |   34 +-
 .../h2/twostep/msg/GridH2IndexRangeRequest.java |   60 +-
 .../twostep/msg/GridH2IndexRangeResponse.java   |   62 +-
 .../h2/twostep/msg/GridH2QueryRequest.java      |   19 +-
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |    2 +-
 ...niteCacheAbstractInsertSqlQuerySelfTest.java |    6 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |   10 +-
 .../IgniteCacheInsertSqlQuerySelfTest.java      |   14 +
 .../IgniteCacheUpdateSqlQuerySelfTest.java      |    1 +
 .../query/IgniteSqlSegmentedIndexSelfTest.java  |  263 +++
 .../query/IgniteSqlSplitterSelfTest.java        |  331 +++-
 .../query/h2/GridH2IndexRebuildTest.java        |  261 ---
 .../h2/GridIndexingSpiAbstractSelfTest.java     |   43 +-
 .../query/h2/opt/GridH2TableSelfTest.java       |   54 -
 .../h2/sql/AbstractH2CompareQueryTest.java      |   21 +-
 .../query/h2/sql/GridQueryParsingTest.java      |   72 +-
 .../query/h2/sql/H2CompareBigQueryTest.java     |   58 +-
 .../FetchingQueryCursorStressTest.java          |  277 +++
 .../IgniteCacheQuerySelfTestSuite.java          |    6 +-
 .../processors/query/h2/sql/bigQuery.sql        |   36 +-
 modules/kubernetes/config/Dockerfile            |   17 +
 .../kubernetes/config/ignite-deployment.yaml    |   15 +
 modules/kubernetes/config/ignite-service.yaml   |   15 +
 .../cpp/common/project/vs/common.vcxproj        |    1 -
 .../common/project/vs/common.vcxproj.filters    |    6 -
 .../platforms/cpp/common/project/vs/targetver.h |   25 -
 modules/platforms/cpp/core-test/Makefile.am     |    1 +
 .../cpp/core-test/config/cache-store.xml        |   71 +
 .../cpp/core-test/project/vs/core-test.vcxproj  |    5 +
 .../project/vs/core-test.vcxproj.filters        |    9 +
 .../src/binary_identity_resolver_test.cpp       |    2 +-
 .../src/binary_reader_writer_raw_test.cpp       |    2 +-
 .../core-test/src/binary_reader_writer_test.cpp |    2 +-
 .../cpp/core-test/src/binary_session_test.cpp   |    2 +-
 .../cpp/core-test/src/cache_query_test.cpp      |    2 +-
 .../cpp/core-test/src/cache_store_test.cpp      |  151 ++
 .../cpp/core-test/src/continuous_query_test.cpp |    2 +-
 .../cpp/core-test/src/handle_registry_test.cpp  |    2 +-
 .../cpp/core-test/src/ignite_error_test.cpp     |    2 +-
 .../cpp/core-test/src/ignition_test.cpp         |    2 +-
 .../cpp/core-test/src/interop_memory_test.cpp   |    2 +-
 .../cpp/core-test/src/reference_test.cpp        |    2 +-
 .../platforms/cpp/core-test/src/test_utils.cpp  |    7 +
 .../cpp/core-test/src/transactions_test.cpp     |    2 +-
 .../cpp/core/include/ignite/cache/cache.h       |   60 +-
 .../cache/query/continuous/continuous_query.h   |    2 +-
 .../core/include/ignite/impl/cache/cache_impl.h |   19 +
 .../ignite/impl/interop/interop_target.h        |   25 +
 .../cpp/core/src/impl/cache/cache_impl.cpp      |   48 +
 .../core/src/impl/interop/interop_target.cpp    |   36 +-
 .../cpp/jni/include/ignite/jni/utils.h          |    9 +
 .../platforms/cpp/jni/os/linux/src/utils.cpp    |    6 -
 modules/platforms/cpp/jni/os/win/src/utils.cpp  |    6 -
 .../platforms/cpp/jni/project/vs/jni.vcxproj    |    1 -
 .../cpp/jni/project/vs/jni.vcxproj.filters      |    3 -
 .../platforms/cpp/jni/project/vs/targetver.h    |   25 -
 .../Properties/AssemblyInfo.cs                  |    2 +-
 .../Properties/AssemblyInfo.cs                  |    2 +-
 .../Properties/AssemblyInfo.cs                  |    2 +-
 .../Properties/AssemblyInfo.cs                  |    2 +-
 .../Properties/AssemblyInfo.cs                  |    2 +-
 .../Properties/AssemblyInfo.cs                  |    2 +-
 modules/spark-2.10/pom.xml                      |   54 +
 modules/spark/pom.xml                           |  183 +-
 .../org/apache/ignite/spark/IgniteContext.scala |   22 +-
 .../spark/JavaEmbeddedIgniteRDDSelfTest.java    |   10 +-
 .../spark/JavaStandaloneIgniteRDDSelfTest.java  |   22 +-
 .../ant/beautifier/GridJavadocAntTask.java      |    1 +
 modules/web-console/backend/app/agent.js        |   36 +
 modules/web-console/backend/app/browser.js      |   28 +
 modules/web-console/backend/app/settings.js     |    8 +-
 modules/web-console/backend/index.js            |   10 -
 modules/web-console/frontend/.eslintrc          |    1 +
 modules/web-console/frontend/.gitignore         |    1 +
 modules/web-console/frontend/app/app.config.js  |   12 +-
 modules/web-console/frontend/app/app.js         |    7 +-
 .../activities-user-dialog.jade                 |   36 -
 .../activities-user-dialog.tpl.pug              |   36 +
 .../components/activities-user-dialog/index.js  |    2 +-
 .../form-field-datepicker.jade                  |   55 -
 .../form-field-datepicker.pug                   |   55 +
 .../list-of-registered-users/index.js           |    2 +-
 .../list-of-registered-users.controller.js      |   11 +-
 .../list-of-registered-users.jade               |   58 -
 .../list-of-registered-users.tpl.pug            |   58 +
 .../ui-grid-header/ui-grid-header.jade          |   27 -
 .../ui-grid-header/ui-grid-header.scss          |    1 +
 .../ui-grid-header/ui-grid-header.tpl.pug       |   27 +
 .../ui-grid-settings/ui-grid-settings.jade      |   33 -
 .../ui-grid-settings/ui-grid-settings.pug       |   33 +
 .../app/directives/centered/centered.css        |   37 -
 .../directives/centered/centered.directive.js   |    2 +-
 .../app/directives/centered/centered.scss       |   37 +
 .../information/information.directive.js        |    4 +-
 .../app/directives/information/information.jade |   20 -
 .../app/directives/information/information.pug  |   20 +
 .../ui-ace-docker/ui-ace-docker.directive.js    |    4 +-
 .../directives/ui-ace-docker/ui-ace-docker.jade |   31 -
 .../directives/ui-ace-docker/ui-ace-docker.pug  |   31 +
 .../ui-ace-java/ui-ace-java.directive.js        |    4 +-
 .../app/directives/ui-ace-java/ui-ace-java.jade |   22 -
 .../app/directives/ui-ace-java/ui-ace-java.pug  |   22 +
 .../ui-ace-pojos/ui-ace-pojos.directive.js      |    4 +-
 .../directives/ui-ace-pojos/ui-ace-pojos.jade   |   40 -
 .../directives/ui-ace-pojos/ui-ace-pojos.pug    |   40 +
 .../ui-ace-pom/ui-ace-pom.directive.js          |    4 +-
 .../app/directives/ui-ace-pom/ui-ace-pom.jade   |   17 -
 .../app/directives/ui-ace-pom/ui-ace-pom.pug    |   17 +
 .../ui-ace-sharp/ui-ace-sharp.directive.js      |    4 +-
 .../directives/ui-ace-sharp/ui-ace-sharp.jade   |   22 -
 .../directives/ui-ace-sharp/ui-ace-sharp.pug    |   22 +
 .../ui-ace-spring/ui-ace-spring.directive.js    |    4 +-
 .../directives/ui-ace-spring/ui-ace-spring.jade |   17 -
 .../directives/ui-ace-spring/ui-ace-spring.pug  |   17 +
 .../frontend/app/helpers/jade/form.jade         |   28 -
 .../frontend/app/helpers/jade/form.pug          |   28 +
 .../helpers/jade/form/form-field-checkbox.jade  |   38 -
 .../helpers/jade/form/form-field-checkbox.pug   |   38 +
 .../helpers/jade/form/form-field-datalist.jade  |   51 -
 .../helpers/jade/form/form-field-datalist.pug   |   51 +
 .../app/helpers/jade/form/form-field-down.jade  |   18 -
 .../app/helpers/jade/form/form-field-down.pug   |   18 +
 .../helpers/jade/form/form-field-dropdown.jade  |   51 -
 .../helpers/jade/form/form-field-dropdown.pug   |   51 +
 .../helpers/jade/form/form-field-feedback.jade  |   32 -
 .../helpers/jade/form/form-field-feedback.pug   |   32 +
 .../app/helpers/jade/form/form-field-label.jade |   23 -
 .../app/helpers/jade/form/form-field-label.pug  |   23 +
 .../helpers/jade/form/form-field-number.jade    |   53 -
 .../app/helpers/jade/form/form-field-number.pug |   53 +
 .../helpers/jade/form/form-field-password.jade  |   47 -
 .../helpers/jade/form/form-field-password.pug   |   47 +
 .../app/helpers/jade/form/form-field-text.jade  |   64 -
 .../app/helpers/jade/form/form-field-text.pug   |   64 +
 .../app/helpers/jade/form/form-field-up.jade    |   18 -
 .../app/helpers/jade/form/form-field-up.pug     |   18 +
 .../app/helpers/jade/form/form-group.jade       |   23 -
 .../app/helpers/jade/form/form-group.pug        |   23 +
 .../frontend/app/helpers/jade/mixins.jade       |  609 -------
 .../frontend/app/helpers/jade/mixins.pug        |  609 +++++++
 .../frontend/app/modules/agent/agent.module.js  |    4 +-
 .../modules/branding/header-logo.directive.js   |    4 +-
 .../app/modules/branding/header-logo.jade       |   18 -
 .../app/modules/branding/header-logo.pug        |   18 +
 .../branding/powered-by-apache.directive.js     |    4 +-
 .../app/modules/branding/powered-by-apache.jade |   18 -
 .../app/modules/branding/powered-by-apache.pug  |   18 +
 .../frontend/app/modules/demo/Demo.module.js    |    3 +-
 .../app/modules/dialog/dialog.factory.js        |    2 +-
 .../frontend/app/modules/dialog/dialog.jade     |   26 -
 .../frontend/app/modules/dialog/dialog.tpl.pug  |   26 +
 .../getting-started/GettingStarted.provider.js  |    3 +-
 .../frontend/app/modules/loading/loading.css    |   73 -
 .../app/modules/loading/loading.directive.js    |    8 +-
 .../frontend/app/modules/loading/loading.jade   |   23 -
 .../frontend/app/modules/loading/loading.pug    |   23 +
 .../frontend/app/modules/loading/loading.scss   |   73 +
 .../frontend/app/modules/nodes/Nodes.service.js |    4 +-
 .../app/modules/nodes/nodes-dialog.jade         |   35 -
 .../app/modules/nodes/nodes-dialog.tpl.pug      |   35 +
 .../app/modules/sql/notebook.controller.js      |    4 +-
 .../frontend/app/modules/sql/sql.controller.js  |   14 +-
 .../frontend/app/modules/sql/sql.module.js      |   15 +-
 .../frontend/app/modules/states/admin.state.js  |    4 +-
 .../app/modules/states/configuration.state.js   |   23 +-
 .../states/configuration/caches/affinity.jade   |   82 -
 .../states/configuration/caches/affinity.pug    |   82 +
 .../configuration/caches/client-near-cache.jade |   50 -
 .../configuration/caches/client-near-cache.pug  |   50 +
 .../configuration/caches/concurrency.jade       |   65 -
 .../states/configuration/caches/concurrency.pug |   65 +
 .../states/configuration/caches/general.jade    |   69 -
 .../states/configuration/caches/general.pug     |   69 +
 .../states/configuration/caches/memory.jade     |  109 --
 .../states/configuration/caches/memory.pug      |  108 ++
 .../configuration/caches/near-cache-client.jade |   51 -
 .../configuration/caches/near-cache-client.pug  |   51 +
 .../configuration/caches/near-cache-server.jade |   52 -
 .../configuration/caches/near-cache-server.pug  |   52 +
 .../configuration/caches/node-filter.jade       |   59 -
 .../states/configuration/caches/node-filter.pug |   59 +
 .../states/configuration/caches/query.jade      |  114 --
 .../states/configuration/caches/query.pug       |  114 ++
 .../states/configuration/caches/rebalance.jade  |   66 -
 .../states/configuration/caches/rebalance.pug   |   66 +
 .../states/configuration/caches/statistics.jade |   39 -
 .../states/configuration/caches/statistics.pug  |   39 +
 .../states/configuration/caches/store.jade      |  250 ---
 .../states/configuration/caches/store.pug       |  250 +++
 .../states/configuration/clusters/atomic.jade   |   54 -
 .../states/configuration/clusters/atomic.pug    |   54 +
 .../configuration/clusters/attributes.jade      |   57 -
 .../configuration/clusters/attributes.pug       |   57 +
 .../states/configuration/clusters/binary.jade   |   77 -
 .../states/configuration/clusters/binary.pug    |   77 +
 .../configuration/clusters/cache-key-cfg.jade   |   50 -
 .../configuration/clusters/cache-key-cfg.pug    |   50 +
 .../configuration/clusters/checkpoint.jade      |   86 -
 .../configuration/clusters/checkpoint.pug       |   86 +
 .../configuration/clusters/checkpoint/fs.jade   |   66 -
 .../configuration/clusters/checkpoint/fs.pug    |   66 +
 .../configuration/clusters/checkpoint/jdbc.jade |   48 -
 .../configuration/clusters/checkpoint/jdbc.pug  |   48 +
 .../configuration/clusters/checkpoint/s3.jade   |  178 --
 .../configuration/clusters/checkpoint/s3.pug    |  178 ++
 .../configuration/clusters/collision.jade       |   63 -
 .../states/configuration/clusters/collision.pug |   63 +
 .../clusters/collision/custom.jade              |   24 -
 .../configuration/clusters/collision/custom.pug |   24 +
 .../clusters/collision/fifo-queue.jade          |   27 -
 .../clusters/collision/fifo-queue.pug           |   27 +
 .../clusters/collision/job-stealing.jade        |   63 -
 .../clusters/collision/job-stealing.pug         |   63 +
 .../clusters/collision/priority-queue.jade      |   42 -
 .../clusters/collision/priority-queue.pug       |   42 +
 .../configuration/clusters/communication.jade   |  100 --
 .../configuration/clusters/communication.pug    |  100 ++
 .../configuration/clusters/connector.jade       |  104 --
 .../states/configuration/clusters/connector.pug |  104 ++
 .../configuration/clusters/deployment.jade      |  237 ---
 .../configuration/clusters/deployment.pug       |  237 +++
 .../configuration/clusters/discovery.jade       |   88 -
 .../states/configuration/clusters/discovery.pug |   88 +
 .../states/configuration/clusters/events.jade   |   68 -
 .../states/configuration/clusters/events.pug    |   68 +
 .../states/configuration/clusters/failover.jade |   73 -
 .../states/configuration/clusters/failover.pug  |   73 +
 .../states/configuration/clusters/general.jade  |   76 -
 .../states/configuration/clusters/general.pug   |   76 +
 .../clusters/general/discovery/cloud.jade       |  134 --
 .../clusters/general/discovery/cloud.pug        |  134 ++
 .../clusters/general/discovery/google.jade      |   38 -
 .../clusters/general/discovery/google.pug       |   38 +
 .../clusters/general/discovery/jdbc.jade        |   31 -
 .../clusters/general/discovery/jdbc.pug         |   31 +
 .../clusters/general/discovery/multicast.jade   |   99 -
 .../clusters/general/discovery/multicast.pug    |   99 +
 .../clusters/general/discovery/s3.jade          |   27 -
 .../clusters/general/discovery/s3.pug           |   27 +
 .../clusters/general/discovery/shared.jade      |   23 -
 .../clusters/general/discovery/shared.pug       |   23 +
 .../clusters/general/discovery/vm.jade          |   79 -
 .../clusters/general/discovery/vm.pug           |   79 +
 .../clusters/general/discovery/zookeeper.jade   |   85 -
 .../clusters/general/discovery/zookeeper.pug    |   85 +
 .../bounded-exponential-backoff.jade            |   27 -
 .../retrypolicy/bounded-exponential-backoff.pug |   27 +
 .../discovery/zookeeper/retrypolicy/custom.jade |   24 -
 .../discovery/zookeeper/retrypolicy/custom.pug  |   24 +
 .../retrypolicy/exponential-backoff.jade        |   27 -
 .../retrypolicy/exponential-backoff.pug         |   27 +
 .../zookeeper/retrypolicy/forever.jade          |   22 -
 .../discovery/zookeeper/retrypolicy/forever.pug |   22 +
 .../zookeeper/retrypolicy/n-times.jade          |   25 -
 .../discovery/zookeeper/retrypolicy/n-times.pug |   25 +
 .../zookeeper/retrypolicy/one-time.jade         |   23 -
 .../zookeeper/retrypolicy/one-time.pug          |   23 +
 .../zookeeper/retrypolicy/until-elapsed.jade    |   25 -
 .../zookeeper/retrypolicy/until-elapsed.pug     |   25 +
 .../states/configuration/clusters/igfs.jade     |   38 -
 .../states/configuration/clusters/igfs.pug      |   38 +
 .../configuration/clusters/load-balancing.jade  |  107 --
 .../configuration/clusters/load-balancing.pug   |  107 ++
 .../states/configuration/clusters/logger.jade   |   66 -
 .../states/configuration/clusters/logger.pug    |   66 +
 .../configuration/clusters/logger/custom.jade   |   25 -
 .../configuration/clusters/logger/custom.pug    |   25 +
 .../configuration/clusters/logger/log4j.jade    |   50 -
 .../configuration/clusters/logger/log4j.pug     |   50 +
 .../configuration/clusters/logger/log4j2.jade   |   39 -
 .../configuration/clusters/logger/log4j2.pug    |   39 +
 .../configuration/clusters/marshaller.jade      |   76 -
 .../configuration/clusters/marshaller.pug       |   76 +
 .../states/configuration/clusters/metrics.jade  |   51 -
 .../states/configuration/clusters/metrics.pug   |   51 +
 .../states/configuration/clusters/odbc.jade     |   48 -
 .../states/configuration/clusters/odbc.pug      |   48 +
 .../states/configuration/clusters/ssl.jade      |  110 --
 .../states/configuration/clusters/ssl.pug       |  110 ++
 .../states/configuration/clusters/swap.jade     |   72 -
 .../states/configuration/clusters/swap.pug      |   72 +
 .../states/configuration/clusters/thread.jade   |   48 -
 .../states/configuration/clusters/thread.pug    |   48 +
 .../states/configuration/clusters/time.jade     |   47 -
 .../states/configuration/clusters/time.pug      |   47 +
 .../configuration/clusters/transactions.jade    |   69 -
 .../configuration/clusters/transactions.pug     |   69 +
 .../states/configuration/domains/general.jade   |   52 -
 .../states/configuration/domains/general.pug    |   52 +
 .../states/configuration/domains/query.jade     |  172 --
 .../states/configuration/domains/query.pug      |  172 ++
 .../states/configuration/domains/store.jade     |  127 --
 .../states/configuration/domains/store.pug      |  127 ++
 .../modules/states/configuration/igfs/dual.jade |   42 -
 .../modules/states/configuration/igfs/dual.pug  |   42 +
 .../states/configuration/igfs/fragmentizer.jade |   43 -
 .../states/configuration/igfs/fragmentizer.pug  |   43 +
 .../states/configuration/igfs/general.jade      |   57 -
 .../states/configuration/igfs/general.pug       |   57 +
 .../modules/states/configuration/igfs/ipc.jade  |   60 -
 .../modules/states/configuration/igfs/ipc.pug   |   60 +
 .../modules/states/configuration/igfs/misc.jade |  108 --
 .../modules/states/configuration/igfs/misc.pug  |  108 ++
 .../states/configuration/igfs/secondary.jade    |   45 -
 .../states/configuration/igfs/secondary.pug     |   45 +
 .../configuration/summary/summary.controller.js |    5 +
 .../frontend/app/modules/states/errors.state.js |    4 +-
 .../app/modules/states/password.state.js        |    6 +-
 .../app/modules/states/profile.state.js         |    4 +-
 .../frontend/app/modules/states/signin.state.js |    2 +-
 .../frontend/app/services/Clone.service.js      |    4 +-
 .../frontend/app/services/Confirm.service.js    |    4 +-
 .../app/services/ConfirmBatch.service.js        |    4 +-
 .../frontend/controllers/caches-controller.js   |    4 +-
 .../frontend/controllers/domains-controller.js  |    4 +-
 .../frontend/gulpfile.babel.js/paths.js         |   28 +-
 .../frontend/gulpfile.babel.js/tasks/build.js   |    2 +-
 .../frontend/gulpfile.babel.js/tasks/bundle.js  |    8 +-
 .../frontend/gulpfile.babel.js/tasks/jade.js    |   49 -
 .../frontend/gulpfile.babel.js/tasks/watch.js   |    5 +-
 .../gulpfile.babel.js/webpack/common.js         |  292 +--
 .../webpack/environments/development.js         |   90 +-
 .../webpack/environments/production.js          |   41 +-
 .../webpack/environments/test.js                |   52 +-
 .../frontend/gulpfile.babel.js/webpack/index.js |    4 +-
 modules/web-console/frontend/package.json       |   60 +-
 .../frontend/test/e2e/exampe.test.js            |    4 +-
 .../frontend/test/karma.conf.babel.js           |    7 +-
 .../frontend/test/protractor.conf.js            |   16 +-
 .../frontend/test/unit/JavaTransformer.test.js  |    2 +-
 .../frontend/test/unit/JavaTypes.test.js        |  137 +-
 .../frontend/test/unit/SharpTransformer.test.js |    2 +-
 .../test/unit/SpringTransformer.test.js         |    2 +-
 .../frontend/test/unit/SqlTypes.test.js         |    7 +-
 .../frontend/test/unit/UserAuth.test.js         |    4 +-
 .../frontend/test/unit/Version.test.js          |    1 +
 .../test/unit/defaultName.filter.test.js        |   27 +-
 modules/web-console/frontend/views/403.jade     |   22 -
 modules/web-console/frontend/views/403.pug      |   22 +
 modules/web-console/frontend/views/404.jade     |   22 -
 modules/web-console/frontend/views/404.pug      |   22 +
 modules/web-console/frontend/views/base.jade    |   22 -
 modules/web-console/frontend/views/base.pug     |   22 +
 .../frontend/views/configuration/caches.jade    |   55 -
 .../frontend/views/configuration/caches.tpl.pug |   55 +
 .../frontend/views/configuration/clusters.jade  |   68 -
 .../views/configuration/clusters.tpl.pug        |   68 +
 .../views/configuration/domains-import.jade     |  170 --
 .../views/configuration/domains-import.tpl.pug  |  170 ++
 .../frontend/views/configuration/domains.jade   |   66 -
 .../views/configuration/domains.tpl.pug         |   66 +
 .../frontend/views/configuration/igfs.jade      |   51 -
 .../frontend/views/configuration/igfs.tpl.pug   |   51 +
 .../frontend/views/configuration/sidebar.jade   |   29 -
 .../views/configuration/sidebar.tpl.pug         |   29 +
 .../summary-project-structure.jade              |   27 -
 .../summary-project-structure.tpl.pug           |   28 +
 .../views/configuration/summary-tabs.jade       |   25 -
 .../views/configuration/summary-tabs.pug        |   25 +
 .../frontend/views/configuration/summary.jade   |   90 -
 .../views/configuration/summary.tpl.pug         |   90 +
 .../frontend/views/includes/footer.jade         |   23 -
 .../frontend/views/includes/footer.pug          |   23 +
 .../frontend/views/includes/header.jade         |   52 -
 .../frontend/views/includes/header.pug          |   52 +
 modules/web-console/frontend/views/index.jade   |   47 -
 modules/web-console/frontend/views/index.pug    |   47 +
 modules/web-console/frontend/views/reset.jade   |   48 -
 .../web-console/frontend/views/reset.tpl.pug    |   48 +
 .../frontend/views/settings/admin.jade          |   25 -
 .../frontend/views/settings/admin.tpl.pug       |   25 +
 .../frontend/views/settings/profile.jade        |   76 -
 .../frontend/views/settings/profile.tpl.pug     |   76 +
 modules/web-console/frontend/views/signin.jade  |  163 --
 .../web-console/frontend/views/signin.tpl.pug   |  163 ++
 .../frontend/views/sql/cache-metadata.jade      |   40 -
 .../frontend/views/sql/cache-metadata.tpl.pug   |   40 +
 .../frontend/views/sql/chart-settings.jade      |   40 -
 .../frontend/views/sql/chart-settings.tpl.pug   |   40 +
 .../frontend/views/sql/notebook-new.jade        |   33 -
 .../frontend/views/sql/notebook-new.tpl.pug     |   33 +
 .../frontend/views/sql/paragraph-rate.jade      |   31 -
 .../frontend/views/sql/paragraph-rate.tpl.pug   |   31 +
 modules/web-console/frontend/views/sql/sql.jade |  278 ---
 .../web-console/frontend/views/sql/sql.tpl.pug  |  278 +++
 .../views/templates/agent-download.jade         |   50 -
 .../views/templates/agent-download.tpl.pug      |   50 +
 .../frontend/views/templates/alert.jade         |   21 -
 .../frontend/views/templates/alert.tpl.pug      |   21 +
 .../frontend/views/templates/batch-confirm.jade |   34 -
 .../views/templates/batch-confirm.tpl.pug       |   34 +
 .../frontend/views/templates/clone.jade         |   39 -
 .../frontend/views/templates/clone.tpl.pug      |   39 +
 .../frontend/views/templates/confirm.jade       |   33 -
 .../frontend/views/templates/confirm.tpl.pug    |   33 +
 .../frontend/views/templates/demo-info.jade     |   47 -
 .../frontend/views/templates/demo-info.tpl.pug  |   47 +
 .../frontend/views/templates/dropdown.jade      |   24 -
 .../frontend/views/templates/dropdown.tpl.pug   |   24 +
 .../views/templates/getting-started.jade        |   34 -
 .../views/templates/getting-started.tpl.pug     |   34 +
 .../frontend/views/templates/message.jade       |   28 -
 .../frontend/views/templates/message.tpl.pug    |   28 +
 .../frontend/views/templates/pagination.jade    |   32 -
 .../frontend/views/templates/select.jade        |   26 -
 .../frontend/views/templates/select.tpl.pug     |   26 +
 .../views/templates/validation-error.jade       |   25 -
 .../views/templates/validation-error.tpl.pug    |   25 +
 .../demo/service/DemoCachesLoadService.java     |   26 +
 modules/yardstick/config/ignite-base-config.xml |   25 +
 .../yardstick/cache/IgniteGetAllBenchmark.java  |   42 +
 .../cache/IgniteGetAllOffHeapBenchmark.java     |   30 +
 .../yardstick/cache/IgniteGetBenchmark.java     |   35 +
 .../cache/IgnitePutAllOffHeapBenchmark.java     |   30 +
 .../cache/IgnitePutAllTxOffHeapBenchmark.java   |   30 +
 .../IgnitePutOffHeapIndexedValue8Benchmark.java |   30 +
 .../IgnitePutRandomValueSizeBenchmark.java      |   41 +
 modules/zeromq/README.txt                       |   37 +
 modules/zeromq/licenses/apache-2.0.txt          |  202 +++
 modules/zeromq/pom.xml                          |   75 +
 .../stream/zeromq/IgniteZeroMqStreamer.java     |  146 ++
 .../ignite/stream/zeromq/ZeroMqTypeSocket.java  |   56 +
 .../ignite/stream/zeromq/package-info.java      |   21 +
 .../stream/zeromq/IgniteZeroMqStreamerTest.java |  235 +++
 .../zeromq/IgniteZeroMqStreamerTestSuite.java   |   37 +
 .../ZeroMqStringSingleTupleExtractor.java       |   46 +
 .../ignite/stream/zeromq/package-info.java      |   21 +
 parent/pom.xml                                  |    6 +-
 pom.xml                                         |    1 +
 585 files changed, 20664 insertions(+), 12620 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8ec5c8e0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/8ec5c8e0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/8ec5c8e0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
index 91ca1b6,9c4e4ef..1bf8759
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
@@@ -31,7 -31,7 +31,8 @@@ import org.apache.ignite.IgniteCheckedE
  import org.apache.ignite.IgniteLogger;
  import org.apache.ignite.cluster.ClusterNode;
  import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 +import org.apache.ignite.internal.processors.affinity.AffinityAssignment;
+ import org.apache.ignite.internal.managers.discovery.DiscoCache;
  import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
  import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
  import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionExchangeId;

http://git-wip-us.apache.org/repos/asf/ignite/blob/8ec5c8e0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/8ec5c8e0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/8ec5c8e0/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/8ec5c8e0/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
index 1ef5b84,03204e2..6fc6846
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
@@@ -66,8 -66,8 +67,10 @@@ public class IgniteCacheTestSuite5 exte
  
          suite.addTestSuite(CacheRebalancingSelfTest.class);
  
 +        suite.addTestSuite(IgniteCacheAtomicProtocolTest.class);
 +
+         suite.addTestSuite(PartitionsExchangeOnDiscoveryHistoryOverflowTest.class);
+ 
          return suite;
      }
  }


[12/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/domains/query.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/domains/query.pug b/modules/web-console/frontend/app/modules/states/configuration/domains/query.pug
new file mode 100644
index 0000000..a057f59
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/domains/query.pug
@@ -0,0 +1,172 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'query'
+-var model = 'backupItem'
+-var queryFields = `${model}.fields`
+-var queryAliases = `${model}.aliases`
+-var queryIndexes = `${model}.indexes`
+-var queryFieldsForm = 'queryFields'
+-var queryAliasesForm = 'queryAliases'
+-var queryIndexesForm = 'queryIndexes'
+
+// LEGACY mixin for LEGACY index fields table.
+mixin table-index-item-edit(prefix, index, sortAvailable, idAddition)
+    -var fieldName = `${prefix}FieldName`
+    -var direction = `${prefix}Direction`
+
+    -var fieldNameModel = `indexesTbl.${fieldName}`
+    -var directionModel = `indexesTbl.${direction}`
+
+    -var btnVisible = `tableIndexItemSaveVisible(indexesTbl, ${index})`
+    -var btnSave = `tableIndexItemSave(indexesTbl, itemIndex, ${index})`
+    -var btnVisibleAndSave = `${btnVisible} && ${btnSave}`
+
+    div(ng-if=sortAvailable)
+        .col-xs-8.col-sm-8.col-md-8
+            label.fieldSep /
+            .input-tip
+                button.select-toggle.form-control(id=`{{::'${fieldName}' + ${idAddition}}}` ignite-on-enter-focus-move=`{{::'${direction}S' + ${idAddition}}}` ng-model=fieldNameModel placeholder=`{{fields('${prefix}', ${fieldNameModel}).length > 0 ? 'Choose field' : 'No fields configured'}}` bs-select bs-options=`item.value as item.label for item in fields('${prefix}', ${fieldNameModel})` ng-disabled=`fields('${prefix}', ${fieldNameModel}).length === 0` ignite-on-escape='tableReset(false)' tabindex='0')
+        .col-xs-4.col-sm-4.col-md-4
+            +btn-save(btnVisible, btnSave)
+            .input-tip
+                button.select-toggle.form-control(id=`{{::'${direction}' + ${idAddition}}}` ng-model=directionModel bs-select bs-options='item.value as item.label for item in {{sortDirections}}' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)' tabindex='0')
+    .col-xs-12(ng-if=`!(${sortAvailable})`)
+        +btn-save(btnVisible, btnSave)
+        .input-tip
+            button.select-toggle.form-control(id=`{{::'${fieldName}' + ${idAddition}}}` ng-model=fieldNameModel placeholder=`{{fields('${prefix}', ${fieldNameModel}).length > 0 ? 'Choose index field' : 'No fields configured'}}` bs-select bs-options=`item.value as item.label for item in fields('${prefix}', ${fieldNameModel})` ng-disabled=`fields('${prefix}', ${fieldNameModel}).length === 0` ignite-on-escape='tableReset(false)' tabindex='0')
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle)
+        ignite-form-panel-chevron
+        label(id='query-title') Domain model for SQL query
+        ignite-form-field-tooltip.tipLabel
+            | Domain model properties for fields queries#[br]
+            | #[a(href='https://apacheignite.readme.io/docs/cache-queries' target='_blank') More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id='query')
+        .panel-body
+            .col-sm-6
+                .content-not-available(ng-if=`${model}.queryMetadata === 'Annotations'`)
+                    label Not available for annotated types
+                div(ng-if=`${model}.queryMetadata === 'Configuration'`)
+                    .settings-row
+                        +ignite-form-group(ng-model=queryFields ng-form=queryFieldsForm)
+                            ignite-form-field-label(id='queryFields')
+                                | Fields
+                            ignite-form-group-tooltip
+                                | Collection of name-to-type mappings to be queried, in addition to indexed fields
+                            ignite-form-group-add(ng-click='tableNewItem(queryFieldsTbl)')
+                                | Add field to query
+                            .group-content-empty(ng-if=`!((${queryFields} && ${queryFields}.length > 0) || tableNewItemActive(queryFieldsTbl))`)
+                                | Not defined
+                            .group-content(ng-show=`(${queryFields} && ${queryFields}.length > 0) || tableNewItemActive(queryFieldsTbl)`)
+                                table.links-edit(id='fields' st-table=queryFields)
+                                    tbody
+                                        tr(ng-repeat=`item in ${queryFields} track by $index`)
+                                            td.col-sm-12(ng-hide='tableEditing(queryFieldsTbl, $index)')
+                                                a.labelFormField(ng-click='tableStartEdit(backupItem, queryFieldsTbl, $index)') {{item.name}}  / {{item.className}}
+                                                +btn-remove('tableRemove(backupItem, queryFieldsTbl, $index)', '"Remove path"')
+                                            td.col-sm-12(ng-show='tableEditing(queryFieldsTbl, $index)')
+                                                +table-pair-edit('queryFieldsTbl', 'cur', 'Field name', 'Field full class name', false, true, '{{::queryFieldsTbl.focusId + $index}}', '$index', '/')
+                                    tfoot(ng-show='tableNewItemActive(queryFieldsTbl)')
+                                        tr
+                                            td.col-sm-12
+                                                +table-pair-edit('queryFieldsTbl', 'new', 'Field name', 'Field full class name', false, true, '{{::queryFieldsTbl.focusId + $index}}', '-1', '/')
+                    .settings-row
+                        +ignite-form-group(ng-model=queryAliases ng-form=queryAliasesForm)
+                            ignite-form-field-label
+                                | Aliases
+                            ignite-form-group-tooltip
+                                | Mapping from full property name in dot notation to an alias that will be used as SQL column name
+                                | For example: "parent.name" as "parentName"
+                            ignite-form-group-add(ng-click='tableNewItem(aliasesTbl)')
+                                | Add alias to query
+                            .group-content-empty(ng-if=`!((${queryAliases} && ${queryAliases}.length > 0) || tableNewItemActive(aliasesTbl))`)
+                                | Not defined
+                            .group-content(ng-show=`(${queryAliases} && ${queryAliases}.length > 0) || tableNewItemActive(aliasesTbl)`)
+                                table.links-edit(id='aliases' st-table=queryAliases)
+                                    tbody
+                                        tr(ng-repeat=`item in ${queryAliases} track by $index`)
+                                            td.col-sm-12(ng-hide='tableEditing(aliasesTbl, $index)')
+                                                a.labelFormField(ng-click='tableStartEdit(backupItem, aliasesTbl, $index)') {{item.field}} &rarr; {{item.alias}}
+                                                +btn-remove('tableRemove(backupItem, aliasesTbl, $index)', '"Remove alias"')
+                                            td.col-sm-12(ng-show='tableEditing(aliasesTbl, $index)')
+                                                +table-pair-edit('aliasesTbl', 'cur', 'Field name', 'Field Alias', false, false, '{{::aliasesTbl.focusId + $index}}', '$index', '&rarr;')
+                                    tfoot(ng-show='tableNewItemActive(aliasesTbl)')
+                                        tr
+                                            td.col-sm-12
+                                                +table-pair-edit('aliasesTbl', 'new', 'Field name', 'Field Alias', false, false, '{{::aliasesTbl.focusId + $index}}', '-1', '&rarr;')
+                    .settings-row(ng-init='indexesTbl={type: "table-indexes", model: "indexes", focusId: "IndexName", ui: "table-indexes"}')
+                        +ignite-form-group(ng-model=queryIndexes ng-form=queryIndexesForm)
+                            ignite-form-field-label
+                                | Indexes
+                            ignite-form-group-tooltip
+                                | Collection of indexes
+                            ignite-form-group-add(ng-click='tableNewItem(indexesTbl)')
+                                | Add new index
+                            .group-content-empty(id='indexes-add' ng-show=`!((${queryIndexes} && ${queryIndexes}.length > 0) || tableNewItemActive(indexesTbl))`)
+                                | Not defined
+                            .group-content(ng-show=`(${queryIndexes} && ${queryIndexes}.length > 0) || tableNewItemActive(indexesTbl)`)
+                                -var btnVisibleAndSave = 'tableIndexSaveVisible(indexesTbl, $index) && tableIndexSave(indexesTbl, $index)'
+
+                                table.links-edit(st-table=queryIndexes ng-init='newDirection = false')
+                                    tbody
+                                        tr(ng-repeat=`item in ${queryIndexes} track by $index`)
+                                            td
+                                                .col-sm-12(ng-hide='tableEditing(indexesTbl, $index)')
+                                                    a.labelFormField(id='indexes{{$index}}' ng-click='tableStartEdit(backupItem, indexesTbl, $index)') {{$index + 1}}) {{item.name}} [{{item.indexType}}]
+                                                    +btn-remove('tableRemove(backupItem, indexesTbl, $index)', '"Remove index"')
+                                                    +btn-add('tableIndexNewItem(indexesTbl, $index)', '"Add new field to index"')
+                                                div(ng-show='tableEditing(indexesTbl, $index)')
+                                                    .col-sm-7
+                                                        label.fieldSep /
+                                                        .input-tip
+                                                            input.form-control(id='curIndexName{{$index}}' type='text' ignite-on-enter-focus-move='curIndexType{{$index}}' ng-model='indexesTbl.curIndexName' placeholder='Index name' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
+                                                    .col-sm-5
+                                                        +btn-save('tableIndexSaveVisible(indexesTbl, $index)', 'tableIndexSave(indexesTbl, $index)')
+                                                        .input-tip
+                                                            button.select-toggle.form-control(id='curIndexType{{$index}}' bs-select ng-model='indexesTbl.curIndexType' data-placeholder='Select index type' bs-options='item.value as item.label for item in indexType' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
+                                                .margin-left-dflt
+                                                    table.links-edit-sub(st-table='item.fields' ng-init='itemIndex = $index')
+                                                        tbody
+                                                            tr(ng-repeat='itemItem in item.fields track by $index')
+                                                                td
+                                                                    div(ng-hide='tableIndexItemEditing(indexesTbl, itemIndex, $index)')
+                                                                        a.labelFormField(ng-if='item.indexType == "SORTED"' ng-click='tableIndexItemStartEdit(indexesTbl, itemIndex, $index)') {{$index + 1}}) {{itemItem.name}} / {{itemItem.direction ? "ASC" : "DESC"}}
+                                                                        a.labelFormField(ng-if='item.indexType != "SORTED"' ng-click='tableIndexItemStartEdit(indexesTbl, itemIndex, $index)') {{$index + 1}}) {{itemItem.name}}
+                                                                        +btn-remove('tableRemoveIndexItem(item, $index)', '"Remove field from index"')
+                                                                    div(ng-show='tableIndexItemEditing(indexesTbl, itemIndex, $index)')
+                                                                        +table-index-item-edit('cur', '$index', 'item.indexType == "SORTED"', 'itemIndex + "-" + $index')
+                                                        tfoot(ng-show='tableIndexNewItemActive(indexesTbl, itemIndex)')
+                                                            tr(style='padding-left: 18px')
+                                                                td
+                                                                    +table-index-item-edit('new', '-1', 'item.indexType == "SORTED"', 'itemIndex')
+                                    tfoot(ng-show='tableNewItemActive(indexesTbl)')
+                                        tr
+                                            td
+                                                .col-sm-7
+                                                    .fieldSep /
+                                                    .input-tip
+                                                        input#newIndexName.form-control(type='text' ignite-on-enter-focus-move='newIndexType' ng-model='indexesTbl.newIndexName' placeholder='Index name' ignite-on-enter='tableIndexSaveVisible(indexesTbl, -1) && tableIndexSave(indexesTbl, -1)' ignite-on-escape='tableReset(false)')
+                                                .col-sm-5
+                                                    +btn-save('tableIndexSaveVisible(indexesTbl, -1)', 'tableIndexSave(indexesTbl, -1)')
+                                                    .input-tip
+                                                        button#newIndexType.select-toggle.form-control(bs-select ng-model='indexesTbl.newIndexType' data-placeholder='Select index type' bs-options='item.value as item.label for item in indexType' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
+            .col-sm-6
+                +preview-xml-java(model, 'domainModelQuery')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/domains/store.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/domains/store.jade b/modules/web-console/frontend/app/modules/states/configuration/domains/store.jade
deleted file mode 100644
index f5d6b7d..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/domains/store.jade
+++ /dev/null
@@ -1,127 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'store'
--var model = 'backupItem'
--var keyFields = model + '.keyFields'
--var valueFields = model + '.valueFields'
--var keyFieldsForm = 'storeKeyFields'
--var valueFieldsForm = 'storeValueFields'
-
-//- LEGACY mixin for LEGACY db fields tables.
-mixin table-db-field-edit(tbl, prefix, focusId, index)
-    -var databaseName = prefix + 'DatabaseFieldName'
-    -var databaseType = prefix + 'DatabaseFieldType'
-    -var javaName = prefix + 'JavaFieldName'
-    -var javaType = prefix + 'JavaFieldType'
-
-    -var databaseNameModel = tbl + '.' + databaseName
-    -var databaseTypeModel = tbl + '.' + databaseType
-    -var javaNameModel = tbl + '.' + javaName
-    -var javaTypeModel = tbl + '.' + javaType
-
-    -var databaseNameId = databaseName + focusId
-    -var databaseTypeId = databaseType + focusId
-    -var javaNameId = javaName + focusId
-    -var javaTypeId = javaType + focusId
-
-    .col-xs-3.col-sm-3.col-md-3
-        .fieldSep /
-        .input-tip
-            input.form-control(id=databaseNameId ignite-on-enter-focus-move=databaseTypeId type='text' ng-model=databaseNameModel placeholder='DB name' ignite-on-enter='#{javaNameModel} = #{javaNameModel} ? #{javaNameModel} : #{databaseNameModel}' ignite-on-escape='tableReset(false)')
-    .col-xs-3.col-sm-3.col-md-3
-        .fieldSep /
-        .input-tip
-            button.select-toggle.form-control(id=databaseTypeId ignite-on-enter-focus-move=javaNameId ng-model=databaseTypeModel data-placeholder='DB type' ng-class='{placeholder: !#{databaseTypeModel}}' bs-select bs-options='item.value as item.label for item in {{supportedJdbcTypes}}' ignite-on-escape='tableReset(false)' tabindex='0')
-    .col-xs-3.col-sm-3.col-md-3
-        .fieldSep /
-        .input-tip
-            input.form-control(id=javaNameId ignite-on-enter-focus-move=javaTypeId type='text' ng-model=javaNameModel placeholder='Java name' ignite-on-escape='tableReset(false)')
-    .col-xs-3.col-sm-3.col-md-3
-        -var btnVisible = 'tableDbFieldSaveVisible(' + tbl + ', ' + index +')'
-        -var btnSave = 'tableDbFieldSave(' + tbl + ', ' + index +')'
-        -var btnVisibleAndSave = btnVisible + ' && ' + btnSave
-
-        +btn-save(btnVisible, btnSave)
-        .input-tip
-            button.select-toggle.form-control(id=javaTypeId ng-model=javaTypeModel data-placeholder='Java type' ng-class='{placeholder: !#{javaTypeModel}}' bs-select bs-options='item.value as item.label for item in {{supportedJavaTypes}}' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)' tabindex='0')
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label(id='store-title') Domain model for cache store
-        ignite-form-field-tooltip.tipLabel
-            | Domain model properties for binding database with cache via POJO cache store#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/persistent-store" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +text('Database schema:', model + '.databaseSchema', '"databaseSchema"', 'false', 'Input DB schema name', 'Schema name in database')
-                .settings-row
-                    +text('Database table:', model + '.databaseTable', '"databaseTable"', 'false', 'Input DB table name', 'Table name in database')
-                .settings-row(ng-init='keysTbl={type: "table-db-fields", model: "keyFields", focusId: "KeyField", ui: "table-db-fields"}')
-                    +ignite-form-group(ng-form=keyFieldsForm ng-model=keyFields)
-                        ignite-form-field-label(id='keyFields')
-                            | Key fields
-                        ignite-form-group-tooltip
-                            | Collection of key fields descriptions for CacheJdbcPojoStore
-                        ignite-form-group-add(ng-click='tableNewItem(keysTbl)')
-                            | Add key field
-                        .group-content-empty(ng-show='!((#{keyFields} && #{keyFields}.length > 0) || tableNewItemActive(keysTbl))') Not defined
-                        .group-content(ng-show='(#{keyFields} && #{keyFields}.length > 0) || tableNewItemActive(keysTbl)')
-                            table.links-edit(st-table=keyFields)
-                                tbody
-                                    tr(ng-repeat='item in #{keyFields} track by $index')
-                                        td
-                                            div(ng-hide='tableEditing(keysTbl, $index)')
-                                                a.labelFormField(ng-click='tableStartEdit(backupItem, keysTbl, $index)') {{$index + 1}}) {{item.databaseFieldName}} / {{item.databaseFieldType}} / {{item.javaFieldName}} / {{item.javaFieldType}}
-                                                +btn-remove('tableRemove(backupItem, keysTbl, $index)', '"Remove key field"')
-                                            div(ng-if='tableEditing(keysTbl, $index)')
-                                                +table-db-field-edit('keysTbl', 'cur', '{{::keysTbl.focusId + $index}}', '$index')
-                                tfoot(ng-show='tableNewItemActive(keysTbl)')
-                                    tr
-                                        td
-                                            +table-db-field-edit('keysTbl', 'new', 'KeyField', '-1')
-                .settings-row(ng-init='valuesTbl={type: "table-db-fields", model: "valueFields", focusId: "ValueField", ui: "table-db-fields"}')
-                    +ignite-form-group(ng-form=valueFieldsForm ng-model=valueFields)
-                        ignite-form-field-label(id='valueFields')
-                            | Value fields
-                        ignite-form-group-tooltip
-                            | Collection of value fields descriptions for CacheJdbcPojoStore
-                        ignite-form-group-add(ng-click='tableNewItem(valuesTbl)')
-                            | Add value field
-                        .group-content-empty(ng-show='!((#{valueFields} && #{valueFields}.length > 0) || tableNewItemActive(valuesTbl))') Not defined
-                        .group-content(ng-show='(#{valueFields} && #{valueFields}.length > 0) || tableNewItemActive(valuesTbl)')
-                            table.links-edit(st-table=valueFields)
-                                tbody
-                                    tr(ng-repeat='item in #{valueFields} track by $index')
-                                        td
-                                            div(ng-hide='tableEditing(valuesTbl, $index)')
-                                                a.labelFormField(ng-click='tableStartEdit(backupItem, valuesTbl, $index)') {{$index + 1}}) {{item.databaseFieldName}} / {{item.databaseFieldType}} / {{item.javaFieldName}} / {{item.javaFieldType}}
-                                                +btn-remove('tableRemove(backupItem, valuesTbl, $index)', '"Remove key field"')
-                                            div(ng-if='tableEditing(valuesTbl, $index)')
-                                                +table-db-field-edit('valuesTbl', 'cur', '{{::valuesTbl.focusId + $index}}', '$index')
-                                tfoot(ng-show='tableNewItemActive(valuesTbl)')
-                                    tr
-                                        td
-                                            +table-db-field-edit('valuesTbl', 'new', 'ValueField', '-1')
-            .col-sm-6
-                +preview-xml-java(model, 'domainStore')
-

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/domains/store.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/domains/store.pug b/modules/web-console/frontend/app/modules/states/configuration/domains/store.pug
new file mode 100644
index 0000000..4dee986
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/domains/store.pug
@@ -0,0 +1,127 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'store'
+-var model = 'backupItem'
+-var keyFields = `${model}.keyFields`
+-var valueFields = `${model}.valueFields`
+-var keyFieldsForm = 'storeKeyFields'
+-var valueFieldsForm = 'storeValueFields'
+
+//- LEGACY mixin for LEGACY db fields tables.
+mixin table-db-field-edit(tbl, prefix, focusId, index)
+    -var databaseName = `${prefix}DatabaseFieldName`
+    -var databaseType = `${prefix}DatabaseFieldType`
+    -var javaName = `${prefix}JavaFieldName`
+    -var javaType = `${prefix}JavaFieldType`
+
+    -var databaseNameModel = `${tbl}.${databaseName}`
+    -var databaseTypeModel = `${tbl}.${databaseType}`
+    -var javaNameModel = `${tbl}.${javaName}`
+    -var javaTypeModel = `${tbl}.${javaType}`
+
+    -var databaseNameId = `${databaseName}${focusId}`
+    -var databaseTypeId = `${databaseType}${focusId}`
+    -var javaNameId = `${javaName}${focusId}`
+    -var javaTypeId = `${javaType}${focusId}`
+
+    .col-xs-3.col-sm-3.col-md-3
+        .fieldSep /
+        .input-tip
+            input.form-control(id=databaseNameId ignite-on-enter-focus-move=databaseTypeId type='text' ng-model=databaseNameModel placeholder='DB name' ignite-on-enter=`${javaNameModel} = ${javaNameModel} ? ${javaNameModel} : ${databaseNameModel}` ignite-on-escape='tableReset(false)')
+    .col-xs-3.col-sm-3.col-md-3
+        .fieldSep /
+        .input-tip
+            button.select-toggle.form-control(id=databaseTypeId ignite-on-enter-focus-move=javaNameId ng-model=databaseTypeModel data-placeholder='DB type' ng-class=`{placeholder: !${databaseTypeModel}}` bs-select bs-options='item.value as item.label for item in {{supportedJdbcTypes}}' ignite-on-escape='tableReset(false)' tabindex='0')
+    .col-xs-3.col-sm-3.col-md-3
+        .fieldSep /
+        .input-tip
+            input.form-control(id=javaNameId ignite-on-enter-focus-move=javaTypeId type='text' ng-model=javaNameModel placeholder='Java name' ignite-on-escape='tableReset(false)')
+    .col-xs-3.col-sm-3.col-md-3
+        -var btnVisible = `tableDbFieldSaveVisible(${tbl}, ${index})`
+        -var btnSave = `tableDbFieldSave(${tbl}, ${index})`
+        -var btnVisibleAndSave = `${btnVisible} && ${btnSave}`
+
+        +btn-save(btnVisible, btnSave)
+        .input-tip
+            button.select-toggle.form-control(id=javaTypeId ng-model=javaTypeModel data-placeholder='Java type' ng-class=`{placeholder: !${javaTypeModel}}` bs-select bs-options='item.value as item.label for item in {{supportedJavaTypes}}' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)' tabindex='0')
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label(id='store-title') Domain model for cache store
+        ignite-form-field-tooltip.tipLabel
+            | Domain model properties for binding database with cache via POJO cache store#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/persistent-store" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +text('Database schema:', model + '.databaseSchema', '"databaseSchema"', 'false', 'Input DB schema name', 'Schema name in database')
+                .settings-row
+                    +text('Database table:', model + '.databaseTable', '"databaseTable"', 'false', 'Input DB table name', 'Table name in database')
+                .settings-row(ng-init='keysTbl={type: "table-db-fields", model: "keyFields", focusId: "KeyField", ui: "table-db-fields"}')
+                    +ignite-form-group(ng-form=keyFieldsForm ng-model=keyFields)
+                        ignite-form-field-label(id='keyFields')
+                            | Key fields
+                        ignite-form-group-tooltip
+                            | Collection of key fields descriptions for CacheJdbcPojoStore
+                        ignite-form-group-add(ng-click='tableNewItem(keysTbl)')
+                            | Add key field
+                        .group-content-empty(ng-show=`!((${keyFields} && ${keyFields}.length > 0) || tableNewItemActive(keysTbl))`) Not defined
+                        .group-content(ng-show=`(${keyFields} && ${keyFields}.length > 0) || tableNewItemActive(keysTbl)`)
+                            table.links-edit(st-table=keyFields)
+                                tbody
+                                    tr(ng-repeat=`item in ${keyFields} track by $index`)
+                                        td
+                                            div(ng-hide='tableEditing(keysTbl, $index)')
+                                                a.labelFormField(ng-click='tableStartEdit(backupItem, keysTbl, $index)') {{$index + 1}}) {{item.databaseFieldName}} / {{item.databaseFieldType}} / {{item.javaFieldName}} / {{item.javaFieldType}}
+                                                +btn-remove('tableRemove(backupItem, keysTbl, $index)', '"Remove key field"')
+                                            div(ng-if='tableEditing(keysTbl, $index)')
+                                                +table-db-field-edit('keysTbl', 'cur', '{{::keysTbl.focusId + $index}}', '$index')
+                                tfoot(ng-show='tableNewItemActive(keysTbl)')
+                                    tr
+                                        td
+                                            +table-db-field-edit('keysTbl', 'new', 'KeyField', '-1')
+                .settings-row(ng-init='valuesTbl={type: "table-db-fields", model: "valueFields", focusId: "ValueField", ui: "table-db-fields"}')
+                    +ignite-form-group(ng-form=valueFieldsForm ng-model=valueFields)
+                        ignite-form-field-label(id='valueFields')
+                            | Value fields
+                        ignite-form-group-tooltip
+                            | Collection of value fields descriptions for CacheJdbcPojoStore
+                        ignite-form-group-add(ng-click='tableNewItem(valuesTbl)')
+                            | Add value field
+                        .group-content-empty(ng-show=`!((${valueFields} && ${valueFields}.length > 0) || tableNewItemActive(valuesTbl))`) Not defined
+                        .group-content(ng-show=`(${valueFields} && ${valueFields}.length > 0) || tableNewItemActive(valuesTbl)`)
+                            table.links-edit(st-table=valueFields)
+                                tbody
+                                    tr(ng-repeat=`item in ${valueFields} track by $index`)
+                                        td
+                                            div(ng-hide='tableEditing(valuesTbl, $index)')
+                                                a.labelFormField(ng-click='tableStartEdit(backupItem, valuesTbl, $index)') {{$index + 1}}) {{item.databaseFieldName}} / {{item.databaseFieldType}} / {{item.javaFieldName}} / {{item.javaFieldType}}
+                                                +btn-remove('tableRemove(backupItem, valuesTbl, $index)', '"Remove key field"')
+                                            div(ng-if='tableEditing(valuesTbl, $index)')
+                                                +table-db-field-edit('valuesTbl', 'cur', '{{::valuesTbl.focusId + $index}}', '$index')
+                                tfoot(ng-show='tableNewItemActive(valuesTbl)')
+                                    tr
+                                        td
+                                            +table-db-field-edit('valuesTbl', 'new', 'ValueField', '-1')
+            .col-sm-6
+                +preview-xml-java(model, 'domainStore')
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/dual.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/dual.jade b/modules/web-console/frontend/app/modules/states/configuration/igfs/dual.jade
deleted file mode 100644
index f6ac89f..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/igfs/dual.jade
+++ /dev/null
@@ -1,42 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'dualMode'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Dual mode
-        ignite-form-field-tooltip.tipLabel
-            | IGFS supports dual-mode that allows it to work as either a standalone file system in Hadoop cluster, or work in tandem with HDFS, providing a primary caching layer for the secondary HDFS#[br]
-            | As a caching layer it provides highly configurable read-through and write-through behaviour
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +number('Maximum pending puts size:', model + '.dualModeMaxPendingPutsSize', '"dualModeMaxPendingPutsSize"', 'true', '0', 'Number.MIN_SAFE_INTEGER',
-                        'Maximum amount of pending data read from the secondary file system and waiting to be written to data cache<br/>\
-                        Zero or negative value stands for unlimited size')
-                .settings-row
-                    +java-class('Put executor service:', model + '.dualModePutExecutorService', '"dualModePutExecutorService"', 'true', 'false', 'DUAL mode put operation executor service')
-                .settings-row
-                    +checkbox('Put executor service shutdown', model + '.dualModePutExecutorServiceShutdown', '"dualModePutExecutorServiceShutdown"', 'DUAL mode put operation executor service shutdown flag')
-            .col-sm-6
-                +preview-xml-java(model, 'igfsDualMode')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/dual.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/dual.pug b/modules/web-console/frontend/app/modules/states/configuration/igfs/dual.pug
new file mode 100644
index 0000000..613070c
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/igfs/dual.pug
@@ -0,0 +1,42 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'dualMode'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Dual mode
+        ignite-form-field-tooltip.tipLabel
+            | IGFS supports dual-mode that allows it to work as either a standalone file system in Hadoop cluster, or work in tandem with HDFS, providing a primary caching layer for the secondary HDFS#[br]
+            | As a caching layer it provides highly configurable read-through and write-through behaviour
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +number('Maximum pending puts size:', `${model}.dualModeMaxPendingPutsSize`, '"dualModeMaxPendingPutsSize"', 'true', '0', 'Number.MIN_SAFE_INTEGER',
+                        'Maximum amount of pending data read from the secondary file system and waiting to be written to data cache<br/>\
+                        Zero or negative value stands for unlimited size')
+                .settings-row
+                    +java-class('Put executor service:', `${model}.dualModePutExecutorService`, '"dualModePutExecutorService"', 'true', 'false', 'DUAL mode put operation executor service')
+                .settings-row
+                    +checkbox('Put executor service shutdown', `${model}.dualModePutExecutorServiceShutdown`, '"dualModePutExecutorServiceShutdown"', 'DUAL mode put operation executor service shutdown flag')
+            .col-sm-6
+                +preview-xml-java(model, 'igfsDualMode')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/fragmentizer.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/fragmentizer.jade b/modules/web-console/frontend/app/modules/states/configuration/igfs/fragmentizer.jade
deleted file mode 100644
index 16f3749..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/igfs/fragmentizer.jade
+++ /dev/null
@@ -1,43 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'fragmentizer'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Fragmentizer
-        ignite-form-field-tooltip.tipLabel
-            | Fragmentizer settings
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                -var enabled = model + '.fragmentizerEnabled'
-
-                .settings-row
-                    +checkbox('Enabled', enabled, '"fragmentizerEnabled"', 'Fragmentizer enabled flag')
-                .settings-row
-                    +number('Concurrent files:', model + '.fragmentizerConcurrentFiles', '"fragmentizerConcurrentFiles"', enabled, '0', '0', 'Number of files to process concurrently by fragmentizer')
-                .settings-row
-                    +number('Throttling block length:', model + '.fragmentizerThrottlingBlockLength', '"fragmentizerThrottlingBlockLength"', enabled, '16777216', '1', 'Length of file chunk to transmit before throttling is delayed')
-                .settings-row
-                    +number('Throttling delay:', model + '.fragmentizerThrottlingDelay', '"fragmentizerThrottlingDelay"', enabled, '200', '0', 'Delay in milliseconds for which fragmentizer is paused')
-            .col-sm-6
-                +preview-xml-java(model, 'igfsFragmentizer')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/fragmentizer.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/fragmentizer.pug b/modules/web-console/frontend/app/modules/states/configuration/igfs/fragmentizer.pug
new file mode 100644
index 0000000..b112697
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/igfs/fragmentizer.pug
@@ -0,0 +1,43 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'fragmentizer'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Fragmentizer
+        ignite-form-field-tooltip.tipLabel
+            | Fragmentizer settings
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                -var enabled = `${model}.fragmentizerEnabled`
+
+                .settings-row
+                    +checkbox('Enabled', enabled, '"fragmentizerEnabled"', 'Fragmentizer enabled flag')
+                .settings-row
+                    +number('Concurrent files:', `${model}.fragmentizerConcurrentFiles`, '"fragmentizerConcurrentFiles"', enabled, '0', '0', 'Number of files to process concurrently by fragmentizer')
+                .settings-row
+                    +number('Throttling block length:', `${model}.fragmentizerThrottlingBlockLength`, '"fragmentizerThrottlingBlockLength"', enabled, '16777216', '1', 'Length of file chunk to transmit before throttling is delayed')
+                .settings-row
+                    +number('Throttling delay:', `${model}.fragmentizerThrottlingDelay`, '"fragmentizerThrottlingDelay"', enabled, '200', '0', 'Delay in milliseconds for which fragmentizer is paused')
+            .col-sm-6
+                +preview-xml-java(model, 'igfsFragmentizer')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/general.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/general.jade b/modules/web-console/frontend/app/modules/states/configuration/igfs/general.jade
deleted file mode 100644
index 62cda77..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/igfs/general.jade
+++ /dev/null
@@ -1,57 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'general'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle)
-        ignite-form-panel-chevron
-        label General
-        ignite-form-field-tooltip.tipLabel
-            | General IGFS configuration#[br]
-            | #[a(href="https://apacheignite-fs.readme.io/docs/in-memory-file-system" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id='general')
-        .panel-body
-            .col-sm-6
-                .settings-row
-                    +text('Name:', model + '.name', '"igfsName"', 'true', 'Input name', 'IGFS name')
-                .settings-row
-                    +clusters(model, 'Associate clusters with the current IGFS')
-                .settings-row
-                    +dropdown('IGFS mode:', model + '.defaultMode', '"defaultMode"', 'true', 'DUAL_ASYNC',
-                    '[\
-                        {value: "PRIMARY", label: "PRIMARY"},\
-                        {value: "PROXY", label: "PROXY"},\
-                        {value: "DUAL_SYNC", label: "DUAL_SYNC"},\
-                        {value: "DUAL_ASYNC", label: "DUAL_ASYNC"}\
-                    ]',
-                    'Mode to specify how IGFS interacts with Hadoop file system\
-                    <ul>\
-                        <li>PRIMARY - in this mode IGFS will not delegate to secondary Hadoop file system and will cache all the files in memory only</li>\
-                        <li>PROXY - in this mode IGFS will not cache any files in memory and will only pass them through to secondary file system</li>\
-                        <li>DUAL_SYNC - in this mode IGFS will cache files locally and also <b>synchronously</b> write them through to secondary file system</li>\
-                        <li>DUAL_ASYNC - in this mode IGFS will cache files locally and also <b> asynchronously </b> write them through to secondary file system</li>\
-                    </ul>')
-                .settings-row
-                    +number('Group size:', model + '.affinnityGroupSize', '"affinnityGroupSize"', 'true', '512', '1',
-                        'Size of the group in blocks<br/>\
-                        Required for construction of affinity mapper in IGFS data cache')
-            .col-sm-6
-                +preview-xml-java(model, 'igfsGeneral')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/general.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/general.pug b/modules/web-console/frontend/app/modules/states/configuration/igfs/general.pug
new file mode 100644
index 0000000..e002d36
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/igfs/general.pug
@@ -0,0 +1,57 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'general'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle)
+        ignite-form-panel-chevron
+        label General
+        ignite-form-field-tooltip.tipLabel
+            | General IGFS configuration#[br]
+            | #[a(href="https://apacheignite-fs.readme.io/docs/in-memory-file-system" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id='general')
+        .panel-body
+            .col-sm-6
+                .settings-row
+                    +text('Name:', `${model}.name`, '"igfsName"', 'true', 'Input name', 'IGFS name')
+                .settings-row
+                    +clusters(model, 'Associate clusters with the current IGFS')
+                .settings-row
+                    +dropdown('IGFS mode:', `${model}.defaultMode`, '"defaultMode"', 'true', 'DUAL_ASYNC',
+                    '[\
+                        {value: "PRIMARY", label: "PRIMARY"},\
+                        {value: "PROXY", label: "PROXY"},\
+                        {value: "DUAL_SYNC", label: "DUAL_SYNC"},\
+                        {value: "DUAL_ASYNC", label: "DUAL_ASYNC"}\
+                    ]',
+                    'Mode to specify how IGFS interacts with Hadoop file system\
+                    <ul>\
+                        <li>PRIMARY - in this mode IGFS will not delegate to secondary Hadoop file system and will cache all the files in memory only</li>\
+                        <li>PROXY - in this mode IGFS will not cache any files in memory and will only pass them through to secondary file system</li>\
+                        <li>DUAL_SYNC - in this mode IGFS will cache files locally and also <b>synchronously</b> write them through to secondary file system</li>\
+                        <li>DUAL_ASYNC - in this mode IGFS will cache files locally and also <b> asynchronously </b> write them through to secondary file system</li>\
+                    </ul>')
+                .settings-row
+                    +number('Group size:', `${model}.affinnityGroupSize`, '"affinnityGroupSize"', 'true', '512', '1',
+                        'Size of the group in blocks<br/>\
+                        Required for construction of affinity mapper in IGFS data cache')
+            .col-sm-6
+                +preview-xml-java(model, 'igfsGeneral')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/ipc.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/ipc.jade b/modules/web-console/frontend/app/modules/states/configuration/igfs/ipc.jade
deleted file mode 100644
index 83c5de6..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/igfs/ipc.jade
+++ /dev/null
@@ -1,60 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'ipc'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label IPC
-        ignite-form-field-tooltip.tipLabel
-            | IGFS Inter-process communication properties
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                -var ipcEndpointConfiguration = model + '.ipcEndpointConfiguration'
-                -var enabled = model + '.ipcEndpointEnabled'
-
-                .settings-row
-                    +checkbox('Enabled', enabled, '"ipcEndpointEnabled"', 'IPC endpoint enabled flag')
-                .settings-row
-                    +dropdown('Type:', ipcEndpointConfiguration + '.type', '"ipcEndpointConfigurationType"', enabled, 'TCP',
-                        '[\
-                            {value: "SHMEM", label: "SHMEM"},\
-                            {value: "TCP", label: "TCP"}\
-                        ]',
-                        'IPC endpoint type\
-                        <ul>\
-                            <li>SHMEM - shared memory endpoint</li>\
-                            <li>TCP - TCP endpoint</li>\
-                        </ul>')
-                .settings-row
-                    +text-ip-address('Host:', ipcEndpointConfiguration + '.host', '"ipcEndpointConfigurationHost"', enabled, '127.0.0.1', 'Host endpoint is bound to')
-                .settings-row
-                    +number-min-max('Port:', ipcEndpointConfiguration + '.port', '"ipcEndpointConfigurationPort"', enabled, '10500', '1', '65535', 'Port endpoint is bound to')
-                .settings-row
-                    +number('Memory size:', ipcEndpointConfiguration + '.memorySize', '"ipcEndpointConfigurationMemorySize"', enabled, '262144', '1', 'Shared memory size in bytes allocated for endpoint communication')
-                .settings-row
-                    +text-enabled('Token directory:', ipcEndpointConfiguration + '.tokenDirectoryPath', '"ipcEndpointConfigurationTokenDirectoryPath"', enabled, 'false', 'ipc/shmem', 'Directory where shared memory tokens are stored')
-                .settings-row
-                    +number('Thread count:', ipcEndpointConfiguration + '.threadCount', '"ipcEndpointConfigurationThreadCount"', enabled, 'availableProcessors', '1',
-                        'Number of threads used by this endpoint to process incoming requests')
-            .col-sm-6
-                +preview-xml-java(model, 'igfsIPC')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/ipc.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/ipc.pug b/modules/web-console/frontend/app/modules/states/configuration/igfs/ipc.pug
new file mode 100644
index 0000000..7c8c056
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/igfs/ipc.pug
@@ -0,0 +1,60 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'ipc'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label IPC
+        ignite-form-field-tooltip.tipLabel
+            | IGFS Inter-process communication properties
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                -var ipcEndpointConfiguration = `${model}.ipcEndpointConfiguration`
+                -var enabled = `${model}.ipcEndpointEnabled`
+
+                .settings-row
+                    +checkbox('Enabled', enabled, '"ipcEndpointEnabled"', 'IPC endpoint enabled flag')
+                .settings-row
+                    +dropdown('Type:', `${ipcEndpointConfiguration}.type`, '"ipcEndpointConfigurationType"', enabled, 'TCP',
+                        '[\
+                            {value: "SHMEM", label: "SHMEM"},\
+                            {value: "TCP", label: "TCP"}\
+                        ]',
+                        'IPC endpoint type\
+                        <ul>\
+                            <li>SHMEM - shared memory endpoint</li>\
+                            <li>TCP - TCP endpoint</li>\
+                        </ul>')
+                .settings-row
+                    +text-ip-address('Host:', `${ipcEndpointConfiguration}.host`, '"ipcEndpointConfigurationHost"', enabled, '127.0.0.1', 'Host endpoint is bound to')
+                .settings-row
+                    +number-min-max('Port:', `${ipcEndpointConfiguration}.port`, '"ipcEndpointConfigurationPort"', enabled, '10500', '1', '65535', 'Port endpoint is bound to')
+                .settings-row
+                    +number('Memory size:', `${ipcEndpointConfiguration}.memorySize`, '"ipcEndpointConfigurationMemorySize"', enabled, '262144', '1', 'Shared memory size in bytes allocated for endpoint communication')
+                .settings-row
+                    +text-enabled('Token directory:', `${ipcEndpointConfiguration}.tokenDirectoryPath`, '"ipcEndpointConfigurationTokenDirectoryPath"', enabled, 'false', 'ipc/shmem', 'Directory where shared memory tokens are stored')
+                .settings-row
+                    +number('Thread count:', `${ipcEndpointConfiguration}.threadCount`, '"ipcEndpointConfigurationThreadCount"', enabled, 'availableProcessors', '1',
+                        'Number of threads used by this endpoint to process incoming requests')
+            .col-sm-6
+                +preview-xml-java(model, 'igfsIPC')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.jade b/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.jade
deleted file mode 100644
index dc0e9fc..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.jade
+++ /dev/null
@@ -1,108 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'misc'
--var model = 'backupItem'
--var pathModesForm = 'miscPathModes'
--var pathModes = model + '.pathModes'
-
-//- LEGACY mixin for LEGACY IGFS path modes table.
-mixin table-igfs-path-mode-edit(prefix, focusId, index)
-    -var keyModel = 'tblPathModes.' + prefix + 'Key'
-    -var valModel = 'tblPathModes.' + prefix + 'Value'
-
-    -var keyFocusId = prefix + 'Key' + focusId
-    -var valFocusId = prefix + 'Value' + focusId
-
-    .col-xs-8.col-sm-8.col-md-8
-        .fieldSep /
-        .input-tip
-            input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder='Path' ignite-on-escape='tableReset(false)')
-    .col-xs-4.col-sm-4.col-md-4
-        -var arg = keyModel + ', ' + valModel
-        -var btnVisible = 'tablePairSaveVisible(tblPathModes, ' + index + ')'
-        -var btnSave = 'tablePairSave(tablePairValid, backupItem, tblPathModes, ' + index + ')'
-        -var btnVisibleAndSave = btnVisible + ' && ' + btnSave
-        +btn-save(btnVisible, btnSave)
-        .input-tip
-            button.select-toggle.form-control(id=valFocusId bs-select ng-model=valModel data-placeholder='Mode' bs-options='item.value as item.label for item in igfsModes' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Miscellaneous
-        ignite-form-field-tooltip.tipLabel
-            | Various miscellaneous IGFS settings
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +number('Block size:', model + '.blockSize', '"blockSize"', 'true', '65536', '0', 'File data block size in bytes')
-                .settings-row
-                    +number('Stream buffer size:', model + '.streamBufferSize', '"streamBufferSize"', 'true', '65536', '0', 'Read/write buffer size for IGFS stream operations in bytes')
-                .settings-row
-                    +number('Maximum space size:', model + '.maxSpaceSize', '"maxSpaceSize"', 'true', '0', '0', 'Maximum space available for data cache to store file system entries')
-                .settings-row
-                    +number('Maximum task range length:', model + '.maximumTaskRangeLength', '"maximumTaskRangeLength"', 'true', '0', '0', 'Maximum default range size of a file being split during IGFS task execution')
-                .settings-row
-                    +number-min-max('Management port:', model + '.managementPort', '"managementPort"', 'true', '11400', '0', '65535', 'Port number for management endpoint')
-                .settings-row
-                    +number('Per node batch size:', model + '.perNodeBatchSize', '"perNodeBatchSize"', 'true', '100', '0', 'Number of file blocks collected on local node before sending batch to remote node')
-                .settings-row
-                    +number('Per node parallel batch count:', model + '.perNodeParallelBatchCount', '"perNodeParallelBatchCount"', 'true', '8', '0', 'Number of file block batches that can be concurrently sent to remote node')
-                .settings-row
-                    +number('Prefetch blocks:', model + '.prefetchBlocks', '"prefetchBlocks"', 'true', '0', '0', 'Number of pre-fetched blocks if specific file chunk is requested')
-                .settings-row
-                    +number('Sequential reads before prefetch:', model + '.sequentialReadsBeforePrefetch', '"sequentialReadsBeforePrefetch"', 'true', '0', '0', 'Amount of sequential block reads before prefetch is triggered')
-                .settings-row
-                    +number('Trash purge timeout:', model + '.trashPurgeTimeout', '"trashPurgeTimeout"', 'true', '1000', '0', 'Maximum timeout awaiting for trash purging in case data cache oversize is detected')
-                .settings-row
-                    +checkbox('Colocate metadata', model + '.colocateMetadata', '"colocateMetadata"', 'Whether to co-locate metadata on a single node')
-                .settings-row
-                    +checkbox('Relaxed consistency', model + '.relaxedConsistency', '"relaxedConsistency"',
-                        'If value of this flag is <b>true</b>, IGFS will skip expensive consistency checks<br/>\
-                        It is recommended to set this flag to <b>false</b> if your application has conflicting\
-                        operations, or you do not know how exactly users will use your system')
-                .settings-row
-                    +ignite-form-group(ng-model=pathModes ng-form=pathModesForm)
-                        ignite-form-field-label
-                            | Path modes
-                        ignite-form-group-tooltip
-                            | Map of path prefixes to IGFS modes used for them
-                        ignite-form-group-add(ng-click='tableNewItem(tblPathModes)')
-                            | Add path mode
-
-                        .group-content-empty(ng-if='!((#{pathModes} && #{pathModes}.length > 0) || tableNewItemActive(tblPathModes))') Not defined
-
-                        .group-content(ng-show='(#{pathModes} && #{pathModes}.length > 0) || tableNewItemActive(tblPathModes)')
-                            table.links-edit(id='pathModes' st-table=pathModes)
-                                tbody
-                                    tr(ng-repeat='item in #{pathModes} track by $index')
-                                        td.col-sm-12(ng-hide='tableEditing(tblPathModes, $index)')
-                                            a.labelFormField(ng-click='tableStartEdit(backupItem, tblPathModes, $index)') {{item.path + " [" + item.mode + "]"}}
-                                            +btn-remove('tableRemove(backupItem, tblPathModes, $index)', '"Remove path"')
-                                        td.col-sm-12(ng-show='tableEditing(tblPathModes, $index)')
-                                            +table-igfs-path-mode-edit('cur', '{{::tblPathModes.focusId + $index}}', '$index')
-                                tfoot(ng-show='tableNewItemActive(tblPathModes)')
-                                    tr
-                                        td.col-sm-12
-                                            +table-igfs-path-mode-edit('new', 'PathMode', '-1')
-
-            .col-sm-6
-                +preview-xml-java(model, 'igfsMisc')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.pug b/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.pug
new file mode 100644
index 0000000..aa4b957
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.pug
@@ -0,0 +1,108 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'misc'
+-var model = 'backupItem'
+-var pathModesForm = 'miscPathModes'
+-var pathModes = `${model}.pathModes`
+
+//- LEGACY mixin for LEGACY IGFS path modes table.
+mixin table-igfs-path-mode-edit(prefix, focusId, index)
+    -var keyModel = `tblPathModes.${prefix}Key`
+    -var valModel = `tblPathModes.${prefix}Value`
+
+    -var keyFocusId = `${prefix}Key${focusId}`
+    -var valFocusId = `${prefix}Value${focusId}`
+
+    .col-xs-8.col-sm-8.col-md-8
+        .fieldSep /
+        .input-tip
+            input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder='Path' ignite-on-escape='tableReset(false)')
+    .col-xs-4.col-sm-4.col-md-4
+        -var arg = `${keyModel}, ${valModel}`
+        -var btnVisible = `tablePairSaveVisible(tblPathModes, ${index})`
+        -var btnSave = `tablePairSave(tablePairValid, backupItem, tblPathModes, ${index})`
+        -var btnVisibleAndSave = `${btnVisible} && ${btnSave}`
+        +btn-save(btnVisible, btnSave)
+        .input-tip
+            button.select-toggle.form-control(id=valFocusId bs-select ng-model=valModel data-placeholder='Mode' bs-options='item.value as item.label for item in igfsModes' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Miscellaneous
+        ignite-form-field-tooltip.tipLabel
+            | Various miscellaneous IGFS settings
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +number('Block size:', `${model}.blockSize`, '"blockSize"', 'true', '65536', '0', 'File data block size in bytes')
+                .settings-row
+                    +number('Stream buffer size:', `${model}.streamBufferSize`, '"streamBufferSize"', 'true', '65536', '0', 'Read/write buffer size for IGFS stream operations in bytes')
+                .settings-row
+                    +number('Maximum space size:', `${model}.maxSpaceSize`, '"maxSpaceSize"', 'true', '0', '0', 'Maximum space available for data cache to store file system entries')
+                .settings-row
+                    +number('Maximum task range length:', `${model}.maximumTaskRangeLength`, '"maximumTaskRangeLength"', 'true', '0', '0', 'Maximum default range size of a file being split during IGFS task execution')
+                .settings-row
+                    +number-min-max('Management port:', `${model}.managementPort`, '"managementPort"', 'true', '11400', '0', '65535', 'Port number for management endpoint')
+                .settings-row
+                    +number('Per node batch size:', `${model}.perNodeBatchSize`, '"perNodeBatchSize"', 'true', '100', '0', 'Number of file blocks collected on local node before sending batch to remote node')
+                .settings-row
+                    +number('Per node parallel batch count:', `${model}.perNodeParallelBatchCount`, '"perNodeParallelBatchCount"', 'true', '8', '0', 'Number of file block batches that can be concurrently sent to remote node')
+                .settings-row
+                    +number('Prefetch blocks:', `${model}.prefetchBlocks`, '"prefetchBlocks"', 'true', '0', '0', 'Number of pre-fetched blocks if specific file chunk is requested')
+                .settings-row
+                    +number('Sequential reads before prefetch:', `${model}.sequentialReadsBeforePrefetch`, '"sequentialReadsBeforePrefetch"', 'true', '0', '0', 'Amount of sequential block reads before prefetch is triggered')
+                .settings-row
+                    +number('Trash purge timeout:', `${model}.trashPurgeTimeout`, '"trashPurgeTimeout"', 'true', '1000', '0', 'Maximum timeout awaiting for trash purging in case data cache oversize is detected')
+                .settings-row
+                    +checkbox('Colocate metadata', `${model}.colocateMetadata`, '"colocateMetadata"', 'Whether to co-locate metadata on a single node')
+                .settings-row
+                    +checkbox('Relaxed consistency', `${model}.relaxedConsistency`, '"relaxedConsistency"',
+                        'If value of this flag is <b>true</b>, IGFS will skip expensive consistency checks<br/>\
+                        It is recommended to set this flag to <b>false</b> if your application has conflicting\
+                        operations, or you do not know how exactly users will use your system')
+                .settings-row
+                    +ignite-form-group(ng-model=pathModes ng-form=pathModesForm)
+                        ignite-form-field-label
+                            | Path modes
+                        ignite-form-group-tooltip
+                            | Map of path prefixes to IGFS modes used for them
+                        ignite-form-group-add(ng-click='tableNewItem(tblPathModes)')
+                            | Add path mode
+
+                        .group-content-empty(ng-if=`!((${pathModes} && ${pathModes}.length > 0) || tableNewItemActive(tblPathModes))`) Not defined
+
+                        .group-content(ng-show=`(${pathModes} && ${pathModes}.length > 0) || tableNewItemActive(tblPathModes)`)
+                            table.links-edit(id='pathModes' st-table=pathModes)
+                                tbody
+                                    tr(ng-repeat=`item in ${pathModes} track by $index`)
+                                        td.col-sm-12(ng-hide='tableEditing(tblPathModes, $index)')
+                                            a.labelFormField(ng-click='tableStartEdit(backupItem, tblPathModes, $index)') {{item.path + " [" + item.mode + "]"}}
+                                            +btn-remove('tableRemove(backupItem, tblPathModes, $index)', '"Remove path"')
+                                        td.col-sm-12(ng-show='tableEditing(tblPathModes, $index)')
+                                            +table-igfs-path-mode-edit('cur', '{{::tblPathModes.focusId + $index}}', '$index')
+                                tfoot(ng-show='tableNewItemActive(tblPathModes)')
+                                    tr
+                                        td.col-sm-12
+                                            +table-igfs-path-mode-edit('new', 'PathMode', '-1')
+
+            .col-sm-6
+                +preview-xml-java(model, 'igfsMisc')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/secondary.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/secondary.jade b/modules/web-console/frontend/app/modules/states/configuration/igfs/secondary.jade
deleted file mode 100644
index b605e77..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/igfs/secondary.jade
+++ /dev/null
@@ -1,45 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'secondaryFileSystem'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label(id="secondaryFileSystem-title") Secondary file system
-        ignite-form-field-tooltip.tipLabel
-            | Secondary file system is provided for pass-through, write-through, and read-through purposes#[br]
-            | #[a(href="https://apacheignite-fs.readme.io/docs/secondary-file-system" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                -var enabled = model + '.secondaryFileSystemEnabled'
-                -var secondaryFileSystem = model + '.secondaryFileSystem'
-
-                .settings-row
-                    +checkbox('Enabled', enabled, '"secondaryFileSystemEnabled"', 'Secondary file system enabled flag')
-                .settings-row
-                    +text-enabled('URI:', secondaryFileSystem + '.uri', '"hadoopURI"', enabled, 'false', 'hdfs://[namenodehost]:[port]/[path]', 'URI of file system')
-                .settings-row
-                    +text-enabled('Config path:', secondaryFileSystem + '.cfgPath', '"cfgPath"', enabled, 'false', 'Path to additional config', 'Additional path to Hadoop configuration')
-                .settings-row
-                    +text-enabled('User name:', secondaryFileSystem + '.userName', '"userName"', enabled, 'false', 'Input user name', 'User name')
-            .col-sm-6
-                +preview-xml-java(model, 'igfsSecondFS')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/igfs/secondary.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/secondary.pug b/modules/web-console/frontend/app/modules/states/configuration/igfs/secondary.pug
new file mode 100644
index 0000000..87e1f4f
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/igfs/secondary.pug
@@ -0,0 +1,45 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'secondaryFileSystem'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label(id="secondaryFileSystem-title") Secondary file system
+        ignite-form-field-tooltip.tipLabel
+            | Secondary file system is provided for pass-through, write-through, and read-through purposes#[br]
+            | #[a(href="https://apacheignite-fs.readme.io/docs/secondary-file-system" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                -var enabled = `${model}.secondaryFileSystemEnabled`
+                -var secondaryFileSystem = `${model}.secondaryFileSystem`
+
+                .settings-row
+                    +checkbox('Enabled', enabled, '"secondaryFileSystemEnabled"', 'Secondary file system enabled flag')
+                .settings-row
+                    +text-enabled('URI:', `${secondaryFileSystem}.uri`, '"hadoopURI"', enabled, 'false', 'hdfs://[namenodehost]:[port]/[path]', 'URI of file system')
+                .settings-row
+                    +text-enabled('Config path:', `${secondaryFileSystem}.cfgPath`, '"cfgPath"', enabled, 'false', 'Path to additional config', 'Additional path to Hadoop configuration')
+                .settings-row
+                    +text-enabled('User name:', `${secondaryFileSystem}.userName`, '"userName"', enabled, 'false', 'Input user name', 'User name')
+            .col-sm-6
+                +preview-xml-java(model, 'igfsSecondFS')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/summary/summary.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/summary/summary.controller.js b/modules/web-console/frontend/app/modules/states/configuration/summary/summary.controller.js
index 16d2fae..25203b3 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/summary/summary.controller.js
+++ b/modules/web-console/frontend/app/modules/states/configuration/summary/summary.controller.js
@@ -18,6 +18,8 @@
 import _ from 'lodash';
 import saver from 'file-saver';
 
+import summaryProjectStructureTemplateUrl from 'views/configuration/summary-project-structure.tpl.pug';
+
 const escapeFileName = (name) => name.replace(/[\\\/*\"\[\],\.:;|=<>?]/g, '-').replace(/ /g, '_');
 
 export default [
@@ -25,6 +27,9 @@ export default [
     function($root, $scope, $http, LegacyUtils, Messages, Loading, $filter, Resource, JavaTypes, Version, generator, spring, java, docker, pom, propsGenerator, readme, FormUtils, SummaryZipper, ActivitiesData) {
         const ctrl = this;
 
+        // Define template urls.
+        ctrl.summaryProjectStructureTemplateUrl = summaryProjectStructureTemplateUrl;
+
         $scope.ui = {
             isSafari: !!(/constructor/i.test(window.HTMLElement) || window.safari),
             ready: false

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/errors.state.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/errors.state.js b/modules/web-console/frontend/app/modules/states/errors.state.js
index 2bdb80a..e219132 100644
--- a/modules/web-console/frontend/app/modules/states/errors.state.js
+++ b/modules/web-console/frontend/app/modules/states/errors.state.js
@@ -16,8 +16,8 @@
  */
 
 import angular from 'angular';
-import templateNotFoundPage from '../../../views/404.jade';
-import templateNotAuthorizedPage from '../../../views/403.jade';
+import templateNotFoundPage from 'views/404.pug';
+import templateNotAuthorizedPage from 'views/403.pug';
 
 angular
     .module('ignite-console.states.errors', [

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/password.state.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/password.state.js b/modules/web-console/frontend/app/modules/states/password.state.js
index 48d01df..587f83d 100644
--- a/modules/web-console/frontend/app/modules/states/password.state.js
+++ b/modules/web-console/frontend/app/modules/states/password.state.js
@@ -17,6 +17,8 @@
 
 import angular from 'angular';
 
+import templateUrl from 'views/reset.tpl.pug';
+
 angular
 .module('ignite-console.states.password', [
     'ui.router'
@@ -31,14 +33,14 @@ angular
     })
     .state('password.reset', {
         url: '/reset?{token}',
-        templateUrl: '/reset.html',
+        templateUrl,
         metaTags: {
             title: 'Reset password'
         }
     })
     .state('password.send', {
         url: '/send',
-        templateUrl: '/reset.html',
+        templateUrl,
         metaTags: {
             title: 'Password Send'
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/profile.state.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/profile.state.js b/modules/web-console/frontend/app/modules/states/profile.state.js
index 9c31340..7c270ad 100644
--- a/modules/web-console/frontend/app/modules/states/profile.state.js
+++ b/modules/web-console/frontend/app/modules/states/profile.state.js
@@ -17,6 +17,8 @@
 
 import angular from 'angular';
 
+import templateUrl from 'views/settings/profile.tpl.pug';
+
 angular
 .module('ignite-console.states.profile', [
     'ui.router'
@@ -26,7 +28,7 @@ angular
     $stateProvider
     .state('settings.profile', {
         url: '/profile',
-        templateUrl: '/settings/profile.html',
+        templateUrl,
         onEnter: AclRoute.checkAccess('profile'),
         metaTags: {
             title: 'User profile'

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/signin.state.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/signin.state.js b/modules/web-console/frontend/app/modules/states/signin.state.js
index 14ebc1b..2625aaa 100644
--- a/modules/web-console/frontend/app/modules/states/signin.state.js
+++ b/modules/web-console/frontend/app/modules/states/signin.state.js
@@ -16,7 +16,7 @@
  */
 
 import angular from 'angular';
-import templateUrl from 'views/signin.jade';
+import templateUrl from 'views/signin.tpl.pug';
 
 angular
 .module('ignite-console.states.login', [


[11/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/services/Clone.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/Clone.service.js b/modules/web-console/frontend/app/services/Clone.service.js
index 52a4e4e..d079141 100644
--- a/modules/web-console/frontend/app/services/Clone.service.js
+++ b/modules/web-console/frontend/app/services/Clone.service.js
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+import templateUrl from 'views/templates/clone.tpl.pug';
+
 // Service for clone objects.
 export default ['IgniteClone', ['$rootScope', '$q', '$modal', ($root, $q, $modal) => {
     const scope = $root.$new();
@@ -36,7 +38,7 @@ export default ['IgniteClone', ['$rootScope', '$q', '$modal', ($root, $q, $modal
         return tmpName;
     }
 
-    const cloneModal = $modal({templateUrl: '/templates/clone.html', scope, placement: 'center', show: false});
+    const cloneModal = $modal({templateUrl, scope, placement: 'center', show: false});
 
     scope.ok = function(newName) {
         if (!_validator || _validator(newName)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/services/Confirm.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/Confirm.service.js b/modules/web-console/frontend/app/services/Confirm.service.js
index 8208ea2..0b5b9be 100644
--- a/modules/web-console/frontend/app/services/Confirm.service.js
+++ b/modules/web-console/frontend/app/services/Confirm.service.js
@@ -15,11 +15,13 @@
  * limitations under the License.
  */
 
+import templateUrl from 'views/templates/confirm.tpl.pug';
+
 // Confirm popup service.
 export default ['IgniteConfirm', ['$rootScope', '$q', '$modal', '$animate', ($root, $q, $modal, $animate) => {
     const scope = $root.$new();
 
-    const modal = $modal({templateUrl: '/templates/confirm.html', scope, placement: 'center', show: false, backdrop: true});
+    const modal = $modal({templateUrl, scope, placement: 'center', show: false, backdrop: true});
 
     const _hide = () => {
         $animate.enabled(modal.$element, false);

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/services/ConfirmBatch.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/ConfirmBatch.service.js b/modules/web-console/frontend/app/services/ConfirmBatch.service.js
index ef66335..2fd55b7 100644
--- a/modules/web-console/frontend/app/services/ConfirmBatch.service.js
+++ b/modules/web-console/frontend/app/services/ConfirmBatch.service.js
@@ -15,12 +15,14 @@
  * limitations under the License.
  */
 
+import templateUrl from 'views/templates/batch-confirm.tpl.pug';
+
 // Service for confirm or skip several steps.
 export default ['IgniteConfirmBatch', ['$rootScope', '$q', '$modal', ($root, $q, $modal) => {
     const scope = $root.$new();
 
     scope.confirmModal = $modal({
-        templateUrl: '/templates/batch-confirm.html',
+        templateUrl,
         scope,
         placement: 'center',
         show: false,

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/controllers/caches-controller.js b/modules/web-console/frontend/controllers/caches-controller.js
index e7521b5..b50fde3 100644
--- a/modules/web-console/frontend/controllers/caches-controller.js
+++ b/modules/web-console/frontend/controllers/caches-controller.js
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+import infoMessageTemplateUrl from 'views/templates/message.tpl.pug';
+
 // Controller for Caches screen.
 export default ['cachesController', [
     '$scope', '$http', '$state', '$filter', '$timeout', '$modal', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'IgniteClone', 'IgniteLoading', 'IgniteModelNormalizer', 'IgniteUnsavedChangesGuard', 'IgniteConfigurationResource', 'IgniteErrorPopover', 'IgniteFormUtils', 'IgniteLegacyTable',
@@ -542,7 +544,7 @@ export default ['cachesController', [
                         ];
 
                         // Show a basic modal from a controller
-                        $modal({scope, template: '/templates/message.html', placement: 'center', show: true});
+                        $modal({scope, templateUrl: infoMessageTemplateUrl, placement: 'center', show: true});
                     }
 
                     save(item);

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/controllers/domains-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/controllers/domains-controller.js b/modules/web-console/frontend/controllers/domains-controller.js
index bfffe92..5c9e511 100644
--- a/modules/web-console/frontend/controllers/domains-controller.js
+++ b/modules/web-console/frontend/controllers/domains-controller.js
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+import templateUrl from 'views/configuration/domains-import.tpl.pug';
+
 // Controller for Domain model screen.
 export default ['domainsController', [
     '$rootScope', '$scope', '$http', '$state', '$filter', '$timeout', '$modal', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteFocus', 'IgniteConfirm', 'IgniteConfirmBatch', 'IgniteClone', 'IgniteLoading', 'IgniteModelNormalizer', 'IgniteUnsavedChangesGuard', 'IgniteAgentMonitor', 'IgniteLegacyTable', 'IgniteConfigurationResource', 'IgniteErrorPopover', 'IgniteFormUtils', 'JavaTypes', 'SqlTypes', 'IgniteActivitiesData',
@@ -409,7 +411,7 @@ export default ['domainsController', [
         $scope.$watch('importDomain.displayedTables', $scope.selectTable);
 
         // Pre-fetch modal dialogs.
-        const importDomainModal = $modal({scope: $scope, templateUrl: '/configuration/domains-import.html', show: false});
+        const importDomainModal = $modal({scope: $scope, templateUrl, show: false});
 
         const hideImportDomain = importDomainModal.hide;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/gulpfile.babel.js/paths.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/gulpfile.babel.js/paths.js b/modules/web-console/frontend/gulpfile.babel.js/paths.js
index 6ebfbad..627b2f9 100644
--- a/modules/web-console/frontend/gulpfile.babel.js/paths.js
+++ b/modules/web-console/frontend/gulpfile.babel.js/paths.js
@@ -24,33 +24,15 @@ const destDir = path.resolve('build');
 const igniteModulesDir = process.env.IGNITE_MODULES ? path.join(path.normalize(process.env.IGNITE_MODULES), 'frontend') : './ignite_modules';
 const igniteModulesTemp = path.resolve('ignite_modules_temp');
 
-const jadeViewsPaths = [
-    './views/**/*.jade',
-    '!./views/configuration/*.jade'
-];
-
-const jadeAppModulePaths = [
-    './app/modules/states/configuration/**/*.jade',
-    './app/modules/sql/*.jade',
-    './views/**/*.jade',
-    '!./views/*.jade',
-    '!./views/includes/*.jade',
-    '!./views/settings/*.jade',
-    '!./views/sql/*.jade',
-    '!./views/templates/*.jade'
-];
-
-const jadeModulePaths = [
-    igniteModulesDir + '/**/view/**/*.jade'
-];
-
 const appModulePaths = [
     igniteModulesDir + '/index.js',
     igniteModulesDir + '/**/main.js',
     igniteModulesDir + '/**/module.js',
     igniteModulesDir + '/**/app/modules/*.js',
     igniteModulesDir + '/**/app/modules/**/*.js',
-    igniteModulesDir + '/**/app/modules/**/*.jade',
+    igniteModulesDir + '/**/app/modules/**/*.pug',
+    igniteModulesDir + '/**/*.pug',
+    igniteModulesDir + '/**/*.tpl.pug',
     igniteModulesDir + '/**/app/**/*.css',
     igniteModulesDir + '/**/app/**/*.scss',
     igniteModulesDir + '/**/app/data/*.json'
@@ -73,10 +55,6 @@ export {
     igniteModulesDir,
     igniteModulesTemp,
 
-    jadeViewsPaths,
-    jadeAppModulePaths,
-    jadeModulePaths,
-
     resourcePaths,
     resourceModulePaths,
     appModulePaths

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/gulpfile.babel.js/tasks/build.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/gulpfile.babel.js/tasks/build.js b/modules/web-console/frontend/gulpfile.babel.js/tasks/build.js
index 7d7401b..149b076 100644
--- a/modules/web-console/frontend/gulpfile.babel.js/tasks/build.js
+++ b/modules/web-console/frontend/gulpfile.babel.js/tasks/build.js
@@ -18,4 +18,4 @@
 import gulp from 'gulp';
 import sequence from 'gulp-sequence';
 
-gulp.task('build', (cb) => sequence(['clean', 'clean:ignite-modules-temp'], 'ignite:modules', ['copy:resource', 'jade'], 'bundle', cb));
+gulp.task('build', (cb) => sequence(['clean', 'clean:ignite-modules-temp'], 'ignite:modules', ['copy:resource'], 'bundle', cb));

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/gulpfile.babel.js/tasks/bundle.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/gulpfile.babel.js/tasks/bundle.js b/modules/web-console/frontend/gulpfile.babel.js/tasks/bundle.js
index d3e8dca..ac3ac76 100644
--- a/modules/web-console/frontend/gulpfile.babel.js/tasks/bundle.js
+++ b/modules/web-console/frontend/gulpfile.babel.js/tasks/bundle.js
@@ -21,10 +21,14 @@ import webpackConfig from '../webpack';
 import WebpackDevServer from 'webpack-dev-server';
 
 gulp.task('bundle', (cb) => {
+    const devServerConfig = webpackConfig.devServer;
+
+    delete webpackConfig.devServer;
+
     if (process.env.NODE_ENV === 'development') {
         // Important! Call webpack and WebpackDevServer must be inline.
-        new WebpackDevServer(webpack(webpackConfig), webpackConfig.devServer)
-            .listen(webpackConfig.devServer.port, 'localhost', cb);
+        new WebpackDevServer(webpack(webpackConfig), devServerConfig)
+            .listen(devServerConfig.port, 'localhost', cb);
     }
     else
         webpack(webpackConfig, cb);

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/gulpfile.babel.js/tasks/jade.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/gulpfile.babel.js/tasks/jade.js b/modules/web-console/frontend/gulpfile.babel.js/tasks/jade.js
deleted file mode 100644
index 4935976..0000000
--- a/modules/web-console/frontend/gulpfile.babel.js/tasks/jade.js
+++ /dev/null
@@ -1,49 +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.
- */
-
-import gulp from 'gulp';
-import ll from 'gulp-ll';
-import jade from 'gulp-jade';
-
-import { jadeViewsPaths, jadeAppModulePaths, jadeModulePaths, destDir, rootDir } from '../paths';
-
-const jadeOptions = {
-    basedir: rootDir,
-    cache: true
-};
-
-ll.tasks(['jade:views', 'jade:app', 'jade:ignite_modules']);
-
-gulp.task('jade', ['jade:views', 'jade:app', 'jade:ignite_modules']);
-
-gulp.task('jade:views', () =>
-    gulp.src(jadeViewsPaths)
-        .pipe(jade(jadeOptions))
-        .pipe(gulp.dest(destDir))
-);
-
-gulp.task('jade:app', () =>
-    gulp.src(jadeAppModulePaths)
-        .pipe(jade(jadeOptions))
-        .pipe(gulp.dest(destDir))
-);
-
-gulp.task('jade:ignite_modules', () =>
-    gulp.src(jadeModulePaths)
-        .pipe(jade(jadeOptions))
-        .pipe(gulp.dest(`${destDir}/ignite_modules`))
-);

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/gulpfile.babel.js/tasks/watch.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/gulpfile.babel.js/tasks/watch.js b/modules/web-console/frontend/gulpfile.babel.js/tasks/watch.js
index dfaa1a3..9a02b88 100644
--- a/modules/web-console/frontend/gulpfile.babel.js/tasks/watch.js
+++ b/modules/web-console/frontend/gulpfile.babel.js/tasks/watch.js
@@ -18,15 +18,12 @@
 import gulp from 'gulp';
 import sequence from 'gulp-sequence';
 
-import { jadeViewsPaths, jadeAppModulePaths, jadeModulePaths, resourcePaths, resourceModulePaths, appModulePaths } from '../paths';
+import { resourcePaths, resourceModulePaths, appModulePaths } from '../paths';
 
 gulp.task('watch:ignite-modules', (cb) => sequence('clean:ignite-modules-temp', 'ignite:modules', cb));
 
 // Build + watch task.
 gulp.task('watch', ['build'], () => {
-    gulp.watch(jadeViewsPaths, ['jade:views']);
-    gulp.watch(jadeAppModulePaths.concat('./app/helpers/**/*.jade'), ['jade:app']);
-    gulp.watch(jadeModulePaths.concat('./app/helpers/**/*.jade'), ['jade:ignite_modules']);
     gulp.watch(resourcePaths, ['copy:resource:app']);
     gulp.watch(resourceModulePaths, ['copy:resource:ignite_modules']);
     gulp.watch(appModulePaths, ['watch:ignite-modules']);

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/gulpfile.babel.js/webpack/common.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/gulpfile.babel.js/webpack/common.js b/modules/web-console/frontend/gulpfile.babel.js/webpack/common.js
index 7360ac4..3d9616f 100644
--- a/modules/web-console/frontend/gulpfile.babel.js/webpack/common.js
+++ b/modules/web-console/frontend/gulpfile.babel.js/webpack/common.js
@@ -18,21 +18,22 @@
 import path from 'path';
 import fs from 'fs';
 import webpack from 'webpack';
-import autoprefixer from 'autoprefixer-core';
-import jade from 'jade';
+
 import ProgressBarPlugin from 'progress-bar-webpack-plugin';
 import eslintFormatter from 'eslint-friendly-formatter';
 
-import ExtractTextPlugin from 'extract-text-webpack-plugin';
 import HtmlWebpackPlugin from 'html-webpack-plugin';
 
+import ExtractTextPlugin from 'extract-text-webpack-plugin';
+
 import {srcDir, destDir, rootDir, igniteModulesDir} from '../paths';
 
+const viewsDir = path.resolve('views');
+const imagesDir = path.resolve('public/images');
+
 const NODE_ENV = process.env.NODE_ENV || 'production';
 const development = NODE_ENV === 'development';
 const node_modules_path = path.resolve('node_modules');
-const cssLoader = 'css-loader?sourceMap!postcss-loader';
-const stylesLoader = cssLoader + '!sass-loader?outputStyle=expanded&sourceMap=true&sourceMapContents=true';
 
 let favicon = 'build/ignite_modules/favicon.ico';
 
@@ -42,150 +43,155 @@ try {
     favicon = 'build/favicon.ico';
 }
 
-export default () => {
-    const assetsLoader = 'file-loader';
-
-    return {
-        cache: true,
-        node: {
-            fs: 'empty'
-        },
-
-        // Entry points.
-        entry: {
-            polyfill: 'babel-polyfill',
-            app: path.join(srcDir, 'app.js'),
-            vendor: path.join(srcDir, 'vendor.js')
-        },
-
-        // Output system.
-        output: {
-            path: destDir,
-            filename: '[name].js'
-        },
-
-        // Resolves modules.
-        resolve: {
-            extensions: [
-                '',
-                '.js'
-            ],
-            root: [rootDir],
-            modulesDirectories: [
-                node_modules_path,
-                './'
-            ]
-        },
-        jade: {
-            basedir: rootDir,
-            locals: {}
-        },
-        // Modules resolvers.
-        /* global require */
-        module: {
-            noParse: [],
-            preLoaders: [
-                {
-                    test: /\.js$/,
-                    exclude: [node_modules_path],
-                    loader: 'eslint-loader'
-                }
-            ],
-            loaders: [
-                {
-                    test: /\.json$/,
-                    loader: 'json-loader'
-                },
-                {
-                    test: /\.jade$/,
-                    loaders: [
-                        `ngtemplate-loader?relativeTo=${rootDir}`,
-                        'html-loader?attrs[]=img:src&attrs[]=img:data-src',
-                        'jade-html-loader'
-                    ]
-                },
-                {
-                    test: /\.js$/,
-                    exclude: [node_modules_path],
-                    loader: 'babel-loader',
-                    query: {
+export default {
+    cache: true,
+    node: {
+        fs: 'empty'
+    },
+    // Entry points.
+    entry: {
+        polyfill: 'babel-polyfill',
+        vendor: path.join(srcDir, 'vendor.js'),
+        app: path.join(srcDir, 'app.js')
+    },
+
+    // Output system.
+    output: {
+        path: destDir,
+        filename: '[name].js'
+    },
+
+    // Resolves modules.
+    resolve: {
+        extensions: [
+            '.js'
+        ],
+        modules: [
+            srcDir,
+            rootDir,
+            node_modules_path
+        ],
+        // A list of module source folders.
+        alias: {
+            app: srcDir,
+            views: viewsDir,
+            images: imagesDir
+        }
+    },
+
+    // Resolve loader use postfix.
+    resolveLoader: {
+        moduleExtensions: ['-loader']
+    },
+
+    module: {
+        rules: [
+            {
+                test: /\.json$/,
+                loader: 'json'
+            },
+
+            // Exclude tpl.pug files to import in bundle.
+            {
+                test: /^(?:(?!tpl\.pug$).)*\.pug$/, // TODO: check this regexp for correct.
+                loader: `pug-html?basedir=${rootDir}`
+            },
+
+            // Render .tpl.pug files to assets folder.
+            {
+                test: /\.tpl\.pug$/,
+                use: [
+                    'file?exports=false&name=assets/templates/[name].[hash].html',
+                    `pug-html?exports=false&basedir=${rootDir}`
+                ]
+            },
+            {
+                test: /\.js$/,
+                enforce: 'pre',
+                exclude: [node_modules_path],
+                use: [{
+                    loader: 'eslint',
+                    options: {
+                        failOnWarning: false,
+                        failOnError: false,
+                        formatter: eslintFormatter
+                    }
+                }]
+            },
+            {
+                test: /\.js$/,
+                exclude: [node_modules_path],
+                use: [{
+                    loader: 'babel',
+                    options: {
                         cacheDirectory: true,
                         plugins: [
                             'transform-runtime',
                             'add-module-exports'
                         ],
                         presets: ['angular']
-
                     }
-                },
-                {
-                    test: /\.css$/,
-                    loader: development ? `style-loader!${cssLoader}` : ExtractTextPlugin.extract('style-loader', cssLoader)
-                },
-                {
-                    test: /\.(scss|sass)$/,
-                    loader: development ? `style-loader!${stylesLoader}` : ExtractTextPlugin.extract('style-loader', stylesLoader)
-                },
-                {
-                    test: /\.(ttf|eot|svg|woff(2)?)(\?v=[\d.]+)?(\?[a-z0-9#-]+)?$/,
-                    loaders: [`${assetsLoader}?name=assets/fonts/[name].[ext]`]
-                },
-                {
-                    test: /\.(jpe?g|png|gif)$/i,
-                    loaders: [`${assetsLoader}?name=assets/images/[name]_[hash].[ext]`]
-                },
-                {
-                    test: require.resolve('jquery'),
-                    loaders: [
-                        'expose-loader?$',
-                        'expose-loader?jQuery'
-                    ]
-                },
-                {
-                    test: require.resolve('nvd3'),
-                    loaders: [
-                        'expose-loader?nv'
-                    ]
-                }
-            ]
-        },
-
-        // Postcss configuration.
-        postcss: [autoprefixer({browsers: ['last 2 versions']})],
-
-        // ESLint loader configuration.
-        eslint: {
-            failOnWarning: false,
-            failOnError: false,
-            formatter: eslintFormatter
-        },
-
-        // Load plugins.
-        plugins: [
-            new webpack.ProvidePlugin({
-                $: 'jquery',
-                jQuery: 'jquery',
-                _: 'lodash',
-                nv: 'nvd3'
-            }),
-            new webpack.DefinePlugin({NODE_ENV: JSON.stringify(NODE_ENV)}),
-            // new webpack.NoErrorsPlugin(),
-            new webpack.optimize.DedupePlugin(),
-            new webpack.optimize.CommonsChunkPlugin({
-                name: 'common',
-                chunks: ['vendor', 'app']
-            }),
-            new webpack.optimize.AggressiveMergingPlugin({moveToParents: true}),
-            new webpack.optimize.OccurenceOrderPlugin(),
-            new ExtractTextPlugin('assets/css/[name]' + (development ? '' : '.[chunkhash]') + '.css', {allChunks: true}),
-            new HtmlWebpackPlugin({
-                filename: 'index.html',
-                templateContent: () => {
-                    return jade.renderFile(path.join(rootDir, 'views', 'index.jade'));
-                },
-                favicon
-            }),
-            new ProgressBarPlugin()
+                }]
+            },
+            {
+                test: /\.css$/,
+                use: development ? ['style', 'css'] : ExtractTextPlugin.extract({
+                    fallback: 'style',
+                    use: ['css']
+                })
+            },
+            {
+                test: /\.scss$/,
+                use: development ? ['style', 'css', 'sass'] : ExtractTextPlugin.extract({
+                    fallback: 'style-loader',
+                    use: ['css', 'sass']
+                })
+            },
+            {
+                test: /\.(ttf|eot|svg|woff(2)?)(\?v=[\d.]+)?(\?[a-z0-9#-]+)?$/,
+                loader: 'file?name=assets/fonts/[name].[ext]'
+            },
+            {
+                test: /\.(jpe?g|png|gif)$/i,
+                loader: 'file?name=assets/images/[name]_[hash].[ext]'
+            },
+            {
+                test: require.resolve('jquery'),
+                use: [
+                    'expose-loader?$',
+                    'expose-loader?jQuery'
+                ]
+            },
+            {
+                test: require.resolve('nvd3'),
+                use: ['expose-loader?nv']
+            }
         ]
-    };
+    },
+
+    // Load plugins.
+    plugins: [
+        new webpack.LoaderOptionsPlugin({
+            options: {
+                pug: {
+                    basedir: rootDir
+                }
+            }
+        }),
+        new webpack.ProvidePlugin({
+            $: 'jquery',
+            jQuery: 'jquery',
+            _: 'lodash',
+            nv: 'nvd3'
+        }),
+        new webpack.DefinePlugin({NODE_ENV: JSON.stringify(NODE_ENV)}),
+        new webpack.optimize.CommonsChunkPlugin({name: 'vendor'}),
+        new webpack.optimize.AggressiveMergingPlugin({moveToParents: true}),
+        new HtmlWebpackPlugin({
+            template: './views/index.pug',
+            favicon
+        }),
+        new ExtractTextPlugin({filename: 'assets/css/[name].css', allChunks: true}),
+        new ProgressBarPlugin()
+    ]
 };

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/development.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/development.js b/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/development.js
index 34e1f6a..c837c43 100644
--- a/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/development.js
+++ b/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/development.js
@@ -15,65 +15,47 @@
  * limitations under the License.
  */
 
-import path from 'path';
-import webpack from 'webpack';
-
-import {destDir, rootDir, srcDir} from '../../paths';
+import {destDir} from '../../paths';
 
 const backendPort = 3000;
 const devServerPort = 9000;
 
-export default () => {
-    const plugins = [
-        new webpack.HotModuleReplacementPlugin()
-    ];
-
-    return {
-        entry: {
-            app: [path.join(srcDir, 'app.js'), 'webpack/hot/only-dev-server']
-        },
-        output: {
-            publicPath: `http://localhost:${devServerPort}/`
-        },
-        context: rootDir,
-        debug: true,
-        devtool: 'source-map',
-        watch: true,
-        devServer: {
-            compress: true,
-            historyApiFallback: true,
-            contentBase: destDir,
-            hot: true,
-            inline: true,
-            proxy: {
-                '/socket.io': {
-                    target: `http://localhost:${backendPort}`,
-                    changeOrigin: true,
-                    ws: true
-                },
-                '/agents': {
-                    target: `http://localhost:${backendPort}`,
-                    changeOrigin: true,
-                    ws: true
-                },
-                '/api/v1/*': {
-                    target: `http://localhost:${backendPort}`,
-                    changeOrigin: true,
-                    pathRewrite: {
-                        '^/api/v1': ''
-                    }
-                }
+export default {
+    devtool: 'source-map',
+    watch: true,
+    devServer: {
+        compress: true,
+        historyApiFallback: true,
+        contentBase: destDir,
+        // hot: true,
+        inline: true,
+        proxy: {
+            '/socket.io': {
+                target: `http://localhost:${backendPort}`,
+                changeOrigin: true,
+                ws: true
             },
-            watchOptions: {
-                aggregateTimeout: 1000,
-                poll: 2000
+            '/agents': {
+                target: `http://localhost:${backendPort}`,
+                changeOrigin: true,
+                ws: true
             },
-            stats: {
-                colors: true,
-                chunks: false
-            },
-            port: devServerPort
+            '/api/v1/*': {
+                target: `http://localhost:${backendPort}`,
+                changeOrigin: true,
+                pathRewrite: {
+                    '^/api/v1': ''
+                }
+            }
+        },
+        watchOptions: {
+            aggregateTimeout: 1000,
+            poll: 2000
+        },
+        stats: {
+            colors: true,
+            chunks: false
         },
-        plugins
-    };
+        port: devServerPort
+    }
 };

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/production.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/production.js b/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/production.js
index 1194568..cbbe9ca 100644
--- a/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/production.js
+++ b/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/production.js
@@ -15,30 +15,27 @@
  * limitations under the License.
  */
 
+
 import webpack from 'webpack';
 
-import {destDir, rootDir} from '../../paths';
+import {destDir} from '../../paths';
 
-export default () => {
-    const plugins = [
-        new webpack.optimize.UglifyJsPlugin({
-            path: destDir,
-            minimize: true,
-            warnings: false,
-            sourceMap: false,
-            mangle: true
-        })
-    ];
+const plugins = [
+    new webpack.optimize.UglifyJsPlugin({
+        path: destDir,
+        minimize: true,
+        warnings: false,
+        sourceMap: false,
+        mangle: true
+    })
+];
 
-    return {
-        context: rootDir,
-        bail: true, // Cancel build on error.
-        debug: false,
-        devtool: 'cheap-source-map',
-        output: {
-            publicPath: '/',
-            filename: '[name].[chunkhash].js'
-        },
-        plugins
-    };
+export default {
+    bail: true, // Cancel build on error.
+    devtool: 'cheap-source-map',
+    output: {
+        publicPath: '/',
+        filename: '[name].[chunkhash].js'
+    },
+    plugins
 };

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/test.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/test.js b/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/test.js
index 1c37196..0cb9b77 100644
--- a/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/test.js
+++ b/modules/web-console/frontend/gulpfile.babel.js/webpack/environments/test.js
@@ -19,34 +19,26 @@ import webpack from 'webpack';
 
 const NODE_ENV = process.env.NODE_ENV || 'production';
 
-export default () => {
-
-    return {
-        cache: true,
-        node: {
-            fs: 'empty'
-        },
-
-        module: {
-            preLoaders: null
-        },
-
-        // Entry points.
-        entry: null,
-
-        // Output system.
-        output: null,
-        eslint: null,
-
-        // Load plugins.
-        plugins: [
-            new webpack.ProvidePlugin({
-                $: 'jquery',
-                jQuery: 'jquery',
-                _: 'lodash',
-                nv: 'nvd3'
-            }),
-            new webpack.DefinePlugin({NODE_ENV: JSON.stringify(NODE_ENV)})
-        ]
-    };
+export default {
+    cache: true,
+    node: {
+        fs: 'empty'
+    },
+
+    // Entry points.
+    entry: null,
+
+    // Output system.
+    output: null,
+
+    // Load plugins.
+    plugins: [
+        new webpack.ProvidePlugin({
+            $: 'jquery',
+            jQuery: 'jquery',
+            _: 'lodash',
+            nv: 'nvd3'
+        }),
+        new webpack.DefinePlugin({NODE_ENV: JSON.stringify(NODE_ENV)})
+    ]
 };

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/gulpfile.babel.js/webpack/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/gulpfile.babel.js/webpack/index.js b/modules/web-console/frontend/gulpfile.babel.js/webpack/index.js
index 9b344dd..3caf06c 100644
--- a/modules/web-console/frontend/gulpfile.babel.js/webpack/index.js
+++ b/modules/web-console/frontend/gulpfile.babel.js/webpack/index.js
@@ -19,6 +19,8 @@ import _ from 'lodash';
 import commonConfig from './common';
 import devConfig from './environments/development';
 import prodConfig from './environments/production';
+
+// TODO check test config
 import testConfig from './environments/test';
 
 const env = process.env.NODE_ENV || 'production';
@@ -31,4 +33,4 @@ const configs = {
 };
 
 // Load config file by environment
-export default _.merge(commonConfig(), configs[env]());
+export default _.merge(commonConfig, configs[env]);

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/package.json
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/package.json b/modules/web-console/frontend/package.json
index 2d12655..b11f690 100644
--- a/modules/web-console/frontend/package.json
+++ b/modules/web-console/frontend/package.json
@@ -5,7 +5,7 @@
   "private": true,
   "scripts": {
     "dev": "cross-env NODE_ENV=development gulp watch",
-    "build": "cross-env NODE_ENV=production gulp build --no-ll",
+    "build": "cross-env NODE_ENV=production gulp build",
     "test": "cross-env NODE_ENV=test karma start ./test/karma.conf.js",
     "eslint": "eslint --format node_modules/eslint-friendly-formatter gulpfile.babel.js/ app/ controllers/ ignite_modules/ ignite_modules_temp/ -- --eff-by-issue"
   },
@@ -50,7 +50,7 @@
     "angular-ui-router": "0.4.2",
     "bootstrap-sass": "3.3.7",
     "brace": "0.8.0",
-    "es6-promise": "3.3.1",
+    "es6-promise": "4.0.5",
     "file-saver": "1.3.3",
     "font-awesome": "4.7.0",
     "glob": "7.1.1",
@@ -60,12 +60,12 @@
     "nvd3": "1.8.4",
     "raleway-webfont": "3.0.1",
     "roboto-font": "0.1.0",
-    "socket.io-client": "1.7.2",
+    "socket.io-client": "1.7.3",
     "ui-router-metatags": "1.0.3"
   },
   "devDependencies": {
     "assets-webpack-plugin": "3.5.1",
-    "autoprefixer-core": "6.0.1",
+    "autoprefixer": "6.7.5",
     "babel-core": "6.20.0",
     "babel-eslint": "7.0.0",
     "babel-loader": "6.2.10",
@@ -77,52 +77,50 @@
     "babel-preset-es2015": "6.18.0",
     "babel-runtime": "6.20.0",
     "chai": "3.5.0",
-    "cross-env": "1.0.8",
-    "css-loader": "0.26.1",
-    "eslint": "3.12.2",
+    "cross-env": "3.1.4",
+    "css-loader": "0.26.2",
+    "eslint": "3.16.1",
     "eslint-friendly-formatter": "2.0.7",
-    "eslint-loader": "1.6.1",
-    "expose-loader": "0.7.1",
-    "extract-text-webpack-plugin": "1.0.1",
-    "file-loader": "0.9.0",
+    "eslint-loader": "1.6.3",
+    "expose-loader": "0.7.3",
+    "extract-text-webpack-plugin": "2.0.0",
+    "file-loader": "0.10.1",
     "gulp": "3.9.1",
     "gulp-eslint": "3.0.1",
-    "gulp-inject": "4.1.0",
-    "gulp-jade": "1.1.0",
-    "gulp-ll": "1.0.4",
+    "gulp-inject": "4.2.0",
     "gulp-rimraf": "0.2.1",
     "gulp-sequence": "0.4.6",
     "gulp-util": "3.0.8",
-    "html-loader": "0.4.4",
-    "html-webpack-plugin": "2.24.1",
-    "jade": "1.11.0",
-    "jade-html-loader": "git://github.com/courcelan/jade-html-loader",
+    "html-loader": "0.4.5",
+    "html-webpack-plugin": "2.28.0",
     "jasmine-core": "2.5.2",
     "json-loader": "0.5.4",
-    "karma": "0.13.22",
+    "karma": "1.5.0",
     "karma-babel-preprocessor": "6.0.1",
     "karma-jasmine": "1.1.0",
     "karma-mocha": "1.3.0",
     "karma-mocha-reporter": "2.2.2",
     "karma-phantomjs-launcher": "1.0.2",
     "karma-teamcity-reporter": "1.0.0",
-    "karma-webpack": "1.8.1",
-    "mocha": "2.5.3",
+    "karma-webpack": "2.0.2",
+    "mocha": "3.2.0",
     "mocha-teamcity-reporter": "1.1.1",
-    "morgan": "1.7.0",
     "ngtemplate-loader": "1.3.1",
-    "node-sass": "3.13.1",
+    "node-sass": "4.5.0",
     "phantomjs-prebuilt": "2.1.14",
-    "postcss-loader": "0.9.1",
+    "postcss-loader": "1.3.2",
     "progress-bar-webpack-plugin": "1.9.3",
+    "pug-html-loader": "1.1.0",
+    "pug-loader": "2.3.0",
     "require-dir": "0.3.1",
-    "resolve-url-loader": "1.6.1",
-    "sass-loader": "3.2.2",
-    "style-loader": "0.13.1",
+    "resolve-url-loader": "2.0.0",
+    "sass-loader": "6.0.2",
+    "style-loader": "0.13.2",
     "url": "0.11.0",
-    "url-loader": "0.5.7",
-    "webpack": "1.14.0",
-    "webpack-dev-server": "1.16.3",
-    "worker-loader": "0.7.1"
+    "url-loader": "0.5.8",
+    "webpack": "2.2.1",
+    "webpack-dev-server": "2.4.1",
+    "webpack-stream": "3.2.0",
+    "worker-loader": "0.8.0"
   }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/test/e2e/exampe.test.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/e2e/exampe.test.js b/modules/web-console/frontend/test/e2e/exampe.test.js
index c778c79..00788bb 100644
--- a/modules/web-console/frontend/test/e2e/exampe.test.js
+++ b/modules/web-console/frontend/test/e2e/exampe.test.js
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+import { suite, test, setup } from 'mocha';
+
 suite('ExampleTestSuite', () => {
     setup(() => {
         // browser.get('http://localhost:9000/');
@@ -37,4 +39,4 @@ suite('ExampleTestSuite', () => {
 
         // element(by.model('ui.email')).sendKeys('jhon@doe.com');
     });
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/test/karma.conf.babel.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/karma.conf.babel.js b/modules/web-console/frontend/test/karma.conf.babel.js
index 76a0ba0..992c4d0 100644
--- a/modules/web-console/frontend/test/karma.conf.babel.js
+++ b/modules/web-console/frontend/test/karma.conf.babel.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import webpackConfig from '../gulpfile.babel.js/webpack';
+import webpack from '../gulpfile.babel.js/webpack';
 import path from 'path';
 
 const basePath = path.resolve('./');
@@ -23,7 +23,7 @@ const basePath = path.resolve('./');
 export default (config) => {
     config.set({
         // Base path that will be used to resolve all patterns (eg. files, exclude).
-        basePath: basePath,
+        basePath,
 
         // Frameworks to use available frameworks: https://npmjs.org/browse/keyword/karma-adapter
         frameworks: ['mocha'],
@@ -46,7 +46,8 @@ export default (config) => {
         preprocessors: {
             'test/**/*.js': ['webpack']
         },
-        webpack: webpackConfig,
+
+        webpack,
 
         webpackMiddleware: {
             noInfo: true

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/test/protractor.conf.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/protractor.conf.js b/modules/web-console/frontend/test/protractor.conf.js
index 3386e66..4ee1c69 100644
--- a/modules/web-console/frontend/test/protractor.conf.js
+++ b/modules/web-console/frontend/test/protractor.conf.js
@@ -23,10 +23,10 @@
 // };
 
 exports.config = {
-  seleniumAddress: 'http://localhost:4444/wd/hub',
+    seleniumAddress: 'http://localhost:4444/wd/hub',
 
-  capabilities: {
-    'browserName': 'chrome'
+    capabilities: {
+        browserName: 'chrome'
     // 'browserName': 'phantomjs',
 
     // /*
@@ -40,11 +40,11 @@ exports.config = {
     //  * See https://github.com/detro/ghostdriver#faq
     //  */
     // 'phantomjs.ghostdriver.cli.args': ['--loglevel=DEBUG']
-  },
+    },
 
-  specs: ['test/e2e/*.js'],
+    specs: ['test/e2e/*.js'],
 
-  jasmineNodeOpts: {
-    showColors: true
-  }
+    jasmineNodeOpts: {
+        showColors: true
+    }
 };

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/test/unit/JavaTransformer.test.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/unit/JavaTransformer.test.js b/modules/web-console/frontend/test/unit/JavaTransformer.test.js
index 3f39000..7dacc16 100644
--- a/modules/web-console/frontend/test/unit/JavaTransformer.test.js
+++ b/modules/web-console/frontend/test/unit/JavaTransformer.test.js
@@ -20,7 +20,7 @@ import JavaTypes from '../../app/services/JavaTypes.service.js';
 import generator from '../../app/modules/configuration/generator/ConfigurationGenerator';
 import transformer from '../../app/modules/configuration/generator/JavaTransformer.service';
 
-import { assert } from 'chai';
+import { suite, test } from 'mocha';
 
 suite.skip('JavaTransformerTestsSuite', () => {
     test('AtomicConfiguration', () => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/test/unit/JavaTypes.test.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/unit/JavaTypes.test.js b/modules/web-console/frontend/test/unit/JavaTypes.test.js
index 49e78cc..e42d687 100644
--- a/modules/web-console/frontend/test/unit/JavaTypes.test.js
+++ b/modules/web-console/frontend/test/unit/JavaTypes.test.js
@@ -21,113 +21,114 @@ import ClusterDflts from '../../app/modules/configuration/generator/defaults/Clu
 import CacheDflts from '../../app/modules/configuration/generator/defaults/Cache.service';
 import IgfsDflts from '../../app/modules/configuration/generator/defaults/IGFS.service';
 
-const INSTANCE = new JavaTypes(new ClusterDflts(), new CacheDflts(), new IgfsDflts());
+const instance = new JavaTypes(new ClusterDflts(), new CacheDflts(), new IgfsDflts());
 
+import { suite, test } from 'mocha';
 import { assert } from 'chai';
 
 suite('JavaTypesTestsSuite', () => {
     test('nonBuiltInClass', () => {
-        assert.equal(INSTANCE.nonBuiltInClass('BigDecimal'), false);
-        assert.equal(INSTANCE.nonBuiltInClass('java.math.BigDecimal'), false);
+        assert.equal(instance.nonBuiltInClass('BigDecimal'), false);
+        assert.equal(instance.nonBuiltInClass('java.math.BigDecimal'), false);
 
-        assert.equal(INSTANCE.nonBuiltInClass('String'), false);
-        assert.equal(INSTANCE.nonBuiltInClass('java.lang.String'), false);
+        assert.equal(instance.nonBuiltInClass('String'), false);
+        assert.equal(instance.nonBuiltInClass('java.lang.String'), false);
 
-        assert.equal(INSTANCE.nonBuiltInClass('Timestamp'), false);
-        assert.equal(INSTANCE.nonBuiltInClass('java.sql.Timestamp'), false);
+        assert.equal(instance.nonBuiltInClass('Timestamp'), false);
+        assert.equal(instance.nonBuiltInClass('java.sql.Timestamp'), false);
 
-        assert.equal(INSTANCE.nonBuiltInClass('Date'), false);
-        assert.equal(INSTANCE.nonBuiltInClass('java.sql.Date'), false);
+        assert.equal(instance.nonBuiltInClass('Date'), false);
+        assert.equal(instance.nonBuiltInClass('java.sql.Date'), false);
 
-        assert.equal(INSTANCE.nonBuiltInClass('Date'), false);
-        assert.equal(INSTANCE.nonBuiltInClass('java.util.Date'), false);
+        assert.equal(instance.nonBuiltInClass('Date'), false);
+        assert.equal(instance.nonBuiltInClass('java.util.Date'), false);
 
-        assert.equal(INSTANCE.nonBuiltInClass('CustomClass'), true);
-        assert.equal(INSTANCE.nonBuiltInClass('java.util.CustomClass'), true);
-        assert.equal(INSTANCE.nonBuiltInClass('my.package.CustomClass'), true);
+        assert.equal(instance.nonBuiltInClass('CustomClass'), true);
+        assert.equal(instance.nonBuiltInClass('java.util.CustomClass'), true);
+        assert.equal(instance.nonBuiltInClass('my.package.CustomClass'), true);
     });
 
     test('nonEnum', () => {
-        assert.equal(INSTANCE.nonEnum('org.apache.ignite.cache.CacheMode'), false);
-        assert.equal(INSTANCE.nonEnum('org.apache.ignite.transactions.TransactionConcurrency'), false);
-        assert.equal(INSTANCE.nonEnum('org.apache.ignite.cache.CacheWriteSynchronizationMode'), false);
-        assert.equal(INSTANCE.nonEnum('org.apache.ignite.igfs.IgfsIpcEndpointType'), false);
-        assert.equal(INSTANCE.nonEnum('java.io.Serializable'), true);
-        assert.equal(INSTANCE.nonEnum('BigDecimal'), true);
+        assert.equal(instance.nonEnum('org.apache.ignite.cache.CacheMode'), false);
+        assert.equal(instance.nonEnum('org.apache.ignite.transactions.TransactionConcurrency'), false);
+        assert.equal(instance.nonEnum('org.apache.ignite.cache.CacheWriteSynchronizationMode'), false);
+        assert.equal(instance.nonEnum('org.apache.ignite.igfs.IgfsIpcEndpointType'), false);
+        assert.equal(instance.nonEnum('java.io.Serializable'), true);
+        assert.equal(instance.nonEnum('BigDecimal'), true);
     });
 
     test('shortClassName', () => {
-        assert.equal(INSTANCE.shortClassName('java.math.BigDecimal'), 'BigDecimal');
-        assert.equal(INSTANCE.shortClassName('BigDecimal'), 'BigDecimal');
-        assert.equal(INSTANCE.shortClassName('int'), 'int');
-        assert.equal(INSTANCE.shortClassName('java.lang.Integer'), 'Integer');
-        assert.equal(INSTANCE.shortClassName('Integer'), 'Integer');
-        assert.equal(INSTANCE.shortClassName('java.util.UUID'), 'UUID');
-        assert.equal(INSTANCE.shortClassName('java.sql.Date'), 'Date');
-        assert.equal(INSTANCE.shortClassName('Date'), 'Date');
-        assert.equal(INSTANCE.shortClassName('com.my.Abstract'), 'Abstract');
-        assert.equal(INSTANCE.shortClassName('Abstract'), 'Abstract');
+        assert.equal(instance.shortClassName('java.math.BigDecimal'), 'BigDecimal');
+        assert.equal(instance.shortClassName('BigDecimal'), 'BigDecimal');
+        assert.equal(instance.shortClassName('int'), 'int');
+        assert.equal(instance.shortClassName('java.lang.Integer'), 'Integer');
+        assert.equal(instance.shortClassName('Integer'), 'Integer');
+        assert.equal(instance.shortClassName('java.util.UUID'), 'UUID');
+        assert.equal(instance.shortClassName('java.sql.Date'), 'Date');
+        assert.equal(instance.shortClassName('Date'), 'Date');
+        assert.equal(instance.shortClassName('com.my.Abstract'), 'Abstract');
+        assert.equal(instance.shortClassName('Abstract'), 'Abstract');
     });
 
     test('fullClassName', () => {
-        assert.equal(INSTANCE.fullClassName('BigDecimal'), 'java.math.BigDecimal');
+        assert.equal(instance.fullClassName('BigDecimal'), 'java.math.BigDecimal');
     });
 
     test('validIdentifier', () => {
-        assert.equal(INSTANCE.validIdentifier('myIdent'), true);
-        assert.equal(INSTANCE.validIdentifier('java.math.BigDecimal'), false);
-        assert.equal(INSTANCE.validIdentifier('2Demo'), false);
-        assert.equal(INSTANCE.validIdentifier('abra kadabra'), false);
-        assert.equal(INSTANCE.validIdentifier(undefined), false);
-        assert.equal(INSTANCE.validIdentifier(null), false);
-        assert.equal(INSTANCE.validIdentifier(''), false);
-        assert.equal(INSTANCE.validIdentifier(' '), false);
+        assert.equal(instance.validIdentifier('myIdent'), true);
+        assert.equal(instance.validIdentifier('java.math.BigDecimal'), false);
+        assert.equal(instance.validIdentifier('2Demo'), false);
+        assert.equal(instance.validIdentifier('abra kadabra'), false);
+        assert.equal(instance.validIdentifier(), false);
+        assert.equal(instance.validIdentifier(null), false);
+        assert.equal(instance.validIdentifier(''), false);
+        assert.equal(instance.validIdentifier(' '), false);
     });
 
     test('validClassName', () => {
-        assert.equal(INSTANCE.validClassName('java.math.BigDecimal'), true);
-        assert.equal(INSTANCE.validClassName('2Demo'), false);
-        assert.equal(INSTANCE.validClassName('abra kadabra'), false);
-        assert.equal(INSTANCE.validClassName(undefined), false);
-        assert.equal(INSTANCE.validClassName(null), false);
-        assert.equal(INSTANCE.validClassName(''), false);
-        assert.equal(INSTANCE.validClassName(' '), false);
+        assert.equal(instance.validClassName('java.math.BigDecimal'), true);
+        assert.equal(instance.validClassName('2Demo'), false);
+        assert.equal(instance.validClassName('abra kadabra'), false);
+        assert.equal(instance.validClassName(), false);
+        assert.equal(instance.validClassName(null), false);
+        assert.equal(instance.validClassName(''), false);
+        assert.equal(instance.validClassName(' '), false);
     });
 
     test('validPackage', () => {
-        assert.equal(INSTANCE.validPackage('java.math.BigDecimal'), true);
-        assert.equal(INSTANCE.validPackage('my.org.SomeClass'), true);
-        assert.equal(INSTANCE.validPackage('25'), false);
-        assert.equal(INSTANCE.validPackage('abra kadabra'), false);
-        assert.equal(INSTANCE.validPackage(''), false);
-        assert.equal(INSTANCE.validPackage(' '), false);
+        assert.equal(instance.validPackage('java.math.BigDecimal'), true);
+        assert.equal(instance.validPackage('my.org.SomeClass'), true);
+        assert.equal(instance.validPackage('25'), false);
+        assert.equal(instance.validPackage('abra kadabra'), false);
+        assert.equal(instance.validPackage(''), false);
+        assert.equal(instance.validPackage(' '), false);
     });
 
     test('packageSpecified', () => {
-        assert.equal(INSTANCE.packageSpecified('java.math.BigDecimal'), true);
-        assert.equal(INSTANCE.packageSpecified('BigDecimal'), false);
+        assert.equal(instance.packageSpecified('java.math.BigDecimal'), true);
+        assert.equal(instance.packageSpecified('BigDecimal'), false);
     });
 
     test('isKeyword', () => {
-        assert.equal(INSTANCE.isKeyword('abstract'), true);
-        assert.equal(INSTANCE.isKeyword('Abstract'), true);
-        assert.equal(INSTANCE.isKeyword('abra kadabra'), false);
-        assert.equal(INSTANCE.isKeyword(undefined), false);
-        assert.equal(INSTANCE.isKeyword(null), false);
-        assert.equal(INSTANCE.isKeyword(''), false);
-        assert.equal(INSTANCE.isKeyword(' '), false);
+        assert.equal(instance.isKeyword('abstract'), true);
+        assert.equal(instance.isKeyword('Abstract'), true);
+        assert.equal(instance.isKeyword('abra kadabra'), false);
+        assert.equal(instance.isKeyword(), false);
+        assert.equal(instance.isKeyword(null), false);
+        assert.equal(instance.isKeyword(''), false);
+        assert.equal(instance.isKeyword(' '), false);
     });
 
     test('isPrimitive', () => {
-        assert.equal(INSTANCE.isPrimitive('boolean'), true);
+        assert.equal(instance.isPrimitive('boolean'), true);
     });
 
     test('validUUID', () => {
-        assert.equal(INSTANCE.validUUID('123e4567-e89b-12d3-a456-426655440000'), true);
-        assert.equal(INSTANCE.validUUID('12345'), false);
-        assert.equal(INSTANCE.validUUID(undefined), false);
-        assert.equal(INSTANCE.validUUID(null), false);
-        assert.equal(INSTANCE.validUUID(''), false);
-        assert.equal(INSTANCE.validUUID(' '), false);
+        assert.equal(instance.validUUID('123e4567-e89b-12d3-a456-426655440000'), true);
+        assert.equal(instance.validUUID('12345'), false);
+        assert.equal(instance.validUUID(), false);
+        assert.equal(instance.validUUID(null), false);
+        assert.equal(instance.validUUID(''), false);
+        assert.equal(instance.validUUID(' '), false);
     });
 });

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/test/unit/SharpTransformer.test.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/unit/SharpTransformer.test.js b/modules/web-console/frontend/test/unit/SharpTransformer.test.js
index 20de266..3fb9265 100644
--- a/modules/web-console/frontend/test/unit/SharpTransformer.test.js
+++ b/modules/web-console/frontend/test/unit/SharpTransformer.test.js
@@ -18,7 +18,7 @@
 import generator from '../../app/modules/configuration/generator/PlatformGenerator';
 import transformer from '../../app/modules/configuration/generator/SharpTransformer.service';
 
-import { assert } from 'chai';
+import { suite, test } from 'mocha';
 
 suite.skip('SharpTransformerTestsSuite', () => {
     test('AtomicConfiguration', () => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/test/unit/SpringTransformer.test.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/unit/SpringTransformer.test.js b/modules/web-console/frontend/test/unit/SpringTransformer.test.js
index 7998f66..e96cab3 100644
--- a/modules/web-console/frontend/test/unit/SpringTransformer.test.js
+++ b/modules/web-console/frontend/test/unit/SpringTransformer.test.js
@@ -20,7 +20,7 @@ import JavaTypes from '../../app/services/JavaTypes.service.js';
 import generator from '../../app/modules/configuration/generator/ConfigurationGenerator';
 import transformer from '../../app/modules/configuration/generator/SpringTransformer.service';
 
-import { assert } from 'chai';
+import { suite, test } from 'mocha';
 
 suite.skip('SpringTransformerTestsSuite', () => {
     test('AtomicConfiguration', () => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/test/unit/SqlTypes.test.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/unit/SqlTypes.test.js b/modules/web-console/frontend/test/unit/SqlTypes.test.js
index 2d54bdf..17f899c 100644
--- a/modules/web-console/frontend/test/unit/SqlTypes.test.js
+++ b/modules/web-console/frontend/test/unit/SqlTypes.test.js
@@ -19,6 +19,7 @@ import SqlTypes from '../../app/services/SqlTypes.service.js';
 
 const INSTANCE = new SqlTypes();
 
+import { suite, test } from 'mocha';
 import { assert } from 'chai';
 
 suite('SqlTypesTestsSuite', () => {
@@ -27,7 +28,7 @@ suite('SqlTypesTestsSuite', () => {
         assert.equal(INSTANCE.validIdentifier('java.math.BigDecimal'), false);
         assert.equal(INSTANCE.validIdentifier('2Demo'), false);
         assert.equal(INSTANCE.validIdentifier('abra kadabra'), false);
-        assert.equal(INSTANCE.validIdentifier(undefined), false);
+        assert.equal(INSTANCE.validIdentifier(), false);
         assert.equal(INSTANCE.validIdentifier(null), false);
         assert.equal(INSTANCE.validIdentifier(''), false);
         assert.equal(INSTANCE.validIdentifier(' '), false);
@@ -38,7 +39,7 @@ suite('SqlTypesTestsSuite', () => {
         assert.equal(INSTANCE.isKeyword('Group'), true);
         assert.equal(INSTANCE.isKeyword('select'), true);
         assert.equal(INSTANCE.isKeyword('abra kadabra'), false);
-        assert.equal(INSTANCE.isKeyword(undefined), false);
+        assert.equal(INSTANCE.isKeyword(), false);
         assert.equal(INSTANCE.isKeyword(null), false);
         assert.equal(INSTANCE.isKeyword(''), false);
         assert.equal(INSTANCE.isKeyword(' '), false);
@@ -47,5 +48,5 @@ suite('SqlTypesTestsSuite', () => {
     test('findJdbcType', () => {
         assert.equal(INSTANCE.findJdbcType(0).dbName, 'NULL');
         assert.equal(INSTANCE.findJdbcType(5555).dbName, 'Unknown');
-    })
+    });
 });

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/test/unit/UserAuth.test.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/unit/UserAuth.test.js b/modules/web-console/frontend/test/unit/UserAuth.test.js
index dbba1f6..7b6b24c 100644
--- a/modules/web-console/frontend/test/unit/UserAuth.test.js
+++ b/modules/web-console/frontend/test/unit/UserAuth.test.js
@@ -15,7 +15,9 @@
  * limitations under the License.
  */
 
-import AuthService from '../../app/modules/user/Auth.service';
+// import AuthService from '../../app/modules/user/Auth.service';
+
+import { suite, test } from 'mocha';
 
 suite('AuthServiceTestsSuite', () => {
     test('SignIn', (done) => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/test/unit/Version.test.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/unit/Version.test.js b/modules/web-console/frontend/test/unit/Version.test.js
index 72685ea..d8c8f65 100644
--- a/modules/web-console/frontend/test/unit/Version.test.js
+++ b/modules/web-console/frontend/test/unit/Version.test.js
@@ -19,6 +19,7 @@ import VersionService from '../../app/modules/configuration/Version.service';
 
 const INSTANCE = new VersionService();
 
+import { suite, test } from 'mocha';
 import { assert } from 'chai';
 
 suite('VersionServiceTestsSuite', () => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/test/unit/defaultName.filter.test.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/unit/defaultName.filter.test.js b/modules/web-console/frontend/test/unit/defaultName.filter.test.js
index 5f28290..2eaf223 100644
--- a/modules/web-console/frontend/test/unit/defaultName.filter.test.js
+++ b/modules/web-console/frontend/test/unit/defaultName.filter.test.js
@@ -17,22 +17,25 @@
 
 import defaultName from '../../app/filters/default-name.filter';
 
+import { suite, test } from 'mocha';
 import { assert } from 'chai';
 
-const INSTANCE = defaultName[0]();
+const instance = defaultName[0]();
 
 suite('defaultName', () => {
     test('defaultName filter', () => {
-        assert.equal(INSTANCE(''), '<default>');
-        assert.equal(INSTANCE(null), '<default>');
-        assert.equal(INSTANCE(undefined), '<default>');
-        assert.equal(INSTANCE('', false), '<default>');
-        assert.equal(INSTANCE(null, false), '<default>');
-        assert.equal(INSTANCE(undefined, false), '<default>');
-        assert.equal(INSTANCE('', true), '&lt;default&gt;');
-        assert.equal(INSTANCE(null, true), '&lt;default&gt;');
-        assert.equal(INSTANCE(undefined, true), '&lt;default&gt;');
-        assert.equal(INSTANCE("name", false), 'name');
-        assert.equal(INSTANCE("name", true), 'name');
+        let undef;
+
+        assert.equal(instance(''), '<default>');
+        assert.equal(instance(null), '<default>');
+        assert.equal(instance(), '<default>');
+        assert.equal(instance('', false), '<default>');
+        assert.equal(instance(null, false), '<default>');
+        assert.equal(instance(undef, false), '<default>');
+        assert.equal(instance('', true), '&lt;default&gt;');
+        assert.equal(instance(null, true), '&lt;default&gt;');
+        assert.equal(instance(undef, true), '&lt;default&gt;');
+        assert.equal(instance('name', false), 'name');
+        assert.equal(instance('name', true), 'name');
     });
 });

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/403.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/403.jade b/modules/web-console/frontend/views/403.jade
deleted file mode 100644
index 38d8bb5..0000000
--- a/modules/web-console/frontend/views/403.jade
+++ /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.
-
-include includes/header
-
-.error-page
-    .container
-        h1.error-page__title 403
-        h2.error-page__description You are not authorized

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/403.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/403.pug b/modules/web-console/frontend/views/403.pug
new file mode 100644
index 0000000..38d8bb5
--- /dev/null
+++ b/modules/web-console/frontend/views/403.pug
@@ -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.
+
+include includes/header
+
+.error-page
+    .container
+        h1.error-page__title 403
+        h2.error-page__description You are not authorized

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/404.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/404.jade b/modules/web-console/frontend/views/404.jade
deleted file mode 100644
index 7d2fc55..0000000
--- a/modules/web-console/frontend/views/404.jade
+++ /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.
-
-include includes/header
-
-.error-page
-    .container
-        h1.error-page__title 404
-        h2.error-page__description Page not found

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/404.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/404.pug b/modules/web-console/frontend/views/404.pug
new file mode 100644
index 0000000..7d2fc55
--- /dev/null
+++ b/modules/web-console/frontend/views/404.pug
@@ -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.
+
+include includes/header
+
+.error-page
+    .container
+        h1.error-page__title 404
+        h2.error-page__description Page not found

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/base.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/base.jade b/modules/web-console/frontend/views/base.jade
deleted file mode 100644
index a910d1b..0000000
--- a/modules/web-console/frontend/views/base.jade
+++ /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.
-
-include includes/header
-
-.container.body-container
-    .main-content(ui-view='')
-
-include includes/footer

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/base.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/base.pug b/modules/web-console/frontend/views/base.pug
new file mode 100644
index 0000000..b05cdba
--- /dev/null
+++ b/modules/web-console/frontend/views/base.pug
@@ -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.
+
+include ./includes/header
+
+.container.body-container
+    .main-content(ui-view='')
+
+include ./includes/footer

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/caches.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/caches.jade b/modules/web-console/frontend/views/configuration/caches.jade
deleted file mode 100644
index 73a6309..0000000
--- a/modules/web-console/frontend/views/configuration/caches.jade
+++ /dev/null
@@ -1,55 +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.
-
-include /app/helpers/jade/mixins.jade
-
-.docs-header
-    h1 Configure Ignite Caches
-.docs-body(ng-controller='cachesController')
-    ignite-information
-        ul
-            li Configure #[a(href='https://apacheignite.readme.io/docs/data-grid' target='_blank') memory] settings
-            li Configure persistence
-    div(ignite-loading='loadingCachesScreen' ignite-loading-text='Loading caches...' ignite-loading-position='top')
-        div(ng-show='ui.ready')
-            hr
-            +main-table('caches', 'caches', 'cacheName', 'selectItem(row)', '{{$index + 1}}) {{row.label}}', 'label')
-            .padding-top-dflt(bs-affix)
-                .panel-tip-container(data-placement='bottom' bs-tooltip='' data-title='Create new cache')
-                    button.btn.btn-primary(id='new-item' ng-click='createItem()') Add cache
-                +save-remove-clone-undo-buttons('cache')
-                hr
-            .bs-affix-fix
-            div(bs-collapse='' data-allow-multiple='true' ng-model='ui.activePanels')
-                form.form-horizontal(name='ui.inputForm' novalidate ng-if='contentVisible()')
-                    .panel-group
-                        include /app/modules/states/configuration/caches/general.jade
-                        include /app/modules/states/configuration/caches/memory.jade
-                        include /app/modules/states/configuration/caches/query.jade
-                        include /app/modules/states/configuration/caches/store.jade
-
-                        +advanced-options-toggle-default
-
-                        div(ng-show='ui.expanded')
-                            include /app/modules/states/configuration/caches/affinity.jade
-                            include /app/modules/states/configuration/caches/concurrency.jade
-                            include /app/modules/states/configuration/caches/near-cache-client.jade
-                            include /app/modules/states/configuration/caches/near-cache-server.jade
-                            include /app/modules/states/configuration/caches/node-filter.jade
-                            include /app/modules/states/configuration/caches/rebalance.jade
-                            include /app/modules/states/configuration/caches/statistics.jade
-
-                            +advanced-options-toggle-default

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/caches.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/caches.tpl.pug b/modules/web-console/frontend/views/configuration/caches.tpl.pug
new file mode 100644
index 0000000..fca41a8
--- /dev/null
+++ b/modules/web-console/frontend/views/configuration/caches.tpl.pug
@@ -0,0 +1,55 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+.docs-header
+    h1 Configure Ignite Caches
+.docs-body(ng-controller='cachesController')
+    ignite-information
+        ul
+            li Configure #[a(href='https://apacheignite.readme.io/docs/data-grid' target='_blank') memory] settings
+            li Configure persistence
+    div(ignite-loading='loadingCachesScreen' ignite-loading-text='Loading caches...' ignite-loading-position='top')
+        div(ng-show='ui.ready')
+            hr
+            +main-table('caches', 'caches', 'cacheName', 'selectItem(row)', '{{$index + 1}}) {{row.label}}', 'label')
+            .padding-top-dflt(bs-affix)
+                .panel-tip-container(data-placement='bottom' bs-tooltip='' data-title='Create new cache')
+                    button.btn.btn-primary(id='new-item' ng-click='createItem()') Add cache
+                +save-remove-clone-undo-buttons('cache')
+                hr
+            .bs-affix-fix
+            div(bs-collapse='' data-allow-multiple='true' ng-model='ui.activePanels')
+                form.form-horizontal(name='ui.inputForm' novalidate ng-if='contentVisible()')
+                    .panel-group
+                        include /app/modules/states/configuration/caches/general
+                        include /app/modules/states/configuration/caches/memory
+                        include /app/modules/states/configuration/caches/query
+                        include /app/modules/states/configuration/caches/store
+
+                        +advanced-options-toggle-default
+
+                        div(ng-show='ui.expanded')
+                            include /app/modules/states/configuration/caches/affinity
+                            include /app/modules/states/configuration/caches/concurrency
+                            include /app/modules/states/configuration/caches/near-cache-client
+                            include /app/modules/states/configuration/caches/near-cache-server
+                            include /app/modules/states/configuration/caches/node-filter
+                            include /app/modules/states/configuration/caches/rebalance
+                            include /app/modules/states/configuration/caches/statistics
+
+                            +advanced-options-toggle-default

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/clusters.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/clusters.jade b/modules/web-console/frontend/views/configuration/clusters.jade
deleted file mode 100644
index 7826464..0000000
--- a/modules/web-console/frontend/views/configuration/clusters.jade
+++ /dev/null
@@ -1,68 +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.
-
-include /app/helpers/jade/mixins.jade
-
-.docs-header
-    h1 Configure Ignite Clusters
-.docs-body(ng-controller='clustersController')
-    ignite-information
-        ul
-            li Configure #[a(href='https://apacheignite.readme.io/docs/clustering' target='_blank') clusters] properties
-            li Associate clusters with caches and in-memory file systems
-    div(ignite-loading='loadingClustersScreen' ignite-loading-text='Loading clusters...' ignite-loading-position='top')
-        div(ng-show='ui.ready')
-            hr
-            +main-table('clusters', 'clusters', 'clusterName', 'selectItem(row)', '{{$index + 1}}) {{row.label}}', 'label')
-            .padding-top-dflt(bs-affix)
-                .panel-tip-container(data-placement='bottom' bs-tooltip='' data-title='Create new cluster')
-                    button.btn.btn-primary(id='new-item' ng-click='createItem()') Add cluster
-                +save-remove-clone-undo-buttons('cluster')
-                hr
-            .bs-affix-fix
-            div(bs-collapse='' data-allow-multiple='true' ng-model='ui.activePanels')
-                form.form-horizontal(name='ui.inputForm' novalidate ng-if='contentVisible()')
-                    .panel-group
-                        include /app/modules/states/configuration/clusters/general.jade
-
-                        +advanced-options-toggle-default
-
-                        div(ng-show='ui.expanded')
-                            include /app/modules/states/configuration/clusters/atomic.jade
-                            include /app/modules/states/configuration/clusters/binary.jade
-                            include /app/modules/states/configuration/clusters/cache-key-cfg.jade
-                            include /app/modules/states/configuration/clusters/checkpoint.jade
-                            include /app/modules/states/configuration/clusters/collision.jade
-                            include /app/modules/states/configuration/clusters/communication.jade
-                            include /app/modules/states/configuration/clusters/connector.jade
-                            include /app/modules/states/configuration/clusters/deployment.jade
-                            include /app/modules/states/configuration/clusters/discovery.jade
-                            include /app/modules/states/configuration/clusters/events.jade
-                            include /app/modules/states/configuration/clusters/failover.jade
-                            include /app/modules/states/configuration/clusters/igfs.jade
-                            include /app/modules/states/configuration/clusters/load-balancing.jade
-                            include /app/modules/states/configuration/clusters/logger.jade
-                            include /app/modules/states/configuration/clusters/marshaller.jade
-                            include /app/modules/states/configuration/clusters/metrics.jade
-                            include /app/modules/states/configuration/clusters/odbc.jade
-                            include /app/modules/states/configuration/clusters/ssl.jade
-                            include /app/modules/states/configuration/clusters/swap.jade
-                            include /app/modules/states/configuration/clusters/thread.jade
-                            include /app/modules/states/configuration/clusters/time.jade
-                            include /app/modules/states/configuration/clusters/transactions.jade
-                            include /app/modules/states/configuration/clusters/attributes.jade
-
-                            +advanced-options-toggle-default

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/clusters.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/clusters.tpl.pug b/modules/web-console/frontend/views/configuration/clusters.tpl.pug
new file mode 100644
index 0000000..c979012
--- /dev/null
+++ b/modules/web-console/frontend/views/configuration/clusters.tpl.pug
@@ -0,0 +1,68 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+.docs-header
+    h1 Configure Ignite Clusters
+.docs-body(ng-controller='clustersController')
+    ignite-information
+        ul
+            li Configure #[a(href='https://apacheignite.readme.io/docs/clustering' target='_blank') clusters] properties
+            li Associate clusters with caches and in-memory file systems
+    div(ignite-loading='loadingClustersScreen' ignite-loading-text='Loading clusters...' ignite-loading-position='top')
+        div(ng-show='ui.ready')
+            hr
+            +main-table('clusters', 'clusters', 'clusterName', 'selectItem(row)', '{{$index + 1}}) {{row.label}}', 'label')
+            .padding-top-dflt(bs-affix)
+                .panel-tip-container(data-placement='bottom' bs-tooltip='' data-title='Create new cluster')
+                    button.btn.btn-primary(id='new-item' ng-click='createItem()') Add cluster
+                +save-remove-clone-undo-buttons('cluster')
+                hr
+            .bs-affix-fix
+            div(bs-collapse='' data-allow-multiple='true' ng-model='ui.activePanels')
+                form.form-horizontal(name='ui.inputForm' novalidate ng-if='contentVisible()')
+                    .panel-group
+                        include /app/modules/states/configuration/clusters/general
+
+                        +advanced-options-toggle-default
+
+                        div(ng-show='ui.expanded')
+                            include /app/modules/states/configuration/clusters/atomic
+                            include /app/modules/states/configuration/clusters/binary
+                            include /app/modules/states/configuration/clusters/cache-key-cfg
+                            include /app/modules/states/configuration/clusters/checkpoint
+                            include /app/modules/states/configuration/clusters/collision
+                            include /app/modules/states/configuration/clusters/communication
+                            include /app/modules/states/configuration/clusters/connector
+                            include /app/modules/states/configuration/clusters/deployment
+                            include /app/modules/states/configuration/clusters/discovery
+                            include /app/modules/states/configuration/clusters/events
+                            include /app/modules/states/configuration/clusters/failover
+                            include /app/modules/states/configuration/clusters/igfs
+                            include /app/modules/states/configuration/clusters/load-balancing
+                            include /app/modules/states/configuration/clusters/logger
+                            include /app/modules/states/configuration/clusters/marshaller
+                            include /app/modules/states/configuration/clusters/metrics
+                            include /app/modules/states/configuration/clusters/odbc
+                            include /app/modules/states/configuration/clusters/ssl
+                            include /app/modules/states/configuration/clusters/swap
+                            include /app/modules/states/configuration/clusters/thread
+                            include /app/modules/states/configuration/clusters/time
+                            include /app/modules/states/configuration/clusters/transactions
+                            include /app/modules/states/configuration/clusters/attributes
+
+                            +advanced-options-toggle-default


[21/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.jade b/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.jade
deleted file mode 100644
index 0dd627a..0000000
--- a/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.jade
+++ /dev/null
@@ -1,17 +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.
-
-div(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, onChange: onChange, mode: "xml"}' ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.pug b/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.pug
new file mode 100644
index 0000000..0dd627a
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.pug
@@ -0,0 +1,17 @@
+//-
+    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.
+
+div(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, onChange: onChange, mode: "xml"}' ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form.jade b/modules/web-console/frontend/app/helpers/jade/form.jade
deleted file mode 100644
index c0c558d..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form.jade
+++ /dev/null
@@ -1,28 +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.
-
-include ./form/form-field-feedback.jade
-include ./form/form-field-label.jade
-include ./form/form-field-text.jade
-include ./form/form-field-password.jade
-include ./form/form-field-dropdown.jade
-include ./form/form-field-datalist.jade
-include ./form/form-field-checkbox.jade
-include ./form/form-field-number.jade
-include ./form/form-field-up.jade
-include ./form/form-field-down.jade
-
-include ./form/form-group.jade

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form.pug b/modules/web-console/frontend/app/helpers/jade/form.pug
new file mode 100644
index 0000000..6fddbf6
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form.pug
@@ -0,0 +1,28 @@
+//-
+    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.
+
+include ./form/form-field-feedback
+include ./form/form-field-label
+include ./form/form-field-text
+include ./form/form-field-password
+include ./form/form-field-dropdown
+include ./form/form-field-datalist
+include ./form/form-field-checkbox
+include ./form/form-field-number
+include ./form/form-field-up
+include ./form/form-field-down
+
+include ./form/form-group

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade
deleted file mode 100644
index 222ecfe..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade
+++ /dev/null
@@ -1,38 +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.
-
-mixin form-field-checkbox(label, model, name, disabled, required, tip)
-    div.checkbox.col-xs-12.col-sm-12.col-md-12
-        label(id='{{ #{name} }}Label')
-            .input-tip
-                if block
-                    block
-                else
-                    input(
-                        id='{{ #{name} }}Input'
-                        name='{{ #{name} }}'
-                        type='checkbox'
-
-                        data-ng-model=model
-                        data-ng-required=required && '#{required}'
-                        data-ng-disabled=disabled && '#{disabled}'
-
-                        data-ng-focus='tableReset()'
-
-                        data-ignite-form-panel-field=''
-                    )
-            span #{label}
-            i.tipLabel.icon-help(bs-tooltip='' data-title=tip)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug
new file mode 100644
index 0000000..68a2dd2
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug
@@ -0,0 +1,38 @@
+//-
+    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.
+
+mixin form-field-checkbox(label, model, name, disabled, required, tip)
+    div.checkbox.col-xs-12.col-sm-12.col-md-12
+        label(id=`{{ ${name} }}Label`)
+            .input-tip
+                if block
+                    block
+                else
+                    input(
+                        id=`{{ ${name} }}Input`
+                        name=`{{ ${name} }}`
+                        type='checkbox'
+
+                        data-ng-model=model
+                        data-ng-required=required && `${required}`
+                        data-ng-disabled=disabled && `${disabled}`
+
+                        data-ng-focus='tableReset()'
+
+                        data-ignite-form-panel-field=''
+                    )
+            span #{label}
+            i.tipLabel.icon-help(bs-tooltip='' data-title=tip)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade
deleted file mode 100644
index 4c1970e..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade
+++ /dev/null
@@ -1,51 +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.
-
-mixin form-field-datalist(label, model, name, disabled, required, placeholder, options, tip)
-    -var errLbl = label.substring(0, label.length - 1)
-
-    mixin form-field-input()
-        input.form-control(
-            id='{{ #{name} }}Input'
-            name='{{ #{name} }}'
-            placeholder=placeholder
-           
-            data-ng-model=model
-
-            data-ng-required=required && '#{required}'
-            data-ng-disabled=disabled && '#{disabled}' || '!#{options}.length'
-
-            bs-typeahead
-            bs-options='item for item in #{options}'
-            container='body'
-            data-min-length='1'
-            ignite-retain-selection
-
-            data-ignite-form-panel-field=''
-        )&attributes(attributes.attributes)
-
-    .ignite-form-field
-        +ignite-form-field__label(label, name, required)
-        .ignite-form-field__control
-            i.tipField.fa.icon-help(bs-tooltip='' data-title=tip)
-
-            +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
-
-            if block
-                block
-
-            .input-tip
-                +form-field-input(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug
new file mode 100644
index 0000000..e4b71af
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug
@@ -0,0 +1,51 @@
+//-
+    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.
+
+mixin form-field-datalist(label, model, name, disabled, required, placeholder, options, tip)
+    -var errLbl = label.substring(0, label.length - 1)
+
+    mixin form-field-input()
+        input.form-control(
+            id=`{{ ${name} }}Input`
+            name=`{{ ${name} }}`
+            placeholder=placeholder
+           
+            data-ng-model=model
+
+            data-ng-required=required && `${required}`
+            data-ng-disabled=disabled && `${disabled}` || `!${options}.length`
+
+            bs-typeahead
+            bs-options=`item for item in ${options}`
+            container='body'
+            data-min-length='1'
+            ignite-retain-selection
+
+            data-ignite-form-panel-field=''
+        )&attributes(attributes.attributes)
+
+    .ignite-form-field
+        +ignite-form-field__label(label, name, required)
+        .ignite-form-field__control
+            i.tipField.fa.icon-help(bs-tooltip='' data-title=tip)
+
+            +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
+
+            if block
+                block
+
+            .input-tip
+                +form-field-input(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade
deleted file mode 100644
index cd10ebe..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade
+++ /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.
-
-mixin ignite-form-field-down()
-    i.tipField.fa.fa-arrow-down(ignite-form-field-down ng-click="$ctrl.down()")&attributes(attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug
new file mode 100644
index 0000000..9361650
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug
@@ -0,0 +1,18 @@
+//-
+    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.
+
+mixin ignite-form-field-down()
+    i.tipField.fa.fa-arrow-down(ignite-form-field-down ng-click='$ctrl.down()')&attributes(attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade
deleted file mode 100644
index 33af6d1..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade
+++ /dev/null
@@ -1,51 +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.
-
-mixin ignite-form-field-dropdown(label, model, name, disabled, required, multiple, placeholder, placeholderEmpty, options, tip)
-    mixin form-field-input()
-        button.select-toggle.form-control(
-            id='{{ #{name} }}Input'
-            name='{{ #{name} }}'
-
-            data-placeholder=placeholderEmpty ? '{{ #{options}.length > 0 ? "#{placeholder}" : "#{placeholderEmpty}" }}' : placeholder
-            
-            data-ng-model=model
-
-            data-ng-required=required && '#{required}'
-            data-ng-disabled=disabled && '#{disabled}' || '!#{options}.length'
-
-            bs-select
-            bs-options='item.value as item.label for item in #{options}'
-
-            data-multiple=multiple ? '1' : false
-            data-container='body > .wrapper'
-
-            tabindex='0'
-
-            data-ignite-form-panel-field=''
-        )&attributes(attributes.attributes)
-
-    .ignite-form-field
-        +ignite-form-field__label(label, name, required)
-        .ignite-form-field__control
-            if tip
-                i.tipField.icon-help(bs-tooltip='' data-title=tip)
-
-            if block
-                block
-
-            .input-tip
-                +form-field-input(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug
new file mode 100644
index 0000000..d7bd0fd
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug
@@ -0,0 +1,51 @@
+//-
+    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.
+
+mixin ignite-form-field-dropdown(label, model, name, disabled, required, multiple, placeholder, placeholderEmpty, options, tip)
+    mixin form-field-input()
+        button.select-toggle.form-control(
+            id=`{{ ${name} }}Input`
+            name=`{{ ${name} }}`
+
+            data-placeholder=placeholderEmpty ? `{{ ${options}.length > 0 ? '${placeholder}' : '${placeholderEmpty}' }}` : placeholder
+            
+            data-ng-model=model
+
+            data-ng-required=required && `${required}`
+            data-ng-disabled=disabled && `${disabled}` || `!${options}.length`
+
+            bs-select
+            bs-options=`item.value as item.label for item in ${options}`
+
+            data-multiple=multiple ? '1' : false
+            data-container='body > .wrapper'
+
+            tabindex='0'
+
+            data-ignite-form-panel-field=''
+        )&attributes(attributes.attributes)
+
+    .ignite-form-field
+        +ignite-form-field__label(label, name, required)
+        .ignite-form-field__control
+            if tip
+                i.tipField.icon-help(bs-tooltip='' data-title=tip)
+
+            if block
+                block
+
+            .input-tip
+                +form-field-input(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade
deleted file mode 100644
index ac1f080..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade
+++ /dev/null
@@ -1,32 +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.
-
-mixin form-field-feedback(name, error, message)
-    -var __field = form + '[' + name + ']'
-    -var __error = __field + '.$error.' + error
-    -var __pristine = __field + '.$pristine'
-
-    i.fa.fa-exclamation-triangle.form-field-feedback(
-        ng-if='!#{__pristine} && #{__error}'
-        name='{{ #{name} }}'
-
-        bs-tooltip
-        data-title=message
-
-        ignite-error=error
-        ignite-error-message=message
-        ignite-restore-input-focus
-    )

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug
new file mode 100644
index 0000000..c70e7a3
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug
@@ -0,0 +1,32 @@
+//-
+    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.
+
+mixin form-field-feedback(name, error, message)
+    -var __field = `${form}[${name}]`
+    -var __error = `${__field}.$error.${error}`
+    -var __pristine = `${__field}.$pristine`
+
+    i.fa.fa-exclamation-triangle.form-field-feedback(
+        ng-if=`!${__pristine} && ${__error}`
+        name=`{{ ${name} }}`
+
+        bs-tooltip
+        data-title=message
+
+        ignite-error=error
+        ignite-error-message=message
+        ignite-restore-input-focus
+    )

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade
deleted file mode 100644
index d6aef81..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade
+++ /dev/null
@@ -1,23 +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.
-
-mixin ignite-form-field__label(label, name, required)
-    label.ignite-form-field__label(
-        id='{{ #{name} }}Label'
-        for='{{ #{name} }}Input'
-        class="{{ #{required} ? 'required' : '' }}"
-    )
-        span !{label}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug
new file mode 100644
index 0000000..d0275c9
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug
@@ -0,0 +1,23 @@
+//-
+    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.
+
+mixin ignite-form-field__label(label, name, required)
+    label.ignite-form-field__label(
+        id=`{{ ${name} }}Label`
+        for=`{{ ${name} }}Input`
+        class=`{{ ${required} ? 'required' : '' }}`
+    )
+        span !{label}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade
deleted file mode 100644
index 58b0dcd..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade
+++ /dev/null
@@ -1,53 +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.
-
-mixin ignite-form-field-number(label, model, name, disabled, required, placeholder, min, max, step, tip)
-    mixin form-field-input()
-        input.form-control(
-            id='{{ #{name} }}Input'
-            name='{{ #{name} }}'
-            placeholder=placeholder
-            type='number'
-
-            min=min ? min : '0'
-            max=max ? max : '{{ Number.MAX_VALUE }}'
-            step=step ? step : '1'
-
-            data-ng-model=model
-
-            data-ng-required=required && '#{required}'
-            data-ng-disabled=disabled && '#{disabled}'
-            data-ng-focus='tableReset()'
-
-            data-ignite-form-panel-field=''
-        )&attributes(attributes.attributes)
-
-    .ignite-form-field
-        +ignite-form-field__label(label, name, required)
-        .ignite-form-field__control
-            if tip
-                i.tipField.icon-help(bs-tooltip='' data-title=tip)
-            
-            +form-field-feedback(name, 'required', 'This field could not be empty')
-            +form-field-feedback(name, 'min', 'Value is less than allowable minimum: '+ min || 0)
-            +form-field-feedback(name, 'max', 'Value is more than allowable maximum: '+ max)
-            +form-field-feedback(name, 'number', 'Only numbers allowed')
-
-            if block
-                block
-
-            .input-tip
-                +form-field-input(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug
new file mode 100644
index 0000000..dd41849
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug
@@ -0,0 +1,53 @@
+//-
+    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.
+
+mixin ignite-form-field-number(label, model, name, disabled, required, placeholder, min, max, step, tip)
+    mixin form-field-input()
+        input.form-control(
+            id=`{{ ${name} }}Input`
+            name=`{{ ${name} }}`
+            placeholder=placeholder
+            type='number'
+
+            min=min ? min : '0'
+            max=max ? max : '{{ Number.MAX_VALUE }}'
+            step=step ? step : '1'
+
+            data-ng-model=model
+
+            data-ng-required=required && `${required}`
+            data-ng-disabled=disabled && `${disabled}`
+            data-ng-focus='tableReset()'
+
+            data-ignite-form-panel-field=''
+        )&attributes(attributes.attributes)
+
+    .ignite-form-field
+        +ignite-form-field__label(label, name, required)
+        .ignite-form-field__control
+            if tip
+                i.tipField.icon-help(bs-tooltip='' data-title=tip)
+            
+            +form-field-feedback(name, 'required', 'This field could not be empty')
+            +form-field-feedback(name, 'min', 'Value is less than allowable minimum: '+ min || 0)
+            +form-field-feedback(name, 'max', 'Value is more than allowable maximum: '+ max)
+            +form-field-feedback(name, 'number', 'Only numbers allowed')
+
+            if block
+                block
+
+            .input-tip
+                +form-field-input(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-password.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-password.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-password.jade
deleted file mode 100644
index e5e7bc8..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-password.jade
+++ /dev/null
@@ -1,47 +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.
-
-mixin ignite-form-field-password-input(name, model, disabled, required, placeholder)
-    input.form-control(
-        id='{{ #{name} }}Input'
-        name='{{ #{name} }}'
-        placeholder=placeholder
-        type='password'
-
-        data-ng-model=model
-
-        data-ng-required=required && '#{required}'
-        data-ng-disabled=disabled && '#{disabled}'
-        data-ng-focus='tableReset()'
-
-        data-ignite-form-panel-field=''
-    )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes : {})
-
-mixin ignite-form-field-password(label, model, name, disabled, required, placeholder, tip)
-    -var errLbl = label.substring(0, label.length - 1)
-
-    .ignite-form-field
-        +ignite-form-field__label(label, name, required)
-        .ignite-form-field__control
-            i.tipField.icon-help(bs-tooltip='' data-title=tip)
-            
-            if block
-                block
-
-            +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
-
-            .input-tip
-                +ignite-form-field-password-input(name, model, disabled, required, placeholder)(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug
new file mode 100644
index 0000000..a12982f
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug
@@ -0,0 +1,47 @@
+//-
+    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.
+
+mixin ignite-form-field-password-input(name, model, disabled, required, placeholder)
+    input.form-control(
+        id=`{{ ${name} }}Input`
+        name=`{{ ${name} }}`
+        placeholder=placeholder
+        type='password'
+
+        data-ng-model=model
+
+        data-ng-required=required && `${required}`
+        data-ng-disabled=disabled && `${disabled}`
+        data-ng-focus='tableReset()'
+
+        data-ignite-form-panel-field=''
+    )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes : {})
+
+mixin ignite-form-field-password(label, model, name, disabled, required, placeholder, tip)
+    -var errLbl = label.substring(0, label.length - 1)
+
+    .ignite-form-field
+        +ignite-form-field__label(label, name, required)
+        .ignite-form-field__control
+            i.tipField.icon-help(bs-tooltip='' data-title=tip)
+            
+            if block
+                block
+
+            +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
+
+            .input-tip
+                +ignite-form-field-password-input(name, model, disabled, required, placeholder)(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade
deleted file mode 100644
index 1f93d3b..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade
+++ /dev/null
@@ -1,64 +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.
-
-mixin ignite-form-field-input(name, model, disabled, required, placeholder)
-    input.form-control(
-        id='{{ #{name} }}Input'
-        name='{{ #{name} }}'
-        placeholder=placeholder
-        type='text'
-
-        data-ng-model=model
-
-        data-ng-required=required && '#{required}'
-        data-ng-disabled=disabled && '#{disabled}'
-        data-ng-focus='tableReset()'
-
-        data-ignite-form-panel-field=''
-    )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes: {})
-
-mixin ignite-form-field-url-input(name, model, disabled, required, placeholder)
-    input.form-control(
-        id='{{ #{name} }}Input'
-        name='{{ #{name} }}'
-        placeholder=placeholder
-        type='url'
-
-        data-ng-model=model
-
-        data-ng-required=required && '#{required}'
-        data-ng-disabled=disabled && '#{disabled}'
-        data-ng-focus='tableReset()'
-
-        data-ignite-form-panel-field=''
-    )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes: {})
-
-mixin ignite-form-field-text(label, model, name, disabled, required, placeholder, tip)
-    -var errLbl = label.substring(0, label.length - 1)
-
-    .ignite-form-field
-        +ignite-form-field__label(label, name, required)
-        .ignite-form-field__control
-            if tip
-                i.tipField.icon-help(bs-tooltip='' data-title=tip)
-            
-            if block
-                block
-
-            +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
-
-            .input-tip
-                +ignite-form-field-input(name, model, disabled, required, placeholder)(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug
new file mode 100644
index 0000000..76ea6e6
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug
@@ -0,0 +1,64 @@
+//-
+    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.
+
+mixin ignite-form-field-input(name, model, disabled, required, placeholder)
+    input.form-control(
+        id=`{{ ${name} }}Input`
+        name=`{{ ${name} }}`
+        placeholder=placeholder
+        type='text'
+
+        data-ng-model=model
+
+        data-ng-required=required && `${required}`
+        data-ng-disabled=disabled && `${disabled}`
+        data-ng-focus='tableReset()'
+
+        data-ignite-form-panel-field=''
+    )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes: {})
+
+mixin ignite-form-field-url-input(name, model, disabled, required, placeholder)
+    input.form-control(
+        id=`{{ ${name} }}Input`
+        name=`{{ ${name} }}`
+        placeholder=placeholder
+        type='url'
+
+        data-ng-model=model
+
+        data-ng-required=required && `${required}`
+        data-ng-disabled=disabled && `${disabled}`
+        data-ng-focus='tableReset()'
+
+        data-ignite-form-panel-field=''
+    )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes: {})
+
+mixin ignite-form-field-text(label, model, name, disabled, required, placeholder, tip)
+    -var errLbl = label.substring(0, label.length - 1)
+
+    .ignite-form-field
+        +ignite-form-field__label(label, name, required)
+        .ignite-form-field__control
+            if tip
+                i.tipField.icon-help(bs-tooltip='' data-title=tip)
+            
+            if block
+                block
+
+            +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
+
+            .input-tip
+                +ignite-form-field-input(name, model, disabled, required, placeholder)(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade
deleted file mode 100644
index c66cd0e..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade
+++ /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.
-
-mixin ignite-form-field-up()
-    i.tipField.fa.fa-arrow-up.ng-scope(ignite-form-field-up ng-click="$ctrl.up()")&attributes(attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug
new file mode 100644
index 0000000..5b65201
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug
@@ -0,0 +1,18 @@
+//-
+    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.
+
+mixin ignite-form-field-up()
+    i.tipField.fa.fa-arrow-up.ng-scope(ignite-form-field-up ng-click='$ctrl.up()')&attributes(attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-group.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-group.jade b/modules/web-console/frontend/app/helpers/jade/form/form-group.jade
deleted file mode 100644
index 8fb7b1f..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-group.jade
+++ /dev/null
@@ -1,23 +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.
-
-mixin ignite-form-group()
-    .group-section(ignite-form-group)&attributes(attributes)
-        .group(ng-if='true' ng-init='group = {}')
-            .group-legend
-                label {{::group.label}}
-            if block
-                block

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-group.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-group.pug b/modules/web-console/frontend/app/helpers/jade/form/form-group.pug
new file mode 100644
index 0000000..8fb7b1f
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-group.pug
@@ -0,0 +1,23 @@
+//-
+    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.
+
+mixin ignite-form-group()
+    .group-section(ignite-form-group)&attributes(attributes)
+        .group(ng-if='true' ng-init='group = {}')
+            .group-legend
+                label {{::group.label}}
+            if block
+                block

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/mixins.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/mixins.jade b/modules/web-console/frontend/app/helpers/jade/mixins.jade
deleted file mode 100644
index 6ca41f6..0000000
--- a/modules/web-console/frontend/app/helpers/jade/mixins.jade
+++ /dev/null
@@ -1,609 +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.
-
-include ./form.jade
-
-//- Mixin for advanced options toggle.
-mixin advanced-options-toggle(click, cond, showMessage, hideMessage)
-    .advanced-options
-        i.fa(ng-click='#{click}' ng-class='#{cond} ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
-        a(ng-click=click) {{#{cond} ? '#{hideMessage}' : '#{showMessage}'}}
-
-//- Mixin for advanced options toggle with default settings.
-mixin advanced-options-toggle-default
-    +advanced-options-toggle('toggleExpanded()', 'ui.expanded', 'Show advanced settings...', 'Hide advanced settings...')
-
-//- Mixin for main table on screen with list of items.
-mixin main-table(title, rows, focusId, click, rowTemplate, searchField)
-    .padding-bottom-dflt(ng-show='#{rows} && #{rows}.length > 0')
-        table.links(st-table='displayedRows' st-safe-src='#{rows}')
-            thead
-                tr
-                    th
-                        lable.labelHeader.labelFormField #{title}:
-                        .col-sm-3.pull-right(style='padding: 0')
-                            input.form-control(type='text' st-search='#{searchField}' placeholder='Filter #{title}...')
-            tbody
-                tr
-                    td
-                        .scrollable-y(ng-show='displayedRows.length > 0' style='max-height: 200px')
-                            table
-                                tbody
-                                    tr(ng-repeat='row in displayedRows track by row._id' ignite-bs-affix-update)
-                                        td
-                                            a(ng-class='{active: row._id == selectedItem._id}' ignite-on-click-focus=focusId ng-click=click) #{rowTemplate}
-                        label.placeholder(ng-show='displayedRows.length == 0') No #{title} found
-
-//- Mixin with save, remove, clone and undo buttons.
-mixin save-remove-clone-undo-buttons(objectName)
-    -var removeTip = '"Remove current ' + objectName + '"'
-    -var cloneTip = '"Clone current ' + objectName + '"'
-    -var undoTip = '"Undo all changes for current ' + objectName + '"'
-
-    div(ng-show='contentVisible()' style='display: inline-block;')
-        .panel-tip-container(ng-hide='!backupItem || backupItem._id')
-            a.btn.btn-primary(ng-disabled='!ui.inputForm.$dirty' ng-click='ui.inputForm.$dirty && saveItem()' bs-tooltip='' data-title='{{saveBtnTipText(ui.inputForm.$dirty, "#{objectName}")}}' data-placement='bottom' data-trigger='hover') Save
-        .panel-tip-container(ng-show='backupItem._id')
-            a.btn.btn-primary(id='save-item' ng-disabled='!ui.inputForm.$dirty' ng-click='ui.inputForm.$dirty && saveItem()' bs-tooltip='' data-title='{{saveBtnTipText(ui.inputForm.$dirty, "#{objectName}")}}' data-placement='bottom' data-trigger='hover') Save
-        .panel-tip-container(ng-show='backupItem._id')
-            a.btn.btn-primary(id='clone-item' ng-click='cloneItem()' bs-tooltip=cloneTip data-placement='bottom' data-trigger='hover') Clone
-        .btn-group.panel-tip-container(ng-show='backupItem._id')
-            button.btn.btn-primary(id='remove-item' ng-click='removeItem()' bs-tooltip=removeTip data-placement='bottom' data-trigger='hover') Remove
-            button.btn.dropdown-toggle.btn-primary(id='remove-item-dropdown' data-toggle='dropdown' data-container='body' bs-dropdown='[{ text: "Remove All", click: "removeAllItems()" }]' data-placement='bottom-right')
-                span.caret
-        .panel-tip-container(ng-show='backupItem')
-            i.btn.btn-primary.fa.fa-undo(id='undo-item' ng-disabled='!ui.inputForm.$dirty' ng-click='ui.inputForm.$dirty && resetAll()' bs-tooltip=undoTip data-placement='bottom' data-trigger='hover')
-
-//- Mixin for feedback on specified error.
-mixin error-feedback(visible, error, errorMessage, name)
-    i.fa.fa-exclamation-triangle.form-control-feedback(
-        ng-if=visible
-        bs-tooltip='"#{errorMessage}"'
-        ignite-error=error
-        ignite-error-message=errorMessage
-        name=name
-    )
-
-//- Mixin for feedback on unique violation.
-mixin unique-feedback(name, errorMessage)
-    +form-field-feedback(name, 'igniteUnique', errorMessage)
-
-//- Mixin for feedback on IP address violation.
-mixin ipaddress-feedback(name)
-    +form-field-feedback(name, 'ipaddress', 'Invalid address!')
-
-//- Mixin for feedback on port of IP address violation.
-mixin ipaddress-port-feedback(name)
-    +form-field-feedback(name, 'ipaddressPort', 'Invalid port!')
-
-//- Mixin for feedback on port range violation.
-mixin ipaddress-port-range-feedback(name)
-    +form-field-feedback(name, 'ipaddressPortRange', 'Invalid port range!')
-
-//- Mixin for feedback on UUID violation.
-mixin uuid-feedback(name)
-    +form-field-feedback(name, 'uuid', 'Invalid node ID!')
-
-//- Function that convert enabled state to corresponding disabled state.
--var enabledToDisabled = function (enabled) {
--    return (enabled === false || enabled === true) ? !enabled : '!(' + enabled + ')';
--}
-
-//- Mixin for checkbox.
-mixin checkbox(lbl, model, name, tip)
-    +form-field-checkbox(lbl, model, name, false, false, tip)
-
-//- Mixin for checkbox with enabled condition.
-mixin checkbox-enabled(lbl, model, name, enabled, tip)
-    +form-field-checkbox(lbl, model, name, enabledToDisabled(enabled), false, tip)
-
-//- Mixin for Java class name field with auto focus condition.
-mixin java-class-autofocus-placholder(lbl, model, name, enabled, required, autofocus, placeholder, tip, validationActive)
-    -var errLbl = lbl.substring(0, lbl.length - 1)
-
-    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, placeholder, tip)(
-        data-java-identifier='true'
-        data-java-package-specified='true'
-        data-java-keywords='true'
-        data-java-built-in-class='true'
-        data-ignite-form-field-input-autofocus=autofocus
-        data-validation-active=validationActive ? '{{ #{validationActive} }}' : '"always"'
-    )
-        if  block
-            block
-
-        +form-field-feedback(name, 'javaBuiltInClass', errLbl + ' should not be the Java built-in class!')
-        +form-field-feedback(name, 'javaKeywords', errLbl + ' could not contains reserved Java keyword!')
-        +form-field-feedback(name, 'javaPackageSpecified', errLbl + ' does not have package specified!')
-        +form-field-feedback(name, 'javaIdentifier', errLbl + ' is invalid Java identifier!')
-
-//- Mixin for Java class name field with auto focus condition.
-mixin java-class-autofocus(lbl, model, name, enabled, required, autofocus, tip, validationActive)
-    +java-class-autofocus-placholder(lbl, model, name, enabled, required, autofocus, 'Enter fully qualified class name', tip, validationActive)
-        if  block
-            block
-
-//- Mixin for Java class name field.
-mixin java-class(lbl, model, name, enabled, required, tip, validationActive)
-    +java-class-autofocus(lbl, model, name, enabled, required, 'false', tip, validationActive)
-        if  block
-            block
-
-//- Mixin for text field with enabled condition with options.
-mixin java-class-typeahead(lbl, model, name, options, enabled, required, placeholder, tip, validationActive)
-    -var errLbl = lbl.substring(0, lbl.length - 1)
-
-    +form-field-datalist(lbl, model, name, enabledToDisabled(enabled), required, placeholder, options, tip)(
-        data-java-identifier='true'
-        data-java-package-specified='allow-built-in'
-        data-java-keywords='true'
-        data-validation-active=validationActive ? '{{ #{validationActive} }}' : '"always"'
-    )
-        +form-field-feedback(name, 'javaKeywords', errLbl + ' could not contains reserved Java keyword!')
-        +form-field-feedback(name, 'javaPackageSpecified', errLbl + ' does not have package specified!')
-        +form-field-feedback(name, 'javaIdentifier', errLbl + ' is invalid Java identifier!')
-
-//- Mixin for java package field with enabled condition.
-mixin java-package(lbl, model, name, enabled, required, tip)
-    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, 'Enter package name', tip)(
-        data-java-keywords='true'
-        data-java-package-name='package-only'
-    )
-        +form-field-feedback(name, 'javaPackageName', 'Package name is invalid')
-        +form-field-feedback(name, 'javaKeywords', 'Package name could not contains reserved java keyword')
-
-//- Mixin for text field with IP address check.
-mixin text-ip-address(lbl, model, name, enabled, placeholder, tip)
-    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), false, placeholder, tip)(data-ipaddress='true')
-        +ipaddress-feedback(name)
-
-//- Mixin for text field with IP address and port range check.
-mixin text-ip-address-with-port-range(lbl, model, name, enabled, placeholder, tip)
-    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), false, placeholder, tip)(data-ipaddress='true' data-ipaddress-with-port='true' data-ipaddress-with-port-range='true')
-        +ipaddress-feedback(name)
-        +ipaddress-port-feedback(name)
-        +ipaddress-port-range-feedback(name)
-
-//- Mixin for text field.
-mixin text-enabled(lbl, model, name, enabled, required, placeholder, tip)
-    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, placeholder, tip)
-        if  block
-            block
-
-//- Mixin for text field with autofocus.
-mixin text-enabled-autofocus(lbl, model, name, enabled, required, placeholder, tip)
-    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, placeholder, tip)(
-        data-ignite-form-field-input-autofocus='true'
-    )
-        if  block
-            block
-
-//- Mixin for text field.
-mixin text(lbl, model, name, required, placeholder, tip)
-    +ignite-form-field-text(lbl, model, name, false, required, placeholder, tip)
-        if  block
-            block
-
-//- Mixin for password field.
-mixin password(lbl, model, name, required, placeholder, tip)
-    +ignite-form-field-password(lbl, model, name, false, required, placeholder, tip)
-        if  block
-            block
-
-//- Mixin for text field with enabled condition with options.
-mixin text-options(lbl, model, name, options, enabled, required, placeholder, tip)
-    +form-field-datalist(lbl, model, name, enabledToDisabled(enabled), required, placeholder, options, tip)
-
-//- Mixin for required numeric field.
-mixin number-required(lbl, model, name, enabled, required, placeholder, min, tip)
-    +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), required, placeholder, min, false, false, tip)
-
-//- Mixin for required numeric field with maximum and minimum limit.
-mixin number-min-max(lbl, model, name, enabled, placeholder, min, max, tip)
-    +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), false, placeholder, min, max, '1', tip)
-
-//- Mixin for required numeric field with maximum and minimum limit.
-mixin number-min-max-step(lbl, model, name, enabled, placeholder, min, max, step, tip)
-    +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), false, placeholder, min, max, step, tip)
-
-//- Mixin for numeric field.
-mixin number(lbl, model, name, enabled, placeholder, min, tip)
-    +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), false, placeholder, min, false, false, tip)
-
-//- Mixin for required dropdown field.
-mixin dropdown-required-empty(lbl, model, name, enabled, required, placeholder, placeholderEmpty, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, placeholderEmpty, options, tip)
-        if  block
-            block
-
-//- Mixin for required dropdown field with autofocus.
-mixin dropdown-required-empty-autofocus(lbl, model, name, enabled, required, placeholder, placeholderEmpty, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, placeholderEmpty, options, tip)(
-        data-ignite-form-field-input-autofocus='true'
-    )
-        if  block
-            block
-
-//- Mixin for required dropdown field.
-mixin dropdown-required(lbl, model, name, enabled, required, placeholder, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, '', options, tip)
-        if  block
-            block
-
-//- Mixin for required dropdown field with autofocus.
-mixin dropdown-required-autofocus(lbl, model, name, enabled, required, placeholder, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, '', options, tip)(
-        data-ignite-form-field-input-autofocus='true'
-    )
-        if  block
-            block
-
-//- Mixin for dropdown field.
-mixin dropdown(lbl, model, name, enabled, placeholder, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), false, false, placeholder, '', options, tip)
-        if  block
-            block
-
-//- Mixin for dropdown-multiple field.
-mixin dropdown-multiple(lbl, model, name, enabled, placeholder, placeholderEmpty, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), false, true, placeholder, placeholderEmpty, options, tip)
-        if  block
-            block
-
-//- Mixin for table text field.
-mixin table-text-field(name, model, items, valid, save, placeholder, newItem)
-    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
-    -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
-    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
-    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
-    -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
-    div(ignite-on-focus-out=onBlur)
-        if block
-            block
-
-        .input-tip
-            +ignite-form-field-input(name, model, false, 'true', placeholder)(
-                data-ignite-unique=items
-                data-ignite-form-field-input-autofocus='true'
-
-                ignite-on-enter=onEnter
-                ignite-on-escape=onEscape
-            )
-
-//- Mixin for table java class field.
-mixin table-java-class-field(lbl, name, model, items, valid, save, newItem)
-    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
-    -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
-    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
-    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
-    -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
-    div(ignite-on-focus-out=onBlur)
-        +form-field-feedback(name, 'javaBuiltInClass', lbl + ' should not be the Java built-in class!')
-        +form-field-feedback(name, 'javaKeywords', lbl + ' could not contains reserved Java keyword!')
-        +form-field-feedback(name, 'javaPackageSpecified', lbl + ' does not have package specified!')
-        +form-field-feedback(name, 'javaIdentifier', lbl + ' is invalid Java identifier!')
-
-        if block
-            block
-
-        .input-tip
-            +ignite-form-field-input(name, model, false, 'true', 'Enter fully qualified class name')(
-                data-java-identifier='true'
-                data-java-package-specified='true'
-                data-java-keywords='true'
-                data-java-built-in-class='true'
-
-                data-ignite-unique=items
-                data-ignite-form-field-input-autofocus='true'
-
-                ignite-on-enter=onEnter
-                ignite-on-escape=onEscape
-            )
-
-//- Mixin for table java package field.
-mixin table-java-package-field(name, model, items, valid, save, newItem)
-    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
-    -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
-    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
-    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
-    -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
-    div(ignite-on-focus-out=onBlur)
-        +form-field-feedback(name, 'javaKeywords', 'Package name could not contains reserved Java keyword!')
-        +form-field-feedback(name, 'javaPackageName', 'Package name is invalid!')
-
-        if block
-            block
-
-        .input-tip
-            +ignite-form-field-input(name, model, false, 'true', 'Enter package name')(
-                data-java-keywords='true'
-                data-java-package-name='package-only'
-
-                data-ignite-unique=items
-                data-ignite-form-field-input-autofocus='true'
-
-                ignite-on-enter=onEnter
-                ignite-on-escape=onEscape
-            )
-
-//- Mixin for table java package field.
-mixin table-url-field(name, model, items, valid, save, newItem)
-    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
-    -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
-    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
-    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
-    -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
-    div(ignite-on-focus-out=onBlur)
-        if block
-            block
-
-        .input-tip
-            +ignite-form-field-url-input(name, model, false, 'true', 'Enter URL')(
-                data-ignite-unique=items
-                data-ignite-form-field-input-autofocus='true'
-
-                ignite-on-enter=onEnter
-                ignite-on-escape=onEscape
-            )
-
-//- Mixin for table address field.
-mixin table-address-field(name, model, items, valid, save, newItem, portRange)
-    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
-    -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
-    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
-    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
-    -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
-    div(ignite-on-focus-out=onBlur)
-        +ipaddress-feedback(name)
-        +ipaddress-port-feedback(name)
-        +ipaddress-port-range-feedback(name)
-        +form-field-feedback(name, 'required', 'IP address:port could not be empty!')
-
-        if block
-            block
-
-        .input-tip
-            +ignite-form-field-input(name, model, false, 'true', 'IP address:port')(
-                data-ipaddress='true'
-                data-ipaddress-with-port='true'
-                data-ipaddress-with-port-range=portRange ? 'true' : null
-                data-ignite-unique=items
-                data-ignite-form-field-input-autofocus='true'
-
-                ignite-on-enter=onEnter
-                ignite-on-escape=onEscape
-            )
-
-//- Mixin for table UUID field.
-mixin table-uuid-field(name, model, items, valid, save, newItem)
-    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
-    -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
-    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
-    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
-    -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
-    div(ignite-on-focus-out=onBlur)
-        if block
-            block
-
-        .input-tip
-            +ignite-form-field-input(name, model, false, 'true', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')(
-                data-uuid='true'
-                data-ignite-unique=items
-                data-ignite-form-field-input-autofocus='true'
-
-                ignite-on-enter=onEnter
-                ignite-on-escape=onEscape
-            )
-
-//- Mixin for table save button.
-   "||" used instead of "&&" to workaround escaping of "&&" to "&amp;&amp;"
-mixin table-save-button(valid, save, newItem)
-    -var reset = newItem ? 'group.add = []' : 'field.edit = false'
-
-    i.fa.fa-floppy-o.form-field-save(
-        ng-show=valid
-        ng-click='!(#{valid}) || (#{save}); !(#{valid}) || (#{reset});'
-        bs-tooltip
-        data-title='Click icon or press [Enter] to save item'
-    )
-
-//- Mixin for table remove button.
-mixin table-remove-conditional-button(items, show, tip, row)
-    i.tipField.fa.fa-remove(
-        ng-hide='!#{show} || field.edit'
-        bs-tooltip
-        data-title=tip
-        ng-click='#{items}.splice(#{items}.indexOf(#{row}), 1)'
-    )
-
-//- Mixin for table remove button.
-mixin table-remove-button(items, tip)
-    +table-remove-conditional-button(items, 'true', tip, 'model')
-
-//- Mixin for cache mode.
-mixin cacheMode(lbl, model, name, placeholder)
-    +dropdown(lbl, model, name, 'true', placeholder,
-        '[\
-            {value: "LOCAL", label: "LOCAL"},\
-            {value: "REPLICATED", label: "REPLICATED"},\
-            {value: "PARTITIONED", label: "PARTITIONED"}\
-        ]',
-        '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>'
-    )
-
-//- Mixin for eviction policy.
-mixin evictionPolicy(model, name, enabled, required, tip)
-    -var kind = model + '.kind'
-    -var policy = model + '[' + kind + ']'
-
-    +dropdown-required('Eviction policy:', kind, name + '+ "Kind"', enabled, required, 'Not set',
-        '[\
-            {value: "LRU", label: "LRU"},\
-            {value: "FIFO", label: "FIFO"},\
-            {value: "SORTED", label: "Sorted"},\
-            {value: undefined, label: "Not set"}\
-        ]', tip)
-    span(ng-show=kind)
-        +showHideLink('expanded', 'settings')
-            .details-row
-                +number('Batch size', policy + '.batchSize', name + '+ "batchSize"', enabled, '1', '1',
-                    'Number of entries to remove on shrink')
-            .details-row
-                +number('Max memory size', policy + '.maxMemorySize', name + '+ "maxMemorySize"', enabled, '0', '0',
-                    'Maximum allowed cache size in bytes')
-            .details-row
-                +number('Max size', policy + '.maxSize', name + '+ "maxSize"', enabled, '100000', '0',
-                    'Maximum allowed size of cache before entry will start getting evicted')
-
-//- Mixin for clusters dropdown.
-mixin clusters(model, tip)
-    +dropdown-multiple('<span>Clusters:</span>' + '<a ui-sref="base.configuration.clusters({linkId: linkId()})"> (add)</a>',
-        model + '.clusters', '"clusters"', true, 'Choose clusters', 'No clusters configured', 'clusters', tip)
-
-//- Mixin for caches dropdown.
-mixin caches(model, tip)
-    +dropdown-multiple('<span>Caches:</span>' + '<a ui-sref="base.configuration.caches({linkId: linkId()})"> (add)</a>',
-        model + '.caches', '"caches"', true, 'Choose caches', 'No caches configured', 'caches', tip)
-
-//- Mixin for XML, Java, .Net preview.
-mixin preview(master, generator, detail)
-    ignite-ui-ace-tabs
-        .preview-panel(ng-init='mode = "spring"')
-            .preview-legend
-                a(ng-class='{active: mode === "spring"}' ng-click='mode = "spring"') Spring
-                a(ng-class='{active: mode === "java"}' ng-click='mode = "java"') Java
-                a(ng-class='{active: mode === "csharp"}' ng-click='mode = "csharp"') C#
-                //a(ng-class='{active: mode === "app.config"}' ng-click='mode = "app.config"') app.config
-            .preview-content(ng-switch='mode')
-                ignite-ui-ace-spring(ng-switch-when="spring" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
-                ignite-ui-ace-java(ng-switch-when="java" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
-                ignite-ui-ace-sharp(ng-switch-when="csharp" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
-            .preview-content-empty(ng-if='!data')
-                label All Defaults
-
-//- Mixin for XML and Java preview.
-mixin preview-xml-java(master, generator, detail)
-    ignite-ui-ace-tabs
-        .preview-panel(ng-init='mode = "spring"')
-            .preview-legend
-                a(ng-class='{active: mode === "spring"}' ng-click='mode = "spring"') Spring
-                a(ng-class='{active: mode === "java"}' ng-click='mode = "java"') Java
-                //a(ng-class='{active: mode === "csharp"}' ng-click='mode = "csharp"') C#
-                //a(ng-class='{active: mode === "app.config"}' ng-click='mode = "app.config"') app.config
-            .preview-content(ng-switch='mode')
-                ignite-ui-ace-spring(ng-switch-when="spring" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
-                ignite-ui-ace-java(ng-switch-when="java" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
-                //ignite-ui-ace-sharp(ng-switch-when="csharp" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
-            .preview-content-empty(ng-if='!data')
-                label All Defaults
-
-//- LEGACY mixin for LEGACY tables.
-mixin btn-save(show, click)
-    i.tipField.fa.fa-floppy-o(ng-show=show ng-click=click bs-tooltip='' data-title='Click icon or press [Enter] to save item' data-trigger='hover')
-
-//- LEGACY mixin for LEGACY tables.
-mixin btn-add(click, tip)
-    i.tipField.fa.fa-plus(ng-click=click bs-tooltip=tip data-trigger = 'hover')
-
-//- LEGACY mixin for LEGACY tables.
-mixin btn-remove(click, tip)
-    i.tipField.fa.fa-remove(ng-click=click bs-tooltip=tip data-trigger='hover')
-
-//- LEGACY mixin for LEGACY tables.
-mixin btn-remove-cond(cond, click, tip)
-    i.tipField.fa.fa-remove(ng-show=cond ng-click=click bs-tooltip=tip data-trigger='hover')
-
-//- LEGACY mixin for LEGACY pair values tables.
-mixin table-pair-edit(tbl, prefix, keyPlaceholder, valPlaceholder, keyJavaBuiltInTypes, valueJavaBuiltInTypes, focusId, index, divider)
-    -var keyModel = tbl + '.' + prefix + 'Key'
-    -var valModel = tbl +'.' + prefix + 'Value'
-
-    -var keyFocusId = prefix + 'Key' + focusId
-    -var valFocusId = prefix + 'Value' + focusId
-
-    .col-xs-6.col-sm-6.col-md-6
-        .fieldSep !{divider}
-        .input-tip
-            if keyJavaBuiltInTypes
-                input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' ignite-on-escape='tableReset(false)')
-            else
-                input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder ignite-on-escape='tableReset(false)')
-    .col-xs-6.col-sm-6.col-md-6
-        -var btnVisible = 'tablePairSaveVisible(' + tbl + ', ' + index + ')'
-        -var btnSave = 'tablePairSave(tablePairValid, backupItem, ' + tbl + ', ' + index + ')'
-        -var btnVisibleAndSave = btnVisible + ' && ' + btnSave
-
-        +btn-save(btnVisible, btnSave)
-        .input-tip
-            if valueJavaBuiltInTypes
-                input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
-            else
-                input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
-
-//- Mixin for DB dialect.
-mixin dialect(lbl, model, name, required, tipTitle, genericDialectName, placeholder)
-    +dropdown-required(lbl, model, name, 'true', required, placeholder, '[\
-                {value: "Generic", label: "' + genericDialectName + '"},\
-                {value: "Oracle", label: "Oracle"},\
-                {value: "DB2", label: "IBM DB2"},\
-                {value: "SQLServer", label: "Microsoft SQL Server"},\
-                {value: "MySQL", label: "MySQL"},\
-                {value: "PostgreSQL", label: "PostgreSQL"},\
-                {value: "H2", label: "H2 database"}\
-        ]',
-        tipTitle +
-        '<ul>\
-            <li>' + genericDialectName + '</li>\
-            <li>Oracle database</li>\
-            <li>IBM DB2</li>\
-            <li>Microsoft SQL Server</li>\
-            <li>MySQL</li>\
-            <li>PostgreSQL</li>\
-            <li>H2 database</li>\
-        </ul>')
-
-//- Mixin for show/hide links.
-mixin showHideLink(name, text)
-    span(ng-init='__ = {};')
-        a.customize(ng-show='__.#{name}' ng-click='__.#{name} = false') Hide #{text}
-        a.customize(ng-hide='__.#{name}' ng-click='__.#{name} = true; ui.loadPanel("#{name}");') Show #{text}
-        div(ng-if='ui.isPanelLoaded("#{name}")')
-            .panel-details(ng-show='__.#{name}')
-                if block
-                    block


[09/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/reset.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/reset.jade b/modules/web-console/frontend/views/reset.jade
deleted file mode 100644
index 9098105..0000000
--- a/modules/web-console/frontend/views/reset.jade
+++ /dev/null
@@ -1,48 +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.
-
-header#header.header
-    table.container
-        tr
-            td.col-xs-3.col-sm-3.col-md-2
-                ignite-header-logo
-            td
-                ignite-header-title
-
-.container.body-container
-    .main-content(ng-controller='resetPassword')
-        .row
-            .text-center(ng-if='!token')
-                p Further instructions for password reset have been sent to your e-mail address.
-            .text-center(ng-if='error')
-                p {{::error}}
-            div(ng-if='token && !error')
-                form.form-horizontal(name='resetForm' ng-init='reset_info.token = token')
-                    .settings-row
-                        label.col-sm-1 E-mail:
-                        label {{::email}}
-                    .settings-row
-                        label.col-sm-1.required Password:
-                        .col-sm-3
-                            input#user_password.form-control(ignite-on-enter-focus-move='user_confirm' type='password' ng-model='reset_info.password' placeholder='New password' required)
-                    .settings-row
-                        label.col-sm-1.required Confirm:
-                        .col-sm-3
-                            input#user_confirm.form-control(type='password' ng-model='reset_info.confirm' ignite-match='reset_info.password' placeholder='Confirm new password' required ignite-on-enter='resetForm.$valid && resetPassword(user_info)')
-                    .settings-row
-                        button.btn.btn-primary(ng-disabled='resetForm.$invalid' ng-click='resetPassword(reset_info)') Reset Password
-
-include includes/footer

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/reset.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/reset.tpl.pug b/modules/web-console/frontend/views/reset.tpl.pug
new file mode 100644
index 0000000..9098105
--- /dev/null
+++ b/modules/web-console/frontend/views/reset.tpl.pug
@@ -0,0 +1,48 @@
+//-
+    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.
+
+header#header.header
+    table.container
+        tr
+            td.col-xs-3.col-sm-3.col-md-2
+                ignite-header-logo
+            td
+                ignite-header-title
+
+.container.body-container
+    .main-content(ng-controller='resetPassword')
+        .row
+            .text-center(ng-if='!token')
+                p Further instructions for password reset have been sent to your e-mail address.
+            .text-center(ng-if='error')
+                p {{::error}}
+            div(ng-if='token && !error')
+                form.form-horizontal(name='resetForm' ng-init='reset_info.token = token')
+                    .settings-row
+                        label.col-sm-1 E-mail:
+                        label {{::email}}
+                    .settings-row
+                        label.col-sm-1.required Password:
+                        .col-sm-3
+                            input#user_password.form-control(ignite-on-enter-focus-move='user_confirm' type='password' ng-model='reset_info.password' placeholder='New password' required)
+                    .settings-row
+                        label.col-sm-1.required Confirm:
+                        .col-sm-3
+                            input#user_confirm.form-control(type='password' ng-model='reset_info.confirm' ignite-match='reset_info.password' placeholder='Confirm new password' required ignite-on-enter='resetForm.$valid && resetPassword(user_info)')
+                    .settings-row
+                        button.btn.btn-primary(ng-disabled='resetForm.$invalid' ng-click='resetPassword(reset_info)') Reset Password
+
+include includes/footer

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/settings/admin.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/settings/admin.jade b/modules/web-console/frontend/views/settings/admin.jade
deleted file mode 100644
index a09fda9..0000000
--- a/modules/web-console/frontend/views/settings/admin.jade
+++ /dev/null
@@ -1,25 +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.
-
-.admin-page.row
-    .docs-content.greedy
-        .docs-header
-            h1 Admin panel
-            hr
-        .docs-body
-            .row
-                .col-xs-12
-                    ignite-list-of-registered-users(data-options='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/settings/admin.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/settings/admin.tpl.pug b/modules/web-console/frontend/views/settings/admin.tpl.pug
new file mode 100644
index 0000000..a09fda9
--- /dev/null
+++ b/modules/web-console/frontend/views/settings/admin.tpl.pug
@@ -0,0 +1,25 @@
+//-
+    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.
+
+.admin-page.row
+    .docs-content.greedy
+        .docs-header
+            h1 Admin panel
+            hr
+        .docs-body
+            .row
+                .col-xs-12
+                    ignite-list-of-registered-users(data-options='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/settings/profile.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/settings/profile.jade b/modules/web-console/frontend/views/settings/profile.jade
deleted file mode 100644
index 6f91f8f..0000000
--- a/modules/web-console/frontend/views/settings/profile.jade
+++ /dev/null
@@ -1,76 +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.
-
-mixin lbl(txt)
-    label.col-sm-2.required.labelFormField #{txt}
-
-.row(ng-controller='profileController')
-    .docs-content.greedy
-        .docs-header
-            h1 User profile
-            hr
-        .docs-body
-            form.form-horizontal(name='profileForm' novalidate)
-                .col-sm-10(style='padding: 0')
-                    .details-row
-                        +lbl('First name:')
-                        .col-xs-5.col-sm-4
-                            input#profile-firstname.form-control(ignite-on-enter-focus-move='profile-lastname' type='text' ng-model='user.firstName' placeholder='Input first name' required ignite-auto-focus)
-                    .details-row
-                        +lbl('Last name:')
-                        .col-xs-5.col-sm-4
-                            input#profile-lastname.form-control(ignite-on-enter-focus-move='profile-email' type='text' ng-model='user.lastName' placeholder='Input last name' required)
-                    .details-row
-                        +lbl('Email:')
-                        .col-xs-5.col-sm-4
-                            input#profile-email.form-control(ignite-on-enter-focus-move='profile-company' type='email' ng-model='user.email' placeholder='Input email' required)
-                    .details-row
-                        +lbl('Company:')
-                        .col-xs-5.col-sm-4
-                            input#profile-company.form-control(ignite-on-enter-focus-move='profile-country' type='text' ng-model='user.company' placeholder='Input company name' required)
-                    .details-row
-                        +lbl('Country:')
-                        .col-xs-5.col-sm-4
-                            button#profile-country.select-toggle.form-control(bs-select bs-options='item.name as item.name for item in countries' type='text' ng-model='user.country' placeholder='Choose your country' ng-required='true')
-                    .details-row
-                        .advanced-options
-                            i.fa(
-                            ng-click='toggleToken()'
-                            ng-class='expandedToken ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
-                            a(ng-click='toggleToken()') {{expandedToken ? 'Cancel security token changing...' : 'Show security token...'}}
-                        div(ng-if='expandedToken')
-                            +lbl('Security token:')
-                            label {{user.token || 'No security token. Regenerate please.'}}
-                            i.tipLabel.fa.fa-refresh(ng-click='generateToken()' bs-tooltip='' data-title='Generate random security token')
-                            i.tipLabel.fa.fa-clipboard(ignite-copy-to-clipboard='{{user.token}}' bs-tooltip='' data-title='Copy security token to clipboard')
-                            i.tipLabel.icon-help(ng-if=lines bs-tooltip='' data-title='The security token is used for authorization of web agent')
-                    .details-row
-                        .advanced-options
-                            i.fa(
-                            ng-click='togglePassword()'
-                            ng-class='expandedPassword ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
-                            a(ng-click='togglePassword()') {{expandedPassword ? 'Cancel password changing...' : 'Change password...'}}
-                        div(ng-if='expandedPassword')
-                            .details-row
-                                +lbl('New password:')
-                                .col-xs-5.col-sm-4
-                                    input#profile_password.form-control(ignite-on-enter-focus-move='profile_confirm' type='password' ng-model='user.password' placeholder='New password')
-                            .details-row
-                                +lbl('Confirm:')
-                                .col-xs-5.col-sm-4
-                                    input#profile_confirm.form-control(type='password' ng-model='user.confirm' ignite-match='user.password' placeholder='Confirm new password')
-                .col-xs-12.col-sm-12.details-row
-                    a.btn.btn-primary(ng-disabled='!profileCouldBeSaved()' ng-click='profileCouldBeSaved() && saveUser()' bs-tooltip='' data-title='{{saveBtnTipText()}}' data-placement='bottom' data-trigger='hover') Save

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/settings/profile.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/settings/profile.tpl.pug b/modules/web-console/frontend/views/settings/profile.tpl.pug
new file mode 100644
index 0000000..6f91f8f
--- /dev/null
+++ b/modules/web-console/frontend/views/settings/profile.tpl.pug
@@ -0,0 +1,76 @@
+//-
+    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.
+
+mixin lbl(txt)
+    label.col-sm-2.required.labelFormField #{txt}
+
+.row(ng-controller='profileController')
+    .docs-content.greedy
+        .docs-header
+            h1 User profile
+            hr
+        .docs-body
+            form.form-horizontal(name='profileForm' novalidate)
+                .col-sm-10(style='padding: 0')
+                    .details-row
+                        +lbl('First name:')
+                        .col-xs-5.col-sm-4
+                            input#profile-firstname.form-control(ignite-on-enter-focus-move='profile-lastname' type='text' ng-model='user.firstName' placeholder='Input first name' required ignite-auto-focus)
+                    .details-row
+                        +lbl('Last name:')
+                        .col-xs-5.col-sm-4
+                            input#profile-lastname.form-control(ignite-on-enter-focus-move='profile-email' type='text' ng-model='user.lastName' placeholder='Input last name' required)
+                    .details-row
+                        +lbl('Email:')
+                        .col-xs-5.col-sm-4
+                            input#profile-email.form-control(ignite-on-enter-focus-move='profile-company' type='email' ng-model='user.email' placeholder='Input email' required)
+                    .details-row
+                        +lbl('Company:')
+                        .col-xs-5.col-sm-4
+                            input#profile-company.form-control(ignite-on-enter-focus-move='profile-country' type='text' ng-model='user.company' placeholder='Input company name' required)
+                    .details-row
+                        +lbl('Country:')
+                        .col-xs-5.col-sm-4
+                            button#profile-country.select-toggle.form-control(bs-select bs-options='item.name as item.name for item in countries' type='text' ng-model='user.country' placeholder='Choose your country' ng-required='true')
+                    .details-row
+                        .advanced-options
+                            i.fa(
+                            ng-click='toggleToken()'
+                            ng-class='expandedToken ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
+                            a(ng-click='toggleToken()') {{expandedToken ? 'Cancel security token changing...' : 'Show security token...'}}
+                        div(ng-if='expandedToken')
+                            +lbl('Security token:')
+                            label {{user.token || 'No security token. Regenerate please.'}}
+                            i.tipLabel.fa.fa-refresh(ng-click='generateToken()' bs-tooltip='' data-title='Generate random security token')
+                            i.tipLabel.fa.fa-clipboard(ignite-copy-to-clipboard='{{user.token}}' bs-tooltip='' data-title='Copy security token to clipboard')
+                            i.tipLabel.icon-help(ng-if=lines bs-tooltip='' data-title='The security token is used for authorization of web agent')
+                    .details-row
+                        .advanced-options
+                            i.fa(
+                            ng-click='togglePassword()'
+                            ng-class='expandedPassword ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
+                            a(ng-click='togglePassword()') {{expandedPassword ? 'Cancel password changing...' : 'Change password...'}}
+                        div(ng-if='expandedPassword')
+                            .details-row
+                                +lbl('New password:')
+                                .col-xs-5.col-sm-4
+                                    input#profile_password.form-control(ignite-on-enter-focus-move='profile_confirm' type='password' ng-model='user.password' placeholder='New password')
+                            .details-row
+                                +lbl('Confirm:')
+                                .col-xs-5.col-sm-4
+                                    input#profile_confirm.form-control(type='password' ng-model='user.confirm' ignite-match='user.password' placeholder='Confirm new password')
+                .col-xs-12.col-sm-12.details-row
+                    a.btn.btn-primary(ng-disabled='!profileCouldBeSaved()' ng-click='profileCouldBeSaved() && saveUser()' bs-tooltip='' data-title='{{saveBtnTipText()}}' data-placement='bottom' data-trigger='hover') Save

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/signin.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/signin.jade b/modules/web-console/frontend/views/signin.jade
deleted file mode 100644
index a6c64a8..0000000
--- a/modules/web-console/frontend/views/signin.jade
+++ /dev/null
@@ -1,163 +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.
-
-mixin lblRequired(txt)
-    label.col-xs-3.col-md-3.required #{txt}
-
-header#header.header
-    table.container
-        tr
-            td.col-xs-3.col-sm-3.col-md-2
-                ignite-header-logo
-            td
-                ignite-header-title
-
-.container.body-container
-    .main-content(ng-controller='auth')
-        .row.home
-            .signin-greedy
-                .col-xs-12.col-md-6
-                    form(name='form' novalidate)
-                        .modal-body.row(style='padding: 0 0 10px 0; margin: 0')
-                            .settings-row(ng-if='action == "signup"')
-                                h3.login-header Sign Up
-                            .settings-row(ng-if='action == "signin"')
-                                h3.login-header Sign In
-                            .settings-row(ng-if='action == "password/forgot"')
-                                h3.login-header Forgot password?
-                            .settings-row
-                                p.col-xs-12.col-md-11(ng-show='action == "password/forgot"')
-                                    | That's ok! Simply enter your email below and a reset password link will be sent to you via email. You can then follow that link and select a new password.
-                            .settings-row(ng-show='action == "signin"')
-                                +lblRequired('Email:')
-                                .col-xs-9.col-md-8
-                                    input#signin_email.form-control(ignite-on-enter-focus-move='user_password' type='email' ng-model='ui.email' placeholder='Input email' required)
-                            .settings-row(ng-show='action == "signup"')
-                                +lblRequired('Email:')
-                                .col-xs-9.col-md-8
-                                    input#signup_email.form-control(ignite-on-enter-focus-move='user_password' type='email' ng-model='ui.email' placeholder='Input email' required)
-                            .settings-row(ng-show='action != "password/forgot"')
-                                +lblRequired('Password:')
-                                .col-xs-9.col-md-8
-                                    input#user_password.form-control(ignite-on-enter-focus-move='user_confirm' type='password' ng-model='ui.password' placeholder='Password' ng-required='action != "password/forgot"' ignite-on-enter='action == "signin" && form.$valid && auth(action, ui)')
-                            .settings-row(ng-if='action == "signup"')
-                                +lblRequired('Confirm:')
-                                .col-xs-9.col-md-8
-                                    input#user_confirm.form-control(ignite-on-enter-focus-move='first_name' type='password' ng-model='ui_exclude.confirm' ignite-match='ui.password' placeholder='Confirm password' ng-required='action == "signup"')
-                            .settings-row(ng-show='action == "signup"')
-                                +lblRequired('First Name:')
-                                .col-xs-9.col-md-8
-                                    input#first_name.form-control(ignite-on-enter-focus-move='last_name' type='text' ng-model='ui.firstName' placeholder='Input first name' ng-required='action=="signup"')
-                            .settings-row(ng-show='action == "signup"')
-                                +lblRequired('Last Name:')
-                                .col-xs-9.col-md-8
-                                    input#last_name.form-control(ignite-on-enter-focus-move='company' type='text' ng-model='ui.lastName' placeholder='Input last name' ng-required='action=="signup"')
-                            .settings-row(ng-show='action == "password/forgot"')
-                                +lblRequired('Email:')
-                                .col-xs-9.col-md-8
-                                    input#forgot_email.form-control(ignite-on-enter='form.$valid && forgotPassword(ui)' type='email' ng-model='ui.email' placeholder='Input email' required)
-                            .settings-row(ng-show='action == "signup"')
-                                +lblRequired('Company:')
-                                .col-xs-9.col-md-8
-                                    input#company.form-control(ignite-on-enter-focus-move='country' type='text' ng-model='ui.company' placeholder='Input company name' ng-required='action=="signup"')
-                            .settings-row(ng-show='action == "signup"')
-                                +lblRequired('Country:')
-                                .col-xs-9.col-md-8
-                                    button#country.select-toggle.form-control(ignite-on-enter-focus-move='signup' bs-select bs-options='item.name as item.name for item in countries' type='text' ng-model='ui.country' placeholder='Choose your country' ng-required='action=="signup"')
-                            .settings-row(ignite-terms)
-                                .col-md-offset-3(ng-if='action == "signup" && terms.termsState')
-                                    label
-                                        input(type='checkbox' ng-model='ui_exclude.agree', ng-required='true')
-                                        | I agree to the #[a(ui-sref='{{::terms.termsState}}' target='_blank') terms and conditions]
-                        .col-xs-12.col-md-11
-                            .login-footer(ng-show='action == "signup"')
-                                a.labelField(ng-click='action = "password/forgot"' ignite-on-click-focus='signin_email') Forgot password?
-                                a.labelLogin(ng-click='action = "signin"' ignite-on-click-focus='signin_email') Sign In
-                                button#signup.btn.btn-primary(ng-click='auth(action, ui)' ng-disabled='form.$invalid') Sign Up
-                        .col-xs-12.col-md-11
-                            .login-footer(ng-show='action == "password/forgot"')
-                                a.labelField(ng-click='action = "signin"' ignite-on-click-focus='signin_email') Sign In
-                                button#forgot.btn.btn-primary(ng-click='forgotPassword(ui)' ng-disabled='form.$invalid') Send it to me
-                        .col-xs-12.col-md-11
-                            .login-footer(ng-show='action == "signin"')
-                                a.labelField(ng-click='action = "password/forgot"' ignite-on-click-focus='signin_email') Forgot password?
-                                a.labelLogin(ng-click='action = "signup"' ignite-on-click-focus='first_name') Sign Up
-                                button#login.btn.btn-primary(ng-click='auth(action, ui)' ng-disabled='form.$invalid') Sign In
-
-                    .col-xs-12.col-md-11.home-panel
-                        ignite-features
-                .col-xs-12.col-md-6
-                    #carousel.carousel.slide
-                        // Indicators
-                        ol.carousel-indicators
-                            li.active(data-target='#carousel', data-slide-to='0')
-                            li(data-target='#carousel', data-slide-to='1')
-                            li(data-target='#carousel', data-slide-to='2')
-                            li(data-target='#carousel', data-slide-to='3')
-                            li(data-target='#carousel', data-slide-to='4')
-                            li(data-target='#carousel', data-slide-to='5')
-                            li(data-target='#carousel', data-slide-to='6')
-                        // Wrapper for slides
-                        .carousel-inner(role='listbox')
-                            .item.active
-                                img(src='/images/cluster.png', alt='Clusters screen')
-                                .carousel-caption
-                                    h3 Clusters screen
-                                    p Configure clusters, link clusters to caches
-                            .item
-                                img(src='/images/cache.png', alt='Caches screen')
-                                .carousel-caption
-                                    h3 Caches screen
-                                    p Configure caches, link domain models to caches, link caches to clusters
-                            .item
-                                img(src='/images/domains.png', alt='Domain model screen')
-                                .carousel-caption
-                                    h3 Domain model screen
-                                    p Manually enter domain model or import from database
-                            .item
-                                img(src='/images/summary.png', alt='Summary screen')
-                                .carousel-caption
-                                    h3 Summary screen
-                                    p Preview XML config, JAVA code,Docker file and download project
-                            .item
-                                img(src='/images/query-table.png', alt='Query')
-                                .carousel-caption
-                                    h3 Query
-                                    p Explain SQL, execute, scan queries
-                            .item
-                                img(src='/images/query-metadata.png', alt='Cache metadata')
-                                .carousel-caption
-                                    h3 Cache metadata
-                                    p View cache type metadata
-                            .item
-                                img(src='/images/query-chart.png', alt='Query chart')
-                                .carousel-caption
-                                    h3 Query chart
-                                    p View data in tabular form and as charts
-                        // Controls
-                        a.left.carousel-control(href='#carousel', ng-click='$event.preventDefault()', role='button', data-slide='prev')
-                            span.fa.fa-chevron-left(aria-hidden='true')
-                            span.sr-only Previous
-                        a.right.carousel-control(href='#carousel', ng-click='$event.preventDefault()', role='button', data-slide='next')
-                            span.fa.fa-chevron-right(aria-hidden='true')
-                            span.sr-only Next
-
-include includes/footer
-
-script.
-    $('.carousel').carousel()
-
-

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/signin.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/signin.tpl.pug b/modules/web-console/frontend/views/signin.tpl.pug
new file mode 100644
index 0000000..a6c64a8
--- /dev/null
+++ b/modules/web-console/frontend/views/signin.tpl.pug
@@ -0,0 +1,163 @@
+//-
+    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.
+
+mixin lblRequired(txt)
+    label.col-xs-3.col-md-3.required #{txt}
+
+header#header.header
+    table.container
+        tr
+            td.col-xs-3.col-sm-3.col-md-2
+                ignite-header-logo
+            td
+                ignite-header-title
+
+.container.body-container
+    .main-content(ng-controller='auth')
+        .row.home
+            .signin-greedy
+                .col-xs-12.col-md-6
+                    form(name='form' novalidate)
+                        .modal-body.row(style='padding: 0 0 10px 0; margin: 0')
+                            .settings-row(ng-if='action == "signup"')
+                                h3.login-header Sign Up
+                            .settings-row(ng-if='action == "signin"')
+                                h3.login-header Sign In
+                            .settings-row(ng-if='action == "password/forgot"')
+                                h3.login-header Forgot password?
+                            .settings-row
+                                p.col-xs-12.col-md-11(ng-show='action == "password/forgot"')
+                                    | That's ok! Simply enter your email below and a reset password link will be sent to you via email. You can then follow that link and select a new password.
+                            .settings-row(ng-show='action == "signin"')
+                                +lblRequired('Email:')
+                                .col-xs-9.col-md-8
+                                    input#signin_email.form-control(ignite-on-enter-focus-move='user_password' type='email' ng-model='ui.email' placeholder='Input email' required)
+                            .settings-row(ng-show='action == "signup"')
+                                +lblRequired('Email:')
+                                .col-xs-9.col-md-8
+                                    input#signup_email.form-control(ignite-on-enter-focus-move='user_password' type='email' ng-model='ui.email' placeholder='Input email' required)
+                            .settings-row(ng-show='action != "password/forgot"')
+                                +lblRequired('Password:')
+                                .col-xs-9.col-md-8
+                                    input#user_password.form-control(ignite-on-enter-focus-move='user_confirm' type='password' ng-model='ui.password' placeholder='Password' ng-required='action != "password/forgot"' ignite-on-enter='action == "signin" && form.$valid && auth(action, ui)')
+                            .settings-row(ng-if='action == "signup"')
+                                +lblRequired('Confirm:')
+                                .col-xs-9.col-md-8
+                                    input#user_confirm.form-control(ignite-on-enter-focus-move='first_name' type='password' ng-model='ui_exclude.confirm' ignite-match='ui.password' placeholder='Confirm password' ng-required='action == "signup"')
+                            .settings-row(ng-show='action == "signup"')
+                                +lblRequired('First Name:')
+                                .col-xs-9.col-md-8
+                                    input#first_name.form-control(ignite-on-enter-focus-move='last_name' type='text' ng-model='ui.firstName' placeholder='Input first name' ng-required='action=="signup"')
+                            .settings-row(ng-show='action == "signup"')
+                                +lblRequired('Last Name:')
+                                .col-xs-9.col-md-8
+                                    input#last_name.form-control(ignite-on-enter-focus-move='company' type='text' ng-model='ui.lastName' placeholder='Input last name' ng-required='action=="signup"')
+                            .settings-row(ng-show='action == "password/forgot"')
+                                +lblRequired('Email:')
+                                .col-xs-9.col-md-8
+                                    input#forgot_email.form-control(ignite-on-enter='form.$valid && forgotPassword(ui)' type='email' ng-model='ui.email' placeholder='Input email' required)
+                            .settings-row(ng-show='action == "signup"')
+                                +lblRequired('Company:')
+                                .col-xs-9.col-md-8
+                                    input#company.form-control(ignite-on-enter-focus-move='country' type='text' ng-model='ui.company' placeholder='Input company name' ng-required='action=="signup"')
+                            .settings-row(ng-show='action == "signup"')
+                                +lblRequired('Country:')
+                                .col-xs-9.col-md-8
+                                    button#country.select-toggle.form-control(ignite-on-enter-focus-move='signup' bs-select bs-options='item.name as item.name for item in countries' type='text' ng-model='ui.country' placeholder='Choose your country' ng-required='action=="signup"')
+                            .settings-row(ignite-terms)
+                                .col-md-offset-3(ng-if='action == "signup" && terms.termsState')
+                                    label
+                                        input(type='checkbox' ng-model='ui_exclude.agree', ng-required='true')
+                                        | I agree to the #[a(ui-sref='{{::terms.termsState}}' target='_blank') terms and conditions]
+                        .col-xs-12.col-md-11
+                            .login-footer(ng-show='action == "signup"')
+                                a.labelField(ng-click='action = "password/forgot"' ignite-on-click-focus='signin_email') Forgot password?
+                                a.labelLogin(ng-click='action = "signin"' ignite-on-click-focus='signin_email') Sign In
+                                button#signup.btn.btn-primary(ng-click='auth(action, ui)' ng-disabled='form.$invalid') Sign Up
+                        .col-xs-12.col-md-11
+                            .login-footer(ng-show='action == "password/forgot"')
+                                a.labelField(ng-click='action = "signin"' ignite-on-click-focus='signin_email') Sign In
+                                button#forgot.btn.btn-primary(ng-click='forgotPassword(ui)' ng-disabled='form.$invalid') Send it to me
+                        .col-xs-12.col-md-11
+                            .login-footer(ng-show='action == "signin"')
+                                a.labelField(ng-click='action = "password/forgot"' ignite-on-click-focus='signin_email') Forgot password?
+                                a.labelLogin(ng-click='action = "signup"' ignite-on-click-focus='first_name') Sign Up
+                                button#login.btn.btn-primary(ng-click='auth(action, ui)' ng-disabled='form.$invalid') Sign In
+
+                    .col-xs-12.col-md-11.home-panel
+                        ignite-features
+                .col-xs-12.col-md-6
+                    #carousel.carousel.slide
+                        // Indicators
+                        ol.carousel-indicators
+                            li.active(data-target='#carousel', data-slide-to='0')
+                            li(data-target='#carousel', data-slide-to='1')
+                            li(data-target='#carousel', data-slide-to='2')
+                            li(data-target='#carousel', data-slide-to='3')
+                            li(data-target='#carousel', data-slide-to='4')
+                            li(data-target='#carousel', data-slide-to='5')
+                            li(data-target='#carousel', data-slide-to='6')
+                        // Wrapper for slides
+                        .carousel-inner(role='listbox')
+                            .item.active
+                                img(src='/images/cluster.png', alt='Clusters screen')
+                                .carousel-caption
+                                    h3 Clusters screen
+                                    p Configure clusters, link clusters to caches
+                            .item
+                                img(src='/images/cache.png', alt='Caches screen')
+                                .carousel-caption
+                                    h3 Caches screen
+                                    p Configure caches, link domain models to caches, link caches to clusters
+                            .item
+                                img(src='/images/domains.png', alt='Domain model screen')
+                                .carousel-caption
+                                    h3 Domain model screen
+                                    p Manually enter domain model or import from database
+                            .item
+                                img(src='/images/summary.png', alt='Summary screen')
+                                .carousel-caption
+                                    h3 Summary screen
+                                    p Preview XML config, JAVA code,Docker file and download project
+                            .item
+                                img(src='/images/query-table.png', alt='Query')
+                                .carousel-caption
+                                    h3 Query
+                                    p Explain SQL, execute, scan queries
+                            .item
+                                img(src='/images/query-metadata.png', alt='Cache metadata')
+                                .carousel-caption
+                                    h3 Cache metadata
+                                    p View cache type metadata
+                            .item
+                                img(src='/images/query-chart.png', alt='Query chart')
+                                .carousel-caption
+                                    h3 Query chart
+                                    p View data in tabular form and as charts
+                        // Controls
+                        a.left.carousel-control(href='#carousel', ng-click='$event.preventDefault()', role='button', data-slide='prev')
+                            span.fa.fa-chevron-left(aria-hidden='true')
+                            span.sr-only Previous
+                        a.right.carousel-control(href='#carousel', ng-click='$event.preventDefault()', role='button', data-slide='next')
+                            span.fa.fa-chevron-right(aria-hidden='true')
+                            span.sr-only Next
+
+include includes/footer
+
+script.
+    $('.carousel').carousel()
+
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/sql/cache-metadata.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/cache-metadata.jade b/modules/web-console/frontend/views/sql/cache-metadata.jade
deleted file mode 100644
index 385960a..0000000
--- a/modules/web-console/frontend/views/sql/cache-metadata.jade
+++ /dev/null
@@ -1,40 +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.
-.popover.cache-metadata(tabindex='-1' ignite-loading='loadingCacheMetadata' ignite-loading-text='Loading metadata...' ng-init='importMetadata()')
-    h3.popover-title
-        label.labelField Metadata for caches:
-        button.close(id='cache-metadata-close' ng-click='$hide()') &times;
-        .input-tip
-            input.form-control(type='text' ng-model='metaFilter' placeholder='Filter metadata...')
-    .popover-content(ng-if='metadata && metadata.length > 0')
-        treecontrol.tree-classic(tree-model='metadata' options='metaOptions' filter-expression='metaFilter')
-            span(ng-switch='node.type')
-                span(ng-switch-when='type' ng-dblclick='dblclickMetadata(paragraph, node)')
-                    i.fa.fa-table
-                    label.clickable(ng-bind='node.displayName')
-                span(ng-switch-when='plain')
-                    label {{node.name}}
-                span(ng-switch-when='field' ng-dblclick='dblclickMetadata(paragraph, node)')
-                    i.fa(ng-class='node.system ? "fa-file-text-o" : "fa-file-o"')
-                    label.clickable {{node.name}} [{{node.clazz}}]
-                label(ng-switch-when='indexes') {{node.name}}
-                label(ng-switch-when='index') {{node.name}}
-                span(ng-switch-when='index-field' ng-dblclick='dblclickMetadata(paragraph, node)')
-                    i.fa(ng-class='node.order ? "fa-sort-amount-desc" : "fa-sort-amount-asc"')
-                    label.clickable {{node.name}}
-    .popover-content(ng-if='!metadata || metadata.length == 0')
-        label.content-empty No types found
-    h3.popover-footer Double click to paste into editor

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/sql/cache-metadata.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/cache-metadata.tpl.pug b/modules/web-console/frontend/views/sql/cache-metadata.tpl.pug
new file mode 100644
index 0000000..385960a
--- /dev/null
+++ b/modules/web-console/frontend/views/sql/cache-metadata.tpl.pug
@@ -0,0 +1,40 @@
+//-
+    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.
+.popover.cache-metadata(tabindex='-1' ignite-loading='loadingCacheMetadata' ignite-loading-text='Loading metadata...' ng-init='importMetadata()')
+    h3.popover-title
+        label.labelField Metadata for caches:
+        button.close(id='cache-metadata-close' ng-click='$hide()') &times;
+        .input-tip
+            input.form-control(type='text' ng-model='metaFilter' placeholder='Filter metadata...')
+    .popover-content(ng-if='metadata && metadata.length > 0')
+        treecontrol.tree-classic(tree-model='metadata' options='metaOptions' filter-expression='metaFilter')
+            span(ng-switch='node.type')
+                span(ng-switch-when='type' ng-dblclick='dblclickMetadata(paragraph, node)')
+                    i.fa.fa-table
+                    label.clickable(ng-bind='node.displayName')
+                span(ng-switch-when='plain')
+                    label {{node.name}}
+                span(ng-switch-when='field' ng-dblclick='dblclickMetadata(paragraph, node)')
+                    i.fa(ng-class='node.system ? "fa-file-text-o" : "fa-file-o"')
+                    label.clickable {{node.name}} [{{node.clazz}}]
+                label(ng-switch-when='indexes') {{node.name}}
+                label(ng-switch-when='index') {{node.name}}
+                span(ng-switch-when='index-field' ng-dblclick='dblclickMetadata(paragraph, node)')
+                    i.fa(ng-class='node.order ? "fa-sort-amount-desc" : "fa-sort-amount-asc"')
+                    label.clickable {{node.name}}
+    .popover-content(ng-if='!metadata || metadata.length == 0')
+        label.content-empty No types found
+    h3.popover-footer Double click to paste into editor

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/sql/chart-settings.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/chart-settings.jade b/modules/web-console/frontend/views/sql/chart-settings.jade
deleted file mode 100644
index 5a1ceed..0000000
--- a/modules/web-console/frontend/views/sql/chart-settings.jade
+++ /dev/null
@@ -1,40 +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.
-
-.popover.settings(tabindex='-1' style='width: 300px')
-    .arrow
-    h3.popover-title(style='color: black') Chart settings
-    button.close(id='chart-settings-close' ng-click='$hide()') &times;
-    .popover-content
-        form.form-horizontal.chart-settings(name='chartSettingsForm' novalidate)
-            .form-group.chart-settings
-                -var btnClass = 'col.value < 0 ? "btn-success" : "btn-default"'
-
-                label All columns (drag columns to axis)
-                ul.chart-settings-columns-list(dnd-list='paragraph.chartColumns' dnd-allowed-types='[]')
-                    li(ng-repeat='col in paragraph.chartColumns track by $index')
-                        .btn.btn-default.btn-chart-column-movable(ng-class=btnClass dnd-draggable='col' dnd-effect-allowed='copy') {{col.label}}
-                label X axis (accept only one column)
-                ul.chart-settings-columns-list(dnd-list='paragraph.chartKeyCols' dnd-drop='chartAcceptKeyColumn(paragraph, item)')
-                    li(ng-repeat='col in paragraph.chartKeyCols track by $index')
-                        .btn.btn-default.btn-chart-column(ng-class=btnClass) {{col.label}}
-                            i.fa.fa-close(ng-click='chartRemoveKeyColumn(paragraph, $index)')
-                label Y axis (accept only numeric columns)
-                ul.chart-settings-columns-list(dnd-list='paragraph.chartValCols' dnd-drop='chartAcceptValColumn(paragraph, item)')
-                    li(ng-repeat='col in paragraph.chartValCols track by $index')
-                        .btn.btn-default.btn-chart-column(ng-style='chartColor($index)') {{col.label}}
-                            button.btn-chart-column-agg-fx.select-toggle(ng-change='applyChartSettings(paragraph)' ng-show='paragraphTimeSpanVisible(paragraph)' ng-style='chartColor($index)' ng-model='col.aggFx' placeholder='...' bs-select bs-options='item for item in aggregateFxs' data-container='false' tabindex='-1')
-                            i.fa.fa-close(ng-click='chartRemoveValColumn(paragraph, $index)')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/sql/chart-settings.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/chart-settings.tpl.pug b/modules/web-console/frontend/views/sql/chart-settings.tpl.pug
new file mode 100644
index 0000000..5a1ceed
--- /dev/null
+++ b/modules/web-console/frontend/views/sql/chart-settings.tpl.pug
@@ -0,0 +1,40 @@
+//-
+    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.
+
+.popover.settings(tabindex='-1' style='width: 300px')
+    .arrow
+    h3.popover-title(style='color: black') Chart settings
+    button.close(id='chart-settings-close' ng-click='$hide()') &times;
+    .popover-content
+        form.form-horizontal.chart-settings(name='chartSettingsForm' novalidate)
+            .form-group.chart-settings
+                -var btnClass = 'col.value < 0 ? "btn-success" : "btn-default"'
+
+                label All columns (drag columns to axis)
+                ul.chart-settings-columns-list(dnd-list='paragraph.chartColumns' dnd-allowed-types='[]')
+                    li(ng-repeat='col in paragraph.chartColumns track by $index')
+                        .btn.btn-default.btn-chart-column-movable(ng-class=btnClass dnd-draggable='col' dnd-effect-allowed='copy') {{col.label}}
+                label X axis (accept only one column)
+                ul.chart-settings-columns-list(dnd-list='paragraph.chartKeyCols' dnd-drop='chartAcceptKeyColumn(paragraph, item)')
+                    li(ng-repeat='col in paragraph.chartKeyCols track by $index')
+                        .btn.btn-default.btn-chart-column(ng-class=btnClass) {{col.label}}
+                            i.fa.fa-close(ng-click='chartRemoveKeyColumn(paragraph, $index)')
+                label Y axis (accept only numeric columns)
+                ul.chart-settings-columns-list(dnd-list='paragraph.chartValCols' dnd-drop='chartAcceptValColumn(paragraph, item)')
+                    li(ng-repeat='col in paragraph.chartValCols track by $index')
+                        .btn.btn-default.btn-chart-column(ng-style='chartColor($index)') {{col.label}}
+                            button.btn-chart-column-agg-fx.select-toggle(ng-change='applyChartSettings(paragraph)' ng-show='paragraphTimeSpanVisible(paragraph)' ng-style='chartColor($index)' ng-model='col.aggFx' placeholder='...' bs-select bs-options='item for item in aggregateFxs' data-container='false' tabindex='-1')
+                            i.fa.fa-close(ng-click='chartRemoveValColumn(paragraph, $index)')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/sql/notebook-new.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/notebook-new.jade b/modules/web-console/frontend/views/sql/notebook-new.jade
deleted file mode 100644
index 9585e92..0000000
--- a/modules/web-console/frontend/views/sql/notebook-new.jade
+++ /dev/null
@@ -1,33 +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.
-
-.modal(tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            .modal-header
-                button.close(ng-click='$hide()') &times;
-                h4.modal-title
-                    i.fa.fa-file-o
-                    | New query notebook
-            form.form-horizontal.modal-body.row(name='ui.inputForm' novalidate)
-                div
-                    .col-sm-2
-                        label.required.labelFormField Name:&nbsp;
-                    .col-sm-10
-                        input.form-control(id='create-notebook' type='text' ng-model='name' required ignite-on-enter='ui.inputForm.$valid && create(name)' ignite-auto-focus)
-            .modal-footer
-                button.btn.btn-default(id='copy-btn-cancel' ng-click='$hide()') Cancel
-                button.btn.btn-primary(id='copy-btn-confirm' ng-disabled='ui.inputForm.$invalid' ng-click='create(name)') Create

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/sql/notebook-new.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/notebook-new.tpl.pug b/modules/web-console/frontend/views/sql/notebook-new.tpl.pug
new file mode 100644
index 0000000..9585e92
--- /dev/null
+++ b/modules/web-console/frontend/views/sql/notebook-new.tpl.pug
@@ -0,0 +1,33 @@
+//-
+    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.
+
+.modal(tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            .modal-header
+                button.close(ng-click='$hide()') &times;
+                h4.modal-title
+                    i.fa.fa-file-o
+                    | New query notebook
+            form.form-horizontal.modal-body.row(name='ui.inputForm' novalidate)
+                div
+                    .col-sm-2
+                        label.required.labelFormField Name:&nbsp;
+                    .col-sm-10
+                        input.form-control(id='create-notebook' type='text' ng-model='name' required ignite-on-enter='ui.inputForm.$valid && create(name)' ignite-auto-focus)
+            .modal-footer
+                button.btn.btn-default(id='copy-btn-cancel' ng-click='$hide()') Cancel
+                button.btn.btn-primary(id='copy-btn-confirm' ng-disabled='ui.inputForm.$invalid' ng-click='create(name)') Create

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/sql/paragraph-rate.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/paragraph-rate.jade b/modules/web-console/frontend/views/sql/paragraph-rate.jade
deleted file mode 100644
index 03c6497..0000000
--- a/modules/web-console/frontend/views/sql/paragraph-rate.jade
+++ /dev/null
@@ -1,31 +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.
-
-.popover.settings(tabindex='-1' style='width: 200px')
-    .arrow
-    h3.popover-title(style='color: black') Refresh rate
-    button.close(id='paragraph-rate-close' ng-click='$hide()') &times;
-    .popover-content
-        form(name='popoverForm' novalidate)
-            .form-group(style='padding: 5px')
-                .col-sm-4
-                    input.form-control(id='paragraph-rate' ng-init='value = paragraph.rate.value' ng-model='value' type='number' min='1' required ignite-auto-focus)
-                .col-sm-8(style='padding-left: 5px')
-                    button.form-control.select-toggle(id='paragraph-unit' ng-init='unit = paragraph.rate.unit' ng-model='unit' required placeholder='Time unit' bs-select bs-options='item.value as item.label for item in timeUnit' data-container='false' tabindex='0')
-            .form-actions(style='margin-top: 30px; padding: 5px')
-                button.btn.btn-primary(id='paragraph-rate-start' ng-disabled='popoverForm.$invalid' ng-click='startRefresh(paragraph, value, unit); $hide()') Start
-                button.btn.btn-primary.btn-default(id='paragraph-rate-stop' ng-click='stopRefresh(paragraph); $hide()' ng-disabled='!paragraph.rate.installed') Stop
-

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/sql/paragraph-rate.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/paragraph-rate.tpl.pug b/modules/web-console/frontend/views/sql/paragraph-rate.tpl.pug
new file mode 100644
index 0000000..03c6497
--- /dev/null
+++ b/modules/web-console/frontend/views/sql/paragraph-rate.tpl.pug
@@ -0,0 +1,31 @@
+//-
+    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.
+
+.popover.settings(tabindex='-1' style='width: 200px')
+    .arrow
+    h3.popover-title(style='color: black') Refresh rate
+    button.close(id='paragraph-rate-close' ng-click='$hide()') &times;
+    .popover-content
+        form(name='popoverForm' novalidate)
+            .form-group(style='padding: 5px')
+                .col-sm-4
+                    input.form-control(id='paragraph-rate' ng-init='value = paragraph.rate.value' ng-model='value' type='number' min='1' required ignite-auto-focus)
+                .col-sm-8(style='padding-left: 5px')
+                    button.form-control.select-toggle(id='paragraph-unit' ng-init='unit = paragraph.rate.unit' ng-model='unit' required placeholder='Time unit' bs-select bs-options='item.value as item.label for item in timeUnit' data-container='false' tabindex='0')
+            .form-actions(style='margin-top: 30px; padding: 5px')
+                button.btn.btn-primary(id='paragraph-rate-start' ng-disabled='popoverForm.$invalid' ng-click='startRefresh(paragraph, value, unit); $hide()') Start
+                button.btn.btn-primary.btn-default(id='paragraph-rate-stop' ng-click='stopRefresh(paragraph); $hide()' ng-disabled='!paragraph.rate.installed') Stop
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/sql/sql.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/sql.jade b/modules/web-console/frontend/views/sql/sql.jade
deleted file mode 100644
index 61d5b30..0000000
--- a/modules/web-console/frontend/views/sql/sql.jade
+++ /dev/null
@@ -1,278 +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.
-
-include /app/helpers/jade/mixins.jade
-include /app/components/ui-grid-settings/ui-grid-settings.jade
-
-mixin btn-toolbar(btn, click, tip, focusId)
-    i.btn.btn-default.fa(class=btn ng-click=click bs-tooltip='' data-title=tip ignite-on-click-focus=focusId data-trigger='hover' data-placement='bottom')
-
-mixin btn-toolbar-data(btn, kind, tip)
-    i.btn.btn-default.fa(class=btn ng-click='setResult(paragraph, "#{kind}")' ng-class='{active: resultEq(paragraph, "#{kind}")}' bs-tooltip='' data-title=tip data-trigger='hover' data-placement='bottom')
-
-mixin result-toolbar
-    .btn-group(ng-model='paragraph.result' ng-click='$event.stopPropagation()' style='left: 50%; margin: 0 0 0 -70px;display: block;')
-        +btn-toolbar-data('fa-table', 'table', 'Show data in tabular form')
-        +btn-toolbar-data('fa-bar-chart', 'bar', 'Show bar chart<br/>By default first column - X values, second column - Y values<br/>In case of one column it will be treated as Y values')
-        +btn-toolbar-data('fa-pie-chart', 'pie', 'Show pie chart<br/>By default first column - pie labels, second column - pie values<br/>In case of one column it will be treated as pie values')
-        +btn-toolbar-data('fa-line-chart', 'line', 'Show line chart<br/>By default first column - X values, second column - Y values<br/>In case of one column it will be treated as Y values')
-        +btn-toolbar-data('fa-area-chart', 'area', 'Show area chart<br/>By default first column - X values, second column - Y values<br/>In case of one column it will be treated as Y values')
-
-mixin chart-settings
-    .total.row
-        .col-xs-4
-            .chart-settings-link(ng-show='paragraph.chart && paragraph.chartColumns.length > 0')
-                a(title='Click to show chart settings dialog' ng-click='$event.stopPropagation()' bs-popover data-template-url='/sql/chart-settings.html' data-placement='bottom' data-auto-close='1' data-trigger='click')
-                    i.fa.fa-bars
-                    | Chart settings
-                div(ng-show='paragraphTimeSpanVisible(paragraph)')
-                    label Show
-                    button.select-manual-caret.btn.btn-default(ng-model='paragraph.timeLineSpan' ng-change='applyChartSettings(paragraph)' bs-options='item for item in timeLineSpans' bs-select data-caret-html='<span class="caret"></span>')
-                    label min
-        .col-xs-4
-            +result-toolbar
-
-mixin notebook-rename
-    .docs-header.notebook-header
-        h1.col-sm-6(ng-hide='notebook.edit')
-            label(style='max-width: calc(100% - 60px)') {{notebook.name}}
-            .btn-group(ng-if='!demo')
-                +btn-toolbar('fa-pencil', 'notebook.edit = true;notebook.editName = notebook.name', 'Rename notebook')
-                +btn-toolbar('fa-trash', 'removeNotebook(notebook)', 'Remove notebook')
-        h1.col-sm-6(ng-show='notebook.edit')
-            i.btn.fa.fa-floppy-o(ng-show='notebook.editName' ng-click='renameNotebook(notebook.editName)' bs-tooltip data-title='Save notebook name' data-trigger='hover')
-            .input-tip
-                input.form-control(ng-model='notebook.editName' required ignite-on-enter='renameNotebook(notebook.editName)' ignite-on-escape='notebook.edit = false;')
-        h1.pull-right
-            a.dropdown-toggle(style='margin-right: 20px' data-toggle='dropdown' bs-dropdown='scrollParagraphs' data-placement='bottom-right') Scroll to query
-                span.caret
-            button.btn.btn-default(style='margin-top: 2px' ng-click='addQuery()' ignite-on-click-focus=focusId)
-                i.fa.fa-fw.fa-plus
-                | Add query
-
-            button.btn.btn-default(style='margin-top: 2px' ng-click='addScan()' ignite-on-click-focus=focusId)
-                i.fa.fa-fw.fa-plus
-                | Add scan
-
-mixin notebook-error
-    h2 Failed to load notebook
-    label.col-sm-12 Notebook not accessible any more. Go back to configuration or open to another notebook.
-    button.h3.btn.btn-primary(ui-sref='base.configuration.clusters') Back to configuration
-
-mixin paragraph-rename
-    .col-sm-6(ng-hide='paragraph.edit')
-        i.fa(ng-class='paragraphExpanded(paragraph) ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
-        label {{paragraph.name}}
-
-        .btn-group(ng-hide='notebook.paragraphs.length > 1')
-            +btn-toolbar('fa-pencil', 'paragraph.edit = true; paragraph.editName = paragraph.name; $event.stopPropagation();', 'Rename query', 'paragraph-name-{{paragraph.id}}')
-
-        .btn-group(ng-show='notebook.paragraphs.length > 1' ng-click='$event.stopPropagation();')
-            +btn-toolbar('fa-pencil', 'paragraph.edit = true; paragraph.editName = paragraph.name;', 'Rename query', 'paragraph-name-{{paragraph.id}}')
-            +btn-toolbar('fa-remove', 'removeParagraph(paragraph)', 'Remove query')
-
-    .col-sm-6(ng-show='paragraph.edit')
-        i.tipLabel.fa(style='float: left;' ng-class='paragraphExpanded(paragraph) ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
-        i.tipLabel.fa.fa-floppy-o(style='float: right;' ng-show='paragraph.editName' ng-click='renameParagraph(paragraph, paragraph.editName); $event.stopPropagation();' bs-tooltip data-title='Save query name' data-trigger='hover')
-        .input-tip
-            input.form-control(id='paragraph-name-{{paragraph.id}}' ng-model='paragraph.editName' required ng-click='$event.stopPropagation();' ignite-on-enter='renameParagraph(paragraph, paragraph.editName)' ignite-on-escape='paragraph.edit = false')
-
-mixin query-settings
-    label.tipLabel(bs-tooltip data-placement='bottom' data-title='Configure periodical execution of last successfully executed query') Refresh rate:
-        button.btn.btn-default.fa.fa-clock-o.tipLabel(ng-class='{"btn-info": paragraph.rate && paragraph.rate.installed}' bs-popover data-template-url='/sql/paragraph-rate.html' data-placement='left' data-auto-close='1' data-trigger='click') {{rateAsString(paragraph)}}
-
-    label.tipLabel(bs-tooltip data-placement='bottom' data-title='Max number of rows to show in query result as one page') Page size:
-        button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.pageSize' bs-select bs-options='item for item in pageSizes')
-
-    label.tipLabel(bs-tooltip data-placement='bottom' data-title='Limit query max results to specified number of pages') Max pages:
-        button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.maxPages' bs-select bs-options='item.value as item.label for item in maxPages')
-
-    label.tipLabel(ng-if='nonCollocatedJoinsAvailable(paragraph)' bs-tooltip data-placement='bottom' data-title='Non-collocated joins is a special mode that allow to join data across cluster without collocation.<br/>\
-        Nested joins are not supported for now.<br/>\
-        <b>NOTE</b>: In some cases it may consume more heap memory or may take a long time than collocated joins.' data-trigger='hover')
-        input(type='checkbox' ng-model='paragraph.nonCollocatedJoins')
-        span Allow non-collocated joins
-
-mixin query-actions
-    button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, true)' ng-click='execute(paragraph)') Execute
-    button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, true)' ng-click='execute(paragraph, true)') Execute on selected node
-
-    a.btn.btn-default(ng-disabled='!actionAvailable(paragraph, true)' ng-click='explain(paragraph)' data-placement='bottom' bs-tooltip='' data-title='{{actionTooltip(paragraph, "explain", true)}}') Explain
-
-mixin table-result-heading-query
-    .total.row
-        .col-xs-4
-            +ui-grid-settings
-            label Page: #[b {{paragraph.page}}]
-            label.margin-left-dflt Results so far: #[b {{paragraph.rows.length + paragraph.total}}]
-            label.margin-left-dflt Duration: #[b {{paragraph.duration | duration}}]
-        .col-xs-4
-            div(ng-if='paragraph.qryType === "query"')
-                +result-toolbar
-        .col-xs-4
-            .pull-right
-                .btn-group(ng-disabled='paragraph.loading')
-                    button.btn.btn-primary(ng-click='exportCsv(paragraph)' bs-tooltip data-title='{{actionTooltip(paragraph, "export", false)}}') Export
-                    button.btn.btn-primary.dropdown-toggle(id='export-item-dropdown' data-toggle='dropdown' data-container='body' bs-dropdown='exportDropdown' data-placement='bottom-right')
-                        span.caret
-
-mixin table-result-heading-scan
-    .total.row
-        .col-xs-4
-            +ui-grid-settings
-            label Page: #[b {{paragraph.page}}]
-            label.margin-left-dflt Results so far: #[b {{paragraph.rows.length + paragraph.total}}]
-            label.margin-left-dflt Duration: #[b {{paragraph.duration | duration}}]
-        .col-xs-4
-            div(ng-if='paragraph.qryType === "query"')
-                +result-toolbar
-        .col-xs-4
-            .pull-right
-                .btn-group(ng-disabled='paragraph.loading')
-                    button.btn.btn-primary(ng-click='exportCsv(paragraph)' bs-tooltip data-title='{{actionTooltip(paragraph, "export", false)}}') Export
-                    button.btn.btn-primary.dropdown-toggle(id='export-item-dropdown' data-toggle='dropdown' data-container='body' bs-dropdown='exportDropdown' data-placement='bottom-right')
-                        span.caret
-
-mixin table-result-body
-    .grid(ui-grid='paragraph.gridOptions' ui-grid-resize-columns ui-grid-exporter)
-
-mixin chart-result
-    div(ng-hide='paragraph.scanExplain()')
-        +chart-settings
-        .empty(ng-show='paragraph.chartColumns.length > 0 && !paragraph.chartColumnsConfigured()') Cannot display chart. Please configure axis using #[b Chart settings]
-        .empty(ng-show='paragraph.chartColumns.length == 0') Cannot display chart. Result set must contain Java build-in type columns. Please change query and execute it again.
-        div(ng-show='paragraph.chartColumnsConfigured()')
-            div(ng-show='paragraph.timeLineSupported() || !paragraph.chartTimeLineEnabled()')
-                div(ng-repeat='chart in paragraph.charts')
-                    nvd3(options='chart.options' data='chart.data' api='chart.api')
-            .empty(ng-show='!paragraph.timeLineSupported() && paragraph.chartTimeLineEnabled()') Pie chart does not support 'TIME_LINE' column for X-axis. Please use another column for X-axis or switch to another chart.
-    .empty(ng-show='paragraph.scanExplain()')
-        .row
-            .col-xs-4.col-xs-offset-4
-                +result-toolbar
-        label.margin-top-dflt Charts do not support #[b Explain] and #[b Scan] query
-
-mixin paragraph-scan
-    .panel-heading(bs-collapse-toggle)
-        .row
-            +paragraph-rename
-    .panel-collapse(role='tabpanel' bs-collapse-target)
-        .col-sm-12.sql-controls
-            .col-sm-3
-                +dropdown-required('Cache:', 'paragraph.cacheName', '"cache"', 'true', 'false', 'Choose cache', 'caches')
-            .col-sm-3
-                +text-enabled('Filter:', 'paragraph.filter', '"filter"', true, false, 'Enter filter')
-                    label.btn.btn-default.ignite-form-field__btn(ng-click='paragraph.caseSensitive = !paragraph.caseSensitive')
-                        input(type='checkbox' ng-model='paragraph.caseSensitive')
-                        span(bs-tooltip data-title='Select this checkbox for case sensitive search') Cs
-            label.tipLabel(bs-tooltip data-placement='bottom' data-title='Max number of rows to show in query result as one page') Page size:
-                button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.pageSize' bs-select bs-options='item for item in pageSizes')
-
-        .col-sm-12.sql-controls
-            button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, false)' ng-click='scan(paragraph)')
-                | Scan
-            button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, false)' ng-click='scan(paragraph, true)')
-                | Scan on selected node
-
-        .col-sm-12.sql-result(ng-if='paragraph.queryExecuted()' ng-switch='paragraph.resultType()')
-            .error(ng-switch-when='error') Error: {{paragraph.errMsg}}
-            .empty(ng-switch-when='empty') Result set is empty
-            .table(ng-switch-when='table')
-                +table-result-heading-scan
-                +table-result-body
-            .footer.clearfix()
-                .pull-left
-                    | Showing results for scan of #[b {{ paragraph.queryArgs.cacheName | defaultName }}]
-                    span(ng-if='paragraph.queryArgs.filter') &nbsp; with filter: #[b {{ paragraph.queryArgs.filter }}]
-                    span(ng-if='paragraph.queryArgs.localNid') &nbsp; on node: #[b {{ paragraph.queryArgs.localNid | limitTo:8 }}]
-
-                -var nextVisibleCondition = 'paragraph.resultType() != "error" && paragraph.queryId && paragraph.nonRefresh() && (paragraph.table() || paragraph.chart() && !paragraph.scanExplain())'
-
-                .pull-right(ng-show='#{nextVisibleCondition}' ng-class='{disabled: paragraph.loading}' ng-click='!paragraph.loading && nextPage(paragraph)')
-                    i.fa.fa-chevron-circle-right
-                    a Next
-
-mixin paragraph-query
-    .row.panel-heading(bs-collapse-toggle)
-        +paragraph-rename
-    .panel-collapse(role='tabpanel' bs-collapse-target)
-        .col-sm-12
-            .col-xs-8.col-sm-9(style='border-right: 1px solid #eee')
-                .sql-editor(ignite-ace='{onLoad: aceInit(paragraph), theme: "chrome", mode: "sql", require: ["ace/ext/language_tools"],' +
-                'advanced: {enableSnippets: false, enableBasicAutocompletion: true, enableLiveAutocompletion: true}}'
-                ng-model='paragraph.query')
-            .col-xs-4.col-sm-3
-                div(ng-show='caches.length > 0' style='padding: 5px 10px' st-table='displayedCaches' st-safe-src='caches')
-                    lable.labelField.labelFormField Caches:
-                    i.fa.fa-database.tipField(title='Click to show cache types metadata dialog' bs-popover data-template-url='/sql/cache-metadata.html' data-placement='bottom' data-trigger='click' data-container='#{{ paragraph.id }}')
-                    .input-tip
-                        input.form-control(type='text' st-search='label' placeholder='Filter caches...')
-                    table.links
-                        tbody.scrollable-y(style='max-height: 15em; display: block;')
-                            tr(ng-repeat='cache in displayedCaches track by cache.name')
-                                td(style='width: 100%')
-                                    input.labelField(id='cache_{{ [paragraph.id, $index].join("_") }}' type='radio' value='{{cache.name}}' ng-model='paragraph.cacheName')
-                                    label(for='cache_{{ [paragraph.id, $index].join("_") }} ' ng-bind-html='cache.label')
-                .empty-caches(ng-show='displayedCaches.length == 0 && caches.length != 0')
-                    label Wrong caches filter
-                .empty-caches(ng-show='caches.length == 0')
-                    label No caches
-        .col-sm-12.sql-controls
-            +query-actions
-
-            .pull-right
-                +query-settings
-        .col-sm-12.sql-result(ng-if='paragraph.queryExecuted()' ng-switch='paragraph.resultType()')
-            .error(ng-switch-when='error') Error: {{paragraph.errMsg}}
-            .empty(ng-switch-when='empty') Result set is empty
-            .table(ng-switch-when='table')
-                +table-result-heading-query
-                +table-result-body
-            .chart(ng-switch-when='chart')
-                +chart-result
-            .footer.clearfix
-                a.pull-left(ng-click='showResultQuery(paragraph)') Show query
-
-                -var nextVisibleCondition = 'paragraph.resultType() != "error" && paragraph.queryId && paragraph.nonRefresh() && (paragraph.table() || paragraph.chart() && !paragraph.scanExplain())'
-
-                .pull-right(ng-show='#{nextVisibleCondition}' ng-class='{disabled: paragraph.loading}' ng-click='!paragraph.loading && nextPage(paragraph)')
-                    i.fa.fa-chevron-circle-right
-                    a Next
-
-.row(ng-controller='sqlController')
-    .docs-content
-        .row(ng-if='notebook' bs-affix style='margin-bottom: 20px;')
-            +notebook-rename
-
-        ignite-information(data-title='With query notebook you can' style='margin-top: 0; margin-bottom: 30px')
-            ul
-                li Create any number of queries
-                li Execute and explain SQL queries
-                li Execute scan queries
-                li View data in tabular form and as charts
-
-        div(ng-if='notebookLoadFailed' style='text-align: center')
-            +notebook-error
-
-        div(ng-if='notebook' ignite-loading='sqlLoading' ignite-loading-text='{{ loadingText }}' ignite-loading-position='top')
-            .docs-body.paragraphs
-                .panel-group(bs-collapse ng-model='notebook.expandedParagraphs' data-allow-multiple='true' data-start-collapsed='false')
-
-                    .panel-paragraph(ng-repeat='paragraph in notebook.paragraphs' id='{{paragraph.id}}' ng-form='form_{{paragraph.id}}')
-                        .panel.panel-default(ng-if='paragraph.qryType === "scan"')
-                            +paragraph-scan
-                        .panel.panel-default(ng-if='paragraph.qryType === "query"')
-                            +paragraph-query


[18/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/statistics.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/statistics.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/statistics.pug
new file mode 100644
index 0000000..1eeea84
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/statistics.pug
@@ -0,0 +1,39 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'statistics'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Statistics
+        ignite-form-field-tooltip.tipLabel
+            | Cache statistics and management settings
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +checkbox('Statistics enabled', `${model}.statisticsEnabled`, '"statisticsEnabled"', 'Flag indicating whether statistics gathering is enabled on this cache')
+                .settings-row
+                    +checkbox('Management enabled', `${model}.managementEnabled`, '"managementEnabled"',
+                    'Flag indicating whether management is enabled on this cache<br/>\
+                    If enabled the CacheMXBean for each cache is registered in the platform MBean server')
+            .col-sm-6
+                +preview-xml-java(model, 'cacheStatistics')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/store.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/store.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/store.jade
deleted file mode 100644
index ea350f2..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/store.jade
+++ /dev/null
@@ -1,250 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'store'
--var model = 'backupItem'
-
-mixin hibernateField(name, model, items, valid, save, newItem)
-    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
-    -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
-    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
-    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
-    -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
-    div(ignite-on-focus-out=onBlur)
-        if block
-            block
-
-        .input-tip
-            +ignite-form-field-input(name, model, false, 'true', 'key=value')(
-                data-ignite-property-unique=items
-                data-ignite-property-value-specified
-                data-ignite-form-field-input-autofocus='true'
-
-                ignite-on-enter=onEnter
-                ignite-on-escape=onEscape
-            )
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Store
-        ignite-form-field-tooltip.tipLabel
-            | Cache store settings#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/persistent-store" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    -var storeFactory = model + '.cacheStoreFactory';
-                    -var storeFactoryKind = storeFactory + '.kind';
-
-                    +dropdown('Store factory:', storeFactoryKind, '"cacheStoreFactory"', 'true', 'Not set',
-                        '[\
-                            {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"}\
-                        ]',
-                        'Factory for persistent storage for cache data\
-                        <ul>\
-                            <li>JDBC POJO store factory - Objects are stored in underlying database by using java beans mapping description via reflection backed by JDBC</li>\
-                            <li>JDBC BLOB store factory - Objects are stored in underlying database in BLOB format backed by JDBC</li>\
-                            <li>Hibernate BLOB store factory - Objects are stored in underlying database in BLOB format backed by Hibernate</li>\
-                        </ul>'
-                    )
-                    span(ng-show=storeFactoryKind ng-init='__.expanded = true')
-                        a.customize(ng-show='__.expanded' ng-click='__.expanded = false') Hide settings
-                        a.customize(ng-hide='__.expanded' ng-click='__.expanded = true') Show settings
-                        .panel-details(ng-show='__.expanded')
-                            div(ng-show='#{storeFactoryKind} === "CacheJdbcPojoStoreFactory"')
-                                -var pojoStoreFactory = storeFactory + '.CacheJdbcPojoStoreFactory'
-                                -var required = storeFactoryKind + ' === "CacheJdbcPojoStoreFactory"'
-
-                                .details-row
-                                    +text('Data source bean name:', pojoStoreFactory + '.dataSourceBean',
-                                        '"pojoDataSourceBean"', required, 'Input bean name',
-                                        'Name of the data source bean in Spring context')
-                                .details-row
-                                    +dialect('Dialect:', pojoStoreFactory + '.dialect', '"pojoDialect"', required,
-                                        'Dialect of SQL implemented by a particular RDBMS:', 'Generic JDBC dialect',
-                                        'Choose JDBC dialect')
-                                .details-row
-                                    +number('Batch size:', pojoStoreFactory + '.batchSize', '"pojoBatchSize"', true, '512', '1',
-                                        'Maximum batch size for writeAll and deleteAll operations')
-                                .details-row
-                                    +number('Thread count:', pojoStoreFactory + '.maximumPoolSize', '"pojoMaximumPoolSize"', true, 'availableProcessors', '1',
-                                        'Maximum workers thread count.<br/>\
-                                        These threads are responsible for load cache.')
-                                .details-row
-                                    +number('Maximum write attempts:', pojoStoreFactory + '.maximumWriteAttempts', '"pojoMaximumWriteAttempts"', true, '2', '0',
-                                        'Maximum write attempts in case of database error')
-                                .details-row
-                                    +number('Parallel load threshold:', pojoStoreFactory + '.parallelLoadCacheMinimumThreshold', '"pojoParallelLoadCacheMinimumThreshold"', true, '512', '0',
-                                        'Parallel load cache minimum threshold.<br/>\
-                                        If <b>0</b> then load sequentially.')
-                                .details-row
-                                    +java-class('Hasher', pojoStoreFactory + '.hasher', '"pojoHasher"', 'true', 'false', 'Hash calculator', required)
-                                .details-row
-                                    +java-class('Transformer', pojoStoreFactory + '.transformer', '"pojoTransformer"', 'true', 'false', 'Types transformer', required)
-                                .details-row
-                                    +checkbox('Escape table and filed names', pojoStoreFactory + '.sqlEscapeAll', '"sqlEscapeAll"',
-                                        'If enabled than all schema, table and field names will be escaped with double quotes (for example: "tableName"."fieldName").<br/>\
-                                        This enforces case sensitivity for field names and also allows having special characters in table and field names.<br/>\
-                                        Escaped names will be used for CacheJdbcPojoStore internal SQL queries.')
-                            div(ng-show='#{storeFactoryKind} === "CacheJdbcBlobStoreFactory"')
-                                -var blobStoreFactory = storeFactory + '.CacheJdbcBlobStoreFactory'
-                                -var blobStoreFactoryVia = blobStoreFactory + '.connectVia'
-
-                                .details-row
-                                    +dropdown('Connect via:', blobStoreFactoryVia, '"connectVia"', 'true', 'Choose connection method',
-                                        '[\
-                                            {value: "URL", label: "URL"},\
-                                            {value: "DataSource", label: "Data source"}\
-                                        ]',
-                                        'You can connect to database via:\
-                                        <ul>\
-                                            <li>JDBC URL, for example: jdbc:h2:mem:myDatabase</li>\
-                                            <li>Configured data source</li>\
-                                        </ul>')
-                                div(ng-show='#{blobStoreFactoryVia} === "URL"')
-                                    -var required = storeFactoryKind + ' === "CacheJdbcBlobStoreFactory" && ' + blobStoreFactoryVia + ' === "URL"'
-
-                                    .details-row
-                                        +text('Connection URL:', blobStoreFactory + '.connectionUrl', '"connectionUrl"', required, 'Input URL',
-                                            'URL for database access, for example: jdbc:h2:mem:myDatabase')
-                                    .details-row
-                                        +text('User:', blobStoreFactory + '.user', '"user"', required, 'Input user name', 'User name for database access')
-                                    .details-row
-                                        label Note, password will be generated as stub
-                                div(ng-show='#{blobStoreFactoryVia} !== "URL"')
-                                    -var required = storeFactoryKind + ' === "CacheJdbcBlobStoreFactory" && ' + blobStoreFactoryVia + '!== "URL"'
-
-                                    .details-row
-                                        +text('Data source bean name:', blobStoreFactory + '.dataSourceBean', '"blobDataSourceBean"', required, 'Input bean name',
-                                            'Name of the data source bean in Spring context')
-                                    .details-row
-                                        +dialect('Database:', blobStoreFactory + '.dialect', '"blobDialect"', required, 'Supported databases:', 'Generic database', 'Choose database')
-                                .details-row
-                                    +checkbox('Init schema', blobStoreFactory + '.initSchema', '"initSchema"',
-                                        'Flag indicating whether DB schema should be initialized by Ignite (default behaviour) or was explicitly created by user')
-                                .details-row
-                                    +text('Create query:', blobStoreFactory + '.createTableQuery', '"createTableQuery"', 'false', 'SQL for table creation',
-                                        'Query for table creation in underlying database<br/>\
-                                        Default value: create table if not exists ENTRIES (key binary primary key, val binary)')
-                                .details-row
-                                    +text('Load query:', blobStoreFactory + '.loadQuery', '"loadQuery"', 'false', 'SQL for load entry',
-                                        'Query for entry load from underlying database<br/>\
-                                        Default value: select * from ENTRIES where key=?')
-                                .details-row
-                                    +text('Insert query:', blobStoreFactory + '.insertQuery', '"insertQuery"', 'false', 'SQL for insert entry',
-                                        'Query for insert entry into underlying database<br/>\
-                                        Default value: insert into ENTRIES (key, val) values (?, ?)')
-                                .details-row
-                                    +text('Update query:', blobStoreFactory + '.updateQuery', '"updateQuery"', 'false', 'SQL for update entry',
-                                        'Query for update entry in underlying database<br/>\
-                                        Default value: update ENTRIES set val=? where key=?')
-                                .details-row
-                                    +text('Delete query:', blobStoreFactory + '.deleteQuery', '"deleteQuery"', 'false', 'SQL for delete entry',
-                                        'Query for delete entry from underlying database<br/>\
-                                        Default value: delete from ENTRIES where key=?')
-
-                            div(ng-show='#{storeFactoryKind} === "CacheHibernateBlobStoreFactory"')
-                                -var hibernateStoreFactory = storeFactory + '.CacheHibernateBlobStoreFactory'
-                                -var hibernateProperties = hibernateStoreFactory + '.hibernateProperties'
-
-                                .details-row
-                                    +ignite-form-group(ng-form=form ng-model=hibernateProperties)
-                                        ignite-form-field-label
-                                            | Hibernate properties
-                                        ignite-form-group-tooltip
-                                            | List of Hibernate properties#[br]
-                                            | For example: connection.url=jdbc:h2:mem:exampleDb
-                                        ignite-form-group-add(ng-click='tableNewItem(hibernatePropsTbl)')
-                                            | Add new Hibernate property
-
-                                        -var tipUnique = 'Property with such key already exists!'
-                                        -var tipPropertySpecified = 'Property should be present in format key=value!'
-
-                                        .group-content-empty(ng-if='!((#{hibernateProperties} && #{hibernateProperties}.length > 0) || tableNewItemActive(hibernatePropsTbl))')
-                                            | Not defined
-                                        .group-content(ng-show='(#{hibernateProperties} && #{hibernateProperties}.length > 0) || tableNewItemActive(hibernatePropsTbl)')
-                                            table.links-edit(id='hibernateProps' st-table=hibernateProperties)
-                                                tbody
-                                                    tr(ng-repeat='item in #{hibernateProperties}')
-                                                        td.col-sm-12(ng-hide='tableEditing(hibernatePropsTbl, $index)')
-                                                            a.labelFormField(ng-click='tableStartEdit(backupItem, hibernatePropsTbl, $index)') {{item.name}} = {{item.value}}
-                                                            +btn-remove('tableRemove(backupItem, hibernatePropsTbl, $index)', '"Remove Property"')
-                                                        td.col-sm-12(ng-if='tableEditing(hibernatePropsTbl, $index)')
-                                                            +table-pair-edit('hibernatePropsTbl', 'cur', 'Property name', 'Property value', false, false, '{{::hibernatePropsTbl.focusId + $index}}', '$index', '=')
-                                                tfoot(ng-show='tableNewItemActive(hibernatePropsTbl)')
-                                                    tr
-                                                        td.col-sm-12
-                                                            +table-pair-edit('hibernatePropsTbl', 'new', 'Property name', 'Property value', false, false, '{{::hibernatePropsTbl.focusId + $index}}', '-1', '=')
-
-
-                .settings-row
-                    +checkbox('Keep binary in store', model + '.storeKeepBinary', '"storeKeepBinary"',
-                        'Flag indicating that CacheStore implementation is working with binary objects instead of Java objects')
-                .settings-row
-                    +checkbox('Load previous value', model + '.loadPreviousValue', '"loadPreviousValue"',
-                        '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.remove()</li> \
-                            <li>IgniteCache.getAndPut()</li> \
-                            <li>IgniteCache.getAndRemove()</li> \
-                            <li>IgniteCache.getAndReplace()</li> \
-                            <li> IgniteCache.getAndPutIfAbsent()</li>\
-                        </ul>')
-                .settings-row
-                    +checkbox('Read-through', model + '.readThrough', '"readThrough"', 'Flag indicating whether read-through caching should be used')
-                .settings-row
-                    +checkbox('Write-through', model + '.writeThrough', '"writeThrough"', 'Flag indicating whether write-through caching should be used')
-                .settings-row
-                    +ignite-form-group
-                        ignite-form-field-label
-                            | Write-behind
-                        ignite-form-group-tooltip
-                            | Cache write-behind settings#[br]
-                            | Write-behind is a special mode when updates to cache accumulated and then asynchronously flushed to persistent store as a bulk operation
-                        .group-content
-                            -var enabled = model + '.writeBehindEnabled'
-
-                            .details-row
-                                +checkbox('Enabled', enabled, '"writeBehindEnabled"', 'Flag indicating whether Ignite should use write-behind behaviour for the cache store')
-                            .details-row
-                                +number('Batch size:', model + '.writeBehindBatchSize', '"writeBehindBatchSize"', enabled, '512', '1',
-                                    'Maximum batch size for write-behind cache store operations<br/>\
-                                     Store operations(get or remove) are combined in a batch of this size to be passed to cache store')
-                            .details-row
-                                +number('Flush size:', model + '.writeBehindFlushSize', '"writeBehindFlushSize"', enabled, '10240', '0',
-                                    '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')
-                            .details-row
-                                +number('Flush frequency:', model + '.writeBehindFlushFrequency', '"writeBehindFlushFrequency"', enabled, '5000', '0',
-                                    'Frequency with which write-behind cache is flushed to the cache store in milliseconds')
-                            .details-row
-                                +number('Flush threads count:', model + '.writeBehindFlushThreadCount', '"writeBehindFlushThreadCount"', enabled, '1', '1',
-                                    'Number of threads that will perform cache flushing')
-            .col-sm-6
-                +preview-xml-java(model, 'cacheStore', 'domains')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/store.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/store.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/store.pug
new file mode 100644
index 0000000..f09bc0b
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/store.pug
@@ -0,0 +1,250 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'store'
+-var model = 'backupItem'
+
+mixin hibernateField(name, model, items, valid, save, newItem)
+    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
+    -var onEnter = `${valid} && (${save}); ${valid} && ${resetOnEnter};`
+
+    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
+
+    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
+    -var onBlur = `${valid} && (${save}); ${resetOnBlur};`
+
+    div(ignite-on-focus-out=onBlur)
+        if block
+            block
+
+        .input-tip
+            +ignite-form-field-input(name, model, false, 'true', 'key=value')(
+                data-ignite-property-unique=items
+                data-ignite-property-value-specified
+                data-ignite-form-field-input-autofocus='true'
+
+                ignite-on-enter=onEnter
+                ignite-on-escape=onEscape
+            )
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Store
+        ignite-form-field-tooltip.tipLabel
+            | Cache store settings#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/persistent-store" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    -var storeFactory = `${model}.cacheStoreFactory`;
+                    -var storeFactoryKind = `${storeFactory}.kind`;
+
+                    +dropdown('Store factory:', storeFactoryKind, '"cacheStoreFactory"', 'true', 'Not set',
+                        '[\
+                            {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"}\
+                        ]',
+                        'Factory for persistent storage for cache data\
+                        <ul>\
+                            <li>JDBC POJO store factory - Objects are stored in underlying database by using java beans mapping description via reflection backed by JDBC</li>\
+                            <li>JDBC BLOB store factory - Objects are stored in underlying database in BLOB format backed by JDBC</li>\
+                            <li>Hibernate BLOB store factory - Objects are stored in underlying database in BLOB format backed by Hibernate</li>\
+                        </ul>'
+                    )
+                    span(ng-show=storeFactoryKind ng-init='__.expanded = true')
+                        a.customize(ng-show='__.expanded' ng-click='__.expanded = false') Hide settings
+                        a.customize(ng-hide='__.expanded' ng-click='__.expanded = true') Show settings
+                        .panel-details(ng-show='__.expanded')
+                            div(ng-show=`${storeFactoryKind} === 'CacheJdbcPojoStoreFactory'`)
+                                -var pojoStoreFactory = `${storeFactory}.CacheJdbcPojoStoreFactory`
+                                -var required = `${storeFactoryKind} === 'CacheJdbcPojoStoreFactory'`
+
+                                .details-row
+                                    +text('Data source bean name:', `${pojoStoreFactory}.dataSourceBean`,
+                                        '"pojoDataSourceBean"', required, 'Input bean name',
+                                        'Name of the data source bean in Spring context')
+                                .details-row
+                                    +dialect('Dialect:', `${pojoStoreFactory}.dialect`, '"pojoDialect"', required,
+                                        'Dialect of SQL implemented by a particular RDBMS:', 'Generic JDBC dialect',
+                                        'Choose JDBC dialect')
+                                .details-row
+                                    +number('Batch size:', `${pojoStoreFactory}.batchSize`, '"pojoBatchSize"', true, '512', '1',
+                                        'Maximum batch size for writeAll and deleteAll operations')
+                                .details-row
+                                    +number('Thread count:', `${pojoStoreFactory}.maximumPoolSize`, '"pojoMaximumPoolSize"', true, 'availableProcessors', '1',
+                                        'Maximum workers thread count.<br/>\
+                                        These threads are responsible for load cache.')
+                                .details-row
+                                    +number('Maximum write attempts:', `${pojoStoreFactory}.maximumWriteAttempts`, '"pojoMaximumWriteAttempts"', true, '2', '0',
+                                        'Maximum write attempts in case of database error')
+                                .details-row
+                                    +number('Parallel load threshold:', `${pojoStoreFactory}.parallelLoadCacheMinimumThreshold`, '"pojoParallelLoadCacheMinimumThreshold"', true, '512', '0',
+                                        'Parallel load cache minimum threshold.<br/>\
+                                        If <b>0</b> then load sequentially.')
+                                .details-row
+                                    +java-class('Hasher', `${pojoStoreFactory}.hasher`, '"pojoHasher"', 'true', 'false', 'Hash calculator', required)
+                                .details-row
+                                    +java-class('Transformer', `${pojoStoreFactory}.transformer`, '"pojoTransformer"', 'true', 'false', 'Types transformer', required)
+                                .details-row
+                                    +checkbox('Escape table and filed names', `${pojoStoreFactory}.sqlEscapeAll`, '"sqlEscapeAll"',
+                                        'If enabled than all schema, table and field names will be escaped with double quotes (for example: "tableName"."fieldName").<br/>\
+                                        This enforces case sensitivity for field names and also allows having special characters in table and field names.<br/>\
+                                        Escaped names will be used for CacheJdbcPojoStore internal SQL queries.')
+                            div(ng-show=`${storeFactoryKind} === 'CacheJdbcBlobStoreFactory'`)
+                                -var blobStoreFactory = `${storeFactory}.CacheJdbcBlobStoreFactory`
+                                -var blobStoreFactoryVia = `${blobStoreFactory}.connectVia`
+
+                                .details-row
+                                    +dropdown('Connect via:', blobStoreFactoryVia, '"connectVia"', 'true', 'Choose connection method',
+                                        '[\
+                                            {value: "URL", label: "URL"},\
+                                            {value: "DataSource", label: "Data source"}\
+                                        ]',
+                                        'You can connect to database via:\
+                                        <ul>\
+                                            <li>JDBC URL, for example: jdbc:h2:mem:myDatabase</li>\
+                                            <li>Configured data source</li>\
+                                        </ul>')
+                                div(ng-show=`${blobStoreFactoryVia} === 'URL'`)
+                                    -var required = `${storeFactoryKind} === 'CacheJdbcBlobStoreFactory' && ${blobStoreFactoryVia} === 'URL'`
+
+                                    .details-row
+                                        +text('Connection URL:', `${blobStoreFactory}.connectionUrl`, '"connectionUrl"', required, 'Input URL',
+                                            'URL for database access, for example: jdbc:h2:mem:myDatabase')
+                                    .details-row
+                                        +text('User:', `${blobStoreFactory}.user`, '"user"', required, 'Input user name', 'User name for database access')
+                                    .details-row
+                                        label Note, password will be generated as stub
+                                div(ng-show=`${blobStoreFactoryVia} !== 'URL'`)
+                                    -var required = `${storeFactoryKind} === 'CacheJdbcBlobStoreFactory' && ${blobStoreFactoryVia} !== 'URL'`
+
+                                    .details-row
+                                        +text('Data source bean name:', `${blobStoreFactory}.dataSourceBean`, '"blobDataSourceBean"', required, 'Input bean name',
+                                            'Name of the data source bean in Spring context')
+                                    .details-row
+                                        +dialect('Database:', `${blobStoreFactory}.dialect`, '"blobDialect"', required, 'Supported databases:', 'Generic database', 'Choose database')
+                                .details-row
+                                    +checkbox('Init schema', `${blobStoreFactory}.initSchema`, '"initSchema"',
+                                        'Flag indicating whether DB schema should be initialized by Ignite (default behaviour) or was explicitly created by user')
+                                .details-row
+                                    +text('Create query:', `${blobStoreFactory}.createTableQuery`, '"createTableQuery"', 'false', 'SQL for table creation',
+                                        'Query for table creation in underlying database<br/>\
+                                        Default value: create table if not exists ENTRIES (key binary primary key, val binary)')
+                                .details-row
+                                    +text('Load query:', `${blobStoreFactory}.loadQuery`, '"loadQuery"', 'false', 'SQL for load entry',
+                                        'Query for entry load from underlying database<br/>\
+                                        Default value: select * from ENTRIES where key=?')
+                                .details-row
+                                    +text('Insert query:', `${blobStoreFactory}.insertQuery`, '"insertQuery"', 'false', 'SQL for insert entry',
+                                        'Query for insert entry into underlying database<br/>\
+                                        Default value: insert into ENTRIES (key, val) values (?, ?)')
+                                .details-row
+                                    +text('Update query:', `${blobStoreFactory}.updateQuery`, '"updateQuery"', 'false', 'SQL for update entry',
+                                        'Query for update entry in underlying database<br/>\
+                                        Default value: update ENTRIES set val=? where key=?')
+                                .details-row
+                                    +text('Delete query:', `${blobStoreFactory}.deleteQuery`, '"deleteQuery"', 'false', 'SQL for delete entry',
+                                        'Query for delete entry from underlying database<br/>\
+                                        Default value: delete from ENTRIES where key=?')
+
+                            div(ng-show=`${storeFactoryKind} === 'CacheHibernateBlobStoreFactory'`)
+                                -var hibernateStoreFactory = `${storeFactory}.CacheHibernateBlobStoreFactory`
+                                -var hibernateProperties = `${hibernateStoreFactory}.hibernateProperties`
+
+                                .details-row
+                                    +ignite-form-group(ng-form=form ng-model=hibernateProperties)
+                                        ignite-form-field-label
+                                            | Hibernate properties
+                                        ignite-form-group-tooltip
+                                            | List of Hibernate properties#[br]
+                                            | For example: connection.url=jdbc:h2:mem:exampleDb
+                                        ignite-form-group-add(ng-click='tableNewItem(hibernatePropsTbl)')
+                                            | Add new Hibernate property
+
+                                        -var tipUnique = 'Property with such key already exists!'
+                                        -var tipPropertySpecified = 'Property should be present in format key=value!'
+
+                                        .group-content-empty(ng-if=`!((${hibernateProperties} && ${hibernateProperties}.length > 0) || tableNewItemActive(hibernatePropsTbl))`)
+                                            | Not defined
+                                        .group-content(ng-show=`(${hibernateProperties} && ${hibernateProperties}.length > 0) || tableNewItemActive(hibernatePropsTbl)`)
+                                            table.links-edit(id='hibernateProps' st-table=hibernateProperties)
+                                                tbody
+                                                    tr(ng-repeat=`item in ${hibernateProperties}`)
+                                                        td.col-sm-12(ng-hide='tableEditing(hibernatePropsTbl, $index)')
+                                                            a.labelFormField(ng-click='tableStartEdit(backupItem, hibernatePropsTbl, $index)') {{item.name}} = {{item.value}}
+                                                            +btn-remove('tableRemove(backupItem, hibernatePropsTbl, $index)', '"Remove Property"')
+                                                        td.col-sm-12(ng-if='tableEditing(hibernatePropsTbl, $index)')
+                                                            +table-pair-edit('hibernatePropsTbl', 'cur', 'Property name', 'Property value', false, false, '{{::hibernatePropsTbl.focusId + $index}}', '$index', '=')
+                                                tfoot(ng-show='tableNewItemActive(hibernatePropsTbl)')
+                                                    tr
+                                                        td.col-sm-12
+                                                            +table-pair-edit('hibernatePropsTbl', 'new', 'Property name', 'Property value', false, false, '{{::hibernatePropsTbl.focusId + $index}}', '-1', '=')
+
+
+                .settings-row
+                    +checkbox('Keep binary in store', `${model}.storeKeepBinary`, '"storeKeepBinary"',
+                        'Flag indicating that CacheStore implementation is working with binary objects instead of Java objects')
+                .settings-row
+                    +checkbox('Load previous value', `${model}.loadPreviousValue`, '"loadPreviousValue"',
+                        '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.remove()</li> \
+                            <li>IgniteCache.getAndPut()</li> \
+                            <li>IgniteCache.getAndRemove()</li> \
+                            <li>IgniteCache.getAndReplace()</li> \
+                            <li> IgniteCache.getAndPutIfAbsent()</li>\
+                        </ul>')
+                .settings-row
+                    +checkbox('Read-through', `${model}.readThrough`, '"readThrough"', 'Flag indicating whether read-through caching should be used')
+                .settings-row
+                    +checkbox('Write-through', `${model}.writeThrough`, '"writeThrough"', 'Flag indicating whether write-through caching should be used')
+                .settings-row
+                    +ignite-form-group
+                        ignite-form-field-label
+                            | Write-behind
+                        ignite-form-group-tooltip
+                            | Cache write-behind settings#[br]
+                            | Write-behind is a special mode when updates to cache accumulated and then asynchronously flushed to persistent store as a bulk operation
+                        .group-content
+                            -var enabled = `${model}.writeBehindEnabled`
+
+                            .details-row
+                                +checkbox('Enabled', enabled, '"writeBehindEnabled"', 'Flag indicating whether Ignite should use write-behind behaviour for the cache store')
+                            .details-row
+                                +number('Batch size:', `${model}.writeBehindBatchSize`, '"writeBehindBatchSize"', enabled, '512', '1',
+                                    'Maximum batch size for write-behind cache store operations<br/>\
+                                     Store operations(get or remove) are combined in a batch of this size to be passed to cache store')
+                            .details-row
+                                +number('Flush size:', `${model}.writeBehindFlushSize`, '"writeBehindFlushSize"', enabled, '10240', '0',
+                                    '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')
+                            .details-row
+                                +number('Flush frequency:', `${model}.writeBehindFlushFrequency`, '"writeBehindFlushFrequency"', enabled, '5000', '0',
+                                    'Frequency with which write-behind cache is flushed to the cache store in milliseconds')
+                            .details-row
+                                +number('Flush threads count:', `${model}.writeBehindFlushThreadCount`, '"writeBehindFlushThreadCount"', enabled, '1', '1',
+                                    'Number of threads that will perform cache flushing')
+            .col-sm-6
+                +preview-xml-java(model, 'cacheStore', 'domains')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/atomic.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/atomic.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/atomic.jade
deleted file mode 100644
index 412ca3a..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/atomic.jade
+++ /dev/null
@@ -1,54 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'atomics'
--var model = 'backupItem.atomicConfiguration'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Atomic configuration
-        ignite-form-field-tooltip.tipLabel
-            | Configuration for atomic data structures#[br]
-            | 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#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/atomic-types" target="_blank") More info]
-        ignite-form-revert 
-    .panel-collapse(role='tabpanel' bs-collapse-target='' id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown('Cache mode:', model + '.cacheMode', '"cacheMode"', 'true', 'PARTITIONED',
-                        '[\
-                            {value: "LOCAL", label: "LOCAL"},\
-                            {value: "REPLICATED", label: "REPLICATED"},\
-                            {value: "PARTITIONED", label: "PARTITIONED"}\
-                        ]',
-                        '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>')
-                .settings-row
-                    +number('Sequence reserve:', model + '.atomicSequenceReserveSize', '"atomicSequenceReserveSize"', 'true', '1000', '0',
-                        'Default number of sequence values reserved for IgniteAtomicSequence instances<br/>\
-                        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')
-                .settings-row(ng-show='!(#{model}.cacheMode && #{model}.cacheMode != "PARTITIONED")')
-                    +number('Backups:', model + '.backups', '"backups"', 'true', '0', '0', 'Number of backup nodes')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterAtomics')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/atomic.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/atomic.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/atomic.pug
new file mode 100644
index 0000000..61532ab
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/atomic.pug
@@ -0,0 +1,54 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'atomics'
+-var model = 'backupItem.atomicConfiguration'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Atomic configuration
+        ignite-form-field-tooltip.tipLabel
+            | Configuration for atomic data structures#[br]
+            | 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#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/atomic-types" target="_blank") More info]
+        ignite-form-revert 
+    .panel-collapse(role='tabpanel' bs-collapse-target='' id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown('Cache mode:', `${model}.cacheMode`, '"cacheMode"', 'true', 'PARTITIONED',
+                        '[\
+                            {value: "LOCAL", label: "LOCAL"},\
+                            {value: "REPLICATED", label: "REPLICATED"},\
+                            {value: "PARTITIONED", label: "PARTITIONED"}\
+                        ]',
+                        '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>')
+                .settings-row
+                    +number('Sequence reserve:', `${model}.atomicSequenceReserveSize`, '"atomicSequenceReserveSize"', 'true', '1000', '0',
+                        'Default number of sequence values reserved for IgniteAtomicSequence instances<br/>\
+                        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')
+                .settings-row(ng-show=`!(${model}.cacheMode && ${model}.cacheMode != "PARTITIONED")`)
+                    +number('Backups:', model + '.backups', '"backups"', 'true', '0', '0', 'Number of backup nodes')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterAtomics')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/attributes.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/attributes.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/attributes.jade
deleted file mode 100644
index 0366ed8..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/attributes.jade
+++ /dev/null
@@ -1,57 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'attributes'
--var model = 'backupItem'
--var userAttributes = model + '.attributes'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label User attributes
-        ignite-form-field-tooltip.tipLabel
-            | Configuration for Ignite user attributes
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +ignite-form-group(ng-model='#{userAttributes}' ng-form='#{form}')
-                        ignite-form-field-label
-                            | User attributes
-                        ignite-form-group-tooltip
-                            | User-defined attributes to add to node
-                        ignite-form-group-add(ng-click='tableNewItem(attributesTbl)')
-                            | Add user attribute
-                        .group-content-empty(ng-if='!((#{userAttributes} && #{userAttributes}.length > 0) || tableNewItemActive(attributesTbl))')
-                            | Not defined
-                        .group-content(ng-show='(#{userAttributes} && #{userAttributes}.length > 0) || tableNewItemActive(attributesTbl)')
-                            table.links-edit(id='attributes' st-table=userAttributes)
-                                tbody
-                                    tr(ng-repeat='item in #{userAttributes} track by $index')
-                                        td.col-sm-12(ng-hide='tableEditing(attributesTbl, $index)')
-                                            a.labelFormField(ng-click='tableStartEdit(backupItem, attributesTbl, $index)') {{item.name}} = {{item.value}}
-                                            +btn-remove('tableRemove(backupItem, attributesTbl, $index)', '"Remove attribute"')
-                                        td.col-sm-12(ng-show='tableEditing(attributesTbl, $index)')
-                                            +table-pair-edit('attributesTbl', 'cur', 'Attribute name', 'Attribute value', false, false, '{{::attributesTbl.focusId + $index}}', '$index', '=')
-                                tfoot(ng-show='tableNewItemActive(attributesTbl)')
-                                    tr
-                                        td.col-sm-12
-                                            +table-pair-edit('attributesTbl', 'new', 'Attribute name', 'Attribute value', false, false, '{{::attributesTbl.focusId + $index}}', '-1', '=')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterUserAttributes')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/attributes.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/attributes.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/attributes.pug
new file mode 100644
index 0000000..cac122b
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/attributes.pug
@@ -0,0 +1,57 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'attributes'
+-var model = 'backupItem'
+-var userAttributes = model + '.attributes'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label User attributes
+        ignite-form-field-tooltip.tipLabel
+            | Configuration for Ignite user attributes
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +ignite-form-group(ng-model=`${userAttributes}` ng-form=form)
+                        ignite-form-field-label
+                            | User attributes
+                        ignite-form-group-tooltip
+                            | User-defined attributes to add to node
+                        ignite-form-group-add(ng-click='tableNewItem(attributesTbl)')
+                            | Add user attribute
+                        .group-content-empty(ng-if=`!((${userAttributes} && ${userAttributes}.length > 0) || tableNewItemActive(attributesTbl))`)
+                            | Not defined
+                        .group-content(ng-show=`(${userAttributes} && ${userAttributes}.length > 0) || tableNewItemActive(attributesTbl)`)
+                            table.links-edit(id='attributes' st-table=userAttributes)
+                                tbody
+                                    tr(ng-repeat=`item in ${userAttributes} track by $index`)
+                                        td.col-sm-12(ng-hide='tableEditing(attributesTbl, $index)')
+                                            a.labelFormField(ng-click='tableStartEdit(backupItem, attributesTbl, $index)') {{item.name}} = {{item.value}}
+                                            +btn-remove('tableRemove(backupItem, attributesTbl, $index)', '"Remove attribute"')
+                                        td.col-sm-12(ng-show='tableEditing(attributesTbl, $index)')
+                                            +table-pair-edit('attributesTbl', 'cur', 'Attribute name', 'Attribute value', false, false, '{{::attributesTbl.focusId + $index}}', '$index', '=')
+                                tfoot(ng-show='tableNewItemActive(attributesTbl)')
+                                    tr
+                                        td.col-sm-12
+                                            +table-pair-edit('attributesTbl', 'new', 'Attribute name', 'Attribute value', false, false, '{{::attributesTbl.focusId + $index}}', '-1', '=')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterUserAttributes')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.jade
deleted file mode 100644
index f8ec8f9..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.jade
+++ /dev/null
@@ -1,77 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'binary'
--var model = 'backupItem.binaryConfiguration'
--var types = model + '.typeConfigurations'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Binary configuration
-        ignite-form-field-tooltip.tipLabel
-            | Configuration of specific binary types#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/binary-marshaller" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +java-class('ID mapper:', model + '.idMapper', '"idMapper"', 'true', 'false',
-                        'Maps given from BinaryNameMapper type and filed name to ID that will be used by Ignite in internals<br/>\
-                        Ignite never writes full strings for field or type names. Instead, for performance reasons, Ignite writes integer hash codes for type/class and field names. It has been tested that hash code conflicts for the type/class names or the field names within the same type are virtually non - existent and, to gain performance, it is safe to work with hash codes. For the cases when hash codes for different types or fields actually do collide <b>BinaryIdMapper</b> allows to override the automatically generated hash code IDs for the type and field names')
-                .settings-row
-                    +java-class('Name mapper:', model + '.nameMapper', '"nameMapper"', 'true', 'false', 'Maps type/class and field names to different names')
-                .settings-row
-                    +java-class('Serializer:', model + '.serializer', '"serializer"', 'true', 'false', 'Class with custom serialization logic for binary objects')
-                .settings-row
-                    +ignite-form-group()
-                        ignite-form-field-label
-                            | Type configurations
-                        ignite-form-group-tooltip
-                            | Configuration properties for binary types
-                        ignite-form-group-add(ng-click='#{types}.push({})')
-                            | Add new type configuration.
-                        .group-content-empty(ng-if='!#{types}.length')
-                            | Not defined
-                        .group-content(ng-repeat='model in #{types} track by $index')
-                            hr(ng-if='$index !== 0')
-                            .settings-row
-                                +java-class-autofocus('Type name:', 'model.typeName', '"typeName" + $index', 'true', 'true', 'true', 'Type name')
-                                    +table-remove-button(types, 'Remove type configuration')
-                            .settings-row
-                                +java-class('ID mapper:', 'model.idMapper', '"idMapper" + $index', 'true', 'false',
-                                    'Maps given from BinaryNameMapper type and filed name to ID that will be used by Ignite in internals<br/>\
-                                    Ignite never writes full strings for field or type/class names.\
-                                    Instead, for performance reasons, Ignite writes integer hash codes for type/class and field names.\
-                                    It has been tested that hash code conflicts for the type/class names or the field names within the same type are virtually non - existent and,\
-                                    to gain performance, it is safe to work with hash codes.\
-                                    For the cases when hash codes for different types or fields actually do collide <b>BinaryIdMapper</b> allows to override the automatically generated hash code IDs for the type and field names')
-                            .settings-row
-                                +java-class('Name mapper:', 'model.nameMapper', '"nameMapper" + $index', 'true', 'false',
-                                    'Maps type/class and field names to different names')
-                            .settings-row
-                                +java-class('Serializer:', 'model.serializer', '"serializer" + $index', 'true', 'false',
-                                    'Class with custom serialization logic for binary object')
-                            .settings-row
-                                +checkbox('Enum', 'model.enum', 'enum', 'Flag indicating that this type is the enum')
-
-                .settings-row
-                    +checkbox('Compact footer', model + '.compactFooter', '"compactFooter"', 'When enabled, Ignite will not write fields metadata when serializing objects(this will increase serialization performance), because internally #[b BinaryMarshaller] already distribute metadata inside cluster')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterBinary')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.pug
new file mode 100644
index 0000000..ee9f37b
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.pug
@@ -0,0 +1,77 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'binary'
+-var model = 'backupItem.binaryConfiguration'
+-var types = model + '.typeConfigurations'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Binary configuration
+        ignite-form-field-tooltip.tipLabel
+            | Configuration of specific binary types#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/binary-marshaller" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +java-class('ID mapper:', model + '.idMapper', '"idMapper"', 'true', 'false',
+                        'Maps given from BinaryNameMapper type and filed name to ID that will be used by Ignite in internals<br/>\
+                        Ignite never writes full strings for field or type names. Instead, for performance reasons, Ignite writes integer hash codes for type/class and field names. It has been tested that hash code conflicts for the type/class names or the field names within the same type are virtually non - existent and, to gain performance, it is safe to work with hash codes. For the cases when hash codes for different types or fields actually do collide <b>BinaryIdMapper</b> allows to override the automatically generated hash code IDs for the type and field names')
+                .settings-row
+                    +java-class('Name mapper:', model + '.nameMapper', '"nameMapper"', 'true', 'false', 'Maps type/class and field names to different names')
+                .settings-row
+                    +java-class('Serializer:', model + '.serializer', '"serializer"', 'true', 'false', 'Class with custom serialization logic for binary objects')
+                .settings-row
+                    +ignite-form-group()
+                        ignite-form-field-label
+                            | Type configurations
+                        ignite-form-group-tooltip
+                            | Configuration properties for binary types
+                        ignite-form-group-add(ng-click=`${types}.push({})`)
+                            | Add new type configuration.
+                        .group-content-empty(ng-if=`!${types}.length`)
+                            | Not defined
+                        .group-content(ng-repeat=`model in ${types} track by $index`)
+                            hr(ng-if='$index !== 0')
+                            .settings-row
+                                +java-class-autofocus('Type name:', 'model.typeName', '"typeName" + $index', 'true', 'true', 'true', 'Type name')
+                                    +table-remove-button(types, 'Remove type configuration')
+                            .settings-row
+                                +java-class('ID mapper:', 'model.idMapper', '"idMapper" + $index', 'true', 'false',
+                                    'Maps given from BinaryNameMapper type and filed name to ID that will be used by Ignite in internals<br/>\
+                                    Ignite never writes full strings for field or type/class names.\
+                                    Instead, for performance reasons, Ignite writes integer hash codes for type/class and field names.\
+                                    It has been tested that hash code conflicts for the type/class names or the field names within the same type are virtually non - existent and,\
+                                    to gain performance, it is safe to work with hash codes.\
+                                    For the cases when hash codes for different types or fields actually do collide <b>BinaryIdMapper</b> allows to override the automatically generated hash code IDs for the type and field names')
+                            .settings-row
+                                +java-class('Name mapper:', 'model.nameMapper', '"nameMapper" + $index', 'true', 'false',
+                                    'Maps type/class and field names to different names')
+                            .settings-row
+                                +java-class('Serializer:', 'model.serializer', '"serializer" + $index', 'true', 'false',
+                                    'Class with custom serialization logic for binary object')
+                            .settings-row
+                                +checkbox('Enum', 'model.enum', 'enum', 'Flag indicating that this type is the enum')
+
+                .settings-row
+                    +checkbox('Compact footer', model + '.compactFooter', '"compactFooter"', 'When enabled, Ignite will not write fields metadata when serializing objects(this will increase serialization performance), because internally #[b BinaryMarshaller] already distribute metadata inside cluster')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterBinary')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/cache-key-cfg.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/cache-key-cfg.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/cache-key-cfg.jade
deleted file mode 100644
index 41a72c1..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/cache-key-cfg.jade
+++ /dev/null
@@ -1,50 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'cacheKeyCfg'
--var model = 'backupItem.cacheKeyConfiguration'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Cache key configuration
-        ignite-form-field-tooltip.tipLabel
-            | Cache key configuration allows to collocate objects in a partitioned cache based on field in cache key without explicit usage of annotations on user classes
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +ignite-form-group()
-                        ignite-form-field-label
-                            | Cache key configuration
-                        ignite-form-group-tooltip
-                            | Cache key configuration
-                        ignite-form-group-add(ng-click='#{model}.push({})')
-                            | Add new cache key configuration
-                        .group-content-empty(ng-if='!#{model}.length')
-                            | Not defined
-                        .group-content(ng-repeat='model in #{model} track by $index')
-                            hr(ng-if='$index !== 0')
-                            .settings-row
-                                +java-class-autofocus('Type name:', 'model.typeName', '"cacheKeyTypeName" + $index', 'true', 'true', 'true', 'Type name')
-                                    +table-remove-button(model, 'Remove cache key configuration')
-                            .settings-row
-                                +text('Affinity key field name:', 'model.affinityKeyFieldName', '"affinityKeyFieldName" + $index', true, 'Enter field name', 'Affinity key field name')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterCacheKeyConfiguration')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/cache-key-cfg.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/cache-key-cfg.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/cache-key-cfg.pug
new file mode 100644
index 0000000..c2926f5
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/cache-key-cfg.pug
@@ -0,0 +1,50 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'cacheKeyCfg'
+-var model = 'backupItem.cacheKeyConfiguration'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Cache key configuration
+        ignite-form-field-tooltip.tipLabel
+            | Cache key configuration allows to collocate objects in a partitioned cache based on field in cache key without explicit usage of annotations on user classes
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +ignite-form-group()
+                        ignite-form-field-label
+                            | Cache key configuration
+                        ignite-form-group-tooltip
+                            | Cache key configuration
+                        ignite-form-group-add(ng-click=`${model}.push({})`)
+                            | Add new cache key configuration
+                        .group-content-empty(ng-if=`!${model}.length`)
+                            | Not defined
+                        .group-content(ng-repeat=`model in ${model} track by $index`)
+                            hr(ng-if='$index !== 0')
+                            .settings-row
+                                +java-class-autofocus('Type name:', 'model.typeName', '"cacheKeyTypeName" + $index', 'true', 'true', 'true', 'Type name')
+                                    +table-remove-button(model, 'Remove cache key configuration')
+                            .settings-row
+                                +text('Affinity key field name:', 'model.affinityKeyFieldName', '"affinityKeyFieldName" + $index', true, 'Enter field name', 'Affinity key field name')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterCacheKeyConfiguration')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint.jade
deleted file mode 100644
index 259909e..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint.jade
+++ /dev/null
@@ -1,86 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'checkpoint'
--var model = 'backupItem.checkpointSpi'
--var CustomCheckpoint = 'model.kind === "Custom"'
--var CacheCheckpoint = 'model.kind === "Cache"'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Checkpointing
-        ignite-form-field-tooltip.tipLabel
-            | Checkpointing provides an ability to save an intermediate job state#[br]
-            | #[a(href="http://apacheignite.readme.io/docs/checkpointing" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row(ng-init='checkpointSpiTbl={type: "checkpointSpi", model: "checkpointSpi", focusId: "kind", ui: "checkpoint-table"}')
-                    +ignite-form-group()
-                        ignite-form-field-label
-                            | Checkpoint SPI configurations
-                        ignite-form-group-tooltip
-                            | Checkpoint SPI configurations
-                        ignite-form-group-add(ng-click='tableNewItem(checkpointSpiTbl)')
-                            | Add checkpoint SPI
-                        .group-content-empty(ng-if='!(#{model} && #{model}.length > 0)')
-                            | Not defined
-                        .group-content(ng-show='#{model} && #{model}.length > 0' ng-repeat='model in #{model} track by $index')
-                            hr(ng-if='$index != 0')
-                            .settings-row
-                                +dropdown-required-autofocus('Checkpoint SPI:', 'model.kind', '"checkpointKind" + $index', 'true', 'true', 'Choose checkpoint configuration variant', '[\
-                                        {value: "FS", label: "File System"},\
-                                        {value: "Cache", label: "Cache"},\
-                                        {value: "S3", label: "Amazon S3"},\
-                                        {value: "JDBC", label: "Database"},\
-                                        {value: "Custom", label: "Custom"}\
-                                    ]',
-                                    'Provides an ability to save an intermediate job state\
-                                    <ul>\
-                                        <li>File System - Uses a shared file system to store checkpoints</li>\
-                                        <li>Cache - Uses a cache to store checkpoints</li>\
-                                        <li>Amazon S3 - Uses Amazon S3 to store checkpoints</li>\
-                                        <li>Database - Uses a database to store checkpoints</li>\
-                                        <li>Custom - Custom checkpoint SPI implementation</li>\
-                                    </ul>')
-                                    +table-remove-button(model, 'Remove Checkpoint SPI')
-
-                            div(ng-show='model.kind === "FS"')
-                                include ./checkpoint/fs.jade
-
-                            div(ng-show=CacheCheckpoint)
-                                .settings-row
-                                    +dropdown-required-empty('Cache:', 'model.Cache.cache', '"checkpointCacheCache"+ $index', 'true', CacheCheckpoint,
-                                        'Choose cache', 'No caches configured for current cluster', 'clusterCaches', 'Cache to use for storing checkpoints')
-                                .settings-row
-                                    +java-class('Listener:', 'model.Cache.checkpointListener', '"checkpointCacheListener" + $index', 'true', 'false',
-                                        'Checkpoint listener implementation class name', CacheCheckpoint)
-
-                            div(ng-show='model.kind === "S3"')
-                                include ./checkpoint/s3.jade
-
-                            div(ng-show='model.kind === "JDBC"')
-                                include ./checkpoint/jdbc.jade
-
-                            .settings-row(ng-show=CustomCheckpoint)
-                                +java-class('Class name:', 'model.Custom.className', '"checkpointCustomClassName" + $index', 'true', CustomCheckpoint,
-                                'Custom CheckpointSpi implementation class', CustomCheckpoint)
-            .col-sm-6
-                +preview-xml-java('backupItem', 'clusterCheckpoint', 'caches')


[15/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/failover.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/failover.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/failover.pug
new file mode 100644
index 0000000..e0c2357
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/failover.pug
@@ -0,0 +1,73 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem'
+-var form = 'failoverSpi'
+-var failoverSpi = model + '.failoverSpi'
+-var failoverCustom = 'model.kind === "Custom"'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Failover configuration
+        ignite-form-field-tooltip.tipLabel
+            | Failover SPI provides ability to supply custom logic for handling failed execution of a grid job#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/fault-tolerance" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row(ng-init='failoverSpiTbl={type: "failoverSpi", model: "failoverSpi", focusId: "kind", ui: "failover-table"}')
+                    +ignite-form-group()
+                        ignite-form-field-label
+                            | Failover SPI configurations
+                        ignite-form-group-tooltip
+                            | Failover SPI configurations
+                        ignite-form-group-add(ng-click='tableNewItem(failoverSpiTbl)')
+                            | Add failover SPI
+                        .group-content-empty(ng-if=`!(${failoverSpi} && ${failoverSpi}.length > 0)`)
+                            | Not defined
+                        .group-content(ng-show=`${failoverSpi} && ${failoverSpi}.length > 0` ng-repeat=`model in ${failoverSpi} track by $index`)
+                            hr(ng-if='$index != 0')
+                            .settings-row
+                                +dropdown-required-autofocus('Failover SPI:', 'model.kind', '"failoverKind" + $index', 'true', 'true', 'Choose Failover SPI', '[\
+                                        {value: "JobStealing", label: "Job stealing"},\
+                                        {value: "Never", label: "Never"},\
+                                        {value: "Always", label: "Always"},\
+                                        {value: "Custom", label: "Custom"}\
+                                    ]', 'Provides ability to supply custom logic for handling failed execution of a grid job\
+                                    <ul>\
+                                        <li>Job stealing - Supports job stealing from over-utilized nodes to under-utilized nodes</li>\
+                                        <li>Never - Jobs are ordered as they arrived</li>\
+                                        <li>Always - Jobs are first ordered by their priority</li>\
+                                        <li>Custom - Jobs are activated immediately on arrival to mapped node</li>\
+                                        <li>Default - Default FailoverSpi implementation</li>\
+                                    </ul>')
+
+                                    +table-remove-button(failoverSpi, 'Remove Failover SPI')
+                            .settings-row(ng-show='model.kind === "JobStealing"')
+                                +number('Maximum failover attempts:', 'model.JobStealing.maximumFailoverAttempts', '"jsMaximumFailoverAttempts" + $index', 'true', '5', '0',
+                                    'Maximum number of attempts to execute a failed job on another node')
+                            .settings-row(ng-show='model.kind === "Always"')
+                                +number('Maximum failover attempts:', 'model.Always.maximumFailoverAttempts', '"alwaysMaximumFailoverAttempts" + $index', 'true', '5', '0',
+                                    'Maximum number of attempts to execute a failed job on another node')
+                            .settings-row(ng-show=failoverCustom)
+                                +java-class('SPI implementation', 'model.Custom.class', '"failoverSpiClass" + $index', 'true', failoverCustom,
+                                    'Custom FailoverSpi implementation class name.', failoverCustom)
+            .col-sm-6
+                +preview-xml-java(model, 'clusterFailover')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general.jade
deleted file mode 100644
index b2ce71f..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general.jade
+++ /dev/null
@@ -1,76 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'general'
--var model = 'backupItem'
--var modelDiscoveryKind = model + '.discovery.kind'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle)
-        ignite-form-panel-chevron
-        label General
-        ignite-form-field-tooltip.tipLabel
-            | Common cluster configuration#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/clustering" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body
-            .col-sm-6
-                .settings-row
-                    +text('Name:', model + '.name', '"clusterName"', 'true', 'Input name', 'Grid name allows to indicate to what grid this particular grid instance belongs to')
-                .settings-row
-                    +caches(model, 'Select caches to start in cluster or add a new cache')
-                .settings-row
-                    +text-ip-address('Local host:', model + '.localHost', '"localHost"', 'true', '0.0.0.0',
-                        'System-wide local address or host for all Ignite components to bind to<br/>\
-                        If not defined then Ignite tries to use local wildcard address<br/>\
-                        That means that all services will be available on all network interfaces of the host machine')
-                .settings-row
-                    +dropdown('Discovery:', model + '.discovery.kind', '"discovery"', 'true', 'Choose discovery', 'discoveries',
-                        'Discovery allows to discover remote nodes in grid\
-                        <ul>\
-                            <li>Static IPs - IP Finder which works only with pre configured list of IP addresses specified</li>\
-                            <li>Multicast - Multicast based IP finder</li>\
-                            <li>AWS S3 - AWS S3 based IP finder that automatically discover cluster nodes on Amazon EC2 cloud</li>\
-                            <li>Apache jclouds - Apache jclouds multi cloud toolkit based IP finder for cloud platforms with unstable IP addresses</li>\
-                            <li>Google cloud storage - Google Cloud Storage based IP finder that automatically discover cluster nodes on Google Compute Engine cluster</li>\
-                            <li>JDBC - JDBC based IP finder that use database to store node IP addres</li>\
-                            <li>Shared filesystem - Shared filesystem based IP finder that use file to store node IP address</li>\
-                            <li>Apache ZooKeeper - Apache ZooKeeper based IP finder when you use ZooKeeper to coordinate your distributed environment</li>\
-                        </ul>')
-                .settings-row
-                    .panel-details
-                        div(ng-if='#{modelDiscoveryKind} === "Cloud"')
-                            include ./general/discovery/cloud.jade
-                        div(ng-if='#{modelDiscoveryKind} === "GoogleStorage"')
-                            include ./general/discovery/google.jade
-                        div(ng-if='#{modelDiscoveryKind} === "Jdbc"')
-                            include ./general/discovery/jdbc.jade
-                        div(ng-if='#{modelDiscoveryKind} === "Multicast"')
-                            include ./general/discovery/multicast.jade
-                        div(ng-if='#{modelDiscoveryKind} === "S3"')
-                            include ./general/discovery/s3.jade
-                        div(ng-if='#{modelDiscoveryKind} === "SharedFs"')
-                            include ./general/discovery/shared.jade
-                        div(ng-if='#{modelDiscoveryKind} === "Vm"')
-                            include ./general/discovery/vm.jade
-                        div(ng-if='#{modelDiscoveryKind} === "ZooKeeper"')
-                            include ./general/discovery/zookeeper.jade
-            .col-sm-6
-                -var model = 'backupItem'
-                +preview-xml-java(model, 'clusterCaches', 'caches')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general.pug
new file mode 100644
index 0000000..be56a6c
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general.pug
@@ -0,0 +1,76 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'general'
+-var model = 'backupItem'
+-var modelDiscoveryKind = model + '.discovery.kind'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle)
+        ignite-form-panel-chevron
+        label General
+        ignite-form-field-tooltip.tipLabel
+            | Common cluster configuration#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/clustering" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body
+            .col-sm-6
+                .settings-row
+                    +text('Name:', `${model}.name`, '"clusterName"', 'true', 'Input name', 'Grid name allows to indicate to what grid this particular grid instance belongs to')
+                .settings-row
+                    +caches(model, 'Select caches to start in cluster or add a new cache')
+                .settings-row
+                    +text-ip-address('Local host:', `${model}.localHost`, '"localHost"', 'true', '0.0.0.0',
+                        'System-wide local address or host for all Ignite components to bind to<br/>\
+                        If not defined then Ignite tries to use local wildcard address<br/>\
+                        That means that all services will be available on all network interfaces of the host machine')
+                .settings-row
+                    +dropdown('Discovery:', `${model}.discovery.kind`, '"discovery"', 'true', 'Choose discovery', 'discoveries',
+                        'Discovery allows to discover remote nodes in grid\
+                        <ul>\
+                            <li>Static IPs - IP Finder which works only with pre configured list of IP addresses specified</li>\
+                            <li>Multicast - Multicast based IP finder</li>\
+                            <li>AWS S3 - AWS S3 based IP finder that automatically discover cluster nodes on Amazon EC2 cloud</li>\
+                            <li>Apache jclouds - Apache jclouds multi cloud toolkit based IP finder for cloud platforms with unstable IP addresses</li>\
+                            <li>Google cloud storage - Google Cloud Storage based IP finder that automatically discover cluster nodes on Google Compute Engine cluster</li>\
+                            <li>JDBC - JDBC based IP finder that use database to store node IP addres</li>\
+                            <li>Shared filesystem - Shared filesystem based IP finder that use file to store node IP address</li>\
+                            <li>Apache ZooKeeper - Apache ZooKeeper based IP finder when you use ZooKeeper to coordinate your distributed environment</li>\
+                        </ul>')
+                .settings-row
+                    .panel-details
+                        div(ng-if=`${modelDiscoveryKind} === 'Cloud'`)
+                            include ./general/discovery/cloud
+                        div(ng-if=`${modelDiscoveryKind} === 'GoogleStorage'`)
+                            include ./general/discovery/google
+                        div(ng-if=`${modelDiscoveryKind} === 'Jdbc'`)
+                            include ./general/discovery/jdbc
+                        div(ng-if=`${modelDiscoveryKind} === 'Multicast'`)
+                            include ./general/discovery/multicast
+                        div(ng-if=`${modelDiscoveryKind} === 'S3'`)
+                            include ./general/discovery/s3
+                        div(ng-if=`${modelDiscoveryKind} === 'SharedFs'`)
+                            include ./general/discovery/shared
+                        div(ng-if=`${modelDiscoveryKind} === 'Vm'`)
+                            include ./general/discovery/vm
+                        div(ng-if=`${modelDiscoveryKind} === 'ZooKeeper'`)
+                            include ./general/discovery/zookeeper
+            .col-sm-6
+                -var model = 'backupItem'
+                +preview-xml-java(model, 'clusterCaches', 'caches')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/cloud.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/cloud.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/cloud.jade
deleted file mode 100644
index 52fb21b..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/cloud.jade
+++ /dev/null
@@ -1,134 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var discoveryKind = 'Cloud'
--var required = 'backupItem.discovery.kind == "' + discoveryKind + '"'
--var model = 'backupItem.discovery.Cloud'
--var regions = model + '.regions'
--var zones = model + '.zones'
--var formRegions = 'discoveryCloudRegions'
--var formZones = 'discoveryCloudZones'
-
-div
-    .details-row
-        +text('Credential:', model + '.credential', '"credential"', 'false', 'Input cloud credential',
-            'Credential that is used during authentication on the cloud<br/>\
-            Depending on a cloud platform it can be a password or access key')
-    .details-row
-        +text('Path to credential:', model + '.credentialPath', '"credentialPath"', 'false', 'Input pathto credential',
-            'Path to a credential that is used during authentication on the cloud<br/>\
-            Access key or private key should be stored in a plain or PEM file without a passphrase')
-    .details-row
-        +text('Identity:', model + '.identity', '"' + discoveryKind + 'Identity"', required, 'Input identity',
-            'Identity that is used as a user name during a connection to the cloud<br/>\
-            Depending on a cloud platform it can be an email address, user name, etc')
-    .details-row
-        +text('Provider:', model + '.provider', '"' + discoveryKind + 'Provider"', required, 'Input provider', 'Cloud provider to use')
-    .details-row
-        -var form = formRegions;
-        +ignite-form-group(ng-model=regions ng-form=form)
-            -var uniqueTip = 'Such region already exists!'
-
-            ignite-form-field-label
-                | Regions
-            ignite-form-group-tooltip
-                | List of regions where VMs are located#[br]
-                | If the regions are not set then every region, that a cloud provider has, will be investigated. This could lead to significant performance degradation#[br]
-                | Note, that some cloud providers, like Google Compute Engine, doesn't have a notion of a region. For such providers regions are redundant
-            ignite-form-group-add(ng-click='group.add = [{}]')
-                | Add new region
-
-            .group-content(ng-if='#{regions}.length')
-                -var model = 'field.model';
-                -var name = '"edit" + $index'
-                -var valid = form + '[' + name + '].$valid'
-                -var save = regions + '[$index] = ' + model
-
-                div(ng-repeat='model in #{regions} track by $index')
-                    label.col-xs-12.col-sm-12.col-md-12(ng-init='field = {}')
-                        .indexField
-                            | {{ $index+1 }})
-                        +table-remove-button(regions, 'Remove region')
-                        span(ng-hide='field.edit')
-                            a.labelFormField(ng-click='field.edit = true; #{model} = model;') {{ model }}
-                        span(ng-if='field.edit')
-                            +table-text-field(name, model, regions, valid, save, 'Region name', false)
-                                +table-save-button(valid, save, false)
-                                +unique-feedback(name, uniqueTip)
-
-            .group-content(ng-repeat='field in group.add')
-                -var model = 'field.new';
-                -var name = '"new"'
-                -var valid = form + '[' + name + '].$valid'
-                -var save = regions + '.push(' + model + ')'
-
-                div
-                    label.col-xs-12.col-sm-12.col-md-12
-                        +table-text-field(name, model, regions, valid, save, 'Region name', true)
-                            +table-save-button(valid, save, false)
-                            +unique-feedback(name, uniqueTip)
-
-            .group-content-empty(ng-if='!(#{regions}.length) && !group.add.length')
-                | Not defined
-    .details-row
-        -var form = formZones;
-        +ignite-form-group(ng-model=zones ng-form=form)
-            -var uniqueTip = 'Such zone already exists!'
-
-            ignite-form-field-label
-                | Zones
-            ignite-form-group-tooltip
-                | List of zones where VMs are located#[br]
-                | If the zones are not set then every zone from specified regions, will be taken into account#[br]
-                | Note, that some cloud providers, like Rackspace, doesn't have a notion of a zone. For such providers zones are redundant
-            ignite-form-group-add(ng-click='group.add = [{}]')
-                | Add new zone
-
-            -var form = formZones;
-            .group-content(ng-if='#{zones}.length')
-                -var model = 'field.model';
-                -var name = '"edit" + $index'
-                -var valid = form + '[' + name + '].$valid'
-                -var save = zones + '[$index] = ' + model
-
-                div(ng-repeat='model in #{zones} track by $index')
-                    label.col-xs-12.col-sm-12.col-md-12(ng-init='field = {}')
-                        .indexField
-                            | {{ $index+1 }})
-                        +table-remove-button(zones, 'Remove zone')
-                        span(ng-hide='field.edit')
-                            a.labelFormField(ng-click='field.edit = true; #{model} = model;') {{ model }}
-                        span(ng-if='field.edit')
-                            +table-text-field(name, model, zones, valid, save, 'Zone name', false)
-                                +table-save-button(valid, save, false)
-                                +unique-feedback(name, uniqueTip)
-
-            .group-content(ng-repeat='field in group.add')
-                -var model = 'field.new';
-                -var name = '"new"'
-                -var valid = form + '[' + name + '].$valid'
-                -var save = zones + '.push(' + model + ')'
-
-                div
-                    label.col-xs-12.col-sm-12.col-md-12
-                        +table-text-field(name, model, zones, valid, save, 'Zone name', true)
-                            +table-save-button(valid, save, true)
-                            +unique-feedback(name, uniqueTip)
-
-            .group-content-empty(ng-if='!(#{zones}.length) && !group.add.length')
-                | Not defined

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/cloud.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/cloud.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/cloud.pug
new file mode 100644
index 0000000..b127a4c
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/cloud.pug
@@ -0,0 +1,134 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var discoveryKind = 'Cloud'
+-var required = 'backupItem.discovery.kind == "' + discoveryKind + '"'
+-var model = 'backupItem.discovery.Cloud'
+-var regions = `${model}.regions`
+-var zones = `${model}.zones`
+-var formRegions = 'discoveryCloudRegions'
+-var formZones = 'discoveryCloudZones'
+
+div
+    .details-row
+        +text('Credential:', `${model}.credential`, '"credential"', 'false', 'Input cloud credential',
+            'Credential that is used during authentication on the cloud<br/>\
+            Depending on a cloud platform it can be a password or access key')
+    .details-row
+        +text('Path to credential:', `${model}.credentialPath`, '"credentialPath"', 'false', 'Input pathto credential',
+            'Path to a credential that is used during authentication on the cloud<br/>\
+            Access key or private key should be stored in a plain or PEM file without a passphrase')
+    .details-row
+        +text('Identity:', `${model}.identity`, '"' + discoveryKind + 'Identity"', required, 'Input identity',
+            'Identity that is used as a user name during a connection to the cloud<br/>\
+            Depending on a cloud platform it can be an email address, user name, etc')
+    .details-row
+        +text('Provider:', `${model}.provider`, '"' + discoveryKind + 'Provider"', required, 'Input provider', 'Cloud provider to use')
+    .details-row
+        -var form = formRegions;
+        +ignite-form-group(ng-model=`${regions}` ng-form=form)
+            -var uniqueTip = 'Such region already exists!'
+
+            ignite-form-field-label
+                | Regions
+            ignite-form-group-tooltip
+                | List of regions where VMs are located#[br]
+                | If the regions are not set then every region, that a cloud provider has, will be investigated. This could lead to significant performance degradation#[br]
+                | Note, that some cloud providers, like Google Compute Engine, doesn't have a notion of a region. For such providers regions are redundant
+            ignite-form-group-add(ng-click='group.add = [{}]')
+                | Add new region
+
+            .group-content(ng-if=`${regions}.length`)
+                -var model = 'field.model';
+                -var name = '"edit" + $index'
+                -var valid = `${form}[${name}].$valid`
+                -var save = `${regions}[$index] = ${model}`
+
+                div(ng-repeat=`model in ${regions} track by $index`)
+                    label.col-xs-12.col-sm-12.col-md-12(ng-init='field = {}')
+                        .indexField
+                            | {{ $index+1 }})
+                        +table-remove-button(regions, 'Remove region')
+                        span(ng-hide='field.edit')
+                            a.labelFormField(ng-click=`field.edit = true; ${model} = model;`) {{ model }}
+                        span(ng-if='field.edit')
+                            +table-text-field(name, model, regions, valid, save, 'Region name', false)
+                                +table-save-button(valid, save, false)
+                                +unique-feedback(name, uniqueTip)
+
+            .group-content(ng-repeat='field in group.add')
+                -var model = 'field.new';
+                -var name = '"new"'
+                -var valid = `${form}[${name}].$valid`
+                -var save = `${regions}.push(${model})`
+
+                div
+                    label.col-xs-12.col-sm-12.col-md-12
+                        +table-text-field(name, model, regions, valid, save, 'Region name', true)
+                            +table-save-button(valid, save, false)
+                            +unique-feedback(name, uniqueTip)
+
+            .group-content-empty(ng-if=`!(${regions}.length) && !group.add.length`)
+                | Not defined
+    .details-row
+        -var form = formZones;
+        +ignite-form-group(ng-model=zones ng-form=form)
+            -var uniqueTip = 'Such zone already exists!'
+
+            ignite-form-field-label
+                | Zones
+            ignite-form-group-tooltip
+                | List of zones where VMs are located#[br]
+                | If the zones are not set then every zone from specified regions, will be taken into account#[br]
+                | Note, that some cloud providers, like Rackspace, doesn't have a notion of a zone. For such providers zones are redundant
+            ignite-form-group-add(ng-click='group.add = [{}]')
+                | Add new zone
+
+            -var form = formZones;
+            .group-content(ng-if=`${zones}.length`)
+                -var model = 'field.model';
+                -var name = '"edit" + $index'
+                -var valid = `${form}[${name}].$valid`
+                -var save = `${zones}[$index] = ${model}`
+
+                div(ng-repeat=`model in ${zones} track by $index`)
+                    label.col-xs-12.col-sm-12.col-md-12(ng-init='field = {}')
+                        .indexField
+                            | {{ $index+1 }})
+                        +table-remove-button(zones, 'Remove zone')
+                        span(ng-hide='field.edit')
+                            a.labelFormField(ng-click=`field.edit = true; ${model} = model;`) {{ model }}
+                        span(ng-if='field.edit')
+                            +table-text-field(name, model, zones, valid, save, 'Zone name', false)
+                                +table-save-button(valid, save, false)
+                                +unique-feedback(name, uniqueTip)
+
+            .group-content(ng-repeat='field in group.add')
+                -var model = 'field.new';
+                -var name = '"new"'
+                -var valid = `${form}[${name}].$valid`
+                -var save = `${zones}.push(${model})`
+
+                div
+                    label.col-xs-12.col-sm-12.col-md-12
+                        +table-text-field(name, model, zones, valid, save, 'Zone name', true)
+                            +table-save-button(valid, save, true)
+                            +unique-feedback(name, uniqueTip)
+
+            .group-content-empty(ng-if=`!(${zones}.length) && !group.add.length`)
+                | Not defined

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/google.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/google.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/google.jade
deleted file mode 100644
index c12bd04..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/google.jade
+++ /dev/null
@@ -1,38 +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.
-
-include /app/helpers/jade/mixins.jade
-
-
--var discoveryKind = 'GoogleStorage'
--var required = 'backupItem.discovery.kind == "' + discoveryKind + '"'
--var model = 'backupItem.discovery.GoogleStorage'
-
-div
-    .details-row
-        +text('Project name:', model + '.projectName', '"' + discoveryKind + 'ProjectName"', required, 'Input project name', '' +
-            'Google Cloud Platforms project name<br/>\
-            Usually this is an auto generated project number(ex. 208709979073) that can be found in "Overview" section of Google Developer Console')
-    .details-row
-        +text('Bucket name:', model + '.bucketName', '"' + discoveryKind + 'BucketName"', required, 'Input bucket name',
-            'Google Cloud Storage bucket name<br/>\
-            If the bucket does not exist Ignite will automatically create it<br/>\
-            However the name must be unique across whole Google Cloud Storage and Service Account Id must be authorized to perform this operation')
-    .details-row
-        +text('Private key path:', model + '.serviceAccountP12FilePath', '"' + discoveryKind + 'ServiceAccountP12FilePath"', required, 'Input private key path',
-            'Full path to the private key in PKCS12 format of the Service Account')
-    .details-row
-        +text('Account id:', model + '.serviceAccountId', '"' + discoveryKind + 'ServiceAccountId"', required, 'Input account id', 'Service account ID (typically an e-mail address)')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/google.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/google.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/google.pug
new file mode 100644
index 0000000..929350e
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/google.pug
@@ -0,0 +1,38 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+
+-var discoveryKind = 'GoogleStorage'
+-var required = `backupItem.discovery.kind == '${discoveryKind}'`
+-var model = 'backupItem.discovery.GoogleStorage'
+
+div
+    .details-row
+        +text('Project name:', `${model}.projectName`, `'${discoveryKind}ProjectName'`, required, 'Input project name', '' +
+            'Google Cloud Platforms project name<br/>\
+            Usually this is an auto generated project number(ex. 208709979073) that can be found in "Overview" section of Google Developer Console')
+    .details-row
+        +text('Bucket name:', `${model}.bucketName`, `'${discoveryKind}BucketName'`, required, 'Input bucket name',
+            'Google Cloud Storage bucket name<br/>\
+            If the bucket does not exist Ignite will automatically create it<br/>\
+            However the name must be unique across whole Google Cloud Storage and Service Account Id must be authorized to perform this operation')
+    .details-row
+        +text('Private key path:', `${model}.serviceAccountP12FilePath`, `'${discoveryKind}ServiceAccountP12FilePath'`, required, 'Input private key path',
+            'Full path to the private key in PKCS12 format of the Service Account')
+    .details-row
+        +text('Account id:', `${model}.serviceAccountId`, `'${discoveryKind}ServiceAccountId'`, required, 'Input account id', 'Service account ID (typically an e-mail address)')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/jdbc.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/jdbc.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/jdbc.jade
deleted file mode 100644
index 4e4246d..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/jdbc.jade
+++ /dev/null
@@ -1,31 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.discovery.Jdbc'
--var required = 'backupItem.discovery.kind === "Jdbc"'
-
-div
-    .details-row
-        +checkbox('DB schema should be initialized by Ignite', model + '.initSchema', '"initSchema"',
-            'Flag indicating whether DB schema should be initialized by Ignite or was explicitly created by user')
-    .details-row
-        +text('Data source bean name:', model + '.dataSourceBean',
-            '"dataSourceBean"', required, 'Input bean name', 'Name of the data source bean in Spring context')
-    .details-row
-        +dialect('Dialect:', model + '.dialect', '"dialect"', required,
-            'Dialect of SQL implemented by a particular RDBMS:', 'Generic JDBC dialect', 'Choose JDBC dialect')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/jdbc.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/jdbc.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/jdbc.pug
new file mode 100644
index 0000000..4e9a430
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/jdbc.pug
@@ -0,0 +1,31 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.discovery.Jdbc'
+-var required = 'backupItem.discovery.kind === "Jdbc"'
+
+div
+    .details-row
+        +checkbox('DB schema should be initialized by Ignite', `${model}.initSchema`, '"initSchema"',
+            'Flag indicating whether DB schema should be initialized by Ignite or was explicitly created by user')
+    .details-row
+        +text('Data source bean name:', `${model}.dataSourceBean`,
+            '"dataSourceBean"', required, 'Input bean name', 'Name of the data source bean in Spring context')
+    .details-row
+        +dialect('Dialect:', `${model}.dialect`, '"dialect"', required,
+            'Dialect of SQL implemented by a particular RDBMS:', 'Generic JDBC dialect', 'Choose JDBC dialect')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/multicast.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/multicast.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/multicast.jade
deleted file mode 100644
index 6a7e9fa..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/multicast.jade
+++ /dev/null
@@ -1,99 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'general'
--var model = 'backupItem.discovery.Multicast'
--var addresses = model + '.addresses'
-
-div
-    .details-row
-        +text-ip-address('IP address:', model + '.multicastGroup', '"multicastGroup"', 'true', '228.1.2.4', 'IP address of multicast group')
-    .details-row
-        +number-min-max('Port number:', model + '.multicastPort', '"multicastPort"', 'true', '47400', '0', '65535', 'Port number which multicast messages are sent to')
-    .details-row
-        +number('Waits for reply:', model + '.responseWaitTime', '"responseWaitTime"', 'true', '500', '0',
-            'Time in milliseconds IP finder waits for reply to multicast address request')
-    .details-row
-        +number('Attempts count:', model + '.addressRequestAttempts', '"addressRequestAttempts"', 'true', '2', '0',
-            'Number of attempts to send multicast address request<br/>\
-            IP finder re - sends request only in case if no reply for previous request is received')
-    .details-row
-        +text-ip-address('Local address:', model + '.localAddress', '"localAddress"', 'true', '0.0.0.0',
-            'Local host address used by this IP finder<br/>\
-            If provided address is non - loopback then multicast socket is bound to this interface<br/>\
-            If local address is not set or is any local address then IP finder creates multicast sockets for all found non - loopback addresses')
-    .details-row
-        -var form = 'discoveryMulticastAddresses';
-
-        +ignite-form-group(ng-model=addresses ng-form=form)
-            -var uniqueTip = 'Such IP address already exists!'
-            -var ipAddressTip = 'Invalid IP address!'
-
-            ignite-form-field-label
-                | Addresses
-            ignite-form-group-tooltip
-                | Addresses may be represented as follows:#[br]
-                ul: li IP address (e.g. 127.0.0.1, 9.9.9.9, etc)
-                    li IP address and port (e.g. 127.0.0.1:47500, 9.9.9.9:47501, etc)
-                    li IP address and port range (e.g. 127.0.0.1:47500..47510, 9.9.9.9:47501..47504, etc)
-                    li Hostname (e.g. host1.com, host2, etc)
-                    li Hostname and port (e.g. host1.com:47500, host2:47502, etc)
-                    li Hostname and port range (e.g. host1.com:47500..47510, host2:47502..47508, etc)
-                | If port is 0 or not provided then default port will be used (depends on discovery SPI configuration)#[br]
-                | If port range is provided (e.g. host:port1..port2) the following should be considered:#[br]
-                ul: li port1 &lt; port2 should be true
-                    li Both port1 and port2 should be greater than 0
-            ignite-form-group-add(ng-click='group.add = [{}]')
-                | Add new address
-
-            .group-content(ng-if='#{addresses}.length')
-                -var model = 'obj.model';
-                -var name = '"edit" + $index'
-                -var valid = form + '[' + name + '].$valid'
-                -var save = addresses + '[$index] = ' + model
-
-                div(ng-repeat='model in #{addresses} track by $index' ng-init='obj = {}')
-                    label.col-xs-12.col-sm-12.col-md-12
-                        .indexField
-                            | {{ $index+1 }})
-                        +table-remove-button(addresses, 'Remove address')
-
-                        +ignite-form-field-down(ng-if='!$last' ng-hide='field.edit' data-ng-model='model' data-models=addresses)
-                        +ignite-form-field-up(ng-if='!$first' ng-hide='field.edit' data-ng-model='model' data-models=addresses)
-
-                        span(ng-hide='field.edit')
-                            a.labelFormField(ng-click='field.edit = true; #{model} = model;') {{ model }}
-                        span(ng-if='field.edit')
-                            +table-address-field(name, model, addresses, valid, save, false, true)
-                                +table-save-button(valid, save, false)
-                                +unique-feedback(name, uniqueTip)
-
-            .group-content(ng-repeat='field in group.add')
-                -var model = 'new';
-                -var name = '"new"'
-                -var valid = form + '[' + name + '].$valid'
-                -var save = addresses + '.push(' + model + ')'
-
-                div
-                    label.col-xs-12.col-sm-12.col-md-12
-                        +table-address-field(name, model, addresses, valid, save, true, true)
-                            +table-save-button(valid, save, true)
-                            +unique-feedback(name, uniqueTip)
-
-            .group-content-empty(ng-if='!(#{addresses}.length) && !group.add.length')
-                | Not defined

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/multicast.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/multicast.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/multicast.pug
new file mode 100644
index 0000000..f865fd3
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/multicast.pug
@@ -0,0 +1,99 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'general'
+-var model = 'backupItem.discovery.Multicast'
+-var addresses = model + '.addresses'
+
+div
+    .details-row
+        +text-ip-address('IP address:', `${model}.multicastGroup`, '"multicastGroup"', 'true', '228.1.2.4', 'IP address of multicast group')
+    .details-row
+        +number-min-max('Port number:', `${model}.multicastPort`, '"multicastPort"', 'true', '47400', '0', '65535', 'Port number which multicast messages are sent to')
+    .details-row
+        +number('Waits for reply:', `${model}.responseWaitTime`, '"responseWaitTime"', 'true', '500', '0',
+            'Time in milliseconds IP finder waits for reply to multicast address request')
+    .details-row
+        +number('Attempts count:', `${model}.addressRequestAttempts`, '"addressRequestAttempts"', 'true', '2', '0',
+            'Number of attempts to send multicast address request<br/>\
+            IP finder re - sends request only in case if no reply for previous request is received')
+    .details-row
+        +text-ip-address('Local address:', `${model}.localAddress`, '"localAddress"', 'true', '0.0.0.0',
+            'Local host address used by this IP finder<br/>\
+            If provided address is non - loopback then multicast socket is bound to this interface<br/>\
+            If local address is not set or is any local address then IP finder creates multicast sockets for all found non - loopback addresses')
+    .details-row
+        -var form = 'discoveryMulticastAddresses';
+
+        +ignite-form-group(ng-model=`${addresses}` ng-form=form)
+            -var uniqueTip = 'Such IP address already exists!'
+            -var ipAddressTip = 'Invalid IP address!'
+
+            ignite-form-field-label
+                | Addresses
+            ignite-form-group-tooltip
+                | Addresses may be represented as follows:#[br]
+                ul: li IP address (e.g. 127.0.0.1, 9.9.9.9, etc)
+                    li IP address and port (e.g. 127.0.0.1:47500, 9.9.9.9:47501, etc)
+                    li IP address and port range (e.g. 127.0.0.1:47500..47510, 9.9.9.9:47501..47504, etc)
+                    li Hostname (e.g. host1.com, host2, etc)
+                    li Hostname and port (e.g. host1.com:47500, host2:47502, etc)
+                    li Hostname and port range (e.g. host1.com:47500..47510, host2:47502..47508, etc)
+                | If port is 0 or not provided then default port will be used (depends on discovery SPI configuration)#[br]
+                | If port range is provided (e.g. host:port1..port2) the following should be considered:#[br]
+                ul: li port1 &lt; port2 should be true
+                    li Both port1 and port2 should be greater than 0
+            ignite-form-group-add(ng-click='group.add = [{}]')
+                | Add new address
+
+            .group-content(ng-if=`${addresses}.length`)
+                -var model = 'obj.model';
+                -var name = '"edit" + $index'
+                -var valid = `${form}[${name}].$valid`
+                -var save = `${addresses}[$index] = ${model}`
+
+                div(ng-repeat=`model in ${addresses} track by $index` ng-init='obj = {}')
+                    label.col-xs-12.col-sm-12.col-md-12
+                        .indexField
+                            | {{ $index+1 }})
+                        +table-remove-button(addresses, 'Remove address')
+
+                        +ignite-form-field-down(ng-if='!$last' ng-hide='field.edit' data-ng-model='model' data-models=addresses)
+                        +ignite-form-field-up(ng-if='!$first' ng-hide='field.edit' data-ng-model='model' data-models=addresses)
+
+                        span(ng-hide='field.edit')
+                            a.labelFormField(ng-click=`field.edit = true; ${model} = model;`) {{ model }}
+                        span(ng-if='field.edit')
+                            +table-address-field(name, model, addresses, valid, save, false, true)
+                                +table-save-button(valid, save, false)
+                                +unique-feedback(name, uniqueTip)
+
+            .group-content(ng-repeat='field in group.add')
+                -var model = 'new';
+                -var name = '"new"'
+                -var valid = `${form}[${name}].$valid`
+                -var save = `${addresses}.push(${model})`
+
+                div
+                    label.col-xs-12.col-sm-12.col-md-12
+                        +table-address-field(name, model, addresses, valid, save, true, true)
+                            +table-save-button(valid, save, true)
+                            +unique-feedback(name, uniqueTip)
+
+            .group-content-empty(ng-if=`!(${addresses}.length) && !group.add.length`)
+                | Not defined

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/s3.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/s3.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/s3.jade
deleted file mode 100644
index e5eaff3..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/s3.jade
+++ /dev/null
@@ -1,27 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var discoveryKind = 'S3'
--var required = 'backupItem.discovery.kind == "' + discoveryKind + '"'
--var model = 'backupItem.discovery.S3'
-
-div
-    .details-row
-        +text('Bucket name:', model + '.bucketName', '"' + discoveryKind + 'BucketName"', required, 'Input bucket name', 'Bucket name for IP finder')
-    .details-row
-        label Note, AWS credentials will be generated as stub

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/s3.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/s3.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/s3.pug
new file mode 100644
index 0000000..ed6e20e
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/s3.pug
@@ -0,0 +1,27 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var discoveryKind = 'S3'
+-var required = `backupItem.discovery.kind == '${discoveryKind}'`
+-var model = 'backupItem.discovery.S3'
+
+div
+    .details-row
+        +text('Bucket name:', `${model}.bucketName`, `${discoveryKind}BucketName'`, required, 'Input bucket name', 'Bucket name for IP finder')
+    .details-row
+        label Note, AWS credentials will be generated as stub

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/shared.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/shared.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/shared.jade
deleted file mode 100644
index ddd9bfa..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/shared.jade
+++ /dev/null
@@ -1,23 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.discovery.SharedFs'
-
-div
-    .details-row
-        +text('File path:', model + '.path', '"path"', 'false', 'disco/tcp', 'Shared path')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/shared.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/shared.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/shared.pug
new file mode 100644
index 0000000..8eb9736
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/shared.pug
@@ -0,0 +1,23 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.discovery.SharedFs'
+
+div
+    .details-row
+        +text('File path:', `${model}.path`, '"path"', 'false', 'disco/tcp', 'Shared path')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/vm.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/vm.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/vm.jade
deleted file mode 100644
index 46ebae0..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/vm.jade
+++ /dev/null
@@ -1,79 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.discovery.Vm'
--var addresses = model + '.addresses'
--var form = 'discoveryVmAddresses'
-
-.details-row
-    +ignite-form-group(ng-form=form ng-model=addresses)
-        -var uniqueTip = 'Such IP address already exists!'
-
-        ignite-form-field-label
-            | Addresses
-        ignite-form-group-tooltip
-            | Addresses may be represented as follows:
-            ul: li IP address (e.g. 127.0.0.1, 9.9.9.9, etc)
-                li IP address and port (e.g. 127.0.0.1:47500, 9.9.9.9:47501, etc)
-                li IP address and port range (e.g. 127.0.0.1:47500..47510, 9.9.9.9:47501..47504, etc)
-                li Hostname (e.g. host1.com, host2, etc)
-                li Hostname and port (e.g. host1.com:47500, host2:47502, etc)
-                li Hostname and port range (e.g. host1.com:47500..47510, host2:47502..47508, etc)
-            | If port is 0 or not provided then default port will be used (depends on discovery SPI configuration)#[br]
-            | If port range is provided (e.g. host:port1..port2) the following should be considered:
-            ul: li port1 &lt; port2 should be true
-                li Both port1 and port2 should be greater than 0
-        ignite-form-group-add(ng-click='group.add = [{}]')
-            | Add new address
-
-        .group-content(ng-if='#{addresses}.length')
-            -var model = 'obj.model';
-            -var name = '"edit" + $index'
-            -var valid = form + '[' + name + '].$valid'
-            -var save = addresses + '[$index] = ' + model
-
-            div(ng-repeat='model in #{addresses} track by $index' ng-init='obj = {}')
-                label.col-xs-12.col-sm-12.col-md-12
-                    .indexField
-                        | {{ $index+1 }})
-                    +table-remove-button(addresses, 'Remove address')
-
-                    +ignite-form-field-down(ng-if='!$last' ng-hide='field.edit' data-ng-model='model' data-models=addresses)
-                    +ignite-form-field-up(ng-if='!$first' ng-hide='field.edit' data-ng-model='model' data-models=addresses)
-
-                    span(ng-hide='field.edit')
-                        a.labelFormField(ng-click='field.edit = true; #{model} = model;') {{ model }}
-                    span(ng-if='field.edit')
-                        +table-address-field(name, model, addresses, valid, save, false, true)
-                            +table-save-button(valid, save, false)
-                            +unique-feedback(name, uniqueTip)
-
-        .group-content(ng-repeat='field in group.add')
-            -var model = 'new';
-            -var name = '"new"'
-            -var valid = form + '[' + name + '].$valid'
-            -var save = addresses + '.push(' + model + ')'
-
-            div
-                label.col-xs-12.col-sm-12.col-md-12
-                    +table-address-field(name, model, addresses, valid, save, true, true)
-                        +table-save-button(valid, save, true)
-                        +unique-feedback(name, uniqueTip)
-
-        .group-content-empty(id='addresses' ng-if='!(#{addresses}.length) && !group.add.length')
-                | Not defined

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/vm.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/vm.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/vm.pug
new file mode 100644
index 0000000..9205c72
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/vm.pug
@@ -0,0 +1,79 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.discovery.Vm'
+-var addresses = model + '.addresses'
+-var form = 'discoveryVmAddresses'
+
+.details-row
+    +ignite-form-group(ng-form=form ng-model=`${addresses}`)
+        -var uniqueTip = 'Such IP address already exists!'
+
+        ignite-form-field-label
+            | Addresses
+        ignite-form-group-tooltip
+            | Addresses may be represented as follows:
+            ul: li IP address (e.g. 127.0.0.1, 9.9.9.9, etc)
+                li IP address and port (e.g. 127.0.0.1:47500, 9.9.9.9:47501, etc)
+                li IP address and port range (e.g. 127.0.0.1:47500..47510, 9.9.9.9:47501..47504, etc)
+                li Hostname (e.g. host1.com, host2, etc)
+                li Hostname and port (e.g. host1.com:47500, host2:47502, etc)
+                li Hostname and port range (e.g. host1.com:47500..47510, host2:47502..47508, etc)
+            | If port is 0 or not provided then default port will be used (depends on discovery SPI configuration)#[br]
+            | If port range is provided (e.g. host:port1..port2) the following should be considered:
+            ul: li port1 &lt; port2 should be true
+                li Both port1 and port2 should be greater than 0
+        ignite-form-group-add(ng-click='group.add = [{}]')
+            | Add new address
+
+        .group-content(ng-if=`${addresses}.length`)
+            -var model = 'obj.model';
+            -var name = '"edit" + $index'
+            -var valid = `${form}[${name}].$valid`
+            -var save = `${addresses}[$index] = ${model}`
+
+            div(ng-repeat=`model in ${addresses} track by $index` ng-init='obj = {}')
+                label.col-xs-12.col-sm-12.col-md-12
+                    .indexField
+                        | {{ $index+1 }})
+                    +table-remove-button(addresses, 'Remove address')
+
+                    +ignite-form-field-down(ng-if='!$last' ng-hide='field.edit' data-ng-model='model' data-models=addresses)
+                    +ignite-form-field-up(ng-if='!$first' ng-hide='field.edit' data-ng-model='model' data-models=addresses)
+
+                    span(ng-hide='field.edit')
+                        a.labelFormField(ng-click=`field.edit = true; ${model} = model;`) {{ model }}
+                    span(ng-if='field.edit')
+                        +table-address-field(name, model, addresses, valid, save, false, true)
+                            +table-save-button(valid, save, false)
+                            +unique-feedback(name, uniqueTip)
+
+        .group-content(ng-repeat='field in group.add')
+            -var model = 'new';
+            -var name = '"new"'
+            -var valid = `${form}[${name}].$valid`
+            -var save = `${addresses}.push(${model})`
+
+            div
+                label.col-xs-12.col-sm-12.col-md-12
+                    +table-address-field(name, model, addresses, valid, save, true, true)
+                        +table-save-button(valid, save, true)
+                        +unique-feedback(name, uniqueTip)
+
+        .group-content-empty(id='addresses' ng-if=`!(${addresses}.length) && !group.add.length`)
+                | Not defined

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper.jade
deleted file mode 100644
index 48b1776..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper.jade
+++ /dev/null
@@ -1,85 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'general'
--var discoveryKind = 'ZooKeeper'
--var required = 'backupItem.discovery.kind == "' + discoveryKind + '"'
--var model = 'backupItem.discovery.ZooKeeper'
--var modelRetryPolicyKind = model + '.retryPolicy.kind'
-
-div
-    .details-row
-        +java-class('Curator:', model + '.curator', '"curator"', 'true', 'false',
-            'The Curator framework in use<br/>\
-            By default generates curator of org.apache.curator. framework.imps.CuratorFrameworkImpl\
-            class with configured connect string, retry policy, and default session and connection timeouts', required)
-    .details-row
-        +text('Connect string:', model + '.zkConnectionString', '"' + discoveryKind + 'ConnectionString"', required, 'host:port[chroot][,host:port[chroot]]',
-            'When "IGNITE_ZK_CONNECTION_STRING" system property is not configured this property will be used')
-    .details-row
-        +dropdown('Retry policy:', model + '.retryPolicy.kind', '"retryPolicy"', 'true', 'Default',
-            '[\
-                {value: "ExponentialBackoff", label: "Exponential backoff"},\
-                {value: "BoundedExponentialBackoff", label: "Bounded exponential backoff"},\
-                {value: "UntilElapsed", label: "Until elapsed"},\
-                {value: "NTimes", label: "Max number of times"},\
-                {value: "OneTime", label: "Only once"},\
-                {value: "Forever", label: "Always allow retry"},\
-                {value: "Custom", label: "Custom"},\
-                {value: undefined, label: "Default"}\
-            ]',
-            'Available retry policies:\
-            <ul>\
-                <li>Exponential backoff - retries a set number of times with increasing sleep time between retries</li>\
-                <li>Bounded exponential backoff - retries a set number of times with an increasing (up to a maximum bound) sleep time between retries</li>\
-                <li>Until elapsed - retries until a given amount of time elapses</li>\
-                <li>Max number of times - retries a max number of times</li>\
-                <li>Only once - retries only once</li>\
-                <li>Always allow retry - retries infinitely</li>\
-                <li>Custom - custom retry policy implementation</li>\
-                <li>Default - exponential backoff retry policy with configured base sleep time equal to 1000ms and max retry count equal to 10</li>\
-            </ul>')
-    .details-row(ng-show='#{model}.retryPolicy.kind')
-        .panel-details
-                div(ng-show='#{modelRetryPolicyKind} === "ExponentialBackoff"')
-                    include ./zookeeper/retrypolicy/exponential-backoff.jade
-                div(ng-show='#{modelRetryPolicyKind} === "BoundedExponentialBackoff"')
-                    include ./zookeeper/retrypolicy/bounded-exponential-backoff.jade
-                div(ng-show='#{modelRetryPolicyKind} === "UntilElapsed"')
-                    include ./zookeeper/retrypolicy/until-elapsed.jade
-                div(ng-show='#{modelRetryPolicyKind} === "NTimes"')
-                    include ./zookeeper/retrypolicy/n-times.jade
-                div(ng-show='#{modelRetryPolicyKind} === "OneTime"')
-                    include ./zookeeper/retrypolicy/one-time.jade
-                div(ng-show='#{modelRetryPolicyKind} === "Forever"')
-                    include ./zookeeper/retrypolicy/forever.jade
-                div(ng-show='#{modelRetryPolicyKind} === "Custom"')
-                    include ./zookeeper/retrypolicy/custom.jade
-    .details-row
-        -var model = 'backupItem.discovery.ZooKeeper'
-
-        +text('Base path:', model + '.basePath', '"basePath"', 'false', '/services', 'Base path for service registration')
-    .details-row
-        +text('Service name:', model + '.serviceName', '"serviceName"', 'false', 'ignite',
-            'Service name to use, as defined by Curator&#39;s ServiceDiscovery recipe<br/>\
-            In physical ZooKeeper terms, it represents the node under basePath, under which services will be registered')
-    .details-row
-        +checkbox('Allow duplicate registrations', model + '.allowDuplicateRegistrations', '"allowDuplicateRegistrations"',
-            'Whether to register each node only once, or if duplicate registrations are allowed<br/>\
-            Nodes will attempt to register themselves, plus those they know about<br/>\
-            By default, duplicate registrations are not allowed, but you might want to set this property to <b>true</b> if you have multiple network interfaces or if you are facing troubles')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper.pug
new file mode 100644
index 0000000..91548e4
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper.pug
@@ -0,0 +1,85 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'general'
+-var discoveryKind = 'ZooKeeper'
+-var required = `backupItem.discovery.kind == '${discoveryKind}'`
+-var model = 'backupItem.discovery.ZooKeeper'
+-var modelRetryPolicyKind = `${model}.retryPolicy.kind`
+
+div
+    .details-row
+        +java-class('Curator:', `${model}.curator`, '"curator"', 'true', 'false',
+            'The Curator framework in use<br/>\
+            By default generates curator of org.apache.curator. framework.imps.CuratorFrameworkImpl\
+            class with configured connect string, retry policy, and default session and connection timeouts', required)
+    .details-row
+        +text('Connect string:', `${model}.zkConnectionString`, `'${discoveryKind}ConnectionString'`, required, 'host:port[chroot][,host:port[chroot]]',
+            'When "IGNITE_ZK_CONNECTION_STRING" system property is not configured this property will be used')
+    .details-row
+        +dropdown('Retry policy:', `${model}.retryPolicy.kind`, '"retryPolicy"', 'true', 'Default',
+            '[\
+                {value: "ExponentialBackoff", label: "Exponential backoff"},\
+                {value: "BoundedExponentialBackoff", label: "Bounded exponential backoff"},\
+                {value: "UntilElapsed", label: "Until elapsed"},\
+                {value: "NTimes", label: "Max number of times"},\
+                {value: "OneTime", label: "Only once"},\
+                {value: "Forever", label: "Always allow retry"},\
+                {value: "Custom", label: "Custom"},\
+                {value: undefined, label: "Default"}\
+            ]',
+            'Available retry policies:\
+            <ul>\
+                <li>Exponential backoff - retries a set number of times with increasing sleep time between retries</li>\
+                <li>Bounded exponential backoff - retries a set number of times with an increasing (up to a maximum bound) sleep time between retries</li>\
+                <li>Until elapsed - retries until a given amount of time elapses</li>\
+                <li>Max number of times - retries a max number of times</li>\
+                <li>Only once - retries only once</li>\
+                <li>Always allow retry - retries infinitely</li>\
+                <li>Custom - custom retry policy implementation</li>\
+                <li>Default - exponential backoff retry policy with configured base sleep time equal to 1000ms and max retry count equal to 10</li>\
+            </ul>')
+    .details-row(ng-show=`${model}.retryPolicy.kind`)
+        .panel-details
+                div(ng-show=`${modelRetryPolicyKind} === 'ExponentialBackoff'`)
+                    include ./zookeeper/retrypolicy/exponential-backoff
+                div(ng-show=`${modelRetryPolicyKind} === 'BoundedExponentialBackoff'`)
+                    include ./zookeeper/retrypolicy/bounded-exponential-backoff
+                div(ng-show=`${modelRetryPolicyKind} === 'UntilElapsed'`)
+                    include ./zookeeper/retrypolicy/until-elapsed
+                div(ng-show=`${modelRetryPolicyKind} === 'NTimes'`)
+                    include ./zookeeper/retrypolicy/n-times
+                div(ng-show=`${modelRetryPolicyKind} === 'OneTime'`)
+                    include ./zookeeper/retrypolicy/one-time
+                div(ng-show=`${modelRetryPolicyKind} === 'Forever'`)
+                    include ./zookeeper/retrypolicy/forever
+                div(ng-show=`${modelRetryPolicyKind} === 'Custom'`)
+                    include ./zookeeper/retrypolicy/custom
+    .details-row
+        -var model = 'backupItem.discovery.ZooKeeper'
+
+        +text('Base path:', `${model}.basePath`, '"basePath"', 'false', '/services', 'Base path for service registration')
+    .details-row
+        +text('Service name:', `${model}.serviceName`, '"serviceName"', 'false', 'ignite',
+            'Service name to use, as defined by Curator&#39;s ServiceDiscovery recipe<br/>\
+            In physical ZooKeeper terms, it represents the node under basePath, under which services will be registered')
+    .details-row
+        +checkbox('Allow duplicate registrations', `${model}.allowDuplicateRegistrations`, '"allowDuplicateRegistrations"',
+            'Whether to register each node only once, or if duplicate registrations are allowed<br/>\
+            Nodes will attempt to register themselves, plus those they know about<br/>\
+            By default, duplicate registrations are not allowed, but you might want to set this property to <b>true</b> if you have multiple network interfaces or if you are facing troubles')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.jade
deleted file mode 100644
index d3c1f9f..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.jade
+++ /dev/null
@@ -1,27 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.discovery.ZooKeeper.retryPolicy.BoundedExponentialBackoff'
-
-div
-    .details-row
-        +number('Base interval:', model + '.baseSleepTimeMs', '"beBaseSleepTimeMs"', 'true', '1000', '0', 'Initial amount of time in ms to wait between retries')
-    .details-row
-        +number('Max interval:', model + '.maxSleepTimeMs', '"beMaxSleepTimeMs"', 'true', 'Integer.MAX_VALUE', '0', 'Max time in ms to sleep on each retry')
-    .details-row
-        +number-min-max('Max retries:', model + '.maxRetries', '"beMaxRetries"', 'true', '10', '0', '29', 'Max number of times to retry')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.pug
new file mode 100644
index 0000000..c71be9a
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.pug
@@ -0,0 +1,27 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.discovery.ZooKeeper.retryPolicy.BoundedExponentialBackoff'
+
+div
+    .details-row
+        +number('Base interval:', `${model}.baseSleepTimeMs`, '"beBaseSleepTimeMs"', 'true', '1000', '0', 'Initial amount of time in ms to wait between retries')
+    .details-row
+        +number('Max interval:', `${model}.maxSleepTimeMs`, '"beMaxSleepTimeMs"', 'true', 'Integer.MAX_VALUE', '0', 'Max time in ms to sleep on each retry')
+    .details-row
+        +number-min-max('Max retries:', `${model}.maxRetries`, '"beMaxRetries"', 'true', '10', '0', '29', 'Max number of times to retry')


[29/50] [abbrv] ignite git commit: Added docker file for 1.9.0

Posted by sb...@apache.org.
Added docker file for 1.9.0


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

Branch: refs/heads/ignite-4705-2
Commit: 497202076153ce7d9fa5a9f866ac30e3d371315f
Parents: de2a158
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Mar 6 15:18:11 2017 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Mar 6 15:18:11 2017 +0300

----------------------------------------------------------------------
 modules/docker/1.9.0/Dockerfile | 46 ++++++++++++++++++++++++++++++++
 modules/docker/1.9.0/run.sh     | 51 ++++++++++++++++++++++++++++++++++++
 modules/docker/Dockerfile       |  4 +--
 3 files changed, 99 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/49720207/modules/docker/1.9.0/Dockerfile
----------------------------------------------------------------------
diff --git a/modules/docker/1.9.0/Dockerfile b/modules/docker/1.9.0/Dockerfile
new file mode 100644
index 0000000..48ceba1
--- /dev/null
+++ b/modules/docker/1.9.0/Dockerfile
@@ -0,0 +1,46 @@
+#
+# 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.
+#
+
+# Start from a Java image.
+FROM java:8
+
+# Ignite version
+ENV IGNITE_VERSION 1.9.0
+
+# Ignite home
+ENV IGNITE_HOME /opt/ignite/apache-ignite-fabric-${IGNITE_VERSION}-bin
+
+# Do not rely on anything provided by base image(s), but be explicit, if they are installed already it is noop then
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        unzip \
+        curl \
+    && rm -rf /var/lib/apt/lists/*
+
+WORKDIR /opt/ignite
+
+RUN curl https://dist.apache.org/repos/dist/release/ignite/${IGNITE_VERSION}/apache-ignite-fabric-${IGNITE_VERSION}-bin.zip -o ignite.zip \
+    && unzip ignite.zip \
+    && rm ignite.zip
+
+# Copy sh files and set permission
+COPY ./run.sh $IGNITE_HOME/
+
+RUN chmod +x $IGNITE_HOME/run.sh
+
+CMD $IGNITE_HOME/run.sh
+
+EXPOSE 11211 47100 47500 49112
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/49720207/modules/docker/1.9.0/run.sh
----------------------------------------------------------------------
diff --git a/modules/docker/1.9.0/run.sh b/modules/docker/1.9.0/run.sh
new file mode 100644
index 0000000..3aafc30
--- /dev/null
+++ b/modules/docker/1.9.0/run.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+#
+# 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.
+#
+
+if [ ! -z "$OPTION_LIBS" ]; then
+  IFS=, LIBS_LIST=("$OPTION_LIBS")
+
+  for lib in ${LIBS_LIST[@]}; do
+    cp -r $IGNITE_HOME/libs/optional/"$lib"/* \
+        $IGNITE_HOME/libs/
+  done
+fi
+
+if [ ! -z "$EXTERNAL_LIBS" ]; then
+  IFS=, LIBS_LIST=("$EXTERNAL_LIBS")
+
+  for lib in ${LIBS_LIST[@]}; do
+    echo $lib >> temp
+  done
+
+  wget -i temp -P $IGNITE_HOME/libs
+
+  rm temp
+fi
+
+QUIET=""
+
+if [ "$IGNITE_QUIET" = "false" ]; then
+  QUIET="-v"
+fi
+
+if [ -z $CONFIG_URI ]; then
+  $IGNITE_HOME/bin/ignite.sh $QUIET
+else
+  $IGNITE_HOME/bin/ignite.sh $QUIET $CONFIG_URI
+fi
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/49720207/modules/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/modules/docker/Dockerfile b/modules/docker/Dockerfile
index 13fb3de..48ceba1 100644
--- a/modules/docker/Dockerfile
+++ b/modules/docker/Dockerfile
@@ -19,7 +19,7 @@
 FROM java:8
 
 # Ignite version
-ENV IGNITE_VERSION 1.8.0
+ENV IGNITE_VERSION 1.9.0
 
 # Ignite home
 ENV IGNITE_HOME /opt/ignite/apache-ignite-fabric-${IGNITE_VERSION}-bin
@@ -32,7 +32,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 
 WORKDIR /opt/ignite
 
-RUN curl http://www.us.apache.org/dist/ignite/${IGNITE_VERSION}/apache-ignite-fabric-${IGNITE_VERSION}-bin.zip -o ignite.zip \
+RUN curl https://dist.apache.org/repos/dist/release/ignite/${IGNITE_VERSION}/apache-ignite-fabric-${IGNITE_VERSION}-bin.zip -o ignite.zip \
     && unzip ignite.zip \
     && rm ignite.zip
 


[49/50] [abbrv] ignite git commit: Merge remote-tracking branch 'upstream/ignite-2.0-merge' into ignite-2.0-merge

Posted by sb...@apache.org.
Merge remote-tracking branch 'upstream/ignite-2.0-merge' into ignite-2.0-merge


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

Branch: refs/heads/ignite-4705-2
Commit: aab4f30bc94a0d61be4801b7bf0cb2afe35d22f4
Parents: e004f9a 75a4077
Author: devozerov <vo...@gridgain.com>
Authored: Fri Mar 10 17:35:43 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Mar 10 17:35:43 2017 +0300

----------------------------------------------------------------------
 modules/platforms/cpp/core-test/src/test_utils.cpp          | 6 +++---
 .../cpp/core/include/ignite/impl/interop/interop_target.h   | 2 +-
 modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp    | 8 ++++----
 modules/platforms/cpp/jni/include/ignite/jni/utils.h        | 9 +++++++++
 modules/platforms/cpp/jni/os/linux/src/utils.cpp            | 6 ------
 modules/platforms/cpp/jni/os/win/src/utils.cpp              | 6 ------
 6 files changed, 17 insertions(+), 20 deletions(-)
----------------------------------------------------------------------



[24/50] [abbrv] ignite git commit: ignite-3727 Resotred fix and fixed issue with wrong method called in GridIoManager.

Posted by sb...@apache.org.
ignite-3727 Resotred fix and fixed issue with wrong method called in GridIoManager.


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

Branch: refs/heads/ignite-4705-2
Commit: 59ed1d7ec08a1bb827e7354bb5dca80b86944933
Parents: 9d811f1
Author: sboikov <sb...@gridgain.com>
Authored: Thu Mar 2 13:28:20 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Mar 2 13:28:20 2017 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteMessaging.java |  13 +-
 .../ignite/internal/IgniteMessagingImpl.java    |   8 +-
 .../internal/managers/GridManagerAdapter.java   |   2 +-
 .../managers/communication/GridIoManager.java   | 130 ++---
 .../communication/GridIoManagerSelfTest.java    |   6 +-
 ...niteMessagingConfigVariationFullApiTest.java | 195 +++++--
 .../ignite/messaging/GridMessagingSelfTest.java | 116 +++-
 .../messaging/IgniteMessagingSendAsyncTest.java | 544 +++++++++++++++++++
 .../ignite/testsuites/IgniteBasicTestSuite.java |   2 +
 .../hadoop/shuffle/HadoopShuffle.java           |   4 +-
 10 files changed, 890 insertions(+), 130 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/59ed1d7e/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java b/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java
index ff52ed8..e64ded5 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java
@@ -77,6 +77,10 @@ public interface IgniteMessaging extends IgniteAsyncSupport {
 
     /**
      * Sends given message with specified topic to the nodes in the underlying cluster group.
+     * <p>
+     * By default all local listeners will be executed in the calling thread, or if you use
+     * {@link #withAsync()}, listeners will execute in public thread pool (in this case it is user's
+     * responsibility to implement back-pressure and limit number of concurrently executed async messages).
      *
      * @param topic Topic to send to, {@code null} for default topic.
      * @param msg Message to send.
@@ -87,6 +91,10 @@ public interface IgniteMessaging extends IgniteAsyncSupport {
 
     /**
      * Sends given messages with the specified topic to the nodes in the underlying cluster group.
+     * <p>
+     * By default all local listeners will be executed in the calling thread, or if you use
+     * {@link #withAsync()}, listeners will execute in public thread pool (in this case it is user's
+     * responsibility to implement back-pressure and limit number of concurrently executed async messages).
      *
      * @param topic Topic to send to, {@code null} for default topic.
      * @param msgs Messages to send. Order of the sending is undefined. If the method produces
@@ -99,7 +107,8 @@ public interface IgniteMessaging extends IgniteAsyncSupport {
     /**
      * Sends given message with specified topic to the nodes in the underlying cluster group. Messages sent with
      * this method will arrive in the same order they were sent. Note that if a topic is used
-     * for ordered messages, then it cannot be reused for non-ordered messages.
+     * for ordered messages, then it cannot be reused for non-ordered messages. Note that local listeners
+     * are always executed in public thread pool, no matter default or {@link #withAsync()} mode is used.
      * <p>
      * The {@code timeout} parameter specifies how long an out-of-order message will stay in a queue,
      * waiting for messages that are ordered ahead of it to arrive. If timeout expires, then all ordered
@@ -162,4 +171,4 @@ public interface IgniteMessaging extends IgniteAsyncSupport {
 
     /** {@inheritDoc} */
     @Override IgniteMessaging withAsync();
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/59ed1d7e/modules/core/src/main/java/org/apache/ignite/internal/IgniteMessagingImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteMessagingImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteMessagingImpl.java
index 6b33aa5..541fad4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteMessagingImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteMessagingImpl.java
@@ -86,7 +86,7 @@ public class IgniteMessagingImpl extends AsyncSupportAdapter<IgniteMessaging>
             if (snapshot.isEmpty())
                 throw U.emptyTopologyException();
 
-            ctx.io().sendUserMessage(snapshot, msg, topic, false, 0);
+            ctx.io().sendUserMessage(snapshot, msg, topic, false, 0, isAsync());
         }
         catch (IgniteCheckedException e) {
             throw U.convertException(e);
@@ -111,7 +111,7 @@ public class IgniteMessagingImpl extends AsyncSupportAdapter<IgniteMessaging>
             for (Object msg : msgs) {
                 A.notNull(msg, "msg");
 
-                ctx.io().sendUserMessage(snapshot, msg, topic, false, 0);
+                ctx.io().sendUserMessage(snapshot, msg, topic, false, 0, isAsync());
             }
         }
         catch (IgniteCheckedException e) {
@@ -137,7 +137,7 @@ public class IgniteMessagingImpl extends AsyncSupportAdapter<IgniteMessaging>
             if (timeout == 0)
                 timeout = ctx.config().getNetworkTimeout();
 
-            ctx.io().sendUserMessage(snapshot, msg, topic, true, timeout);
+            ctx.io().sendUserMessage(snapshot, msg, topic, true, timeout, false);
         }
         catch (IgniteCheckedException e) {
             throw U.convertException(e);
@@ -254,4 +254,4 @@ public class IgniteMessagingImpl extends AsyncSupportAdapter<IgniteMessaging>
     protected Object readResolve() throws ObjectStreamException {
         return prj.message();
     }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/59ed1d7e/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
index 584cc56..5992eda 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
@@ -390,7 +390,7 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements GridMan
                             if (msg instanceof Message)
                                 ctx.io().send(node, topic, (Message)msg, SYSTEM_POOL);
                             else
-                                ctx.io().sendUserMessage(Collections.singletonList(node), msg, topic, false, 0);
+                                ctx.io().sendUserMessage(Collections.singletonList(node), msg, topic, false, 0, false);
                         }
                         catch (IgniteCheckedException e) {
                             throw unwrapException(e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/59ed1d7e/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index 7ef7bc0..0b7c790 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -188,6 +188,13 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     /** */
     private final AtomicLong ioTestId = new AtomicLong();
 
+    /** No-op runnable. */
+    private static final IgniteRunnable NOOP = new IgniteRunnable() {
+        @Override public void run() {
+            // No-op.
+        }
+    };
+
     /**
      * @param ctx Grid kernal context.
      */
@@ -1237,6 +1244,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param timeout Timeout.
      * @param skipOnTimeout Whether message can be skipped on timeout.
      * @param ackC Ack closure.
+     * @param async If {@code true} message for local node will be processed in pool, otherwise in current thread.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
     private void send(
@@ -1248,11 +1256,13 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         boolean ordered,
         long timeout,
         boolean skipOnTimeout,
-        IgniteInClosure<IgniteException> ackC
+        IgniteInClosure<IgniteException> ackC,
+        boolean async
     ) throws IgniteCheckedException {
         assert node != null;
         assert topic != null;
         assert msg != null;
+        assert !async || msg instanceof GridIoUserMessage : msg; // Async execution was added only for IgniteMessaging.
 
         GridIoMessage ioMsg = new GridIoMessage(plc, topic, topicOrd, msg, ordered, timeout, skipOnTimeout);
 
@@ -1266,6 +1276,8 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
             if (ordered)
                 processOrderedMessage(locNodeId, ioMsg, plc, null);
+            else if (async)
+                processRegularMessage(locNodeId, ioMsg, plc, NOOP);
             else
                 processRegularMessage0(ioMsg, locNodeId);
 
@@ -1323,7 +1335,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         if (node == null)
             throw new IgniteCheckedException("Failed to send message to node (has node left grid?): " + nodeId);
 
-        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, null);
+        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, null, false);
     }
 
     /**
@@ -1335,7 +1347,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      */
     public void send(ClusterNode node, Object topic, Message msg, byte plc)
         throws IgniteCheckedException {
-        send(node, topic, -1, msg, plc, false, 0, false, null);
+        send(node, topic, -1, msg, plc, false, 0, false, null, false);
     }
 
     /**
@@ -1347,7 +1359,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      */
     public void send(ClusterNode node, GridTopic topic, Message msg, byte plc)
         throws IgniteCheckedException {
-        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, null);
+        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, null, false);
     }
 
     /**
@@ -1360,7 +1372,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      */
     public void send(ClusterNode node, Object topic, int topicOrd, Message msg, byte plc)
         throws IgniteCheckedException {
-        send(node, topic, topicOrd, msg, plc, false, 0, false, null);
+        send(node, topic, topicOrd, msg, plc, false, 0, false, null, false);
     }
 
     /**
@@ -1382,34 +1394,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     ) throws IgniteCheckedException {
         assert timeout > 0 || skipOnTimeout;
 
-        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, null);
-    }
-
-    /**
-     * @param nodeId Destination node.
-     * @param topic Topic to send the message to.
-     * @param msg Message to send.
-     * @param plc Type of processing.
-     * @param timeout Timeout to keep a message on receiving queue.
-     * @param skipOnTimeout Whether message can be skipped on timeout.
-     * @throws IgniteCheckedException Thrown in case of any errors.
-     */
-    public void sendOrderedMessage(
-        UUID nodeId,
-        Object topic,
-        Message msg,
-        byte plc,
-        long timeout,
-        boolean skipOnTimeout
-    ) throws IgniteCheckedException {
-        assert timeout > 0 || skipOnTimeout;
-
-        ClusterNode node = ctx.discovery().node(nodeId);
-
-        if (node == null)
-            throw new IgniteCheckedException("Failed to send message to node (has node left grid?): " + nodeId);
-
-        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, null);
+        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, null, false);
     }
 
     /**
@@ -1422,7 +1407,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      */
     public void send(ClusterNode node, GridTopic topic, Message msg, byte plc,
         IgniteInClosure<IgniteException> ackC) throws IgniteCheckedException {
-        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, ackC);
+        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, ackC, false);
     }
 
     /**
@@ -1458,7 +1443,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      */
     public void send(ClusterNode node, Object topic, Message msg, byte plc, IgniteInClosure<IgniteException> ackC)
         throws IgniteCheckedException {
-        send(node, topic, -1, msg, plc, false, 0, false, ackC);
+        send(node, topic, -1, msg, plc, false, 0, false, ackC, false);
     }
 
     /**
@@ -1514,10 +1499,10 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     ) throws IgniteCheckedException {
         assert timeout > 0 || skipOnTimeout;
 
-        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, ackC);
+        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, ackC, false);
     }
 
-     /**
+    /**
      * Sends a peer deployable user message.
      *
      * @param nodes Destination nodes.
@@ -1525,7 +1510,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
     public void sendUserMessage(Collection<? extends ClusterNode> nodes, Object msg) throws IgniteCheckedException {
-        sendUserMessage(nodes, msg, null, false, 0);
+        sendUserMessage(nodes, msg, null, false, 0, false);
     }
 
     /**
@@ -1536,11 +1521,12 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param topic Message topic to use.
      * @param ordered Is message ordered?
      * @param timeout Message timeout in milliseconds for ordered messages.
+     * @param async Async flag.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
     @SuppressWarnings("ConstantConditions")
     public void sendUserMessage(Collection<? extends ClusterNode> nodes, Object msg,
-        @Nullable Object topic, boolean ordered, long timeout) throws IgniteCheckedException {
+        @Nullable Object topic, boolean ordered, long timeout, boolean async) throws IgniteCheckedException {
         boolean loc = nodes.size() == 1 && F.first(nodes).id().equals(locNodeId);
 
         byte[] serMsg = null;
@@ -1584,8 +1570,18 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
         if (ordered)
             sendOrderedMessage(nodes, TOPIC_COMM_USER, ioMsg, PUBLIC_POOL, timeout, true);
-        else if (loc)
-            send(F.first(nodes), TOPIC_COMM_USER, ioMsg, PUBLIC_POOL);
+        else if (loc) {
+            send(F.first(nodes),
+                TOPIC_COMM_USER,
+                TOPIC_COMM_USER.ordinal(),
+                ioMsg,
+                PUBLIC_POOL,
+                false,
+                0,
+                false,
+                null,
+                async);
+        }
         else {
             ClusterNode locNode = F.find(nodes, null, F.localNode(locNodeId));
 
@@ -1594,10 +1590,21 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             if (!rmtNodes.isEmpty())
                 send(rmtNodes, TOPIC_COMM_USER, ioMsg, PUBLIC_POOL);
 
-            // Will call local listeners in current thread synchronously, so must go the last
+            // Will call local listeners in current thread synchronously or through pool,
+            // depending async flag, so must go the last
             // to allow remote nodes execute the requested operation in parallel.
-            if (locNode != null)
-                send(locNode, TOPIC_COMM_USER, ioMsg, PUBLIC_POOL);
+            if (locNode != null) {
+                send(locNode,
+                    TOPIC_COMM_USER,
+                    TOPIC_COMM_USER.ordinal(),
+                    ioMsg,
+                    PUBLIC_POOL,
+                    false,
+                    0,
+                    false,
+                    null,
+                    async);
+            }
         }
     }
 
@@ -1639,35 +1646,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     }
 
     /**
-     * @param nodeId Destination node.
-     * @param topic Topic to send the message to.
-     * @param msg Message to send.
-     * @param plc Type of processing.
-     * @param timeout Timeout to keep a message on receiving queue.
-     * @param skipOnTimeout Whether message can be skipped on timeout.
-     * @param ackC Ack closure.
-     * @throws IgniteCheckedException Thrown in case of any errors.
-     */
-    public void sendOrderedMessage(
-        UUID nodeId,
-        Object topic,
-        Message msg,
-        byte plc,
-        long timeout,
-        boolean skipOnTimeout,
-        IgniteInClosure<IgniteException> ackC
-    ) throws IgniteCheckedException {
-        assert timeout > 0 || skipOnTimeout;
-
-        ClusterNode node = ctx.discovery().node(nodeId);
-
-        if (node == null)
-            throw new IgniteCheckedException("Failed to send message to node (has node left grid?): " + nodeId);
-
-        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, ackC);
-    }
-
-    /**
      * @param nodes Destination nodes.
      * @param topic Topic to send the message to.
      * @param topicOrd Topic ordinal value.
@@ -1701,7 +1679,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             // messages to one node vs. many.
             if (!nodes.isEmpty()) {
                 for (ClusterNode node : nodes)
-                    send(node, topic, topicOrd, msg, plc, ordered, timeout, skipOnTimeout, null);
+                    send(node, topic, topicOrd, msg, plc, ordered, timeout, skipOnTimeout, null, false);
             }
             else if (log.isDebugEnabled())
                 log.debug("Failed to send message to empty nodes collection [topic=" + topic + ", msg=" +
@@ -1929,8 +1907,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         if (rmv && log.isDebugEnabled())
             log.debug("Removed message listener [topic=" + topic + ", lsnr=" + lsnr + ']');
 
-        if (lsnr instanceof ArrayListener)
-        {
+        if (lsnr instanceof ArrayListener) {
             for (GridMessageListener childLsnr : ((ArrayListener)lsnr).arr)
                 closeListener(childLsnr);
         }
@@ -1942,6 +1919,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
     /**
      * Closes a listener, if applicable.
+     *
      * @param lsnr Listener.
      */
     private void closeListener(GridMessageListener lsnr) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/59ed1d7e/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
index 2039d81..2bc1398 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
@@ -145,7 +145,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
         GridIoManager ioMgr = spy(new TestGridIoManager(ctx));
 
         try {
-            ioMgr.sendUserMessage(F.asList(locNode, rmtNode), msg, GridTopic.TOPIC_IGFS, false, 123L);
+            ioMgr.sendUserMessage(F.asList(locNode, rmtNode), msg, GridTopic.TOPIC_IGFS, false, 123L, false);
         }
         catch (IgniteCheckedException ignored) {
             // No-op. We are using mocks so real sending is impossible.
@@ -169,7 +169,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
         GridIoManager ioMgr = spy(new TestGridIoManager(ctx));
 
         try {
-            ioMgr.sendUserMessage(F.asList(locNode, rmtNode), msg, GridTopic.TOPIC_IGFS, true, 123L);
+            ioMgr.sendUserMessage(F.asList(locNode, rmtNode), msg, GridTopic.TOPIC_IGFS, true, 123L, false);
         }
         catch (Exception ignored) {
             // No-op. We are using mocks so real sending is impossible.
@@ -257,4 +257,4 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
             return 0;
         }
     }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/59ed1d7e/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java
index 31b0663..49aab10 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java
@@ -58,7 +58,18 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
     public void testLocalServer() throws Exception {
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                localServerInternal();
+                localServerInternal(false);
+            }
+        });
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLocalServerAsync() throws Exception {
+        runInAllDataModes(new TestRunnable() {
+            @Override public void run() throws Exception {
+                localServerInternal(true);
             }
         });
     }
@@ -83,7 +94,21 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                serverClientMessage();
+                serverClientMessage(false);
+            }
+        });
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testServerClientMessageAsync() throws Exception {
+        if (!testsCfg.withClients())
+            return;
+
+        runInAllDataModes(new TestRunnable() {
+            @Override public void run() throws Exception {
+                serverClientMessage(true);
             }
         });
     }
@@ -97,7 +122,21 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                clientClientMessage();
+                clientClientMessage(false);
+            }
+        });
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testClientClientMessageAsync() throws Exception {
+        if (!testsCfg.withClients())
+            return;
+
+        runInAllDataModes(new TestRunnable() {
+            @Override public void run() throws Exception {
+                clientClientMessage(true);
             }
         });
     }
@@ -111,7 +150,21 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                clientServerMessage();
+                clientServerMessage(false);
+            }
+        });
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testClientServerMessageAsync() throws Exception {
+        if (!testsCfg.withClients())
+            return;
+
+        runInAllDataModes(new TestRunnable() {
+            @Override public void run() throws Exception {
+                clientServerMessage(true);
             }
         });
     }
@@ -133,7 +186,18 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
     public void testOrderedMessage() throws Exception {
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                orderedMessage();
+                orderedMessage(false);
+            }
+        });
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testOrderedMessageAsync() throws Exception {
+        runInAllDataModes(new TestRunnable() {
+            @Override public void run() throws Exception {
+                orderedMessage(true);
             }
         });
     }
@@ -147,7 +211,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                clientServerOrderedMessage();
+                clientServerOrderedMessage(false);
             }
         });
     }
@@ -155,13 +219,42 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
     /**
      * @throws Exception If failed.
      */
+    public void testClientServerOrderedMessageAsync() throws Exception {
+        if (!testsCfg.withClients())
+            return;
+
+        runInAllDataModes(new TestRunnable() {
+            @Override public void run() throws Exception {
+                clientServerOrderedMessage(true);
+            }
+        });
+    }
+
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testClientClientOrderedMessage() throws Exception {
         if (!testsCfg.withClients())
             return;
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                clientClientOrderedMessage();
+                clientClientOrderedMessage(false);
+            }
+        });
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testClientClientOrderedMessageAsync() throws Exception {
+        if (!testsCfg.withClients())
+            return;
+
+        runInAllDataModes(new TestRunnable() {
+            @Override public void run() throws Exception {
+                clientClientOrderedMessage(true);
             }
         });
     }
@@ -175,16 +268,32 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                serverClientOrderedMessage();
+                serverClientOrderedMessage(false);
+            }
+        });
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testServerClientOrderedMessageAsync() throws Exception {
+        if (!testsCfg.withClients())
+            return;
+
+        runInAllDataModes(new TestRunnable() {
+            @Override public void run() throws Exception {
+                serverClientOrderedMessage(true);
             }
         });
     }
 
     /**
      * Single server test.
+     *
+     * @param async Async message send flag.
      * @throws Exception If failed.
      */
-    private void localServerInternal() throws Exception {
+    private void localServerInternal(boolean async) throws Exception {
         int messages = MSGS;
 
         Ignite ignite = grid(SERVER_NODE_IDX);
@@ -197,7 +306,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         try {
             for (int i = 0; i < messages; i++)
-                sendMessage(ignite, grp, value(i));
+                sendMessage(ignite, grp, value(i), async);
 
             assertTrue(LATCH.await(10, TimeUnit.SECONDS));
 
@@ -238,52 +347,59 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
     /**
      * Server sends a message and client receives it.
+     *
+     * @param async Async message send flag.
      * @throws Exception If failed.
      */
-    private void serverClientMessage() throws Exception {
+    private void serverClientMessage(boolean async) throws Exception {
         Ignite ignite = grid(SERVER_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forClients();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendMessages(ignite, grp);
+        registerListenerAndSendMessages(ignite, grp, async);
     }
 
     /**
      * Client sends a message and client receives it.
+     *
+     * @param async Async message send flag.
      * @throws Exception If failed.
      */
-    private void clientClientMessage() throws Exception {
+    private void clientClientMessage(boolean async) throws Exception {
         Ignite ignite = grid(CLIENT_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forClients();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendMessages(ignite, grp);
+        registerListenerAndSendMessages(ignite, grp, async);
     }
 
     /**
      * Client sends a message and client receives it.
+     *
+     * @param async Async message send flag.
      * @throws Exception If failed.
      */
-    private void clientServerMessage() throws Exception {
+    private void clientServerMessage(boolean async) throws Exception {
         Ignite ignite = grid(CLIENT_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forServers();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendMessages(ignite, grp);
+        registerListenerAndSendMessages(ignite, grp, async);
     }
 
     /**
      * @param ignite Ignite.
      * @param grp Cluster group.
+     * @param async Async message send flag.
      * @throws Exception If fail.
      */
-    private void registerListenerAndSendMessages(Ignite ignite, ClusterGroup grp) throws Exception {
+    private void registerListenerAndSendMessages(Ignite ignite, ClusterGroup grp, boolean async) throws Exception {
         int messages = MSGS;
 
         LATCH = new CountDownLatch(grp.nodes().size() * messages);
@@ -292,7 +408,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         try {
             for (int i = 0; i < messages; i++)
-                sendMessage(ignite, grp, value(i));
+                sendMessage(ignite, grp, value(i), async);
 
             assertTrue(LATCH.await(10, TimeUnit.SECONDS));
 
@@ -335,67 +451,68 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
     }
 
     /**
-     *
+     * @param async Async message send flag.
      * @throws Exception If fail.
      */
-    private void orderedMessage() throws Exception {
+    private void orderedMessage(boolean async) throws Exception {
         Ignite ignite = grid(SERVER_NODE_IDX);
 
         ClusterGroup grp = gridCount() > 1 ? ignite.cluster().forRemotes() : ignite.cluster().forLocal();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendOrderedMessages(ignite, grp);
+        registerListenerAndSendOrderedMessages(ignite, grp, async);
     }
 
     /**
-     *
+     * @param async Async message send flag.
      * @throws Exception If fail.
      */
-    private void clientServerOrderedMessage() throws Exception {
+    private void clientServerOrderedMessage(boolean async) throws Exception {
         Ignite ignite = grid(CLIENT_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forServers();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendOrderedMessages(ignite, grp);
+        registerListenerAndSendOrderedMessages(ignite, grp, async);
     }
 
     /**
-     *
+     * @param async Async message send flag.
      * @throws Exception If fail.
      */
-    private void clientClientOrderedMessage() throws Exception {
+    private void clientClientOrderedMessage(boolean async) throws Exception {
         Ignite ignite = grid(CLIENT_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forClients();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendOrderedMessages(ignite, grp);
+        registerListenerAndSendOrderedMessages(ignite, grp, async);
     }
 
     /**
-     *
+     * @param async Async message send flag.
      * @throws Exception If fail.
      */
-    private void serverClientOrderedMessage() throws Exception {
+    private void serverClientOrderedMessage(boolean async) throws Exception {
         Ignite ignite = grid(SERVER_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forClients();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendOrderedMessages(ignite, grp);
+        registerListenerAndSendOrderedMessages(ignite, grp, async);
     }
 
     /**
      * @param ignite Ignite.
      * @param grp Cluster group.
+     * @param async Async message send flag.
      * @throws Exception If fail.
      */
-    private void registerListenerAndSendOrderedMessages(Ignite ignite, ClusterGroup grp) throws Exception {
+    private void registerListenerAndSendOrderedMessages(Ignite ignite, ClusterGroup grp, boolean async) throws Exception {
         int messages = MSGS;
 
         LATCH = new CountDownLatch(grp.nodes().size() * messages);
@@ -403,8 +520,12 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
         UUID opId = ignite.message(grp).remoteListen(MESSAGE_TOPIC, new OrderedMessageListener());
 
         try {
-            for (int i=0; i < messages; i++)
-                ignite.message(grp).sendOrdered(MESSAGE_TOPIC, value(i), 2000);
+            for (int i=0; i < messages; i++){
+                if (async)
+                    ignite.message(grp).withAsync().sendOrdered(MESSAGE_TOPIC, value(i), 2000);
+                else
+                    ignite.message(grp).sendOrdered(MESSAGE_TOPIC, value(i), 2000);
+            }
 
             assertTrue(LATCH.await(10, TimeUnit.SECONDS));
 
@@ -419,9 +540,13 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
      * @param nodeSnd Sender Ignite node.
      * @param grp Cluster group.
      * @param msg Message.
+     * @param async Async message send flag.
      */
-    private void sendMessage(Ignite nodeSnd, ClusterGroup grp, Object msg) {
-        nodeSnd.message(grp).send(MESSAGE_TOPIC, msg);
+    private void sendMessage(Ignite nodeSnd, ClusterGroup grp, Object msg, boolean async) {
+        if (async)
+            nodeSnd.message(grp).withAsync().send(MESSAGE_TOPIC, msg);
+        else
+            nodeSnd.message(grp).send(MESSAGE_TOPIC, msg);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/59ed1d7e/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
index 5a0dfa2..a166c3d 100644
--- a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
@@ -24,6 +24,7 @@ import java.io.ObjectOutput;
 import java.io.Serializable;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -36,15 +37,20 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteMessaging;
 import org.apache.ignite.cluster.ClusterGroup;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
+import org.apache.ignite.internal.processors.continuous.StartRoutineDiscoveryMessage;
+import org.apache.ignite.internal.processors.continuous.StopRoutineDiscoveryMessage;
 import org.apache.ignite.internal.util.GridConcurrentHashSet;
 import org.apache.ignite.internal.util.typedef.P2;
 import org.apache.ignite.internal.util.typedef.PA;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteFuture;
-import org.apache.ignite.resources.IgniteInstanceResource;
+import org.apache.ignite.resources.IgniteInstanceResource;;
+import org.apache.ignite.spi.discovery.DiscoverySpiCustomMessage;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
@@ -198,7 +204,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
+        TestTcpDiscoverySpi discoSpi = new TestTcpDiscoverySpi();
 
         discoSpi.setIpFinder(ipFinder);
 
@@ -944,7 +950,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
      * @throws Exception If error occurs.
      */
     public void testSendMessageWithExternalClassLoader() throws Exception {
-        URL[] urls = new URL[] { new URL(GridTestProperties.getProperty("p2p.uri.cls")) };
+        URL[] urls = new URL[] {new URL(GridTestProperties.getProperty("p2p.uri.cls"))};
 
         ClassLoader extLdr = new URLClassLoader(urls);
 
@@ -1028,6 +1034,8 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
     public void testAsync() throws Exception {
         final AtomicInteger msgCnt = new AtomicInteger();
 
+        TestTcpDiscoverySpi discoSpi = (TestTcpDiscoverySpi)ignite2.configuration().getDiscoverySpi();
+
         assertFalse(ignite2.message().isAsync());
 
         final IgniteMessaging msg = ignite2.message().withAsync();
@@ -1044,6 +1052,8 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
             }
         }, IllegalStateException.class, null);
 
+        discoSpi.blockCustomEvent();
+
         final String topic = "topic";
 
         UUID id = msg.remoteListen(topic, new P2<UUID, Object>() {
@@ -1059,9 +1069,15 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
 
         Assert.assertNull(id);
 
-        IgniteFuture<UUID> fut = msg.future();
+        IgniteFuture<UUID> starFut = msg.future();
+
+        Assert.assertNotNull(starFut);
+
+        U.sleep(500);
 
-        Assert.assertNotNull(fut);
+        Assert.assertFalse(starFut.isDone());
+
+        discoSpi.stopBlock();
 
         GridTestUtils.assertThrows(log, new Callable<Void>() {
             @Override public Void call() throws Exception {
@@ -1071,10 +1087,14 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
             }
         }, IllegalStateException.class, null);
 
-        id = fut.get();
+        id = starFut.get();
 
         Assert.assertNotNull(id);
 
+        Assert.assertTrue(starFut.isDone());
+
+        discoSpi.blockCustomEvent();
+
         message(ignite1.cluster().forRemotes()).send(topic, "msg1");
 
         GridTestUtils.waitForCondition(new PA() {
@@ -1099,8 +1119,16 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
             }
         }, IllegalStateException.class, null);
 
+        U.sleep(500);
+
+        Assert.assertFalse(stopFut.isDone());
+
+        discoSpi.stopBlock();
+
         stopFut.get();
 
+        Assert.assertTrue(stopFut.isDone());
+
         message(ignite1.cluster().forRemotes()).send(topic, "msg2");
 
         U.sleep(1000);
@@ -1109,6 +1137,80 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
     }
 
     /**
+     *
+     */
+    static class TestTcpDiscoverySpi extends TcpDiscoverySpi {
+        /** */
+        private boolean blockCustomEvt;
+
+        /** */
+        private final Object mux = new Object();
+
+        /** */
+        private List<DiscoverySpiCustomMessage> blockedMsgs = new ArrayList<>();
+
+        /** {@inheritDoc} */
+        @Override public void sendCustomEvent(DiscoverySpiCustomMessage msg) throws IgniteException {
+            synchronized (mux) {
+                if (blockCustomEvt) {
+                    DiscoveryCustomMessage msg0 = GridTestUtils.getFieldValue(msg, "delegate");
+                    if (msg0 instanceof StopRoutineDiscoveryMessage || msg0 instanceof StartRoutineDiscoveryMessage) {
+                        log.info("Block custom message: " + msg0);
+                        blockedMsgs.add(msg);
+
+                        mux.notifyAll();
+                    }
+                    return;
+                }
+            }
+
+            super.sendCustomEvent(msg);
+        }
+
+        /**
+         *
+         */
+        public void blockCustomEvent() {
+            synchronized (mux) {
+                assert blockedMsgs.isEmpty() : blockedMsgs;
+
+                blockCustomEvt = true;
+            }
+        }
+
+        /**
+         * @throws InterruptedException If interrupted.
+         */
+        public void waitCustomEvent() throws InterruptedException {
+            synchronized (mux) {
+                while (blockedMsgs.isEmpty())
+                    mux.wait();
+            }
+        }
+
+        /**
+         *
+         */
+        public void stopBlock() {
+            List<DiscoverySpiCustomMessage> msgs;
+
+            synchronized (this) {
+                msgs = new ArrayList<>(blockedMsgs);
+
+                blockCustomEvt = false;
+
+                blockedMsgs.clear();
+            }
+
+            for (DiscoverySpiCustomMessage msg : msgs) {
+                log.info("Resend blocked message: " + msg);
+
+                super.sendCustomEvent(msg);
+            }
+        }
+    }
+
+    /**
      * Tests that message listener registers only for one oldest node.
      *
      * @throws Exception If an error occurred.
@@ -1152,4 +1254,4 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
 
         assertEquals(1, MSG_CNT.get());
     }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/59ed1d7e/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java
new file mode 100644
index 0000000..75e7d22
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java
@@ -0,0 +1,544 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.messaging;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicReference;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteMessaging;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.lang.IgniteBiInClosure;
+import org.apache.ignite.lang.IgniteBiPredicate;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.jsr166.ThreadLocalRandom8;
+import org.junit.Assert;
+
+/**
+ *
+ */
+public class IgniteMessagingSendAsyncTest extends GridCommonAbstractTest implements Serializable {
+    /** */
+    private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+    /** Threads number for multi-thread tests. */
+    private static final int THREADS = 10;
+
+    /** */
+    private final String TOPIC = "topic";
+
+    /** */
+    private final String msgStr = "message";
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
+
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+
+        super.afterTest();
+    }
+
+    /**
+     * Checks if use default mode, local listeners execute in the same thread, 1 node in topology.
+     *
+     * @throws Exception If failed.
+     */
+    public void testSendDefaultMode() throws Exception {
+        Ignite ignite1 = startGrid(1);
+
+        send(ignite1.message(), msgStr, new IgniteBiInClosure<String, Thread> () {
+            @Override public void apply(String msg, Thread thread) {
+                Assert.assertEquals(Thread.currentThread(), thread);
+                Assert.assertEquals(msgStr, msg);
+            }
+        });
+    }
+
+    /**
+     * Checks if use async mode, local listeners execute in another thread, 1 node in topology.
+     *
+     * @throws Exception If failed.
+     */
+    public void testSendAsyncMode() throws Exception {
+        Ignite ignite1 = startGrid(1);
+
+        send(ignite1.message().withAsync(), msgStr,  new IgniteBiInClosure<String, Thread> () {
+            @Override public void apply(String msg, Thread thread) {
+                Assert.assertTrue(!Thread.currentThread().equals(thread));
+                Assert.assertEquals(msgStr, msg);
+            }
+        });
+    }
+
+    /**
+     * Checks if use default mode, local listeners execute in the same thread, 2 nodes in topology.
+     *
+     * @throws Exception If failed.
+     */
+    public void testSendDefaultMode2Nodes() throws Exception {
+        Ignite ignite1 = startGrid(1);
+        Ignite ignite2 = startGrid(2);
+
+        sendWith2Nodes(ignite2, ignite1.message(), msgStr, new IgniteBiInClosure<String, Thread> () {
+            @Override public  void apply(String msg, Thread thread) {
+                Assert.assertEquals(Thread.currentThread(), thread);
+                Assert.assertEquals(msgStr, msg);
+            }
+        });
+    }
+
+    /**
+     * Checks if use async mode, local listeners execute in another thread, 2 nodes in topology.
+     *
+     * @throws Exception If failed.
+     */
+    public void testSendAsyncMode2Node() throws Exception {
+        Ignite ignite1 = startGrid(1);
+        Ignite ignite2 = startGrid(2);
+
+        sendWith2Nodes(ignite2, ignite1.message().withAsync(), msgStr,  new IgniteBiInClosure<String, Thread> () {
+            @Override public  void apply(String msg, Thread thread) {
+                Assert.assertTrue(!Thread.currentThread().equals(thread));
+                Assert.assertEquals(msgStr, msg);
+            }
+        });
+    }
+
+    /**
+     * Checks that sendOrdered works in thread pool, 1 node in topology.
+     *
+     * @throws Exception If failed.
+     */
+    public void testSendOrderedDefaultMode() throws Exception {
+        Ignite ignite1 = startGrid(1);
+
+        final List<String> msgs = orderedMessages();
+
+        sendOrdered(ignite1.message(), msgs, new IgniteBiInClosure< List<String>,  List<Thread>> () {
+            @Override public void apply(List<String> received, List<Thread> threads) {
+                assertFalse(threads.contains(Thread.currentThread()));
+                assertTrue(msgs.equals(received));
+            }
+        });
+    }
+
+    /**
+     * Checks that sendOrdered work in thread pool, 1 node in topology.
+     *
+     * @throws Exception If failed.
+     */
+    public void testSendOrderedAsyncMode() throws Exception {
+        Ignite ignite1 = startGrid(1);
+
+        final List<String> msgs = orderedMessages();
+
+        sendOrdered(ignite1.message().withAsync(), msgs, new IgniteBiInClosure< List<String>,  List<Thread>> () {
+            @Override public void apply(List<String> received, List<Thread> threads) {
+                assertFalse(threads.contains(Thread.currentThread()));
+                assertTrue(msgs.equals(received));
+            }
+        });
+    }
+
+    /**
+     * Checks that sendOrdered work in thread pool, 2 nodes in topology.
+     *
+     * @throws Exception If failed.
+     */
+    public void testSendOrderedDefaultMode2Node() throws Exception {
+        Ignite ignite1 = startGrid(1);
+        Ignite ignite2 = startGrid(2);
+
+        final List<String> msgs = orderedMessages();
+
+        sendOrderedWith2Node(ignite2, ignite1.message(), msgs, new IgniteBiInClosure<List<String>, List<Thread>>() {
+            @Override public void apply(List<String> received, List<Thread> threads) {
+                assertFalse(threads.contains(Thread.currentThread()));
+                assertTrue(msgs.equals(received));
+            }
+        });
+    }
+
+    /**
+     * Checks that sendOrdered work in thread pool, 2 nodes in topology.
+     *
+     * @throws Exception If failed.
+     */
+    public void testSendOrderedAsyncMode2Node() throws Exception {
+        Ignite ignite1 = startGrid(1);
+        Ignite ignite2 = startGrid(2);
+
+        final List<String> msgs = orderedMessages();
+
+        sendOrderedWith2Node(ignite2, ignite1.message().withAsync(), msgs, new IgniteBiInClosure<List<String>, List<Thread>>() {
+            @Override public void apply(List<String> received, List<Thread> threads) {
+                assertFalse(threads.contains(Thread.currentThread()));
+                assertTrue(msgs.equals(received));
+            }
+        });
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSendOrderedDefaultModeMultiThreads() throws Exception {
+        Ignite ignite = startGrid(1);
+
+        sendOrderedMultiThreads(ignite.message());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSendOrderedAsyncModeMultiThreads() throws Exception {
+        Ignite ignite = startGrid(1);
+
+        sendOrderedMultiThreads(ignite.message().withAsync());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSendOrderedDefaultModeMultiThreadsWith2Node() throws Exception {
+        Ignite ignite1 = startGrid(1);
+        Ignite ignite2 = startGrid(2);
+
+        sendOrderedMultiThreadsWith2Node(ignite2, ignite1.message());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSendOrderedAsyncModeMultiThreadsWith2Node() throws Exception {
+        Ignite ignite1 = startGrid(1);
+        Ignite ignite2 = startGrid(2);
+
+        sendOrderedMultiThreadsWith2Node(ignite2, ignite1.message().withAsync());
+    }
+
+    /**
+     * @param ignite2 Second node.
+     * @param ignMsg IgniteMessage.
+     * @throws Exception If failed.
+     */
+    private void sendOrderedMultiThreadsWith2Node(
+            final Ignite ignite2,
+            final IgniteMessaging ignMsg
+    ) throws Exception {
+        final ConcurrentMap<String, List<String>> expMsg = Maps.newConcurrentMap();
+        final ConcurrentMap<String, List<String>> actlMsg = Maps.newConcurrentMap();
+
+        final List<String> msgs = orderedMessages();
+
+        sendOrderedMultiThreadsWith2Node(ignite2, ignMsg, expMsg, actlMsg, msgs);
+
+    }
+
+    /**
+     * @param ignMsg IgniteMessaging.
+     * @throws Exception If failed.
+     */
+    private void sendOrderedMultiThreads(
+            final IgniteMessaging ignMsg
+    ) throws Exception {
+        final ConcurrentMap<String, List<String>> expMsg = Maps.newConcurrentMap();
+        final ConcurrentMap<String, List<String>> actlMsg = Maps.newConcurrentMap();
+
+        final List<String> msgs = orderedMessages();
+
+        sendOrderedMultiThreads(ignMsg, expMsg, actlMsg, msgs);
+    }
+
+    /**
+     * @param ignite2 Second node.
+     * @param ignMsg Ignite for send message.
+     * @param expMsg Expected messages map.
+     * @param actlMsg Actual message map.
+     * @param msgs List of messages.
+     * @throws Exception If failed.
+     */
+    private void sendOrderedMultiThreadsWith2Node(
+            final Ignite ignite2,
+            final IgniteMessaging ignMsg,
+            final ConcurrentMap<String, List<String>> expMsg,
+            final ConcurrentMap<String, List<String>> actlMsg,
+            final List<String> msgs
+    ) throws Exception {
+        final CountDownLatch latch = new CountDownLatch(THREADS * msgs.size());
+
+        final ConcurrentMap<String, List<String>> actlMsgNode2 = Maps.newConcurrentMap();
+
+        ignite2.message().localListen(TOPIC, new IgniteBiPredicate<UUID, Message>() {
+            @Override public boolean apply(UUID uuid, Message msg) {
+                actlMsgNode2.putIfAbsent(msg.threadName, Lists.<String>newArrayList());
+
+                actlMsgNode2.get(msg.threadName).add(msg.msg);
+
+                latch.countDown();
+
+                return true;
+            }
+        });
+
+        sendOrderedMultiThreads(ignMsg, expMsg, actlMsg, msgs);
+
+        latch.await();
+
+        assertEquals(expMsg.size(), actlMsgNode2.size());
+
+        for (Map.Entry<String, List<String>> entry : expMsg.entrySet())
+            assertTrue(actlMsgNode2.get(entry.getKey()).equals(entry.getValue()));
+    }
+
+    /**
+     * @param ignMsg Ignite for send message.
+     * @param expMsg Expected messages map.
+     * @param actlMsg Actual message map.
+     * @param msgs List of messages.
+     * @throws Exception If failed.
+     */
+    private void sendOrderedMultiThreads(
+            final IgniteMessaging ignMsg,
+            final ConcurrentMap<String, List<String>> expMsg,
+            final ConcurrentMap<String, List<String>> actlMsg,
+            final List<String> msgs
+    ) throws Exception {
+        final CountDownLatch latch = new CountDownLatch(THREADS * msgs.size());
+
+        ignMsg.localListen(TOPIC, new IgniteBiPredicate<UUID, Message>() {
+            @Override public boolean apply(UUID uuid, Message msg) {
+                actlMsg.putIfAbsent(msg.threadName, Lists.<String>newArrayList());
+
+                actlMsg.get(msg.threadName).add(msg.msg);
+
+                latch.countDown();
+
+                return true;
+            }
+        });
+
+        for (int i = 0; i < THREADS; i++)
+            new Thread(new Runnable() {
+                @Override public void run() {
+                    String thdName = Thread.currentThread().getName();
+
+                    List<String> exp = Lists.newArrayList();
+
+                    expMsg.put(thdName, exp);
+
+                    for (String msg : msgs) {
+                        exp.add(msg);
+
+                        ignMsg.sendOrdered(TOPIC, new Message(thdName, msg), 1000);
+                    }
+
+                }
+            }).start();
+
+        latch.await();
+
+        assertEquals(expMsg.size(), actlMsg.size());
+
+        for (Map.Entry<String, List<String>> entry : expMsg.entrySet())
+            assertTrue(actlMsg.get(entry.getKey()).equals(entry.getValue()));
+    }
+
+    /**
+     * @param ignite2 Second node.
+     * @param igniteMsg Ignite message.
+     * @param msgStr    Message string.
+     * @param cls       Callback for compare result.
+     * @throws Exception If failed.
+     */
+    private void sendWith2Nodes(
+            final Ignite ignite2,
+            final IgniteMessaging igniteMsg,
+            final String msgStr,
+            final IgniteBiInClosure<String, Thread>  cls
+    ) throws Exception {
+        final CountDownLatch latch = new CountDownLatch(1);
+
+        ignite2.message().localListen(TOPIC, new IgniteBiPredicate<UUID, String>() {
+            @Override public boolean apply(UUID uuid, String msg) {
+                Assert.assertEquals(msgStr, msg);
+
+                latch.countDown();
+
+                return true;
+            }
+        });
+
+        send(igniteMsg, msgStr, cls);
+
+        latch.await();
+    }
+
+    /**
+     * @param igniteMsg Ignite messaging.
+     * @param msgStr    Message string.
+     * @param cls       Callback for compare result.
+     * @throws Exception If failed.
+     */
+    private void send(
+           final IgniteMessaging igniteMsg,
+           final String msgStr,
+           final IgniteBiInClosure<String, Thread> cls
+    ) throws Exception {
+        final CountDownLatch latch = new CountDownLatch(1);
+
+        final AtomicReference<Thread> thread = new AtomicReference<>();
+        final AtomicReference<String> val = new AtomicReference<>();
+
+        igniteMsg.localListen(TOPIC, new IgniteBiPredicate<UUID, String>() {
+            @Override public boolean apply(UUID uuid, String msgStr) {
+                thread.set(Thread.currentThread());
+
+                val.set(msgStr);
+
+                latch.countDown();
+
+                return true;
+            }
+        });
+
+        igniteMsg.send(TOPIC, msgStr);
+
+        latch.await();
+
+        cls.apply(val.get(), thread.get());
+    }
+
+    /**
+     * @param ignite2 Second node.
+     * @param igniteMsg Ignite message.
+     * @param msgs messages for send.
+     * @param cls  Callback for compare result.
+     * @throws Exception If failed.
+     */
+    private void sendOrderedWith2Node(
+            final Ignite ignite2,
+            final IgniteMessaging igniteMsg,
+            final List<String> msgs,
+            final IgniteBiInClosure<List<String>, List<Thread>> cls
+    ) throws Exception {
+        final CountDownLatch latch = new CountDownLatch(msgs.size());
+
+        final List<String> received = Lists.newArrayList();
+
+        ignite2.message().localListen(TOPIC, new IgniteBiPredicate<UUID, String>() {
+            @Override public boolean apply(UUID uuid, String msg) {
+                received.add(msg);
+
+                latch.countDown();
+
+                return true;
+            }
+        });
+
+        sendOrdered(igniteMsg, msgs, cls);
+
+        latch.await();
+
+        assertTrue(msgs.equals(received));
+    }
+
+    /**
+     * @param igniteMsg Ignite message.
+     * @param msgs  messages for send.
+     * @param cls Callback for compare result.
+     * @throws Exception If failed.
+     */
+    private<T> void sendOrdered(
+            final IgniteMessaging igniteMsg,
+            final List<T> msgs,
+            final IgniteBiInClosure<List<T>,List<Thread>> cls
+    ) throws Exception {
+        final CountDownLatch latch = new CountDownLatch(msgs.size());
+
+        final List<T> received = Lists.newArrayList();
+        final List<Thread> threads = Lists.newArrayList();
+
+        for (T msg : msgs)
+            igniteMsg.sendOrdered(TOPIC, msg, 1000);
+
+        igniteMsg.localListen(TOPIC, new IgniteBiPredicate<UUID, T>() {
+            @Override public boolean apply(UUID uuid, T s) {
+                received.add(s);
+
+                threads.add(Thread.currentThread());
+
+                latch.countDown();
+
+                return true;
+            }
+        });
+
+        latch.await();
+
+        cls.apply(received, threads);
+    }
+
+    /**
+     * @return List of ordered messages
+     */
+    private List<String> orderedMessages() {
+        final List<String> msgs = Lists.newArrayList();
+
+        for (int i = 0; i < 1000; i++)
+            msgs.add(String.valueOf(ThreadLocalRandom8.current().nextInt()));
+
+        return msgs;
+    }
+
+    /**
+     *
+     */
+    private static class Message implements Serializable{
+        /** Thread name. */
+        private final String threadName;
+
+        /** Message. */
+        private final String msg;
+
+        /**
+         * @param threadName Thread name.
+         * @param msg Message.
+         */
+        private Message(String threadName, String msg) {
+            this.threadName = threadName;
+            this.msg = msg;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/59ed1d7e/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 9e20d2a..688edf7 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -56,6 +56,7 @@ import org.apache.ignite.marshaller.DynamicProxySerializationMultiJvmSelfTest;
 import org.apache.ignite.marshaller.MarshallerContextSelfTest;
 import org.apache.ignite.messaging.GridMessagingNoPeerClassLoadingSelfTest;
 import org.apache.ignite.messaging.GridMessagingSelfTest;
+import org.apache.ignite.messaging.IgniteMessagingSendAsyncTest;
 import org.apache.ignite.messaging.IgniteMessagingWithClientTest;
 import org.apache.ignite.plugin.security.SecurityPermissionSetBuilderTest;
 import org.apache.ignite.spi.GridSpiLocalHostInjectionTest;
@@ -101,6 +102,7 @@ public class IgniteBasicTestSuite extends TestSuite {
         suite.addTest(new TestSuite(GridSelfTest.class));
         suite.addTest(new TestSuite(ClusterGroupHostsSelfTest.class));
         suite.addTest(new TestSuite(IgniteMessagingWithClientTest.class));
+        suite.addTest(new TestSuite(IgniteMessagingSendAsyncTest.class));
 
         GridTestUtils.addTestIfNeeded(suite, ClusterGroupSelfTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, GridMessagingSelfTest.class, ignoredTests);

http://git-wip-us.apache.org/repos/asf/ignite/blob/59ed1d7e/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffle.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffle.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffle.java
index 10f18a6..3db68c4 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffle.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffle.java
@@ -147,7 +147,7 @@ public class HadoopShuffle extends HadoopComponent {
         if (msg instanceof Message)
             ctx.kernalContext().io().send(node, GridTopic.TOPIC_HADOOP_MSG, (Message)msg, GridIoPolicy.PUBLIC_POOL);
         else
-            ctx.kernalContext().io().sendUserMessage(F.asList(node), msg, GridTopic.TOPIC_HADOOP, false, 0);
+            ctx.kernalContext().io().sendUserMessage(F.asList(node), msg, GridTopic.TOPIC_HADOOP, false, 0, false);
     }
 
     /**
@@ -298,4 +298,4 @@ public class HadoopShuffle extends HadoopComponent {
     public GridUnsafeMemory memory() {
         return mem;
     }
-}
+}
\ No newline at end of file


[45/50] [abbrv] ignite git commit: Fix for C++ compiliation.

Posted by sb...@apache.org.
Fix for C++ compiliation.


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

Branch: refs/heads/ignite-4705-2
Commit: 75a4077f77457187f4a08644d1f7e5db3d74a17f
Parents: e18fcda
Author: Igor Sapego <is...@gridgain.com>
Authored: Fri Mar 10 14:57:02 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Fri Mar 10 14:57:02 2017 +0300

----------------------------------------------------------------------
 modules/platforms/cpp/core-test/src/test_utils.cpp          | 6 +++---
 .../cpp/core/include/ignite/impl/interop/interop_target.h   | 2 +-
 modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp    | 8 ++++----
 modules/platforms/cpp/jni/include/ignite/jni/utils.h        | 9 +++++++++
 modules/platforms/cpp/jni/os/linux/src/utils.cpp            | 6 ------
 modules/platforms/cpp/jni/os/win/src/utils.cpp              | 6 ------
 6 files changed, 17 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/75a4077f/modules/platforms/cpp/core-test/src/test_utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/test_utils.cpp b/modules/platforms/cpp/core-test/src/test_utils.cpp
index b706511..7323028 100644
--- a/modules/platforms/cpp/core-test/src/test_utils.cpp
+++ b/modules/platforms/cpp/core-test/src/test_utils.cpp
@@ -37,12 +37,12 @@ namespace ignite_test
         cfg.jvmOpts.push_back("-DIGNITE_CONSOLE_APPENDER=false");
         cfg.jvmOpts.push_back("-DIGNITE_UPDATE_NOTIFIER=false");
 
-        bool homeFound;
-        std::string home = jni::ResolveIgniteHome(0, &homeFound);
+        std::string home;
+        bool homeFound = jni::ResolveIgniteHome("", home);
 
         assert(homeFound);
 
-        cfg.jvmClassPath = jni::CreateIgniteClasspath(0, &home, true);
+        cfg.jvmClassPath = jni::CreateIgniteHomeClasspath(home, true);
 
 #ifdef IGNITE_TESTS_32
         cfg.jvmInitMem = 256;

http://git-wip-us.apache.org/repos/asf/ignite/blob/75a4077f/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
index 7ab6a6c..5ce8cfa 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
@@ -129,7 +129,7 @@ namespace ignite
                  * @param err Error.
                  * @return Operation result.
                  */
-                OperationResult InStreamOutLong(int32_t opType, InteropMemory& outInMem, IgniteError* err);
+                OperationResult InStreamOutLong(int32_t opType, InteropMemory& outInMem, IgniteError& err);
 
                 /**
                 * Internal out-in operation.

http://git-wip-us.apache.org/repos/asf/ignite/blob/75a4077f/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp b/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
index a8c1c6b..dfef8e4 100644
--- a/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
@@ -355,9 +355,9 @@ namespace ignite
 
                 out.Synchronize();
 
-                InStreamOutLong(OP_LOAD_CACHE, *mem.Get(), &err);
+                InStreamOutLong(OP_LOAD_CACHE, *mem.Get(), err);
 
-                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, &err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
             }
 
             void CacheImpl::LocalLoadCache(IgniteError & err)
@@ -376,9 +376,9 @@ namespace ignite
 
                 out.Synchronize();
 
-                InStreamOutLong(OP_LOC_LOAD_CACHE, *mem.Get(), &err);
+                InStreamOutLong(OP_LOC_LOAD_CACHE, *mem.Get(), err);
 
-                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, &err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
             }
 
             struct DummyQry { void Write(BinaryRawWriter&) const { }};

http://git-wip-us.apache.org/repos/asf/ignite/blob/75a4077f/modules/platforms/cpp/jni/include/ignite/jni/utils.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/jni/include/ignite/jni/utils.h b/modules/platforms/cpp/jni/include/ignite/jni/utils.h
index bbd461d..a6eb37a 100644
--- a/modules/platforms/cpp/jni/include/ignite/jni/utils.h
+++ b/modules/platforms/cpp/jni/include/ignite/jni/utils.h
@@ -150,6 +150,15 @@ namespace ignite
         IGNITE_IMPORT_EXPORT bool LoadJvmLibrary(const std::string& path);
 
         /**
+         * Helper function to create classpath based on Ignite home directory.
+         *
+         * @param home Home directory; expected to be valid.
+         * @param forceTest Force test classpath.
+         * @return Classpath.
+         */
+        IGNITE_IMPORT_EXPORT std::string CreateIgniteHomeClasspath(const std::string& home, bool forceTest);
+
+        /**
          * Create Ignite classpath based on user input directory.
          *
          * @param usrCp User's classpath.

http://git-wip-us.apache.org/repos/asf/ignite/blob/75a4077f/modules/platforms/cpp/jni/os/linux/src/utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/jni/os/linux/src/utils.cpp b/modules/platforms/cpp/jni/os/linux/src/utils.cpp
index 924779c..e74e4e0 100644
--- a/modules/platforms/cpp/jni/os/linux/src/utils.cpp
+++ b/modules/platforms/cpp/jni/os/linux/src/utils.cpp
@@ -234,12 +234,6 @@ namespace ignite
             return res;
         }
 
-        /**
-         * Helper function to create classpath based on Ignite home directory.
-         *
-         * @param home Home directory; expected to be valid.
-         * @param forceTest Force test classpath.
-         */
         std::string CreateIgniteHomeClasspath(const std::string& home, bool forceTest)
         {
             std::string res = std::string();

http://git-wip-us.apache.org/repos/asf/ignite/blob/75a4077f/modules/platforms/cpp/jni/os/win/src/utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/jni/os/win/src/utils.cpp b/modules/platforms/cpp/jni/os/win/src/utils.cpp
index 3b2033b..17ab6c3 100644
--- a/modules/platforms/cpp/jni/os/win/src/utils.cpp
+++ b/modules/platforms/cpp/jni/os/win/src/utils.cpp
@@ -209,12 +209,6 @@ namespace ignite
             return res;
         }
 
-        /**
-         * Helper function to create classpath based on Ignite home directory.
-         *
-         * @param home Home directory; expected to be valid.
-         * @param forceTest Force test classpath.
-         */
         std::string CreateIgniteHomeClasspath(const std::string& home, bool forceTest)
         {
             std::string res;


[03/50] [abbrv] ignite git commit: Implemented support for enforce join order flag.

Posted by sb...@apache.org.
Implemented support for enforce join order flag.


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

Branch: refs/heads/ignite-4705-2
Commit: a7f77d4e89956ac7a5d4ec9f629f89f1c2e1315a
Parents: 2ba8005
Author: Alexey Kuznetsov <ak...@gridgain.com>
Authored: Wed Mar 1 22:09:40 2017 +0700
Committer: Alexey Kuznetsov <ak...@gridgain.com>
Committed: Wed Mar 1 22:09:40 2017 +0700

----------------------------------------------------------------------
 .../internal/visor/query/VisorQueryArgV3.java   | 51 ++++++++++++++++++++
 .../internal/visor/query/VisorQueryJob.java     |  6 +--
 .../resources/META-INF/classnames.properties    |  1 +
 3 files changed, 55 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a7f77d4e/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArgV3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArgV3.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArgV3.java
new file mode 100644
index 0000000..f32c00a
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArgV3.java
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.visor.query;
+
+/**
+ * Arguments for {@link VisorQueryTask}.
+ */
+public class VisorQueryArgV3 extends VisorQueryArgV2 {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Enforce join order flag. */
+    private final boolean enforceJoinOrder;
+
+    /**
+     * @param cacheName Cache name for query.
+     * @param qryTxt Query text.
+     * @param distributedJoins If {@code true} then distributed joins enabled.
+     * @param enforceJoinOrder If {@code true} then enforce join order.
+     * @param loc Flag whether to execute query locally.
+     * @param pageSize Result batch size.
+     */
+    public VisorQueryArgV3(String cacheName, String qryTxt,
+        boolean distributedJoins, boolean enforceJoinOrder, boolean loc, int pageSize) {
+        super(cacheName, qryTxt, distributedJoins, loc, pageSize);
+
+        this.enforceJoinOrder = enforceJoinOrder;
+    }
+
+    /**
+     * @return Enforce join order flag.
+     */
+    public boolean enforceJoinOrder() {
+        return enforceJoinOrder;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/a7f77d4e/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
index c66b2dd..1ac90ad 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
@@ -131,9 +131,8 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
                 if (scanWithFilter) {
                     boolean caseSensitive = qryTxt.startsWith(SCAN_CACHE_WITH_FILTER_CASE_SENSITIVE);
 
-                    String ptrn = caseSensitive
-                        ? qryTxt.substring(SCAN_CACHE_WITH_FILTER_CASE_SENSITIVE.length())
-                        : qryTxt.substring(SCAN_CACHE_WITH_FILTER.length());
+                    String ptrn = qryTxt.substring(
+                        caseSensitive ? SCAN_CACHE_WITH_FILTER_CASE_SENSITIVE.length() : SCAN_CACHE_WITH_FILTER.length());
 
                     filter = new VisorQueryScanSubstringFilter(caseSensitive, ptrn);
                 }
@@ -162,6 +161,7 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
                 qry.setPageSize(arg.pageSize());
                 qry.setLocal(arg.local());
                 qry.setDistributedJoins(arg instanceof VisorQueryArgV2 && ((VisorQueryArgV2)arg).distributedJoins());
+                qry.setEnforceJoinOrder(arg instanceof VisorQueryArgV3 && ((VisorQueryArgV3)arg).enforceJoinOrder());
 
                 long start = U.currentTimeMillis();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a7f77d4e/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties
index c0a6407..8cfed3a 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -1822,6 +1822,7 @@ org.apache.ignite.internal.visor.node.VisorSpisConfiguration
 org.apache.ignite.internal.visor.node.VisorTransactionConfiguration
 org.apache.ignite.internal.visor.query.VisorQueryArg
 org.apache.ignite.internal.visor.query.VisorQueryArgV2
+org.apache.ignite.internal.visor.query.VisorQueryArgV3
 org.apache.ignite.internal.visor.query.VisorQueryCleanupTask
 org.apache.ignite.internal.visor.query.VisorQueryCleanupTask$VisorQueryCleanupJob
 org.apache.ignite.internal.visor.query.VisorQueryField


[43/50] [abbrv] ignite git commit: Merge branch 'master' into ignite-2.0-merge

Posted by sb...@apache.org.
Merge branch 'master' into ignite-2.0-merge

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
#	modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
#	modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
#	modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
#	modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffleJob.java
#	modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DmlStatementsProcessor.java
#	modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
#	modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
#	modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
#	modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInsertSqlQuerySelfTest.java
#	modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java
#	modules/platforms/cpp/common/project/vs/common.vcxproj
#	modules/platforms/cpp/core/include/ignite/cache/cache.h
#	modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
#	modules/platforms/cpp/core/src/impl/interop/interop_target.cpp


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

Branch: refs/heads/ignite-4705-2
Commit: d1b2c014a535b6d49f78fd76d4b002552e4ee680
Parents: 6fda2c2 d4b87f4
Author: devozerov <vo...@gridgain.com>
Authored: Fri Mar 10 14:05:21 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Mar 10 14:05:21 2017 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |    2 +-
 RELEASE_NOTES.txt                               |   20 +
 assembly/dependencies-hadoop.xml                |    3 +
 assembly/release-base.xml                       |    5 -
 assembly/release-fabric-base.xml                |    5 +
 assembly/release-sources.xml                    |    3 +-
 config/example-kube.xml                         |   53 +
 doap_Ignite.rdf                                 |    1 -
 examples/pom-standalone-lgpl.xml                |   12 +
 examples/pom-standalone.xml                     |   12 +
 examples/pom.xml                                |   14 +
 .../examples/java8/spark/SharedRDDExample.java  |  110 --
 .../ignite/examples/spark/SharedRDDExample.java |  127 ++
 .../ignite/examples/spark/package-info.java     |   22 +
 .../examples/SharedRDDExampleSelfTest.java      |   36 -
 .../IgniteExamplesJ8SelfTestSuite.java          |    2 -
 .../examples/SharedRDDExampleSelfTest.java      |   36 +
 .../IgniteExamplesSparkSelfTestSuite.java       |   46 +
 modules/clients/src/test/config/jdbc-config.xml |    2 +-
 .../jdbc2/JdbcAbstractDmlStatementSelfTest.java |   49 +-
 .../jdbc2/JdbcInsertStatementSelfTest.java      |   51 +
 .../jdbc2/JdbcMergeStatementSelfTest.java       |   51 +
 .../internal/jdbc2/JdbcStreamingSelfTest.java   |  187 ++
 .../jdbc2/JdbcUpdateStatementSelfTest.java      |   50 +
 .../tcp/redis/RedisProtocolSelfTest.java        |   13 +-
 .../jdbc/suite/IgniteJdbcDriverTestSuite.java   |    1 +
 .../src/main/java/org/apache/ignite/Ignite.java |    1 +
 .../java/org/apache/ignite/IgniteCompute.java   |   44 +-
 .../org/apache/ignite/IgniteJdbcDriver.java     |   30 +
 .../apache/ignite/IgniteSystemProperties.java   |   38 +
 .../configuration/CacheConfiguration.java       |   41 +
 .../ignite/internal/binary/BinaryContext.java   |    3 +
 .../ignite/internal/binary/BinaryTreeMap.java   |    6 +-
 .../ignite/internal/jdbc2/JdbcConnection.java   |   72 +-
 .../internal/jdbc2/JdbcPreparedStatement.java   |   34 +-
 .../ignite/internal/jdbc2/JdbcStatement.java    |   20 +-
 .../jdbc2/JdbcStreamedPreparedStatement.java    |   59 +
 .../internal/managers/discovery/DiscoCache.java |  310 ++++
 .../discovery/GridDiscoveryManager.java         |  568 ++----
 .../eventstorage/DiscoveryEventListener.java    |   33 +
 .../eventstorage/GridEventStorageManager.java   |  162 +-
 .../affinity/GridAffinityAssignmentCache.java   |    7 +-
 .../cache/CacheAffinitySharedManager.java       |   35 +-
 .../processors/cache/EntryGetResult.java        |   40 +-
 .../processors/cache/EntryGetWithTtlResult.java |   58 +
 .../processors/cache/GridCacheAdapter.java      |   69 +-
 .../cache/GridCacheAffinityManager.java         |    3 +-
 .../processors/cache/GridCacheContext.java      |  122 +-
 .../processors/cache/GridCacheEntryEx.java      |    2 +-
 .../processors/cache/GridCacheMapEntry.java     |   29 +-
 .../GridCachePartitionExchangeManager.java      |   64 +-
 .../processors/cache/GridCacheProcessor.java    |    3 +
 .../processors/cache/IgniteCacheProxy.java      |    6 +-
 .../dht/GridClientPartitionTopology.java        |   20 +-
 .../dht/GridDhtAssignmentFetchFuture.java       |    7 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |    4 +-
 .../cache/distributed/dht/GridDhtGetFuture.java |   24 +-
 .../distributed/dht/GridDhtGetSingleFuture.java |   24 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |   44 +-
 .../dht/GridPartitionedGetFuture.java           |   19 +-
 .../dht/GridPartitionedSingleGetFuture.java     |    7 +-
 .../dht/atomic/GridDhtAtomicCache.java          |   12 +-
 .../dht/colocated/GridDhtColocatedCache.java    |   15 +-
 .../GridDhtPartitionsExchangeFuture.java        |   33 +-
 .../distributed/near/GridNearGetFuture.java     |    9 +-
 .../cache/distributed/near/GridNearTxLocal.java |   10 +-
 .../local/atomic/GridLocalAtomicCache.java      |   13 +-
 .../cache/query/GridCacheSqlQuery.java          |  127 +-
 .../transactions/IgniteTxLocalAdapter.java      |   65 +-
 .../closure/GridClosureProcessor.java           |    2 +-
 .../processors/cluster/GridUpdateNotifier.java  |    2 +-
 .../datastructures/DataStructuresProcessor.java |    3 +-
 .../datastructures/GridCacheLockImpl.java       |   17 +-
 .../processors/query/GridQueryIndexing.java     |   58 +-
 .../processors/query/GridQueryProcessor.java    |  187 +-
 .../messages/GridQueryNextPageRequest.java      |   29 +-
 .../messages/GridQueryNextPageResponse.java     |   29 +-
 .../handlers/cache/GridCacheCommandHandler.java |   27 +-
 .../redis/GridRedisRestCommandHandler.java      |   36 +
 .../string/GridRedisSetCommandHandler.java      |   43 +-
 .../service/GridServiceProcessor.java           |   21 +-
 .../ignite/internal/util/IgniteUtils.java       |   14 +-
 .../visor/cache/VisorCacheClearTask.java        |   57 +-
 .../internal/visor/query/VisorQueryArgV3.java   |   51 +
 .../internal/visor/query/VisorQueryJob.java     |    6 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   25 +
 .../resources/META-INF/classnames.properties    |    7 +-
 .../internal/GridCacheRecreateLockTest.java     |   78 +
 .../cache/CacheGetEntryAbstractTest.java        |   16 +-
 .../CacheSerializableTransactionsTest.java      |  173 +-
 .../processors/cache/CacheTxFastFinishTest.java |    2 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   20 +-
 .../processors/cache/GridCacheTestEntryEx.java  |    2 +-
 ...sExchangeOnDiscoveryHistoryOverflowTest.java |  190 ++
 .../CacheLockReleaseNodeLeaveTest.java          |   64 +-
 .../GridCacheRebalancingSyncSelfTest.java       |   69 +-
 .../IgniteCacheExpiryPolicyAbstractTest.java    |   42 +
 .../GridMarshallerPerformanceTest.java          |    4 +
 .../tcp/TcpCommunicationSpiDropNodesTest.java   |    3 +-
 .../TcpCommunicationSpiFaultyClientTest.java    |    3 +-
 .../junits/common/GridCommonAbstractTest.java   |   77 +
 .../testsuites/IgniteCacheTestSuite5.java       |    3 +
 .../testsuites/IgniteComputeGridTestSuite.java  |    2 +
 modules/docker/1.9.0/Dockerfile                 |   46 +
 modules/docker/1.9.0/run.sh                     |   51 +
 modules/docker/Dockerfile                       |    4 +-
 modules/flink/pom.xml                           |    2 +-
 .../query/h2/opt/GridH2SpatialIndex.java        |   56 +-
 .../query/h2/GridH2IndexingGeoSelfTest.java     |  409 +++--
 .../h2/GridH2IndexingSegmentedGeoSelfTest.java  |   37 +
 .../testsuites/GeoSpatialIndexingTestSuite.java |    2 +
 .../hadoop/shuffle/HadoopShuffleJob.java        |    1 -
 .../cache/query/GridCacheTwoStepQuery.java      |   17 +
 .../query/h2/DmlStatementsProcessor.java        |  273 ++-
 .../processors/query/h2/IgniteH2Indexing.java   |  402 ++++-
 .../query/h2/dml/UpdatePlanBuilder.java         |    2 +-
 .../query/h2/opt/DistributedJoinMode.java       |   51 +
 .../query/h2/opt/GridH2CollocationModel.java    |   82 +-
 .../query/h2/opt/GridH2IndexBase.java           |  348 +++-
 .../query/h2/opt/GridH2QueryContext.java        |   84 +-
 .../query/h2/opt/GridH2RowDescriptor.java       |    5 -
 .../query/h2/opt/GridH2ScanIndex.java           |  273 +++
 .../processors/query/h2/opt/GridH2Table.java    |  244 +--
 .../query/h2/opt/GridH2TreeIndex.java           |  135 +-
 .../processors/query/h2/sql/DmlAstUtils.java    |   54 +-
 .../processors/query/h2/sql/GridSqlAlias.java   |   13 +-
 .../processors/query/h2/sql/GridSqlArray.java   |    8 +-
 .../processors/query/h2/sql/GridSqlAst.java     |   61 +
 .../processors/query/h2/sql/GridSqlColumn.java  |   85 +-
 .../processors/query/h2/sql/GridSqlConst.java   |    6 +-
 .../processors/query/h2/sql/GridSqlElement.java |   43 +-
 .../query/h2/sql/GridSqlFunction.java           |   18 +-
 .../processors/query/h2/sql/GridSqlJoin.java    |   35 +-
 .../processors/query/h2/sql/GridSqlKeyword.java |    3 +-
 .../query/h2/sql/GridSqlOperation.java          |    6 +-
 .../query/h2/sql/GridSqlOperationType.java      |    4 +-
 .../query/h2/sql/GridSqlParameter.java          |    4 +-
 .../query/h2/sql/GridSqlPlaceholder.java        |    2 +-
 .../processors/query/h2/sql/GridSqlQuery.java   |   91 +-
 .../query/h2/sql/GridSqlQueryParser.java        |  248 ++-
 .../query/h2/sql/GridSqlQuerySplitter.java      | 1684 +++++++++++++++---
 .../processors/query/h2/sql/GridSqlSelect.java  |  121 +-
 .../query/h2/sql/GridSqlSortColumn.java         |   41 +
 .../query/h2/sql/GridSqlStatement.java          |   11 +-
 .../query/h2/sql/GridSqlSubquery.java           |   31 +-
 .../processors/query/h2/sql/GridSqlTable.java   |   19 +-
 .../processors/query/h2/sql/GridSqlType.java    |    6 +-
 .../processors/query/h2/sql/GridSqlUnion.java   |   66 +-
 .../processors/query/h2/sql/GridSqlValue.java   |   25 -
 .../query/h2/twostep/GridMapQueryExecutor.java  |  313 +++-
 .../query/h2/twostep/GridMergeIndex.java        |  647 +++++--
 .../query/h2/twostep/GridMergeIndexSorted.java  |  380 ++++
 .../h2/twostep/GridMergeIndexUnsorted.java      |  101 +-
 .../query/h2/twostep/GridMergeTable.java        |   70 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |  211 ++-
 .../query/h2/twostep/GridResultPage.java        |   34 +-
 .../h2/twostep/msg/GridH2IndexRangeRequest.java |   60 +-
 .../twostep/msg/GridH2IndexRangeResponse.java   |   62 +-
 .../h2/twostep/msg/GridH2QueryRequest.java      |   19 +-
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |    2 +-
 ...niteCacheAbstractInsertSqlQuerySelfTest.java |    6 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |   10 +-
 .../IgniteCacheInsertSqlQuerySelfTest.java      |   14 +
 .../IgniteCacheUpdateSqlQuerySelfTest.java      |    1 +
 .../query/IgniteSqlSegmentedIndexSelfTest.java  |  263 +++
 .../query/IgniteSqlSplitterSelfTest.java        |  331 +++-
 .../h2/GridIndexingSpiAbstractSelfTest.java     |   26 +-
 .../h2/sql/AbstractH2CompareQueryTest.java      |   21 +-
 .../query/h2/sql/GridQueryParsingTest.java      |   72 +-
 .../query/h2/sql/H2CompareBigQueryTest.java     |   58 +-
 .../FetchingQueryCursorStressTest.java          |  277 +++
 .../IgniteCacheQuerySelfTestSuite.java          |    4 +
 .../processors/query/h2/sql/bigQuery.sql        |   36 +-
 modules/kubernetes/config/Dockerfile            |   17 +
 .../kubernetes/config/ignite-deployment.yaml    |   15 +
 modules/kubernetes/config/ignite-service.yaml   |   15 +
 .../cpp/common/project/vs/common.vcxproj        |    1 -
 .../common/project/vs/common.vcxproj.filters    |    6 -
 .../platforms/cpp/common/project/vs/targetver.h |   25 -
 modules/platforms/cpp/core-test/Makefile.am     |    1 +
 .../cpp/core-test/config/cache-store.xml        |   71 +
 .../cpp/core-test/project/vs/core-test.vcxproj  |    5 +
 .../project/vs/core-test.vcxproj.filters        |    9 +
 .../src/binary_identity_resolver_test.cpp       |    2 +-
 .../src/binary_reader_writer_raw_test.cpp       |    2 +-
 .../core-test/src/binary_reader_writer_test.cpp |    2 +-
 .../cpp/core-test/src/binary_session_test.cpp   |    2 +-
 .../cpp/core-test/src/cache_query_test.cpp      |    2 +-
 .../cpp/core-test/src/cache_store_test.cpp      |  151 ++
 .../cpp/core-test/src/continuous_query_test.cpp |    2 +-
 .../cpp/core-test/src/handle_registry_test.cpp  |    2 +-
 .../cpp/core-test/src/ignite_error_test.cpp     |    2 +-
 .../cpp/core-test/src/ignition_test.cpp         |    2 +-
 .../cpp/core-test/src/interop_memory_test.cpp   |    2 +-
 .../cpp/core-test/src/reference_test.cpp        |    2 +-
 .../platforms/cpp/core-test/src/test_utils.cpp  |    7 +
 .../cpp/core-test/src/transactions_test.cpp     |    2 +-
 .../cpp/core/include/ignite/cache/cache.h       |   60 +-
 .../cache/query/continuous/continuous_query.h   |    2 +-
 .../core/include/ignite/impl/cache/cache_impl.h |   19 +
 .../ignite/impl/interop/interop_target.h        |   25 +
 .../cpp/core/src/impl/cache/cache_impl.cpp      |   48 +
 .../core/src/impl/interop/interop_target.cpp    |   36 +-
 .../platforms/cpp/jni/project/vs/jni.vcxproj    |    1 -
 .../cpp/jni/project/vs/jni.vcxproj.filters      |    3 -
 .../platforms/cpp/jni/project/vs/targetver.h    |   25 -
 .../Properties/AssemblyInfo.cs                  |    2 +-
 .../Properties/AssemblyInfo.cs                  |    2 +-
 .../Properties/AssemblyInfo.cs                  |    2 +-
 .../Properties/AssemblyInfo.cs                  |    2 +-
 .../Properties/AssemblyInfo.cs                  |    2 +-
 .../Properties/AssemblyInfo.cs                  |    2 +-
 modules/spark-2.10/pom.xml                      |   54 +
 modules/spark/pom.xml                           |  183 +-
 .../org/apache/ignite/spark/IgniteContext.scala |   22 +-
 .../spark/JavaEmbeddedIgniteRDDSelfTest.java    |   10 +-
 .../spark/JavaStandaloneIgniteRDDSelfTest.java  |   22 +-
 .../ant/beautifier/GridJavadocAntTask.java      |    1 +
 modules/web-console/backend/app/agent.js        |   36 +
 modules/web-console/backend/app/browser.js      |   28 +
 modules/web-console/backend/app/settings.js     |    8 +-
 modules/web-console/backend/index.js            |   10 -
 modules/web-console/frontend/.eslintrc          |    1 +
 modules/web-console/frontend/.gitignore         |    1 +
 modules/web-console/frontend/app/app.config.js  |   12 +-
 modules/web-console/frontend/app/app.js         |    7 +-
 .../activities-user-dialog.jade                 |   36 -
 .../activities-user-dialog.tpl.pug              |   36 +
 .../components/activities-user-dialog/index.js  |    2 +-
 .../form-field-datepicker.jade                  |   55 -
 .../form-field-datepicker.pug                   |   55 +
 .../list-of-registered-users/index.js           |    2 +-
 .../list-of-registered-users.controller.js      |   11 +-
 .../list-of-registered-users.jade               |   58 -
 .../list-of-registered-users.tpl.pug            |   58 +
 .../ui-grid-header/ui-grid-header.jade          |   27 -
 .../ui-grid-header/ui-grid-header.scss          |    1 +
 .../ui-grid-header/ui-grid-header.tpl.pug       |   27 +
 .../ui-grid-settings/ui-grid-settings.jade      |   33 -
 .../ui-grid-settings/ui-grid-settings.pug       |   33 +
 .../app/directives/centered/centered.css        |   37 -
 .../directives/centered/centered.directive.js   |    2 +-
 .../app/directives/centered/centered.scss       |   37 +
 .../information/information.directive.js        |    4 +-
 .../app/directives/information/information.jade |   20 -
 .../app/directives/information/information.pug  |   20 +
 .../ui-ace-docker/ui-ace-docker.directive.js    |    4 +-
 .../directives/ui-ace-docker/ui-ace-docker.jade |   31 -
 .../directives/ui-ace-docker/ui-ace-docker.pug  |   31 +
 .../ui-ace-java/ui-ace-java.directive.js        |    4 +-
 .../app/directives/ui-ace-java/ui-ace-java.jade |   22 -
 .../app/directives/ui-ace-java/ui-ace-java.pug  |   22 +
 .../ui-ace-pojos/ui-ace-pojos.directive.js      |    4 +-
 .../directives/ui-ace-pojos/ui-ace-pojos.jade   |   40 -
 .../directives/ui-ace-pojos/ui-ace-pojos.pug    |   40 +
 .../ui-ace-pom/ui-ace-pom.directive.js          |    4 +-
 .../app/directives/ui-ace-pom/ui-ace-pom.jade   |   17 -
 .../app/directives/ui-ace-pom/ui-ace-pom.pug    |   17 +
 .../ui-ace-sharp/ui-ace-sharp.directive.js      |    4 +-
 .../directives/ui-ace-sharp/ui-ace-sharp.jade   |   22 -
 .../directives/ui-ace-sharp/ui-ace-sharp.pug    |   22 +
 .../ui-ace-spring/ui-ace-spring.directive.js    |    4 +-
 .../directives/ui-ace-spring/ui-ace-spring.jade |   17 -
 .../directives/ui-ace-spring/ui-ace-spring.pug  |   17 +
 .../frontend/app/helpers/jade/form.jade         |   28 -
 .../frontend/app/helpers/jade/form.pug          |   28 +
 .../helpers/jade/form/form-field-checkbox.jade  |   38 -
 .../helpers/jade/form/form-field-checkbox.pug   |   38 +
 .../helpers/jade/form/form-field-datalist.jade  |   51 -
 .../helpers/jade/form/form-field-datalist.pug   |   51 +
 .../app/helpers/jade/form/form-field-down.jade  |   18 -
 .../app/helpers/jade/form/form-field-down.pug   |   18 +
 .../helpers/jade/form/form-field-dropdown.jade  |   51 -
 .../helpers/jade/form/form-field-dropdown.pug   |   51 +
 .../helpers/jade/form/form-field-feedback.jade  |   32 -
 .../helpers/jade/form/form-field-feedback.pug   |   32 +
 .../app/helpers/jade/form/form-field-label.jade |   23 -
 .../app/helpers/jade/form/form-field-label.pug  |   23 +
 .../helpers/jade/form/form-field-number.jade    |   53 -
 .../app/helpers/jade/form/form-field-number.pug |   53 +
 .../helpers/jade/form/form-field-password.jade  |   47 -
 .../helpers/jade/form/form-field-password.pug   |   47 +
 .../app/helpers/jade/form/form-field-text.jade  |   64 -
 .../app/helpers/jade/form/form-field-text.pug   |   64 +
 .../app/helpers/jade/form/form-field-up.jade    |   18 -
 .../app/helpers/jade/form/form-field-up.pug     |   18 +
 .../app/helpers/jade/form/form-group.jade       |   23 -
 .../app/helpers/jade/form/form-group.pug        |   23 +
 .../frontend/app/helpers/jade/mixins.jade       |  609 -------
 .../frontend/app/helpers/jade/mixins.pug        |  609 +++++++
 .../frontend/app/modules/agent/agent.module.js  |    4 +-
 .../modules/branding/header-logo.directive.js   |    4 +-
 .../app/modules/branding/header-logo.jade       |   18 -
 .../app/modules/branding/header-logo.pug        |   18 +
 .../branding/powered-by-apache.directive.js     |    4 +-
 .../app/modules/branding/powered-by-apache.jade |   18 -
 .../app/modules/branding/powered-by-apache.pug  |   18 +
 .../frontend/app/modules/demo/Demo.module.js    |    3 +-
 .../app/modules/dialog/dialog.factory.js        |    2 +-
 .../frontend/app/modules/dialog/dialog.jade     |   26 -
 .../frontend/app/modules/dialog/dialog.tpl.pug  |   26 +
 .../getting-started/GettingStarted.provider.js  |    3 +-
 .../frontend/app/modules/loading/loading.css    |   73 -
 .../app/modules/loading/loading.directive.js    |    8 +-
 .../frontend/app/modules/loading/loading.jade   |   23 -
 .../frontend/app/modules/loading/loading.pug    |   23 +
 .../frontend/app/modules/loading/loading.scss   |   73 +
 .../frontend/app/modules/nodes/Nodes.service.js |    4 +-
 .../app/modules/nodes/nodes-dialog.jade         |   35 -
 .../app/modules/nodes/nodes-dialog.tpl.pug      |   35 +
 .../app/modules/sql/notebook.controller.js      |    4 +-
 .../frontend/app/modules/sql/sql.controller.js  |   14 +-
 .../frontend/app/modules/sql/sql.module.js      |   15 +-
 .../frontend/app/modules/states/admin.state.js  |    4 +-
 .../app/modules/states/configuration.state.js   |   23 +-
 .../states/configuration/caches/affinity.jade   |   82 -
 .../states/configuration/caches/affinity.pug    |   82 +
 .../configuration/caches/client-near-cache.jade |   50 -
 .../configuration/caches/client-near-cache.pug  |   50 +
 .../configuration/caches/concurrency.jade       |   65 -
 .../states/configuration/caches/concurrency.pug |   65 +
 .../states/configuration/caches/general.jade    |   69 -
 .../states/configuration/caches/general.pug     |   69 +
 .../states/configuration/caches/memory.jade     |  109 --
 .../states/configuration/caches/memory.pug      |  108 ++
 .../configuration/caches/near-cache-client.jade |   51 -
 .../configuration/caches/near-cache-client.pug  |   51 +
 .../configuration/caches/near-cache-server.jade |   52 -
 .../configuration/caches/near-cache-server.pug  |   52 +
 .../configuration/caches/node-filter.jade       |   59 -
 .../states/configuration/caches/node-filter.pug |   59 +
 .../states/configuration/caches/query.jade      |  114 --
 .../states/configuration/caches/query.pug       |  114 ++
 .../states/configuration/caches/rebalance.jade  |   66 -
 .../states/configuration/caches/rebalance.pug   |   66 +
 .../states/configuration/caches/statistics.jade |   39 -
 .../states/configuration/caches/statistics.pug  |   39 +
 .../states/configuration/caches/store.jade      |  250 ---
 .../states/configuration/caches/store.pug       |  250 +++
 .../states/configuration/clusters/atomic.jade   |   54 -
 .../states/configuration/clusters/atomic.pug    |   54 +
 .../configuration/clusters/attributes.jade      |   57 -
 .../configuration/clusters/attributes.pug       |   57 +
 .../states/configuration/clusters/binary.jade   |   77 -
 .../states/configuration/clusters/binary.pug    |   77 +
 .../configuration/clusters/cache-key-cfg.jade   |   50 -
 .../configuration/clusters/cache-key-cfg.pug    |   50 +
 .../configuration/clusters/checkpoint.jade      |   86 -
 .../configuration/clusters/checkpoint.pug       |   86 +
 .../configuration/clusters/checkpoint/fs.jade   |   66 -
 .../configuration/clusters/checkpoint/fs.pug    |   66 +
 .../configuration/clusters/checkpoint/jdbc.jade |   48 -
 .../configuration/clusters/checkpoint/jdbc.pug  |   48 +
 .../configuration/clusters/checkpoint/s3.jade   |  178 --
 .../configuration/clusters/checkpoint/s3.pug    |  178 ++
 .../configuration/clusters/collision.jade       |   63 -
 .../states/configuration/clusters/collision.pug |   63 +
 .../clusters/collision/custom.jade              |   24 -
 .../configuration/clusters/collision/custom.pug |   24 +
 .../clusters/collision/fifo-queue.jade          |   27 -
 .../clusters/collision/fifo-queue.pug           |   27 +
 .../clusters/collision/job-stealing.jade        |   63 -
 .../clusters/collision/job-stealing.pug         |   63 +
 .../clusters/collision/priority-queue.jade      |   42 -
 .../clusters/collision/priority-queue.pug       |   42 +
 .../configuration/clusters/communication.jade   |  100 --
 .../configuration/clusters/communication.pug    |  100 ++
 .../configuration/clusters/connector.jade       |  104 --
 .../states/configuration/clusters/connector.pug |  104 ++
 .../configuration/clusters/deployment.jade      |  237 ---
 .../configuration/clusters/deployment.pug       |  237 +++
 .../configuration/clusters/discovery.jade       |   88 -
 .../states/configuration/clusters/discovery.pug |   88 +
 .../states/configuration/clusters/events.jade   |   68 -
 .../states/configuration/clusters/events.pug    |   68 +
 .../states/configuration/clusters/failover.jade |   73 -
 .../states/configuration/clusters/failover.pug  |   73 +
 .../states/configuration/clusters/general.jade  |   76 -
 .../states/configuration/clusters/general.pug   |   76 +
 .../clusters/general/discovery/cloud.jade       |  134 --
 .../clusters/general/discovery/cloud.pug        |  134 ++
 .../clusters/general/discovery/google.jade      |   38 -
 .../clusters/general/discovery/google.pug       |   38 +
 .../clusters/general/discovery/jdbc.jade        |   31 -
 .../clusters/general/discovery/jdbc.pug         |   31 +
 .../clusters/general/discovery/multicast.jade   |   99 -
 .../clusters/general/discovery/multicast.pug    |   99 +
 .../clusters/general/discovery/s3.jade          |   27 -
 .../clusters/general/discovery/s3.pug           |   27 +
 .../clusters/general/discovery/shared.jade      |   23 -
 .../clusters/general/discovery/shared.pug       |   23 +
 .../clusters/general/discovery/vm.jade          |   79 -
 .../clusters/general/discovery/vm.pug           |   79 +
 .../clusters/general/discovery/zookeeper.jade   |   85 -
 .../clusters/general/discovery/zookeeper.pug    |   85 +
 .../bounded-exponential-backoff.jade            |   27 -
 .../retrypolicy/bounded-exponential-backoff.pug |   27 +
 .../discovery/zookeeper/retrypolicy/custom.jade |   24 -
 .../discovery/zookeeper/retrypolicy/custom.pug  |   24 +
 .../retrypolicy/exponential-backoff.jade        |   27 -
 .../retrypolicy/exponential-backoff.pug         |   27 +
 .../zookeeper/retrypolicy/forever.jade          |   22 -
 .../discovery/zookeeper/retrypolicy/forever.pug |   22 +
 .../zookeeper/retrypolicy/n-times.jade          |   25 -
 .../discovery/zookeeper/retrypolicy/n-times.pug |   25 +
 .../zookeeper/retrypolicy/one-time.jade         |   23 -
 .../zookeeper/retrypolicy/one-time.pug          |   23 +
 .../zookeeper/retrypolicy/until-elapsed.jade    |   25 -
 .../zookeeper/retrypolicy/until-elapsed.pug     |   25 +
 .../states/configuration/clusters/igfs.jade     |   38 -
 .../states/configuration/clusters/igfs.pug      |   38 +
 .../configuration/clusters/load-balancing.jade  |  107 --
 .../configuration/clusters/load-balancing.pug   |  107 ++
 .../states/configuration/clusters/logger.jade   |   66 -
 .../states/configuration/clusters/logger.pug    |   66 +
 .../configuration/clusters/logger/custom.jade   |   25 -
 .../configuration/clusters/logger/custom.pug    |   25 +
 .../configuration/clusters/logger/log4j.jade    |   50 -
 .../configuration/clusters/logger/log4j.pug     |   50 +
 .../configuration/clusters/logger/log4j2.jade   |   39 -
 .../configuration/clusters/logger/log4j2.pug    |   39 +
 .../configuration/clusters/marshaller.jade      |   76 -
 .../configuration/clusters/marshaller.pug       |   76 +
 .../states/configuration/clusters/metrics.jade  |   51 -
 .../states/configuration/clusters/metrics.pug   |   51 +
 .../states/configuration/clusters/odbc.jade     |   48 -
 .../states/configuration/clusters/odbc.pug      |   48 +
 .../states/configuration/clusters/ssl.jade      |  110 --
 .../states/configuration/clusters/ssl.pug       |  110 ++
 .../states/configuration/clusters/swap.jade     |   72 -
 .../states/configuration/clusters/swap.pug      |   72 +
 .../states/configuration/clusters/thread.jade   |   48 -
 .../states/configuration/clusters/thread.pug    |   48 +
 .../states/configuration/clusters/time.jade     |   47 -
 .../states/configuration/clusters/time.pug      |   47 +
 .../configuration/clusters/transactions.jade    |   69 -
 .../configuration/clusters/transactions.pug     |   69 +
 .../states/configuration/domains/general.jade   |   52 -
 .../states/configuration/domains/general.pug    |   52 +
 .../states/configuration/domains/query.jade     |  172 --
 .../states/configuration/domains/query.pug      |  172 ++
 .../states/configuration/domains/store.jade     |  127 --
 .../states/configuration/domains/store.pug      |  127 ++
 .../modules/states/configuration/igfs/dual.jade |   42 -
 .../modules/states/configuration/igfs/dual.pug  |   42 +
 .../states/configuration/igfs/fragmentizer.jade |   43 -
 .../states/configuration/igfs/fragmentizer.pug  |   43 +
 .../states/configuration/igfs/general.jade      |   57 -
 .../states/configuration/igfs/general.pug       |   57 +
 .../modules/states/configuration/igfs/ipc.jade  |   60 -
 .../modules/states/configuration/igfs/ipc.pug   |   60 +
 .../modules/states/configuration/igfs/misc.jade |  108 --
 .../modules/states/configuration/igfs/misc.pug  |  108 ++
 .../states/configuration/igfs/secondary.jade    |   45 -
 .../states/configuration/igfs/secondary.pug     |   45 +
 .../configuration/summary/summary.controller.js |    5 +
 .../frontend/app/modules/states/errors.state.js |    4 +-
 .../app/modules/states/password.state.js        |    6 +-
 .../app/modules/states/profile.state.js         |    4 +-
 .../frontend/app/modules/states/signin.state.js |    2 +-
 .../frontend/app/services/Clone.service.js      |    4 +-
 .../frontend/app/services/Confirm.service.js    |    4 +-
 .../app/services/ConfirmBatch.service.js        |    4 +-
 .../frontend/controllers/caches-controller.js   |    4 +-
 .../frontend/controllers/domains-controller.js  |    4 +-
 .../frontend/gulpfile.babel.js/paths.js         |   28 +-
 .../frontend/gulpfile.babel.js/tasks/build.js   |    2 +-
 .../frontend/gulpfile.babel.js/tasks/bundle.js  |    8 +-
 .../frontend/gulpfile.babel.js/tasks/jade.js    |   49 -
 .../frontend/gulpfile.babel.js/tasks/watch.js   |    5 +-
 .../gulpfile.babel.js/webpack/common.js         |  292 +--
 .../webpack/environments/development.js         |   90 +-
 .../webpack/environments/production.js          |   41 +-
 .../webpack/environments/test.js                |   52 +-
 .../frontend/gulpfile.babel.js/webpack/index.js |    4 +-
 modules/web-console/frontend/package.json       |   60 +-
 .../frontend/test/e2e/exampe.test.js            |    4 +-
 .../frontend/test/karma.conf.babel.js           |    7 +-
 .../frontend/test/protractor.conf.js            |   16 +-
 .../frontend/test/unit/JavaTransformer.test.js  |    2 +-
 .../frontend/test/unit/JavaTypes.test.js        |  137 +-
 .../frontend/test/unit/SharpTransformer.test.js |    2 +-
 .../test/unit/SpringTransformer.test.js         |    2 +-
 .../frontend/test/unit/SqlTypes.test.js         |    7 +-
 .../frontend/test/unit/UserAuth.test.js         |    4 +-
 .../frontend/test/unit/Version.test.js          |    1 +
 .../test/unit/defaultName.filter.test.js        |   27 +-
 modules/web-console/frontend/views/403.jade     |   22 -
 modules/web-console/frontend/views/403.pug      |   22 +
 modules/web-console/frontend/views/404.jade     |   22 -
 modules/web-console/frontend/views/404.pug      |   22 +
 modules/web-console/frontend/views/base.jade    |   22 -
 modules/web-console/frontend/views/base.pug     |   22 +
 .../frontend/views/configuration/caches.jade    |   55 -
 .../frontend/views/configuration/caches.tpl.pug |   55 +
 .../frontend/views/configuration/clusters.jade  |   68 -
 .../views/configuration/clusters.tpl.pug        |   68 +
 .../views/configuration/domains-import.jade     |  170 --
 .../views/configuration/domains-import.tpl.pug  |  170 ++
 .../frontend/views/configuration/domains.jade   |   66 -
 .../views/configuration/domains.tpl.pug         |   66 +
 .../frontend/views/configuration/igfs.jade      |   51 -
 .../frontend/views/configuration/igfs.tpl.pug   |   51 +
 .../frontend/views/configuration/sidebar.jade   |   29 -
 .../views/configuration/sidebar.tpl.pug         |   29 +
 .../summary-project-structure.jade              |   27 -
 .../summary-project-structure.tpl.pug           |   28 +
 .../views/configuration/summary-tabs.jade       |   25 -
 .../views/configuration/summary-tabs.pug        |   25 +
 .../frontend/views/configuration/summary.jade   |   90 -
 .../views/configuration/summary.tpl.pug         |   90 +
 .../frontend/views/includes/footer.jade         |   23 -
 .../frontend/views/includes/footer.pug          |   23 +
 .../frontend/views/includes/header.jade         |   52 -
 .../frontend/views/includes/header.pug          |   52 +
 modules/web-console/frontend/views/index.jade   |   47 -
 modules/web-console/frontend/views/index.pug    |   47 +
 modules/web-console/frontend/views/reset.jade   |   48 -
 .../web-console/frontend/views/reset.tpl.pug    |   48 +
 .../frontend/views/settings/admin.jade          |   25 -
 .../frontend/views/settings/admin.tpl.pug       |   25 +
 .../frontend/views/settings/profile.jade        |   76 -
 .../frontend/views/settings/profile.tpl.pug     |   76 +
 modules/web-console/frontend/views/signin.jade  |  163 --
 .../web-console/frontend/views/signin.tpl.pug   |  163 ++
 .../frontend/views/sql/cache-metadata.jade      |   40 -
 .../frontend/views/sql/cache-metadata.tpl.pug   |   40 +
 .../frontend/views/sql/chart-settings.jade      |   40 -
 .../frontend/views/sql/chart-settings.tpl.pug   |   40 +
 .../frontend/views/sql/notebook-new.jade        |   33 -
 .../frontend/views/sql/notebook-new.tpl.pug     |   33 +
 .../frontend/views/sql/paragraph-rate.jade      |   31 -
 .../frontend/views/sql/paragraph-rate.tpl.pug   |   31 +
 modules/web-console/frontend/views/sql/sql.jade |  278 ---
 .../web-console/frontend/views/sql/sql.tpl.pug  |  278 +++
 .../views/templates/agent-download.jade         |   50 -
 .../views/templates/agent-download.tpl.pug      |   50 +
 .../frontend/views/templates/alert.jade         |   21 -
 .../frontend/views/templates/alert.tpl.pug      |   21 +
 .../frontend/views/templates/batch-confirm.jade |   34 -
 .../views/templates/batch-confirm.tpl.pug       |   34 +
 .../frontend/views/templates/clone.jade         |   39 -
 .../frontend/views/templates/clone.tpl.pug      |   39 +
 .../frontend/views/templates/confirm.jade       |   33 -
 .../frontend/views/templates/confirm.tpl.pug    |   33 +
 .../frontend/views/templates/demo-info.jade     |   47 -
 .../frontend/views/templates/demo-info.tpl.pug  |   47 +
 .../frontend/views/templates/dropdown.jade      |   24 -
 .../frontend/views/templates/dropdown.tpl.pug   |   24 +
 .../views/templates/getting-started.jade        |   34 -
 .../views/templates/getting-started.tpl.pug     |   34 +
 .../frontend/views/templates/message.jade       |   28 -
 .../frontend/views/templates/message.tpl.pug    |   28 +
 .../frontend/views/templates/pagination.jade    |   32 -
 .../frontend/views/templates/select.jade        |   26 -
 .../frontend/views/templates/select.tpl.pug     |   26 +
 .../views/templates/validation-error.jade       |   25 -
 .../views/templates/validation-error.tpl.pug    |   25 +
 .../demo/service/DemoCachesLoadService.java     |   26 +
 modules/yardstick/config/ignite-base-config.xml |   25 +
 .../yardstick/cache/IgniteGetAllBenchmark.java  |   42 +
 .../cache/IgniteGetAllOffHeapBenchmark.java     |   30 +
 .../yardstick/cache/IgniteGetBenchmark.java     |   35 +
 .../cache/IgnitePutAllOffHeapBenchmark.java     |   30 +
 .../cache/IgnitePutAllTxOffHeapBenchmark.java   |   30 +
 .../IgnitePutOffHeapIndexedValue8Benchmark.java |   30 +
 .../IgnitePutRandomValueSizeBenchmark.java      |   41 +
 modules/zeromq/README.txt                       |   37 +
 modules/zeromq/licenses/apache-2.0.txt          |  202 +++
 modules/zeromq/pom.xml                          |   75 +
 .../stream/zeromq/IgniteZeroMqStreamer.java     |  146 ++
 .../ignite/stream/zeromq/ZeroMqTypeSocket.java  |   56 +
 .../ignite/stream/zeromq/package-info.java      |   21 +
 .../stream/zeromq/IgniteZeroMqStreamerTest.java |  235 +++
 .../zeromq/IgniteZeroMqStreamerTestSuite.java   |   37 +
 .../ZeroMqStringSingleTupleExtractor.java       |   46 +
 .../ignite/stream/zeromq/package-info.java      |   21 +
 parent/pom.xml                                  |    6 +-
 pom.xml                                         |    1 +
 579 files changed, 20658 insertions(+), 12042 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
index 4773e3b,1ad2a0f..fb5627e
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
@@@ -195,8 -191,9 +195,11 @@@ public class BinaryContext 
          sysClss.add(GridClosureProcessor.C4V2.class.getName());
          sysClss.add(GridClosureProcessor.C4MLAV2.class.getName());
  
 +        sysClss.add(IgniteUuid.class.getName());
 +
+         // BinaryUtils.FIELDS_SORTED_ORDER support, since it uses TreeMap at BinaryMetadata.
+         sysClss.add(BinaryTreeMap.class.getName());
+ 
          if (BinaryUtils.wrapTrees()) {
              sysClss.add(TreeMap.class.getName());
              sysClss.add(TreeSet.class.getName());

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 176178c,17060fb..1069e55
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@@ -17,11 -17,11 +17,14 @@@
  
  package org.apache.ignite.internal.processors.query;
  
 +import java.sql.PreparedStatement;
 +import java.sql.SQLException;
 +import java.util.concurrent.TimeUnit;
+ import java.lang.reflect.Field;
  import java.lang.reflect.Method;
  import java.math.BigDecimal;
+ import java.sql.PreparedStatement;
+ import java.sql.SQLException;
  import java.sql.Time;
  import java.sql.Timestamp;
  import java.util.ArrayList;
@@@ -33,12 -35,20 +36,15 @@@ import java.util.LinkedHashMap
  import java.util.List;
  import java.util.Map;
  import java.util.Set;
 -import java.util.TreeSet;
  import java.util.UUID;
  import java.util.concurrent.ConcurrentMap;
+ import java.util.concurrent.ExecutorService;
+ import java.util.concurrent.TimeUnit;
  import javax.cache.Cache;
  import javax.cache.CacheException;
  import org.apache.ignite.IgniteCheckedException;
+ import org.apache.ignite.IgniteDataStreamer;
  import org.apache.ignite.IgniteException;
 -import org.apache.ignite.binary.BinaryField;
 -import org.apache.ignite.binary.BinaryObject;
 -import org.apache.ignite.binary.BinaryObjectBuilder;
 -import org.apache.ignite.binary.BinaryType;
  import org.apache.ignite.binary.Binarylizable;
  import org.apache.ignite.cache.CacheTypeMetadata;
  import org.apache.ignite.cache.QueryEntity;
@@@ -747,16 -855,13 +748,13 @@@ public class GridQueryProcessor extend
  
          try {
              return executeQuery(GridCacheQueryType.SQL, qry.getSql(), cctx,
-                 new IgniteOutClosureX<Iterator<Cache.Entry<K, V>>>() {
-                     @Override public Iterator<Cache.Entry<K, V>> applyx() throws IgniteCheckedException {
-                         String space = cctx.name();
+                 new IgniteOutClosureX<QueryCursor<Cache.Entry<K, V>>>() {
+                     @Override public QueryCursor<Cache.Entry<K, V>> applyx() throws IgniteCheckedException {
                          String type = qry.getType();
-                         String sqlQry = qry.getSql();
-                         Object[] params = qry.getArgs();
  
 -                        GridQueryProcessor.TypeDescriptor typeDesc = typesByName.get(
 -                            new GridQueryProcessor.TypeName(
 -                                cctx.name(),
 +                        QueryTypeDescriptorImpl typeDesc = typesByName.get(
 +                            new QueryTypeNameKey(
 +                                space,
                                  type));
  
                          if (typeDesc == null || !typeDesc.registered())

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index 986fff7,99146aa..4be7f10
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@@ -1586,14 -1586,9 +1586,14 @@@ public class GridServiceProcessor exten
                          if (!((CacheAffinityChangeMessage)msg).exchangeNeeded())
                              return;
                      }
 +
 +                    if (msg instanceof MappingProposedMessage || msg instanceof MappingAcceptedMessage)
 +                        return;
 +
 +                    topVer = ((DiscoveryCustomEvent)evt).affinityTopologyVersion();
                  }
                  else
-                     topVer = new AffinityTopologyVersion(((DiscoveryEvent)evt).topologyVersion(), 0);
+                     topVer = new AffinityTopologyVersion((evt).topologyVersion(), 0);
  
                  depExe.execute(new BusyRunnable() {
                      @Override public void run0() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index 2664505,30c6976..30c6976
mode 100755,100644..100755
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffleJob.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DmlStatementsProcessor.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DmlStatementsProcessor.java
index 7995083,60bc483..9ab7704
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DmlStatementsProcessor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DmlStatementsProcessor.java
@@@ -830,43 -935,44 +919,65 @@@ public class DmlStatementsProcessor 
       * @throws IgniteCheckedException if failed.
       */
      @SuppressWarnings({"unchecked", "ConstantConditions", "ResultOfMethodCallIgnored"})
 -    private IgniteBiTuple<?, ?> rowToKeyValue(GridCacheContext cctx, Object[] row, String[] cols,
 -        int[] colTypes, KeyValueSupplier keySupplier, KeyValueSupplier valSupplier, int keyColIdx, int valColIdx,
 -        GridH2RowDescriptor rowDesc) throws IgniteCheckedException {
 +    private IgniteBiTuple<?, ?> rowToKeyValue(GridCacheContext cctx, List<?> row, UpdatePlan plan)
 +        throws IgniteCheckedException {
++        GridH2RowDescriptor rowDesc = plan.tbl.rowDescriptor();
+         GridQueryTypeDescriptor desc = rowDesc.type();
+ 
 -        Object key = keySupplier.apply(F.asList(row));
 +        Object key = plan.keySupplier.apply(row);
+ 
+         if (GridQueryProcessor.isSqlType(desc.keyClass())) {
+             assert keyColIdx != -1;
+ 
 -            key = convert(key, rowDesc, desc.keyClass(), colTypes[keyColIdx]);
++            key = convert(key, rowDesc, desc.keyClass(), plan.colTypes[keyColIdx]);
+         }
+ 
 -        Object val = valSupplier.apply(F.asList(row));
 +        Object val = plan.valSupplier.apply(row);
  
+         if (GridQueryProcessor.isSqlType(desc.valueClass())) {
+             assert valColIdx != -1;
+ 
 -            val = convert(val, rowDesc, desc.valueClass(), colTypes[valColIdx]);
++            val = convert(val, rowDesc, desc.valueClass(), plan.colTypes[valColIdx]);
+         }
+ 
          if (key == null)
              throw new IgniteSQLException("Key for INSERT or MERGE must not be null",  IgniteQueryErrorCode.NULL_KEY);
  
          if (val == null)
              throw new IgniteSQLException("Value for INSERT or MERGE must not be null", IgniteQueryErrorCode.NULL_VALUE);
  
-         GridQueryTypeDescriptor desc = plan.tbl.rowDescriptor().type();
- 
 -        for (int i = 0; i < cols.length; i++) {
 -            if (i == keyColIdx || i == valColIdx)
 +        Map<String, Object> newColVals = new HashMap<>();
 +
 +        for (int i = 0; i < plan.colNames.length; i++) {
 +            if (i == plan.keyColIdx || i == plan.valColIdx)
                  continue;
  
-             newColVals.put(plan.colNames[i], convert(row.get(i), plan.colNames[i],
-                 plan.tbl.rowDescriptor(), plan.colTypes[i]));
 -            GridQueryProperty prop = desc.property(cols[i]);
++            String colName = plan.colNames[i];
++
++            GridQueryProperty prop = desc.property(colName);
+ 
+             assert prop != null;
+ 
+             Class<?> expCls = prop.type();
+ 
 -            desc.setValue(cols[i], key, val, convert(row[i], rowDesc, expCls, colTypes[i]));
++            newColVals.put(colName, convert(row.get(i), plan.colNames[i],
++                rowDesc, expCls, plan.colTypes[i]));
 +        }
 +
 +        // We update columns in the order specified by the table for a reason - table's
 +        // column order preserves their precedence for correct update of nested properties.
 +        Column[] cols = plan.tbl.getColumns();
 +
 +        // First 2 columns are _key and _val, skip 'em.
 +        for (int i = 2; i < cols.length; i++) {
 +            String colName = cols[i].getName();
 +
 +            if (!newColVals.containsKey(colName))
 +                continue;
 +
 +            Object colVal = newColVals.get(colName);
 +
 +            desc.setValue(colName, key, val, colVal);
          }
  
          if (cctx.binaryMarshaller()) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 2f8faa4,46fbb9e..a4e49e9
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@@ -185,6 -188,11 +189,8 @@@ import static org.apache.ignite.IgniteS
  import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.SQL;
  import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.SQL_FIELDS;
  import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.TEXT;
 -import static org.apache.ignite.internal.processors.query.GridQueryIndexType.FULLTEXT;
 -import static org.apache.ignite.internal.processors.query.GridQueryIndexType.GEO_SPATIAL;
 -import static org.apache.ignite.internal.processors.query.GridQueryIndexType.SORTED;
+ import static org.apache.ignite.internal.processors.query.h2.opt.DistributedJoinMode.OFF;
+ import static org.apache.ignite.internal.processors.query.h2.opt.DistributedJoinMode.distributedJoinMode;
  import static org.apache.ignite.internal.processors.query.h2.opt.GridH2AbstractKeyValueRow.KEY_COL;
  import static org.apache.ignite.internal.processors.query.h2.opt.GridH2QueryType.LOCAL;
  import static org.apache.ignite.internal.processors.query.h2.opt.GridH2QueryType.PREPARE;
@@@ -2603,9 -2826,9 +2811,9 @@@ public class IgniteH2Indexing implement
  
                          cols = treeIndexColumns(cols, keyCol, affCol);
  
-                         idxs.add(new GridH2TreeIndex(name, tbl, false, cols));
+                         idxs.add(createTreeIndex(name, tbl, false, cols));
                      }
 -                    else if (idx.type() == GEO_SPATIAL)
 +                    else if (idx.type() == QueryIndexType.GEOSPATIAL)
                          idxs.add(createH2SpatialIndex(tbl, name, cols.toArray(new IndexColumn[cols.size()])));
                      else
                          throw new IllegalStateException("Index type: " + idx.type());

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/dml/UpdatePlanBuilder.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
index 5669fd0,fc5eb4b..1ebfd60
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
@@@ -178,6 -185,31 +185,21 @@@ public abstract class GridH2IndexBase e
      }
  
      /**
+      * @return Index segment ID for current query context.
+      */
+     protected int threadLocalSegment() {
+         if(segmentsCount() == 1)
+             return 0;
+ 
+         GridH2QueryContext qctx = GridH2QueryContext.get();
+ 
+         if(qctx == null)
+             throw new IllegalStateException("GridH2QueryContext is not initialized.");
+ 
+         return qctx.segment();
+     }
+ 
+     /**
 -     * If the index supports rebuilding it has to creates its own copy.
 -     *
 -     * @return Rebuilt copy.
 -     * @throws InterruptedException If interrupted.
 -     */
 -    public GridH2IndexBase rebuild() throws InterruptedException {
 -        return this;
 -    }
 -
 -    /**
       * Put row if absent.
       *
       * @param row Row.

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index 33a6778,6416b21..4dcf331
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@@ -85,8 -86,12 +87,11 @@@ import static org.apache.ignite.events.
  import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_OBJECT_READ;
  import static org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion.NONE;
  import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.OWNING;
+ import static org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.setupConnection;
+ import static org.apache.ignite.internal.processors.query.h2.opt.DistributedJoinMode.OFF;
+ import static org.apache.ignite.internal.processors.query.h2.opt.DistributedJoinMode.distributedJoinMode;
  import static org.apache.ignite.internal.processors.query.h2.opt.GridH2QueryType.MAP;
  import static org.apache.ignite.internal.processors.query.h2.opt.GridH2QueryType.REPLICATED;
 -import static org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.QUERY_POOL;
  import static org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2ValueMessageFactory.toMessages;
  import static org.jsr166.ConcurrentLinkedHashMap.QueuePolicy.PER_SEGMENT_Q;
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractInsertSqlQuerySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInsertSqlQuerySelfTest.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInsertSqlQuerySelfTest.java
index f91f405,471b791..f48e80a
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInsertSqlQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInsertSqlQuerySelfTest.java
@@@ -17,8 -17,7 +17,9 @@@
  
  package org.apache.ignite.internal.processors.cache;
  
 +import java.util.ArrayList;
 +import java.util.Arrays;
+ import java.util.UUID;
  import java.util.concurrent.Callable;
  import javax.cache.CacheException;
  import org.apache.ignite.IgniteCache;
@@@ -208,20 -207,13 +209,33 @@@ public class IgniteCacheInsertSqlQueryS
      /**
       *
       */
+     public void testUuidHandling() {
+         IgniteCache<UUID, Integer> p = ignite(0).cache("U2I");
+ 
+         UUID id = UUID.randomUUID();
+ 
+         p.query(new SqlFieldsQuery("insert into Integer(_key, _val) values (?, ?)").setArgs(id, 1));
+ 
+         assertEquals(1, (int)p.get(id));
+     }
++
++    /**
++     *
++     */
 +    public void testNestedFieldsHandling() {
 +        IgniteCache<Integer, IgniteCacheUpdateSqlQuerySelfTest.AllTypes> p = ignite(0).cache("I2AT");
 +
 +        p.query(new SqlFieldsQuery("insert into AllTypes(_key, innerTypeCol, arrListCol, _val, innerStrCol) " +
 +            "values (1, ?, ?, ?, 'sss')") .setArgs(new IgniteCacheUpdateSqlQuerySelfTest.AllTypes.InnerType(50L),
 +            new ArrayList<>(Arrays.asList(3L, 2L, 1L)), new IgniteCacheUpdateSqlQuerySelfTest.AllTypes(1L)));
 +
 +        IgniteCacheUpdateSqlQuerySelfTest.AllTypes res = p.get(1);
 +
 +        IgniteCacheUpdateSqlQuerySelfTest.AllTypes.InnerType resInner = new IgniteCacheUpdateSqlQuerySelfTest.AllTypes.InnerType(50L);
 +
 +        resInner.innerStrCol = "sss";
 +        resInner.arrListCol = new ArrayList<>(Arrays.asList(3L, 2L, 1L));
 +
 +        assertEquals(resInner, res.innerTypeCol);
 +    }
  }

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 7bf3887,0c74f12..50519a8
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@@ -96,10 -96,11 +96,11 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.query.IgniteCacheQueryCacheDestroySelfTest;
  import org.apache.ignite.internal.processors.cache.query.IndexingSpiQuerySelfTest;
  import org.apache.ignite.internal.processors.cache.query.IndexingSpiQueryTxSelfTest;
 +import org.apache.ignite.internal.processors.query.IgniteSqlQueryDedicatedPoolTest;
  import org.apache.ignite.internal.processors.query.IgniteSqlEntryCacheModeAgnosticTest;
  import org.apache.ignite.internal.processors.query.IgniteSqlSchemaIndexingTest;
+ import org.apache.ignite.internal.processors.query.IgniteSqlSegmentedIndexSelfTest;
  import org.apache.ignite.internal.processors.query.IgniteSqlSplitterSelfTest;
 -import org.apache.ignite.internal.processors.query.h2.GridH2IndexRebuildTest;
  import org.apache.ignite.internal.processors.query.h2.GridH2IndexingInMemSelfTest;
  import org.apache.ignite.internal.processors.query.h2.GridH2IndexingOffheapSelfTest;
  import org.apache.ignite.internal.processors.query.h2.opt.GridH2TableSelfTest;

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/common/project/vs/common.vcxproj
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/common/project/vs/common.vcxproj
index ab9ce53,73a0fef..45ac15e
--- a/modules/platforms/cpp/common/project/vs/common.vcxproj
+++ b/modules/platforms/cpp/common/project/vs/common.vcxproj
@@@ -182,8 -182,6 +182,7 @@@
      <ClInclude Include="..\..\include\ignite\timestamp.h" />
      <ClInclude Include="..\..\os\win\include\ignite\common\common.h" />
      <ClInclude Include="..\..\os\win\include\ignite\common\concurrent_os.h" />
 +    <ClInclude Include="..\..\os\win\include\ignite\common\dynamic_load_os.h" />
-     <ClInclude Include="targetver.h" />
    </ItemGroup>
    <ItemGroup>
      <ClCompile Include="..\..\os\win\src\common\concurrent_os.cpp" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/common/project/vs/common.vcxproj.filters
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/core-test/Makefile.am
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
index 607b5a0,1b77c40..4d252b9
--- a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
+++ b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
@@@ -41,9 -45,8 +45,10 @@@
    <ItemGroup>
      <ClCompile Include="..\..\src\binary_object_test.cpp" />
      <ClCompile Include="..\..\src\binary_identity_resolver_test.cpp" />
+     <ClCompile Include="..\..\src\cache_store_test.cpp" />
      <ClCompile Include="..\..\src\cache_test.cpp" />
 +    <ClCompile Include="..\..\src\cluster_test.cpp" />
 +    <ClCompile Include="..\..\src\cache_invoke_test.cpp" />
      <ClCompile Include="..\..\src\concurrent_test.cpp" />
      <ClCompile Include="..\..\src\decimal_test.cpp" />
      <ClCompile Include="..\..\src\dynamic_size_array_test.cpp" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/core-test/src/binary_reader_writer_raw_test.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/core-test/src/interop_memory_test.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/core/include/ignite/cache/cache.h
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/core/include/ignite/cache/cache.h
index 36a0470,f179830..f9c442c
--- a/modules/platforms/cpp/core/include/ignite/cache/cache.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/cache.h
@@@ -30,20 -30,17 +30,20 @@@
  #include <ignite/common/concurrent.h>
  #include <ignite/ignite_error.h>
  
- #include "ignite/cache/cache_peek_mode.h"
- #include "ignite/cache/query/query_cursor.h"
- #include "ignite/cache/query/query_fields_cursor.h"
- #include "ignite/cache/query/query_scan.h"
- #include "ignite/cache/query/query_sql.h"
- #include "ignite/cache/query/query_text.h"
- #include "ignite/cache/query/query_sql_fields.h"
- #include "ignite/cache/query/continuous/continuous_query_handle.h"
- #include "ignite/cache/query/continuous/continuous_query.h"
- #include "ignite/impl/cache/cache_impl.h"
- #include "ignite/impl/cache/cache_entry_processor_holder.h"
- #include "ignite/impl/operations.h"
- #include "ignite/impl/module_manager.h"
- #include "ignite/ignite_error.h"
+ #include <ignite/cache/cache_peek_mode.h>
+ #include <ignite/cache/query/query_cursor.h>
+ #include <ignite/cache/query/query_fields_cursor.h>
+ #include <ignite/cache/query/query_scan.h>
+ #include <ignite/cache/query/query_sql.h>
+ #include <ignite/cache/query/query_text.h>
+ #include <ignite/cache/query/query_sql_fields.h>
+ #include <ignite/cache/query/continuous/continuous_query_handle.h>
+ #include <ignite/cache/query/continuous/continuous_query.h>
+ #include <ignite/impl/cache/cache_impl.h>
++#include <ignite/impl/cache/cache_entry_processor_holder.h>
+ #include <ignite/impl/operations.h>
++#include <ignite/impl/module_manager.h>
++#include <ignite/ignite_error.h>
  
  namespace ignite
  {

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/core/include/ignite/impl/cache/cache_impl.h
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
index a7a3094,f959f95..7ab6a6c
--- a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_target.h
@@@ -104,9 -110,19 +119,19 @@@ namespace ignit
                   * @param outOp Output.
                   * @param err Error.
                   */
 -                void OutInOpX(int32_t opType, InputOperation& inOp, OutputOperation& outOp, IgniteError* err);
 +                void OutInOpX(int32_t opType, InputOperation& inOp, OutputOperation& outOp, IgniteError& err);
  
                  /**
+                  * In stream out long operation.
+                  *
+                  * @param opType Type of operation.
+                  * @param outInMem Input and output memory.
+                  * @param err Error.
+                  * @return Operation result.
+                  */
+                 OperationResult InStreamOutLong(int32_t opType, InteropMemory& outInMem, IgniteError* err);
+ 
+                 /**
                  * Internal out-in operation.
                  *
                  * @param opType Operation type.

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
index 7b98f65,f439f76..a8c1c6b
--- a/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
@@@ -70,9 -70,9 +70,12 @@@ namespace ignit
              /** Operation: GetAndReplace. */
              const int32_t OP_GET_AND_REPLACE = 10;
  
 +            /** Operation: Invoke. */
 +            const int32_t OP_INVOKE = 12;
 +
+             /** Operation: LoadCache */
+             const int32_t OP_LOAD_CACHE = 15;
+ 
              /** Operation: LocalEvict. */
              const int32_t OP_LOCAL_EVICT = 16;
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1b2c014/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
index 0133894,32be8bc..1c7bb82
--- a/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
+++ b/modules/platforms/cpp/core/src/impl/interop/interop_target.cpp
@@@ -212,7 -172,26 +197,26 @@@ namespace ignit
                  }
              }
  
+             InteropTarget::OperationResult InteropTarget::InStreamOutLong(int32_t opType,
 -                InteropMemory& outInMem, IgniteError* err)
++                InteropMemory& outInMem, IgniteError& err)
+             {
+                 JniErrorInfo jniErr;
+ 
+                 int64_t outInPtr = outInMem.PointerLong();
+ 
+                 if (outInPtr)
+                 {
+                     int64_t res = env.Get()->Context()->TargetInStreamOutLong(javaRef, opType, outInPtr, &jniErr);
+ 
+                     IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+ 
+                     return static_cast<OperationResult>(res);
+                 }
+ 
+                 return ResultError;
+             }
+ 
 -            int64_t InteropTarget::OutInOpLong(int32_t opType, int64_t val, IgniteError* err)
 +            int64_t InteropTarget::OutInOpLong(int32_t opType, int64_t val, IgniteError& err)
              {
                  JniErrorInfo jniErr;
  


[28/50] [abbrv] ignite git commit: Merge branch 'ignite-1.9.1'

Posted by sb...@apache.org.
Merge branch 'ignite-1.9.1'


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

Branch: refs/heads/ignite-4705-2
Commit: de2a1588e89379277011a282e5b0b1aade83dc1e
Parents: 684dc7b 8362fe7
Author: Anton Vinogradov <av...@apache.org>
Authored: Fri Mar 3 12:33:14 2017 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Fri Mar 3 12:33:14 2017 +0300

----------------------------------------------------------------------
 .../managers/communication/GridIoManager.java   | 107 +++++++------------
 .../communication/GridIoManagerSelfTest.java    |   2 +-
 .../ant/beautifier/GridJavadocAntTask.java      |   1 +
 parent/pom.xml                                  |   3 +-
 4 files changed, 40 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/de2a1588/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------


[23/50] [abbrv] ignite git commit: Minor fixes.

Posted by sb...@apache.org.
Minor fixes.


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

Branch: refs/heads/ignite-4705-2
Commit: 684dc7be114c8acccf4dd196daca56c041d78a5c
Parents: 1080e68
Author: Andrey Novikov <an...@gridgain.com>
Authored: Thu Mar 2 16:36:43 2017 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Thu Mar 2 16:36:43 2017 +0700

----------------------------------------------------------------------
 .../internal/GridCacheRecreateLockTest.java     | 18 +++++++++-
 modules/web-console/backend/app/agent.js        | 36 ++++++++++++++++++++
 modules/web-console/backend/app/browser.js      | 28 +++++++++++++++
 .../frontend/app/modules/sql/sql.controller.js  |  1 -
 .../demo/service/DemoCachesLoadService.java     | 26 ++++++++++++++
 5 files changed, 107 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/684dc7be/modules/core/src/test/java/org/apache/ignite/internal/GridCacheRecreateLockTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCacheRecreateLockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCacheRecreateLockTest.java
index ae4ef87..24bb1c9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridCacheRecreateLockTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCacheRecreateLockTest.java
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
 package org.apache.ignite.internal;
 
 import org.apache.ignite.Ignite;
@@ -13,7 +30,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonTest;
  */
 @GridCommonTest(group = "Kernal Self")
 public class GridCacheRecreateLockTest extends GridCommonAbstractTest {
-
     /**
      * @throws IgniteCheckedException If failed.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/684dc7be/modules/web-console/backend/app/agent.js
----------------------------------------------------------------------
diff --git a/modules/web-console/backend/app/agent.js b/modules/web-console/backend/app/agent.js
index 4cae8ee..b4394b7 100644
--- a/modules/web-console/backend/app/agent.js
+++ b/modules/web-console/backend/app/agent.js
@@ -329,6 +329,42 @@ module.exports.factory = function(_, fs, path, JSZip, socketio, settings, mongo,
         }
 
         /**
+         * Collect running queries
+         * @param {Boolean} demo Is need run command on demo node.
+         * @param {Number} duration minimum duration time of running queries.
+         * @returns {Promise}
+         */
+        queryCollectRunning(demo, duration) {
+            const cmd = new Command(demo, 'exe')
+                .addParam('name', 'org.apache.ignite.internal.visor.compute.VisorGatewayTask')
+                .addParam('p1', '')
+                .addParam('p2', 'org.apache.ignite.internal.visor.query.VisorCollectRunningQueriesTask')
+                .addParam('p3', 'java.lang.Long')
+                .addParam('p4', duration);
+
+            return this.executeRest(cmd);
+        }
+
+        /**
+         * Cancel running query.
+         * @param {Boolean} demo Is need run command on demo node.
+         * @param {String} nid Node id.
+         * @param {Number} queryId query id to cancel.
+         * @returns {Promise}
+         */
+        queryCancel(demo, nid, queryId) {
+            const cmd = new Command(demo, 'exe')
+                .addParam('name', 'org.apache.ignite.internal.visor.compute.VisorGatewayTask')
+                .addParam('p1', nid)
+                .addParam('p2', 'org.apache.ignite.internal.visor.query.VisorCancelQueriesTask')
+                .addParam('p3', 'java.util.Collection')
+                .addParam('p4', 'java.lang.Long')
+                .addParam('p5', queryId);
+
+            return this.executeRest(cmd);
+        }
+
+        /**
          * @param {Boolean} demo Is need run command on demo node.
          * @param {String} cacheName Cache name.
          * @returns {Promise}

http://git-wip-us.apache.org/repos/asf/ignite/blob/684dc7be/modules/web-console/backend/app/browser.js
----------------------------------------------------------------------
diff --git a/modules/web-console/backend/app/browser.js b/modules/web-console/backend/app/browser.js
index 2b1285e..56f2acc 100644
--- a/modules/web-console/backend/app/browser.js
+++ b/modules/web-console/backend/app/browser.js
@@ -175,6 +175,34 @@ module.exports.factory = (_, socketio, agentMgr, configure) => {
                         .catch((err) => cb(_errorToJson(err)));
                 });
 
+                // Collect running queries from all nodes in grid.
+                socket.on('node:query:running', (duration, cb) => {
+                    agentMgr.findAgent(accountId())
+                        .then((agent) => agent.queryCollectRunning(demo, duration))
+                        .then((data) => {
+
+                            if (data.finished)
+                                return cb(null, data.result);
+
+                            cb(_errorToJson(data.error));
+                        })
+                        .catch((err) => cb(_errorToJson(err)));
+                });
+
+                // Cancel running query by query id on node.
+                socket.on('node:query:cancel', (nid, queryId, cb) => {
+                    agentMgr.findAgent(accountId())
+                        .then((agent) => agent.queryCancel(demo, nid, queryId))
+                        .then((data) => {
+
+                            if (data.finished)
+                                return cb(null, data.result);
+
+                            cb(_errorToJson(data.error));
+                        })
+                        .catch((err) => cb(_errorToJson(err)));
+                });
+
                 // Return cache metadata from all nodes in grid.
                 socket.on('node:cache:metadata', (cacheName, cb) => {
                     agentMgr.findAgent(accountId())

http://git-wip-us.apache.org/repos/asf/ignite/blob/684dc7be/modules/web-console/frontend/app/modules/sql/sql.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/sql/sql.controller.js b/modules/web-console/frontend/app/modules/sql/sql.controller.js
index e2ead13..c082d4e 100644
--- a/modules/web-console/frontend/app/modules/sql/sql.controller.js
+++ b/modules/web-console/frontend/app/modules/sql/sql.controller.js
@@ -20,7 +20,6 @@ import cacheMetadataTemplateUrl from 'views/sql/cache-metadata.tpl.pug';
 import chartSettingsTemplateUrl from 'views/sql/chart-settings.tpl.pug';
 import showQueryTemplateUrl from 'views/templates/message.tpl.pug';
 
-
 // Time line X axis descriptor.
 const TIME_LINE = {value: -1, type: 'java.sql.Date', label: 'TIME_LINE'};
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/684dc7be/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/service/DemoCachesLoadService.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/service/DemoCachesLoadService.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/service/DemoCachesLoadService.java
index fbfa2ae..5f7823b 100644
--- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/service/DemoCachesLoadService.java
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/service/DemoCachesLoadService.java
@@ -33,6 +33,7 @@ import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.cache.QueryIndexType;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
+import org.apache.ignite.cache.query.annotations.QuerySqlFunction;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.console.demo.AgentDemoUtils;
 import org.apache.ignite.console.demo.model.Car;
@@ -209,6 +210,7 @@ public class DemoCachesLoadService implements Service {
         ccfg.setQueryDetailMetricsSize(10);
         ccfg.setStartSize(100);
         ccfg.setStatisticsEnabled(true);
+        ccfg.setSqlFunctionClasses(SQLFunctions.class);
 
         return ccfg;
     }
@@ -453,4 +455,28 @@ public class DemoCachesLoadService implements Service {
         if (ignite.log().isDebugEnabled())
             ignite.log().debug("DEMO: Finished cars population.");
     }
+
+    /**
+     * Utility class with custom SQL functions.
+     */
+    public static class SQLFunctions {
+        /**
+         * Sleep function to simulate long running queries.
+         *
+         * @param x Time to sleep.
+         * @return Return specified argument.
+         */
+        @QuerySqlFunction
+        public static long sleep(long x) {
+            if (x >= 0)
+                try {
+                    Thread.sleep(x);
+                }
+                catch (InterruptedException ignored) {
+                    // No-op.
+                }
+
+            return x;
+        }
+    }
 }


[04/50] [abbrv] ignite git commit: Revert: ignite-3727 Support local listeners async execution for IgniteMessage.send

Posted by sb...@apache.org.
Revert: ignite-3727 Support local listeners async execution for IgniteMessage.send


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

Branch: refs/heads/ignite-4705-2
Commit: 9d811f1b56a07a463f9ca88535581097477929b2
Parents: bea863f
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Mar 1 19:20:18 2017 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Mar 1 19:20:18 2017 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteMessaging.java |  13 +-
 .../ignite/internal/IgniteMessagingImpl.java    |   8 +-
 .../internal/managers/GridManagerAdapter.java   |   2 +-
 .../managers/communication/GridIoManager.java   |  55 +-
 .../communication/GridIoManagerSelfTest.java    |   8 +-
 ...niteMessagingConfigVariationFullApiTest.java | 195 ++-----
 .../ignite/messaging/GridMessagingSelfTest.java | 116 +---
 .../messaging/IgniteMessagingSendAsyncTest.java | 544 -------------------
 .../ignite/testsuites/IgniteBasicTestSuite.java |   2 -
 .../hadoop/shuffle/HadoopShuffle.java           |   4 +-
 10 files changed, 77 insertions(+), 870 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9d811f1b/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java b/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java
index e64ded5..ff52ed8 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteMessaging.java
@@ -77,10 +77,6 @@ public interface IgniteMessaging extends IgniteAsyncSupport {
 
     /**
      * Sends given message with specified topic to the nodes in the underlying cluster group.
-     * <p>
-     * By default all local listeners will be executed in the calling thread, or if you use
-     * {@link #withAsync()}, listeners will execute in public thread pool (in this case it is user's
-     * responsibility to implement back-pressure and limit number of concurrently executed async messages).
      *
      * @param topic Topic to send to, {@code null} for default topic.
      * @param msg Message to send.
@@ -91,10 +87,6 @@ public interface IgniteMessaging extends IgniteAsyncSupport {
 
     /**
      * Sends given messages with the specified topic to the nodes in the underlying cluster group.
-     * <p>
-     * By default all local listeners will be executed in the calling thread, or if you use
-     * {@link #withAsync()}, listeners will execute in public thread pool (in this case it is user's
-     * responsibility to implement back-pressure and limit number of concurrently executed async messages).
      *
      * @param topic Topic to send to, {@code null} for default topic.
      * @param msgs Messages to send. Order of the sending is undefined. If the method produces
@@ -107,8 +99,7 @@ public interface IgniteMessaging extends IgniteAsyncSupport {
     /**
      * Sends given message with specified topic to the nodes in the underlying cluster group. Messages sent with
      * this method will arrive in the same order they were sent. Note that if a topic is used
-     * for ordered messages, then it cannot be reused for non-ordered messages. Note that local listeners
-     * are always executed in public thread pool, no matter default or {@link #withAsync()} mode is used.
+     * for ordered messages, then it cannot be reused for non-ordered messages.
      * <p>
      * The {@code timeout} parameter specifies how long an out-of-order message will stay in a queue,
      * waiting for messages that are ordered ahead of it to arrive. If timeout expires, then all ordered
@@ -171,4 +162,4 @@ public interface IgniteMessaging extends IgniteAsyncSupport {
 
     /** {@inheritDoc} */
     @Override IgniteMessaging withAsync();
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d811f1b/modules/core/src/main/java/org/apache/ignite/internal/IgniteMessagingImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteMessagingImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteMessagingImpl.java
index 541fad4..6b33aa5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteMessagingImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteMessagingImpl.java
@@ -86,7 +86,7 @@ public class IgniteMessagingImpl extends AsyncSupportAdapter<IgniteMessaging>
             if (snapshot.isEmpty())
                 throw U.emptyTopologyException();
 
-            ctx.io().sendUserMessage(snapshot, msg, topic, false, 0, isAsync());
+            ctx.io().sendUserMessage(snapshot, msg, topic, false, 0);
         }
         catch (IgniteCheckedException e) {
             throw U.convertException(e);
@@ -111,7 +111,7 @@ public class IgniteMessagingImpl extends AsyncSupportAdapter<IgniteMessaging>
             for (Object msg : msgs) {
                 A.notNull(msg, "msg");
 
-                ctx.io().sendUserMessage(snapshot, msg, topic, false, 0, isAsync());
+                ctx.io().sendUserMessage(snapshot, msg, topic, false, 0);
             }
         }
         catch (IgniteCheckedException e) {
@@ -137,7 +137,7 @@ public class IgniteMessagingImpl extends AsyncSupportAdapter<IgniteMessaging>
             if (timeout == 0)
                 timeout = ctx.config().getNetworkTimeout();
 
-            ctx.io().sendUserMessage(snapshot, msg, topic, true, timeout, false);
+            ctx.io().sendUserMessage(snapshot, msg, topic, true, timeout);
         }
         catch (IgniteCheckedException e) {
             throw U.convertException(e);
@@ -254,4 +254,4 @@ public class IgniteMessagingImpl extends AsyncSupportAdapter<IgniteMessaging>
     protected Object readResolve() throws ObjectStreamException {
         return prj.message();
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d811f1b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
index 5992eda..584cc56 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
@@ -390,7 +390,7 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements GridMan
                             if (msg instanceof Message)
                                 ctx.io().send(node, topic, (Message)msg, SYSTEM_POOL);
                             else
-                                ctx.io().sendUserMessage(Collections.singletonList(node), msg, topic, false, 0, false);
+                                ctx.io().sendUserMessage(Collections.singletonList(node), msg, topic, false, 0);
                         }
                         catch (IgniteCheckedException e) {
                             throw unwrapException(e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d811f1b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index 84b4543..7ef7bc0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -785,8 +785,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 finally {
                     threadProcessingMessage(false);
 
-                    if (msgC != null)
-                        msgC.run();
+                    msgC.run();
                 }
             }
 
@@ -1238,7 +1237,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param timeout Timeout.
      * @param skipOnTimeout Whether message can be skipped on timeout.
      * @param ackC Ack closure.
-     * @param async If {@code true} message for local node will be processed in pool, otherwise in current thread.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
     private void send(
@@ -1250,8 +1248,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         boolean ordered,
         long timeout,
         boolean skipOnTimeout,
-        IgniteInClosure<IgniteException> ackC,
-        boolean async
+        IgniteInClosure<IgniteException> ackC
     ) throws IgniteCheckedException {
         assert node != null;
         assert topic != null;
@@ -1269,11 +1266,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
             if (ordered)
                 processOrderedMessage(locNodeId, ioMsg, plc, null);
-            else if (async) {
-                assert msg instanceof GridIoUserMessage : ioMsg; // Async execution was added only for IgniteMessaging.
-
-                processRegularMessage(locNodeId, ioMsg, plc, null);
-            }
             else
                 processRegularMessage0(ioMsg, locNodeId);
 
@@ -1331,7 +1323,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         if (node == null)
             throw new IgniteCheckedException("Failed to send message to node (has node left grid?): " + nodeId);
 
-        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, null, false);
+        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, null);
     }
 
     /**
@@ -1343,7 +1335,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      */
     public void send(ClusterNode node, Object topic, Message msg, byte plc)
         throws IgniteCheckedException {
-        send(node, topic, -1, msg, plc, false, 0, false, null, false);
+        send(node, topic, -1, msg, plc, false, 0, false, null);
     }
 
     /**
@@ -1351,12 +1343,11 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param topic Topic to send the message to.
      * @param msg Message to send.
      * @param plc Type of processing.
-     * @param async Async flag.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
-    public void send(ClusterNode node, GridTopic topic, Message msg, byte plc, boolean async)
+    public void send(ClusterNode node, GridTopic topic, Message msg, byte plc)
         throws IgniteCheckedException {
-        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, null, async);
+        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, null);
     }
 
     /**
@@ -1369,7 +1360,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      */
     public void send(ClusterNode node, Object topic, int topicOrd, Message msg, byte plc)
         throws IgniteCheckedException {
-        send(node, topic, topicOrd, msg, plc, false, 0, false, null, false);
+        send(node, topic, topicOrd, msg, plc, false, 0, false, null);
     }
 
     /**
@@ -1391,7 +1382,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     ) throws IgniteCheckedException {
         assert timeout > 0 || skipOnTimeout;
 
-        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, null, false);
+        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, null);
     }
 
     /**
@@ -1418,7 +1409,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         if (node == null)
             throw new IgniteCheckedException("Failed to send message to node (has node left grid?): " + nodeId);
 
-        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, null, false);
+        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, null);
     }
 
     /**
@@ -1431,7 +1422,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      */
     public void send(ClusterNode node, GridTopic topic, Message msg, byte plc,
         IgniteInClosure<IgniteException> ackC) throws IgniteCheckedException {
-        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, ackC, false);
+        send(node, topic, topic.ordinal(), msg, plc, false, 0, false, ackC);
     }
 
     /**
@@ -1467,7 +1458,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      */
     public void send(ClusterNode node, Object topic, Message msg, byte plc, IgniteInClosure<IgniteException> ackC)
         throws IgniteCheckedException {
-        send(node, topic, -1, msg, plc, false, 0, false, ackC, false);
+        send(node, topic, -1, msg, plc, false, 0, false, ackC);
     }
 
     /**
@@ -1523,10 +1514,10 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     ) throws IgniteCheckedException {
         assert timeout > 0 || skipOnTimeout;
 
-        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, ackC, false);
+        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, ackC);
     }
 
-    /**
+     /**
      * Sends a peer deployable user message.
      *
      * @param nodes Destination nodes.
@@ -1534,7 +1525,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
     public void sendUserMessage(Collection<? extends ClusterNode> nodes, Object msg) throws IgniteCheckedException {
-        sendUserMessage(nodes, msg, null, false, 0, false);
+        sendUserMessage(nodes, msg, null, false, 0);
     }
 
     /**
@@ -1545,12 +1536,11 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
      * @param topic Message topic to use.
      * @param ordered Is message ordered?
      * @param timeout Message timeout in milliseconds for ordered messages.
-     * @param async Async flag.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
     @SuppressWarnings("ConstantConditions")
     public void sendUserMessage(Collection<? extends ClusterNode> nodes, Object msg,
-        @Nullable Object topic, boolean ordered, long timeout, boolean async) throws IgniteCheckedException {
+        @Nullable Object topic, boolean ordered, long timeout) throws IgniteCheckedException {
         boolean loc = nodes.size() == 1 && F.first(nodes).id().equals(locNodeId);
 
         byte[] serMsg = null;
@@ -1595,7 +1585,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         if (ordered)
             sendOrderedMessage(nodes, TOPIC_COMM_USER, ioMsg, PUBLIC_POOL, timeout, true);
         else if (loc)
-            send(F.first(nodes), TOPIC_COMM_USER, ioMsg, PUBLIC_POOL, async);
+            send(F.first(nodes), TOPIC_COMM_USER, ioMsg, PUBLIC_POOL);
         else {
             ClusterNode locNode = F.find(nodes, null, F.localNode(locNodeId));
 
@@ -1604,11 +1594,10 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             if (!rmtNodes.isEmpty())
                 send(rmtNodes, TOPIC_COMM_USER, ioMsg, PUBLIC_POOL);
 
-            // Will call local listeners in current thread synchronously or through pool,
-            // depending async flag, so must go the last
+            // Will call local listeners in current thread synchronously, so must go the last
             // to allow remote nodes execute the requested operation in parallel.
             if (locNode != null)
-                send(locNode, TOPIC_COMM_USER, ioMsg, PUBLIC_POOL, async);
+                send(locNode, TOPIC_COMM_USER, ioMsg, PUBLIC_POOL);
         }
     }
 
@@ -1675,7 +1664,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         if (node == null)
             throw new IgniteCheckedException("Failed to send message to node (has node left grid?): " + nodeId);
 
-        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, ackC, false);
+        send(node, topic, (byte)-1, msg, plc, true, timeout, skipOnTimeout, ackC);
     }
 
     /**
@@ -1712,7 +1701,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             // messages to one node vs. many.
             if (!nodes.isEmpty()) {
                 for (ClusterNode node : nodes)
-                    send(node, topic, topicOrd, msg, plc, ordered, timeout, skipOnTimeout, null, false);
+                    send(node, topic, topicOrd, msg, plc, ordered, timeout, skipOnTimeout, null);
             }
             else if (log.isDebugEnabled())
                 log.debug("Failed to send message to empty nodes collection [topic=" + topic + ", msg=" +
@@ -1940,7 +1929,8 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         if (rmv && log.isDebugEnabled())
             log.debug("Removed message listener [topic=" + topic + ", lsnr=" + lsnr + ']');
 
-        if (lsnr instanceof ArrayListener) {
+        if (lsnr instanceof ArrayListener)
+        {
             for (GridMessageListener childLsnr : ((ArrayListener)lsnr).arr)
                 closeListener(childLsnr);
         }
@@ -1952,7 +1942,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
     /**
      * Closes a listener, if applicable.
-     *
      * @param lsnr Listener.
      */
     private void closeListener(GridMessageListener lsnr) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d811f1b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
index f5499d3..2039d81 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java
@@ -145,7 +145,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
         GridIoManager ioMgr = spy(new TestGridIoManager(ctx));
 
         try {
-            ioMgr.sendUserMessage(F.asList(locNode, rmtNode), msg, GridTopic.TOPIC_IGFS, false, 123L, false);
+            ioMgr.sendUserMessage(F.asList(locNode, rmtNode), msg, GridTopic.TOPIC_IGFS, false, 123L);
         }
         catch (IgniteCheckedException ignored) {
             // No-op. We are using mocks so real sending is impossible.
@@ -169,7 +169,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
         GridIoManager ioMgr = spy(new TestGridIoManager(ctx));
 
         try {
-            ioMgr.sendUserMessage(F.asList(locNode, rmtNode), msg, GridTopic.TOPIC_IGFS, true, 123L, false);
+            ioMgr.sendUserMessage(F.asList(locNode, rmtNode), msg, GridTopic.TOPIC_IGFS, true, 123L);
         }
         catch (Exception ignored) {
             // No-op. We are using mocks so real sending is impossible.
@@ -196,7 +196,7 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void send(ClusterNode node, GridTopic topic, Message msg, byte plc, boolean async)
+        @Override public void send(ClusterNode node, GridTopic topic, Message msg, byte plc)
             throws IgniteCheckedException {
             // No-op.
         }
@@ -257,4 +257,4 @@ public class GridIoManagerSelfTest extends GridCommonAbstractTest {
             return 0;
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d811f1b/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java
index 49aab10..31b0663 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/messaging/IgniteMessagingConfigVariationFullApiTest.java
@@ -58,18 +58,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
     public void testLocalServer() throws Exception {
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                localServerInternal(false);
-            }
-        });
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testLocalServerAsync() throws Exception {
-        runInAllDataModes(new TestRunnable() {
-            @Override public void run() throws Exception {
-                localServerInternal(true);
+                localServerInternal();
             }
         });
     }
@@ -94,21 +83,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                serverClientMessage(false);
-            }
-        });
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testServerClientMessageAsync() throws Exception {
-        if (!testsCfg.withClients())
-            return;
-
-        runInAllDataModes(new TestRunnable() {
-            @Override public void run() throws Exception {
-                serverClientMessage(true);
+                serverClientMessage();
             }
         });
     }
@@ -122,21 +97,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                clientClientMessage(false);
-            }
-        });
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClientClientMessageAsync() throws Exception {
-        if (!testsCfg.withClients())
-            return;
-
-        runInAllDataModes(new TestRunnable() {
-            @Override public void run() throws Exception {
-                clientClientMessage(true);
+                clientClientMessage();
             }
         });
     }
@@ -150,21 +111,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                clientServerMessage(false);
-            }
-        });
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClientServerMessageAsync() throws Exception {
-        if (!testsCfg.withClients())
-            return;
-
-        runInAllDataModes(new TestRunnable() {
-            @Override public void run() throws Exception {
-                clientServerMessage(true);
+                clientServerMessage();
             }
         });
     }
@@ -186,18 +133,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
     public void testOrderedMessage() throws Exception {
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                orderedMessage(false);
-            }
-        });
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOrderedMessageAsync() throws Exception {
-        runInAllDataModes(new TestRunnable() {
-            @Override public void run() throws Exception {
-                orderedMessage(true);
+                orderedMessage();
             }
         });
     }
@@ -211,7 +147,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                clientServerOrderedMessage(false);
+                clientServerOrderedMessage();
             }
         });
     }
@@ -219,42 +155,13 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
     /**
      * @throws Exception If failed.
      */
-    public void testClientServerOrderedMessageAsync() throws Exception {
-        if (!testsCfg.withClients())
-            return;
-
-        runInAllDataModes(new TestRunnable() {
-            @Override public void run() throws Exception {
-                clientServerOrderedMessage(true);
-            }
-        });
-    }
-
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testClientClientOrderedMessage() throws Exception {
         if (!testsCfg.withClients())
             return;
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                clientClientOrderedMessage(false);
-            }
-        });
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClientClientOrderedMessageAsync() throws Exception {
-        if (!testsCfg.withClients())
-            return;
-
-        runInAllDataModes(new TestRunnable() {
-            @Override public void run() throws Exception {
-                clientClientOrderedMessage(true);
+                clientClientOrderedMessage();
             }
         });
     }
@@ -268,32 +175,16 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         runInAllDataModes(new TestRunnable() {
             @Override public void run() throws Exception {
-                serverClientOrderedMessage(false);
-            }
-        });
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testServerClientOrderedMessageAsync() throws Exception {
-        if (!testsCfg.withClients())
-            return;
-
-        runInAllDataModes(new TestRunnable() {
-            @Override public void run() throws Exception {
-                serverClientOrderedMessage(true);
+                serverClientOrderedMessage();
             }
         });
     }
 
     /**
      * Single server test.
-     *
-     * @param async Async message send flag.
      * @throws Exception If failed.
      */
-    private void localServerInternal(boolean async) throws Exception {
+    private void localServerInternal() throws Exception {
         int messages = MSGS;
 
         Ignite ignite = grid(SERVER_NODE_IDX);
@@ -306,7 +197,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         try {
             for (int i = 0; i < messages; i++)
-                sendMessage(ignite, grp, value(i), async);
+                sendMessage(ignite, grp, value(i));
 
             assertTrue(LATCH.await(10, TimeUnit.SECONDS));
 
@@ -347,59 +238,52 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
     /**
      * Server sends a message and client receives it.
-     *
-     * @param async Async message send flag.
      * @throws Exception If failed.
      */
-    private void serverClientMessage(boolean async) throws Exception {
+    private void serverClientMessage() throws Exception {
         Ignite ignite = grid(SERVER_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forClients();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendMessages(ignite, grp, async);
+        registerListenerAndSendMessages(ignite, grp);
     }
 
     /**
      * Client sends a message and client receives it.
-     *
-     * @param async Async message send flag.
      * @throws Exception If failed.
      */
-    private void clientClientMessage(boolean async) throws Exception {
+    private void clientClientMessage() throws Exception {
         Ignite ignite = grid(CLIENT_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forClients();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendMessages(ignite, grp, async);
+        registerListenerAndSendMessages(ignite, grp);
     }
 
     /**
      * Client sends a message and client receives it.
-     *
-     * @param async Async message send flag.
      * @throws Exception If failed.
      */
-    private void clientServerMessage(boolean async) throws Exception {
+    private void clientServerMessage() throws Exception {
         Ignite ignite = grid(CLIENT_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forServers();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendMessages(ignite, grp, async);
+        registerListenerAndSendMessages(ignite, grp);
     }
 
     /**
      * @param ignite Ignite.
      * @param grp Cluster group.
-     * @param async Async message send flag.
      * @throws Exception If fail.
      */
-    private void registerListenerAndSendMessages(Ignite ignite, ClusterGroup grp, boolean async) throws Exception {
+    private void registerListenerAndSendMessages(Ignite ignite, ClusterGroup grp) throws Exception {
         int messages = MSGS;
 
         LATCH = new CountDownLatch(grp.nodes().size() * messages);
@@ -408,7 +292,7 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
 
         try {
             for (int i = 0; i < messages; i++)
-                sendMessage(ignite, grp, value(i), async);
+                sendMessage(ignite, grp, value(i));
 
             assertTrue(LATCH.await(10, TimeUnit.SECONDS));
 
@@ -451,68 +335,67 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
     }
 
     /**
-     * @param async Async message send flag.
+     *
      * @throws Exception If fail.
      */
-    private void orderedMessage(boolean async) throws Exception {
+    private void orderedMessage() throws Exception {
         Ignite ignite = grid(SERVER_NODE_IDX);
 
         ClusterGroup grp = gridCount() > 1 ? ignite.cluster().forRemotes() : ignite.cluster().forLocal();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendOrderedMessages(ignite, grp, async);
+        registerListenerAndSendOrderedMessages(ignite, grp);
     }
 
     /**
-     * @param async Async message send flag.
+     *
      * @throws Exception If fail.
      */
-    private void clientServerOrderedMessage(boolean async) throws Exception {
+    private void clientServerOrderedMessage() throws Exception {
         Ignite ignite = grid(CLIENT_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forServers();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendOrderedMessages(ignite, grp, async);
+        registerListenerAndSendOrderedMessages(ignite, grp);
     }
 
     /**
-     * @param async Async message send flag.
+     *
      * @throws Exception If fail.
      */
-    private void clientClientOrderedMessage(boolean async) throws Exception {
+    private void clientClientOrderedMessage() throws Exception {
         Ignite ignite = grid(CLIENT_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forClients();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendOrderedMessages(ignite, grp, async);
+        registerListenerAndSendOrderedMessages(ignite, grp);
     }
 
     /**
-     * @param async Async message send flag.
+     *
      * @throws Exception If fail.
      */
-    private void serverClientOrderedMessage(boolean async) throws Exception {
+    private void serverClientOrderedMessage() throws Exception {
         Ignite ignite = grid(SERVER_NODE_IDX);
 
         ClusterGroup grp = ignite.cluster().forClients();
 
         assert grp.nodes().size() > 0;
 
-        registerListenerAndSendOrderedMessages(ignite, grp, async);
+        registerListenerAndSendOrderedMessages(ignite, grp);
     }
 
     /**
      * @param ignite Ignite.
      * @param grp Cluster group.
-     * @param async Async message send flag.
      * @throws Exception If fail.
      */
-    private void registerListenerAndSendOrderedMessages(Ignite ignite, ClusterGroup grp, boolean async) throws Exception {
+    private void registerListenerAndSendOrderedMessages(Ignite ignite, ClusterGroup grp) throws Exception {
         int messages = MSGS;
 
         LATCH = new CountDownLatch(grp.nodes().size() * messages);
@@ -520,12 +403,8 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
         UUID opId = ignite.message(grp).remoteListen(MESSAGE_TOPIC, new OrderedMessageListener());
 
         try {
-            for (int i=0; i < messages; i++){
-                if (async)
-                    ignite.message(grp).withAsync().sendOrdered(MESSAGE_TOPIC, value(i), 2000);
-                else
-                    ignite.message(grp).sendOrdered(MESSAGE_TOPIC, value(i), 2000);
-            }
+            for (int i=0; i < messages; i++)
+                ignite.message(grp).sendOrdered(MESSAGE_TOPIC, value(i), 2000);
 
             assertTrue(LATCH.await(10, TimeUnit.SECONDS));
 
@@ -540,13 +419,9 @@ public class IgniteMessagingConfigVariationFullApiTest extends IgniteConfigVaria
      * @param nodeSnd Sender Ignite node.
      * @param grp Cluster group.
      * @param msg Message.
-     * @param async Async message send flag.
      */
-    private void sendMessage(Ignite nodeSnd, ClusterGroup grp, Object msg, boolean async) {
-        if (async)
-            nodeSnd.message(grp).withAsync().send(MESSAGE_TOPIC, msg);
-        else
-            nodeSnd.message(grp).send(MESSAGE_TOPIC, msg);
+    private void sendMessage(Ignite nodeSnd, ClusterGroup grp, Object msg) {
+        nodeSnd.message(grp).send(MESSAGE_TOPIC, msg);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d811f1b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
index a166c3d..5a0dfa2 100644
--- a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
@@ -24,7 +24,6 @@ import java.io.ObjectOutput;
 import java.io.Serializable;
 import java.net.URL;
 import java.net.URLClassLoader;
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -37,20 +36,15 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteMessaging;
 import org.apache.ignite.cluster.ClusterGroup;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
-import org.apache.ignite.internal.processors.continuous.StartRoutineDiscoveryMessage;
-import org.apache.ignite.internal.processors.continuous.StopRoutineDiscoveryMessage;
 import org.apache.ignite.internal.util.GridConcurrentHashSet;
 import org.apache.ignite.internal.util.typedef.P2;
 import org.apache.ignite.internal.util.typedef.PA;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteFuture;
-import org.apache.ignite.resources.IgniteInstanceResource;;
-import org.apache.ignite.spi.discovery.DiscoverySpiCustomMessage;
+import org.apache.ignite.resources.IgniteInstanceResource;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
@@ -204,7 +198,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        TestTcpDiscoverySpi discoSpi = new TestTcpDiscoverySpi();
+        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
 
         discoSpi.setIpFinder(ipFinder);
 
@@ -950,7 +944,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
      * @throws Exception If error occurs.
      */
     public void testSendMessageWithExternalClassLoader() throws Exception {
-        URL[] urls = new URL[] {new URL(GridTestProperties.getProperty("p2p.uri.cls"))};
+        URL[] urls = new URL[] { new URL(GridTestProperties.getProperty("p2p.uri.cls")) };
 
         ClassLoader extLdr = new URLClassLoader(urls);
 
@@ -1034,8 +1028,6 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
     public void testAsync() throws Exception {
         final AtomicInteger msgCnt = new AtomicInteger();
 
-        TestTcpDiscoverySpi discoSpi = (TestTcpDiscoverySpi)ignite2.configuration().getDiscoverySpi();
-
         assertFalse(ignite2.message().isAsync());
 
         final IgniteMessaging msg = ignite2.message().withAsync();
@@ -1052,8 +1044,6 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
             }
         }, IllegalStateException.class, null);
 
-        discoSpi.blockCustomEvent();
-
         final String topic = "topic";
 
         UUID id = msg.remoteListen(topic, new P2<UUID, Object>() {
@@ -1069,15 +1059,9 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
 
         Assert.assertNull(id);
 
-        IgniteFuture<UUID> starFut = msg.future();
-
-        Assert.assertNotNull(starFut);
-
-        U.sleep(500);
+        IgniteFuture<UUID> fut = msg.future();
 
-        Assert.assertFalse(starFut.isDone());
-
-        discoSpi.stopBlock();
+        Assert.assertNotNull(fut);
 
         GridTestUtils.assertThrows(log, new Callable<Void>() {
             @Override public Void call() throws Exception {
@@ -1087,14 +1071,10 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
             }
         }, IllegalStateException.class, null);
 
-        id = starFut.get();
+        id = fut.get();
 
         Assert.assertNotNull(id);
 
-        Assert.assertTrue(starFut.isDone());
-
-        discoSpi.blockCustomEvent();
-
         message(ignite1.cluster().forRemotes()).send(topic, "msg1");
 
         GridTestUtils.waitForCondition(new PA() {
@@ -1119,16 +1099,8 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
             }
         }, IllegalStateException.class, null);
 
-        U.sleep(500);
-
-        Assert.assertFalse(stopFut.isDone());
-
-        discoSpi.stopBlock();
-
         stopFut.get();
 
-        Assert.assertTrue(stopFut.isDone());
-
         message(ignite1.cluster().forRemotes()).send(topic, "msg2");
 
         U.sleep(1000);
@@ -1137,80 +1109,6 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
     }
 
     /**
-     *
-     */
-    static class TestTcpDiscoverySpi extends TcpDiscoverySpi {
-        /** */
-        private boolean blockCustomEvt;
-
-        /** */
-        private final Object mux = new Object();
-
-        /** */
-        private List<DiscoverySpiCustomMessage> blockedMsgs = new ArrayList<>();
-
-        /** {@inheritDoc} */
-        @Override public void sendCustomEvent(DiscoverySpiCustomMessage msg) throws IgniteException {
-            synchronized (mux) {
-                if (blockCustomEvt) {
-                    DiscoveryCustomMessage msg0 = GridTestUtils.getFieldValue(msg, "delegate");
-                    if (msg0 instanceof StopRoutineDiscoveryMessage || msg0 instanceof StartRoutineDiscoveryMessage) {
-                        log.info("Block custom message: " + msg0);
-                        blockedMsgs.add(msg);
-
-                        mux.notifyAll();
-                    }
-                    return;
-                }
-            }
-
-            super.sendCustomEvent(msg);
-        }
-
-        /**
-         *
-         */
-        public void blockCustomEvent() {
-            synchronized (mux) {
-                assert blockedMsgs.isEmpty() : blockedMsgs;
-
-                blockCustomEvt = true;
-            }
-        }
-
-        /**
-         * @throws InterruptedException If interrupted.
-         */
-        public void waitCustomEvent() throws InterruptedException {
-            synchronized (mux) {
-                while (blockedMsgs.isEmpty())
-                    mux.wait();
-            }
-        }
-
-        /**
-         *
-         */
-        public void stopBlock() {
-            List<DiscoverySpiCustomMessage> msgs;
-
-            synchronized (this) {
-                msgs = new ArrayList<>(blockedMsgs);
-
-                blockCustomEvt = false;
-
-                blockedMsgs.clear();
-            }
-
-            for (DiscoverySpiCustomMessage msg : msgs) {
-                log.info("Resend blocked message: " + msg);
-
-                super.sendCustomEvent(msg);
-            }
-        }
-    }
-
-    /**
      * Tests that message listener registers only for one oldest node.
      *
      * @throws Exception If an error occurred.
@@ -1254,4 +1152,4 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
 
         assertEquals(1, MSG_CNT.get());
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d811f1b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java
deleted file mode 100644
index 75e7d22..0000000
--- a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingSendAsyncTest.java
+++ /dev/null
@@ -1,544 +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.
- */
-
-package org.apache.ignite.messaging;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicReference;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteMessaging;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.lang.IgniteBiInClosure;
-import org.apache.ignite.lang.IgniteBiPredicate;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.jsr166.ThreadLocalRandom8;
-import org.junit.Assert;
-
-/**
- *
- */
-public class IgniteMessagingSendAsyncTest extends GridCommonAbstractTest implements Serializable {
-    /** */
-    private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
-    /** Threads number for multi-thread tests. */
-    private static final int THREADS = 10;
-
-    /** */
-    private final String TOPIC = "topic";
-
-    /** */
-    private final String msgStr = "message";
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        stopAllGrids();
-
-        super.afterTest();
-    }
-
-    /**
-     * Checks if use default mode, local listeners execute in the same thread, 1 node in topology.
-     *
-     * @throws Exception If failed.
-     */
-    public void testSendDefaultMode() throws Exception {
-        Ignite ignite1 = startGrid(1);
-
-        send(ignite1.message(), msgStr, new IgniteBiInClosure<String, Thread> () {
-            @Override public void apply(String msg, Thread thread) {
-                Assert.assertEquals(Thread.currentThread(), thread);
-                Assert.assertEquals(msgStr, msg);
-            }
-        });
-    }
-
-    /**
-     * Checks if use async mode, local listeners execute in another thread, 1 node in topology.
-     *
-     * @throws Exception If failed.
-     */
-    public void testSendAsyncMode() throws Exception {
-        Ignite ignite1 = startGrid(1);
-
-        send(ignite1.message().withAsync(), msgStr,  new IgniteBiInClosure<String, Thread> () {
-            @Override public void apply(String msg, Thread thread) {
-                Assert.assertTrue(!Thread.currentThread().equals(thread));
-                Assert.assertEquals(msgStr, msg);
-            }
-        });
-    }
-
-    /**
-     * Checks if use default mode, local listeners execute in the same thread, 2 nodes in topology.
-     *
-     * @throws Exception If failed.
-     */
-    public void testSendDefaultMode2Nodes() throws Exception {
-        Ignite ignite1 = startGrid(1);
-        Ignite ignite2 = startGrid(2);
-
-        sendWith2Nodes(ignite2, ignite1.message(), msgStr, new IgniteBiInClosure<String, Thread> () {
-            @Override public  void apply(String msg, Thread thread) {
-                Assert.assertEquals(Thread.currentThread(), thread);
-                Assert.assertEquals(msgStr, msg);
-            }
-        });
-    }
-
-    /**
-     * Checks if use async mode, local listeners execute in another thread, 2 nodes in topology.
-     *
-     * @throws Exception If failed.
-     */
-    public void testSendAsyncMode2Node() throws Exception {
-        Ignite ignite1 = startGrid(1);
-        Ignite ignite2 = startGrid(2);
-
-        sendWith2Nodes(ignite2, ignite1.message().withAsync(), msgStr,  new IgniteBiInClosure<String, Thread> () {
-            @Override public  void apply(String msg, Thread thread) {
-                Assert.assertTrue(!Thread.currentThread().equals(thread));
-                Assert.assertEquals(msgStr, msg);
-            }
-        });
-    }
-
-    /**
-     * Checks that sendOrdered works in thread pool, 1 node in topology.
-     *
-     * @throws Exception If failed.
-     */
-    public void testSendOrderedDefaultMode() throws Exception {
-        Ignite ignite1 = startGrid(1);
-
-        final List<String> msgs = orderedMessages();
-
-        sendOrdered(ignite1.message(), msgs, new IgniteBiInClosure< List<String>,  List<Thread>> () {
-            @Override public void apply(List<String> received, List<Thread> threads) {
-                assertFalse(threads.contains(Thread.currentThread()));
-                assertTrue(msgs.equals(received));
-            }
-        });
-    }
-
-    /**
-     * Checks that sendOrdered work in thread pool, 1 node in topology.
-     *
-     * @throws Exception If failed.
-     */
-    public void testSendOrderedAsyncMode() throws Exception {
-        Ignite ignite1 = startGrid(1);
-
-        final List<String> msgs = orderedMessages();
-
-        sendOrdered(ignite1.message().withAsync(), msgs, new IgniteBiInClosure< List<String>,  List<Thread>> () {
-            @Override public void apply(List<String> received, List<Thread> threads) {
-                assertFalse(threads.contains(Thread.currentThread()));
-                assertTrue(msgs.equals(received));
-            }
-        });
-    }
-
-    /**
-     * Checks that sendOrdered work in thread pool, 2 nodes in topology.
-     *
-     * @throws Exception If failed.
-     */
-    public void testSendOrderedDefaultMode2Node() throws Exception {
-        Ignite ignite1 = startGrid(1);
-        Ignite ignite2 = startGrid(2);
-
-        final List<String> msgs = orderedMessages();
-
-        sendOrderedWith2Node(ignite2, ignite1.message(), msgs, new IgniteBiInClosure<List<String>, List<Thread>>() {
-            @Override public void apply(List<String> received, List<Thread> threads) {
-                assertFalse(threads.contains(Thread.currentThread()));
-                assertTrue(msgs.equals(received));
-            }
-        });
-    }
-
-    /**
-     * Checks that sendOrdered work in thread pool, 2 nodes in topology.
-     *
-     * @throws Exception If failed.
-     */
-    public void testSendOrderedAsyncMode2Node() throws Exception {
-        Ignite ignite1 = startGrid(1);
-        Ignite ignite2 = startGrid(2);
-
-        final List<String> msgs = orderedMessages();
-
-        sendOrderedWith2Node(ignite2, ignite1.message().withAsync(), msgs, new IgniteBiInClosure<List<String>, List<Thread>>() {
-            @Override public void apply(List<String> received, List<Thread> threads) {
-                assertFalse(threads.contains(Thread.currentThread()));
-                assertTrue(msgs.equals(received));
-            }
-        });
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testSendOrderedDefaultModeMultiThreads() throws Exception {
-        Ignite ignite = startGrid(1);
-
-        sendOrderedMultiThreads(ignite.message());
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testSendOrderedAsyncModeMultiThreads() throws Exception {
-        Ignite ignite = startGrid(1);
-
-        sendOrderedMultiThreads(ignite.message().withAsync());
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testSendOrderedDefaultModeMultiThreadsWith2Node() throws Exception {
-        Ignite ignite1 = startGrid(1);
-        Ignite ignite2 = startGrid(2);
-
-        sendOrderedMultiThreadsWith2Node(ignite2, ignite1.message());
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testSendOrderedAsyncModeMultiThreadsWith2Node() throws Exception {
-        Ignite ignite1 = startGrid(1);
-        Ignite ignite2 = startGrid(2);
-
-        sendOrderedMultiThreadsWith2Node(ignite2, ignite1.message().withAsync());
-    }
-
-    /**
-     * @param ignite2 Second node.
-     * @param ignMsg IgniteMessage.
-     * @throws Exception If failed.
-     */
-    private void sendOrderedMultiThreadsWith2Node(
-            final Ignite ignite2,
-            final IgniteMessaging ignMsg
-    ) throws Exception {
-        final ConcurrentMap<String, List<String>> expMsg = Maps.newConcurrentMap();
-        final ConcurrentMap<String, List<String>> actlMsg = Maps.newConcurrentMap();
-
-        final List<String> msgs = orderedMessages();
-
-        sendOrderedMultiThreadsWith2Node(ignite2, ignMsg, expMsg, actlMsg, msgs);
-
-    }
-
-    /**
-     * @param ignMsg IgniteMessaging.
-     * @throws Exception If failed.
-     */
-    private void sendOrderedMultiThreads(
-            final IgniteMessaging ignMsg
-    ) throws Exception {
-        final ConcurrentMap<String, List<String>> expMsg = Maps.newConcurrentMap();
-        final ConcurrentMap<String, List<String>> actlMsg = Maps.newConcurrentMap();
-
-        final List<String> msgs = orderedMessages();
-
-        sendOrderedMultiThreads(ignMsg, expMsg, actlMsg, msgs);
-    }
-
-    /**
-     * @param ignite2 Second node.
-     * @param ignMsg Ignite for send message.
-     * @param expMsg Expected messages map.
-     * @param actlMsg Actual message map.
-     * @param msgs List of messages.
-     * @throws Exception If failed.
-     */
-    private void sendOrderedMultiThreadsWith2Node(
-            final Ignite ignite2,
-            final IgniteMessaging ignMsg,
-            final ConcurrentMap<String, List<String>> expMsg,
-            final ConcurrentMap<String, List<String>> actlMsg,
-            final List<String> msgs
-    ) throws Exception {
-        final CountDownLatch latch = new CountDownLatch(THREADS * msgs.size());
-
-        final ConcurrentMap<String, List<String>> actlMsgNode2 = Maps.newConcurrentMap();
-
-        ignite2.message().localListen(TOPIC, new IgniteBiPredicate<UUID, Message>() {
-            @Override public boolean apply(UUID uuid, Message msg) {
-                actlMsgNode2.putIfAbsent(msg.threadName, Lists.<String>newArrayList());
-
-                actlMsgNode2.get(msg.threadName).add(msg.msg);
-
-                latch.countDown();
-
-                return true;
-            }
-        });
-
-        sendOrderedMultiThreads(ignMsg, expMsg, actlMsg, msgs);
-
-        latch.await();
-
-        assertEquals(expMsg.size(), actlMsgNode2.size());
-
-        for (Map.Entry<String, List<String>> entry : expMsg.entrySet())
-            assertTrue(actlMsgNode2.get(entry.getKey()).equals(entry.getValue()));
-    }
-
-    /**
-     * @param ignMsg Ignite for send message.
-     * @param expMsg Expected messages map.
-     * @param actlMsg Actual message map.
-     * @param msgs List of messages.
-     * @throws Exception If failed.
-     */
-    private void sendOrderedMultiThreads(
-            final IgniteMessaging ignMsg,
-            final ConcurrentMap<String, List<String>> expMsg,
-            final ConcurrentMap<String, List<String>> actlMsg,
-            final List<String> msgs
-    ) throws Exception {
-        final CountDownLatch latch = new CountDownLatch(THREADS * msgs.size());
-
-        ignMsg.localListen(TOPIC, new IgniteBiPredicate<UUID, Message>() {
-            @Override public boolean apply(UUID uuid, Message msg) {
-                actlMsg.putIfAbsent(msg.threadName, Lists.<String>newArrayList());
-
-                actlMsg.get(msg.threadName).add(msg.msg);
-
-                latch.countDown();
-
-                return true;
-            }
-        });
-
-        for (int i = 0; i < THREADS; i++)
-            new Thread(new Runnable() {
-                @Override public void run() {
-                    String thdName = Thread.currentThread().getName();
-
-                    List<String> exp = Lists.newArrayList();
-
-                    expMsg.put(thdName, exp);
-
-                    for (String msg : msgs) {
-                        exp.add(msg);
-
-                        ignMsg.sendOrdered(TOPIC, new Message(thdName, msg), 1000);
-                    }
-
-                }
-            }).start();
-
-        latch.await();
-
-        assertEquals(expMsg.size(), actlMsg.size());
-
-        for (Map.Entry<String, List<String>> entry : expMsg.entrySet())
-            assertTrue(actlMsg.get(entry.getKey()).equals(entry.getValue()));
-    }
-
-    /**
-     * @param ignite2 Second node.
-     * @param igniteMsg Ignite message.
-     * @param msgStr    Message string.
-     * @param cls       Callback for compare result.
-     * @throws Exception If failed.
-     */
-    private void sendWith2Nodes(
-            final Ignite ignite2,
-            final IgniteMessaging igniteMsg,
-            final String msgStr,
-            final IgniteBiInClosure<String, Thread>  cls
-    ) throws Exception {
-        final CountDownLatch latch = new CountDownLatch(1);
-
-        ignite2.message().localListen(TOPIC, new IgniteBiPredicate<UUID, String>() {
-            @Override public boolean apply(UUID uuid, String msg) {
-                Assert.assertEquals(msgStr, msg);
-
-                latch.countDown();
-
-                return true;
-            }
-        });
-
-        send(igniteMsg, msgStr, cls);
-
-        latch.await();
-    }
-
-    /**
-     * @param igniteMsg Ignite messaging.
-     * @param msgStr    Message string.
-     * @param cls       Callback for compare result.
-     * @throws Exception If failed.
-     */
-    private void send(
-           final IgniteMessaging igniteMsg,
-           final String msgStr,
-           final IgniteBiInClosure<String, Thread> cls
-    ) throws Exception {
-        final CountDownLatch latch = new CountDownLatch(1);
-
-        final AtomicReference<Thread> thread = new AtomicReference<>();
-        final AtomicReference<String> val = new AtomicReference<>();
-
-        igniteMsg.localListen(TOPIC, new IgniteBiPredicate<UUID, String>() {
-            @Override public boolean apply(UUID uuid, String msgStr) {
-                thread.set(Thread.currentThread());
-
-                val.set(msgStr);
-
-                latch.countDown();
-
-                return true;
-            }
-        });
-
-        igniteMsg.send(TOPIC, msgStr);
-
-        latch.await();
-
-        cls.apply(val.get(), thread.get());
-    }
-
-    /**
-     * @param ignite2 Second node.
-     * @param igniteMsg Ignite message.
-     * @param msgs messages for send.
-     * @param cls  Callback for compare result.
-     * @throws Exception If failed.
-     */
-    private void sendOrderedWith2Node(
-            final Ignite ignite2,
-            final IgniteMessaging igniteMsg,
-            final List<String> msgs,
-            final IgniteBiInClosure<List<String>, List<Thread>> cls
-    ) throws Exception {
-        final CountDownLatch latch = new CountDownLatch(msgs.size());
-
-        final List<String> received = Lists.newArrayList();
-
-        ignite2.message().localListen(TOPIC, new IgniteBiPredicate<UUID, String>() {
-            @Override public boolean apply(UUID uuid, String msg) {
-                received.add(msg);
-
-                latch.countDown();
-
-                return true;
-            }
-        });
-
-        sendOrdered(igniteMsg, msgs, cls);
-
-        latch.await();
-
-        assertTrue(msgs.equals(received));
-    }
-
-    /**
-     * @param igniteMsg Ignite message.
-     * @param msgs  messages for send.
-     * @param cls Callback for compare result.
-     * @throws Exception If failed.
-     */
-    private<T> void sendOrdered(
-            final IgniteMessaging igniteMsg,
-            final List<T> msgs,
-            final IgniteBiInClosure<List<T>,List<Thread>> cls
-    ) throws Exception {
-        final CountDownLatch latch = new CountDownLatch(msgs.size());
-
-        final List<T> received = Lists.newArrayList();
-        final List<Thread> threads = Lists.newArrayList();
-
-        for (T msg : msgs)
-            igniteMsg.sendOrdered(TOPIC, msg, 1000);
-
-        igniteMsg.localListen(TOPIC, new IgniteBiPredicate<UUID, T>() {
-            @Override public boolean apply(UUID uuid, T s) {
-                received.add(s);
-
-                threads.add(Thread.currentThread());
-
-                latch.countDown();
-
-                return true;
-            }
-        });
-
-        latch.await();
-
-        cls.apply(received, threads);
-    }
-
-    /**
-     * @return List of ordered messages
-     */
-    private List<String> orderedMessages() {
-        final List<String> msgs = Lists.newArrayList();
-
-        for (int i = 0; i < 1000; i++)
-            msgs.add(String.valueOf(ThreadLocalRandom8.current().nextInt()));
-
-        return msgs;
-    }
-
-    /**
-     *
-     */
-    private static class Message implements Serializable{
-        /** Thread name. */
-        private final String threadName;
-
-        /** Message. */
-        private final String msg;
-
-        /**
-         * @param threadName Thread name.
-         * @param msg Message.
-         */
-        private Message(String threadName, String msg) {
-            this.threadName = threadName;
-            this.msg = msg;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d811f1b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 688edf7..9e20d2a 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -56,7 +56,6 @@ import org.apache.ignite.marshaller.DynamicProxySerializationMultiJvmSelfTest;
 import org.apache.ignite.marshaller.MarshallerContextSelfTest;
 import org.apache.ignite.messaging.GridMessagingNoPeerClassLoadingSelfTest;
 import org.apache.ignite.messaging.GridMessagingSelfTest;
-import org.apache.ignite.messaging.IgniteMessagingSendAsyncTest;
 import org.apache.ignite.messaging.IgniteMessagingWithClientTest;
 import org.apache.ignite.plugin.security.SecurityPermissionSetBuilderTest;
 import org.apache.ignite.spi.GridSpiLocalHostInjectionTest;
@@ -102,7 +101,6 @@ public class IgniteBasicTestSuite extends TestSuite {
         suite.addTest(new TestSuite(GridSelfTest.class));
         suite.addTest(new TestSuite(ClusterGroupHostsSelfTest.class));
         suite.addTest(new TestSuite(IgniteMessagingWithClientTest.class));
-        suite.addTest(new TestSuite(IgniteMessagingSendAsyncTest.class));
 
         GridTestUtils.addTestIfNeeded(suite, ClusterGroupSelfTest.class, ignoredTests);
         GridTestUtils.addTestIfNeeded(suite, GridMessagingSelfTest.class, ignoredTests);

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d811f1b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffle.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffle.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffle.java
index 3db68c4..10f18a6 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffle.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/shuffle/HadoopShuffle.java
@@ -147,7 +147,7 @@ public class HadoopShuffle extends HadoopComponent {
         if (msg instanceof Message)
             ctx.kernalContext().io().send(node, GridTopic.TOPIC_HADOOP_MSG, (Message)msg, GridIoPolicy.PUBLIC_POOL);
         else
-            ctx.kernalContext().io().sendUserMessage(F.asList(node), msg, GridTopic.TOPIC_HADOOP, false, 0, false);
+            ctx.kernalContext().io().sendUserMessage(F.asList(node), msg, GridTopic.TOPIC_HADOOP, false, 0);
     }
 
     /**
@@ -298,4 +298,4 @@ public class HadoopShuffle extends HadoopComponent {
     public GridUnsafeMemory memory() {
         return mem;
     }
-}
\ No newline at end of file
+}


[42/50] [abbrv] ignite git commit: IGNITE-4810: Removed index rebuild methods.

Posted by sb...@apache.org.
IGNITE-4810: Removed index rebuild methods.


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

Branch: refs/heads/ignite-4705-2
Commit: 6fda2c203b82314acff190304168b40043f587c3
Parents: 5899cc3
Author: devozerov <vo...@gridgain.com>
Authored: Fri Mar 10 13:10:07 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Mar 10 13:10:07 2017 +0300

----------------------------------------------------------------------
 .../cache/query/GridCacheQueryManager.java      |  18 --
 .../processors/query/GridQueryIndexing.java     |   8 -
 .../processors/query/GridQueryProcessor.java    | 102 --------
 .../processors/query/h2/IgniteH2Indexing.java   |  13 -
 .../query/h2/opt/GridH2IndexBase.java           |  10 -
 .../processors/query/h2/opt/GridH2Table.java    |  33 ---
 .../query/h2/opt/GridH2TreeIndex.java           |  23 --
 .../query/h2/GridH2IndexRebuildTest.java        | 261 -------------------
 .../h2/GridIndexingSpiAbstractSelfTest.java     |  17 --
 .../query/h2/opt/GridH2TableSelfTest.java       |  54 ----
 .../IgniteCacheQuerySelfTestSuite.java          |   2 -
 11 files changed, 541 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6fda2c20/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index b92ecaf..93dee54 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -324,24 +324,6 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
     }
 
     /**
-     * Rebuilds all search indexes of given value type.
-     *
-     * @param typeName Value type name.
-     * @return Future that will be completed when rebuilding of all indexes is finished.
-     */
-    public IgniteInternalFuture<?> rebuildIndexes(String typeName) {
-        if (!enterBusy())
-            throw new IllegalStateException("Failed to rebuild indexes (grid is stopping).");
-
-        try {
-            return qryProc.rebuildIndexes(space, typeName);
-        }
-        finally {
-            leaveBusy();
-        }
-    }
-
-    /**
      * Marks this request as canceled.
      *
      * @param reqId Request id.

http://git-wip-us.apache.org/repos/asf/ignite/blob/6fda2c20/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
index ca04724..629de78 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
@@ -208,14 +208,6 @@ public interface GridQueryIndexing {
     public void onUnswap(@Nullable String spaceName, CacheObject key, CacheObject val) throws IgniteCheckedException;
 
     /**
-     * Rebuilds all indexes of given type.
-     *
-     * @param spaceName Space name.
-     * @param type Type descriptor.
-     */
-    public void rebuildIndexes(@Nullable String spaceName, GridQueryTypeDescriptor type);
-
-    /**
      * Returns backup filter.
      *
      * @param topVer Topology version.

http://git-wip-us.apache.org/repos/asf/ignite/blob/6fda2c20/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 1c5b822..176178c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -35,7 +35,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ExecutorService;
 import javax.cache.Cache;
 import javax.cache.CacheException;
 import org.apache.ignite.IgniteCheckedException;
@@ -52,7 +51,6 @@ import org.apache.ignite.cache.query.SqlQuery;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.events.CacheQueryExecutedEvent;
 import org.apache.ignite.internal.GridKernalContext;
-import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.processors.GridProcessorAdapter;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
@@ -75,16 +73,12 @@ import org.apache.ignite.internal.processors.query.property.QueryPropertyAccesso
 import org.apache.ignite.internal.processors.query.property.QueryReadOnlyMethodsAccessor;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
-import org.apache.ignite.internal.util.future.GridCompoundFuture;
-import org.apache.ignite.internal.util.future.GridFinishedFuture;
 import org.apache.ignite.internal.util.lang.GridCloseableIterator;
 import org.apache.ignite.internal.util.lang.GridClosureException;
 import org.apache.ignite.internal.util.lang.IgniteOutClosureX;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.internal.util.worker.GridWorker;
-import org.apache.ignite.internal.util.worker.GridWorkerFuture;
 import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.spi.indexing.IndexingQueryFilter;
@@ -139,9 +133,6 @@ public class GridQueryProcessor extends GridProcessorAdapter {
     private final ConcurrentMap<QueryTypeNameKey, QueryTypeDescriptorImpl> typesByName = new ConcurrentHashMap8<>();
 
     /** */
-    private ExecutorService execSvc;
-
-    /** */
     private final GridQueryIndexing idx;
 
     /** */
@@ -172,8 +163,6 @@ public class GridQueryProcessor extends GridProcessorAdapter {
         if (idx != null) {
             ctx.resource().injectGeneric(idx);
 
-            execSvc = ctx.getExecutorService();
-
             idx.start(ctx, busyLock);
         }
 
@@ -556,97 +545,6 @@ public class GridQueryProcessor extends GridProcessorAdapter {
     }
 
     /**
-     * Rebuilds all search indexes of given value type for given space of spi.
-     *
-     * @param space Space.
-     * @param valTypeName Value type name.
-     * @return Future that will be completed when rebuilding of all indexes is finished.
-     */
-    public IgniteInternalFuture<?> rebuildIndexes(@Nullable final String space, String valTypeName) {
-        if (!busyLock.enterBusy())
-            throw new IllegalStateException("Failed to rebuild indexes (grid is stopping).");
-
-        try {
-            return rebuildIndexes(
-                space,
-                typesByName.get(
-                    new QueryTypeNameKey(
-                        space,
-                        valTypeName)));
-        }
-        finally {
-            busyLock.leaveBusy();
-        }
-    }
-
-    /**
-     * @param space Space.
-     * @param desc Type descriptor.
-     * @return Future that will be completed when rebuilding of all indexes is finished.
-     */
-    private IgniteInternalFuture<?> rebuildIndexes(@Nullable final String space, @Nullable final QueryTypeDescriptorImpl desc) {
-        if (idx == null)
-            return new GridFinishedFuture<>(new IgniteCheckedException("Indexing is disabled."));
-
-        if (desc == null || !desc.registered())
-            return new GridFinishedFuture<Void>();
-
-        final GridWorkerFuture<?> fut = new GridWorkerFuture<Void>();
-
-        GridWorker w = new GridWorker(ctx.gridName(), "index-rebuild-worker", log) {
-            @Override protected void body() {
-                try {
-                    idx.rebuildIndexes(space, desc);
-
-                    fut.onDone();
-                }
-                catch (Exception e) {
-                    fut.onDone(e);
-                }
-                catch (Throwable e) {
-                    log.error("Failed to rebuild indexes for type: " + desc.name(), e);
-
-                    fut.onDone(e);
-
-                    if (e instanceof Error)
-                        throw e;
-                }
-            }
-        };
-
-        fut.setWorker(w);
-
-        execSvc.execute(w);
-
-        return fut;
-    }
-
-    /**
-     * Rebuilds all search indexes for given spi.
-     *
-     * @return Future that will be completed when rebuilding of all indexes is finished.
-     */
-    @SuppressWarnings("unchecked")
-    public IgniteInternalFuture<?> rebuildAllIndexes() {
-        if (!busyLock.enterBusy())
-            throw new IllegalStateException("Failed to get space size (grid is stopping).");
-
-        try {
-            GridCompoundFuture<?, ?> fut = new GridCompoundFuture<Object, Object>();
-
-            for (Map.Entry<QueryTypeIdKey, QueryTypeDescriptorImpl> e : types.entrySet())
-                fut.add((IgniteInternalFuture)rebuildIndexes(e.getKey().space(), e.getValue()));
-
-            fut.markInitialized();
-
-            return fut;
-        }
-        finally {
-            busyLock.leaveBusy();
-        }
-    }
-
-    /**
      * @param space Space name.
      * @return Cache object context.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/6fda2c20/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index a26406d..2f8faa4 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -1699,19 +1699,6 @@ public class IgniteH2Indexing implements GridQueryIndexing {
         return schema.spaceName;
     }
 
-    /** {@inheritDoc} */
-    @Override public void rebuildIndexes(@Nullable String spaceName, GridQueryTypeDescriptor type) {
-        TableDescriptor tbl = tableDescriptor(spaceName, type);
-
-        if (tbl == null)
-            return;
-
-        if (tbl.schema.offheap != null)
-            throw new UnsupportedOperationException("Index rebuilding is not supported when off-heap memory is used");
-
-        tbl.tbl.rebuildIndexes();
-    }
-
     /**
      * Gets size (for tests only).
      *

http://git-wip-us.apache.org/repos/asf/ignite/blob/6fda2c20/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
index bab219c..5669fd0 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
@@ -178,16 +178,6 @@ public abstract class GridH2IndexBase extends BaseIndex {
     }
 
     /**
-     * If the index supports rebuilding it has to creates its own copy.
-     *
-     * @return Rebuilt copy.
-     * @throws InterruptedException If interrupted.
-     */
-    public GridH2IndexBase rebuild() throws InterruptedException {
-        return this;
-    }
-
-    /**
      * Put row if absent.
      *
      * @param row Row.

http://git-wip-us.apache.org/repos/asf/ignite/blob/6fda2c20/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
index 8d080ae..ca1bcb0 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
@@ -639,39 +639,6 @@ public class GridH2Table extends TableBase {
         return res;
     }
 
-    /**
-     * Rebuilds all indexes of this table.
-     */
-    public void rebuildIndexes() {
-        if (!snapshotEnabled)
-            return;
-
-        Lock l = lock(true, Long.MAX_VALUE);
-
-        ArrayList<Index> idxs0 = new ArrayList<>(idxs);
-
-        try {
-            snapshotIndexes(null); // Allow read access while we are rebuilding indexes.
-
-            for (int i = 1, len = idxs.size(); i < len; i++) {
-                GridH2IndexBase newIdx = index(i).rebuild();
-
-                idxs.set(i, newIdx);
-
-                if (i == 1) // ScanIndex at 0 and actualSnapshot can contain references to old indexes, reset them.
-                    idxs.set(0, new ScanIndex(newIdx));
-            }
-        }
-        catch (InterruptedException e) {
-            throw new IgniteInterruptedException(e);
-        }
-        finally {
-            releaseSnapshots0(idxs0);
-
-            unlock(l);
-        }
-    }
-
     /** {@inheritDoc} */
     @Override public Index addIndex(Session ses, String s, int i, IndexColumn[] idxCols, IndexType idxType,
         boolean b, String s1) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6fda2c20/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
index 914e0da..aa0846f 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
@@ -27,7 +27,6 @@ import org.apache.ignite.internal.util.GridEmptyIterator;
 import org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap;
 import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeGuard;
 import org.apache.ignite.internal.util.snaptree.SnapTreeMap;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.SB;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.spi.indexing.IndexingQueryFilter;
@@ -457,26 +456,4 @@ public class GridH2TreeIndex extends GridH2IndexBase implements Comparator<GridS
             throw new IllegalStateException();
         }
     }
-
-    /** {@inheritDoc} */
-    @Override public GridH2TreeIndex rebuild() throws InterruptedException {
-        IndexColumn[] cols = getIndexColumns();
-
-        GridH2TreeIndex idx = new GridH2TreeIndex(getName(), getTable(),
-            getIndexType().isUnique(), F.asList(cols));
-
-        Thread thread = Thread.currentThread();
-
-        long i = 0;
-
-        for (GridH2Row row : tree.values()) {
-            // Check for interruptions every 1000 iterations.
-            if (++i % 1000 == 0 && thread.isInterrupted())
-                throw new InterruptedException();
-
-            idx.tree.put(row, row);
-        }
-
-        return idx;
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/6fda2c20/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
deleted file mode 100644
index 2dec475..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
+++ /dev/null
@@ -1,261 +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.
- */
-
-package org.apache.ignite.internal.processors.query.h2;
-
-import java.util.ArrayList;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.query.SqlQuery;
-import org.apache.ignite.cache.query.annotations.QuerySqlField;
-import org.apache.ignite.cache.query.annotations.QueryTextField;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteFutureCancelledCheckedException;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.IgniteInterruptedCheckedException;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
-import org.apache.ignite.internal.processors.query.GridQueryProcessor;
-import org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.jetbrains.annotations.Nullable;
-
-/**
- */
-public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
-    /** */
-    private static final int GRID_CNT = 1;
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return GRID_CNT;
-    }
-
-    /**
-     * Overrides rebuildIndexes to check it can be interrupted.
-     */
-    private static class SleepingH2Indexing extends IgniteH2Indexing {
-        /** */
-        private volatile boolean sleepInRebuild;
-
-        /** */
-        private volatile CountDownLatch interrupted;
-
-        /**
-         * Constructor.
-         */
-        public SleepingH2Indexing() {
-            spi = this;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void rebuildIndexes(@Nullable String spaceName, GridQueryTypeDescriptor type) {
-            if (sleepInRebuild) {
-                try {
-                    U.sleep(Long.MAX_VALUE);
-                }
-                catch (IgniteInterruptedCheckedException ignored) {
-                    interrupted.countDown();
-                }
-            }
-
-            super.rebuildIndexes(spaceName, type);
-        }
-    }
-
-    /** */
-    private static SleepingH2Indexing spi;
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        GridQueryProcessor.idxCls = SleepingH2Indexing.class;
-
-        return cfg;
-    }
-
-    /**
-     * Value class with regular and compound indexes.
-     */
-    @SuppressWarnings("UnusedDeclaration")
-    private static class TestValue1 {
-        /** */
-        @QuerySqlField(index = true)
-        private long val1;
-
-        /** */
-        @QuerySqlField(index = true)
-        private String val2;
-
-        /** */
-        @QuerySqlField(groups = "group1")
-        private int val3;
-
-        /** */
-        @QuerySqlField(groups = "group1")
-        private int val4;
-
-        /**
-         */
-        TestValue1(long val1, String val2, int val3, int val4) {
-            this.val1 = val1;
-            this.val2 = val2;
-            this.val3 = val3;
-            this.val4 = val4;
-        }
-    }
-
-    /**
-     * Value class with regular and text indexes.
-     */
-    @SuppressWarnings("UnusedDeclaration")
-    private static class TestValue2 {
-        /** */
-        @QuerySqlField(index = true)
-        private long val1;
-
-        /** */
-        @QueryTextField
-        private String val2;
-
-        /**
-         */
-        TestValue2(long val1, String val2) {
-            this.val1 = val1;
-            this.val2 = val2;
-        }
-    }
-
-    /** */
-    private static final int ENTRY_CNT = 10000;
-
-    /** {@inheritDoc} */
-    @Override protected Class<?>[] indexedTypes() {
-        return new Class<?>[] {
-            Integer.class, TestValue1.class,
-            Integer.class, TestValue2.class
-        };
-    }
-
-    /**
-     * @throws Exception if failed.
-     */
-    public void testRebuildIndexes() throws Exception {
-        grid(0).context().query().rebuildIndexes(null, ArrayList.class.getName()).get();
-
-        grid(0).context().query().rebuildAllIndexes().get();
-
-        IgniteCache<Integer, TestValue1> cache1 = grid(0).cache(null);
-        IgniteCache<Integer, TestValue2> cache2 = grid(0).cache(null);
-
-        for (int i = 0; i < ENTRY_CNT; i++) {
-            cache1.put(i, new TestValue1(i, "val2-" + i, i, i));
-            cache2.put(ENTRY_CNT * 2 + i, new TestValue2(i, "val2-" + i));
-        }
-
-        SqlQuery<Integer, TestValue1> qry1 = new SqlQuery(TestValue1.class, "val1 = 9000");
-
-        SqlQuery<Integer, TestValue1> qry2 = new SqlQuery(TestValue1.class, "val2 = 'val2-9000'");
-
-        SqlQuery<Integer, TestValue1> qry3 = new SqlQuery(TestValue1.class, "val3 = 9000 and val4 = 9000");
-
-        SqlQuery<Integer, TestValue2> qry4 = new SqlQuery(TestValue2.class, "val1 = 9000");
-
-        SqlQuery<Integer, TestValue2> qry5 = new SqlQuery(TestValue2.class, "val2 = 'val2-9000'");
-
-        assertEquals(1, cache1.query(qry1).getAll().size());
-        assertEquals(1, cache1.query(qry2).getAll().size());
-        assertEquals(1, cache1.query(qry3).getAll().size());
-        assertEquals(1, cache2.query(qry4).getAll().size());
-        assertEquals(1, cache2.query(qry5).getAll().size());
-
-        for (int i = 0; i < ENTRY_CNT / 2; i++) {
-            cache1.remove(i);
-            cache2.remove(ENTRY_CNT * 2 + i);
-        }
-
-        grid(0).context().query().rebuildIndexes(null, TestValue1.class.getName()).get();
-        grid(0).context().query().rebuildIndexes(null, TestValue2.class.getName()).get();
-
-        assertEquals(1, cache1.query(qry1).getAll().size());
-        assertEquals(1, cache1.query(qry2).getAll().size());
-        assertEquals(1, cache1.query(qry3).getAll().size());
-        assertEquals(1, cache2.query(qry4).getAll().size());
-        assertEquals(1, cache2.query(qry5).getAll().size());
-
-        grid(0).context().query().rebuildAllIndexes().get();
-
-        assertEquals(1, cache1.query(qry1).getAll().size());
-        assertEquals(1, cache1.query(qry2).getAll().size());
-        assertEquals(1, cache1.query(qry3).getAll().size());
-        assertEquals(1, cache2.query(qry4).getAll().size());
-        assertEquals(1, cache2.query(qry5).getAll().size());
-    }
-
-    /**
-     * @throws Exception if failed.
-     */
-    public void testRebuildInterrupted() throws Exception {
-        spi.sleepInRebuild = true;
-
-        IgniteCache<Integer, TestValue1> cache1 = grid(0).cache(null);
-        IgniteCache<Integer, TestValue2> cache2 = grid(0).cache(null);
-
-        cache1.put(0, new TestValue1(0, "val0", 0 ,0));
-        cache2.put(1, new TestValue2(0, "val0"));
-
-        checkCancel(grid(0).context().query().rebuildIndexes(null, "TestValue1"));
-
-        checkCancel(grid(0).context().query().rebuildAllIndexes());
-
-        spi.sleepInRebuild = false;
-
-        final IgniteInternalFuture<?> fut1 = grid(0).context().query().rebuildIndexes(null, TestValue1.class.getName());
-
-        assertFalse(fut1.isCancelled());
-
-        fut1.get();
-
-        final IgniteInternalFuture<?> fut2 = grid(0).context().query().rebuildAllIndexes();;
-
-        assertFalse(fut2.isCancelled());
-
-        fut2.get();
-    }
-
-    /**
-     * @param fut Future.
-     * @throws Exception if failed.
-     */
-    private void checkCancel(final IgniteInternalFuture<?> fut) throws Exception {
-        spi.interrupted = new CountDownLatch(1);
-
-        assertTrue(fut.cancel());
-
-        GridTestUtils.assertThrows(log, new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                fut.get();
-                return null;
-            }
-        }, IgniteFutureCancelledCheckedException.class, null);
-
-        assertTrue(spi.interrupted.await(5, TimeUnit.SECONDS));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/6fda2c20/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
index 3b31051..49914c5 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
@@ -392,23 +392,6 @@ public abstract class GridIndexingSpiAbstractSelfTest extends GridCommonAbstract
         assertEquals(2, spi.size(typeAB.space(), typeAB));
         assertEquals(0, spi.size(typeBA.space(), typeBA));
 
-        boolean h2IdxOffheap = offheap();
-
-        // At the time of this writing index rebuilding is not supported for GridH2Indexing with off-heap storage.
-        if (!h2IdxOffheap) {
-            // Rebuild
-
-            spi.rebuildIndexes(typeAB.space(), typeAB);
-
-            assertEquals(1, spi.size(typeAA.space(), typeAA));
-            assertEquals(2, spi.size(typeAB.space(), typeAB));
-            assertEquals(0, spi.size(typeBA.space(), typeBA));
-
-            // For invalid space name/type should not fail.
-            spi.rebuildIndexes("not_existing_space", typeAA);
-            spi.rebuildIndexes(typeAA.space(), new TypeDesc("C", "C", fieldsAA, null));
-        }
-
         // Unregister.
         spi.unregisterType(typeAA.space(), typeAA);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6fda2c20/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TableSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TableSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TableSelfTest.java
index 8408ba0..a3baad4 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TableSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TableSelfTest.java
@@ -46,7 +46,6 @@ import org.h2.value.ValueString;
 import org.h2.value.ValueTimestamp;
 import org.h2.value.ValueUuid;
 import org.jetbrains.annotations.Nullable;
-import org.junit.Assert;
 
 /**
  * Tests H2 Table.
@@ -274,18 +273,6 @@ public class GridH2TableSelfTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Dumps all table rows for index.
-     *
-     * @param idx Index.
-     */
-    private void dumpRows(GridH2TreeIndex idx) {
-        Iterator<GridH2Row> iter = idx.rows();
-
-        while (iter.hasNext())
-            System.out.println(iter.next().toString());
-    }
-
-    /**
      * Multithreaded indexes consistency test.
      *
      * @throws Exception If failed.
@@ -512,47 +499,6 @@ public class GridH2TableSelfTest extends GridCommonAbstractTest {
     }
 
     /**
-     * @throws Exception If failed.
-     */
-    public void testRebuildIndexes() throws Exception {
-        ArrayList<GridH2IndexBase> idxsBefore = tbl.indexes();
-
-        assertEquals(3, idxsBefore.size());
-
-        Random rnd = new Random();
-
-        for (int i = 0; i < MAX_X; i++) {
-            UUID id = UUID.randomUUID();
-
-            GridH2Row row = row(id, System.currentTimeMillis(), rnd.nextBoolean() ? id.toString() :
-                    UUID.randomUUID().toString(), rnd.nextInt(100));
-
-            tbl.doUpdate(row, false);
-        }
-
-        for (GridH2IndexBase idx : idxsBefore)
-            assertEquals(MAX_X, idx.getRowCountApproximation());
-
-        tbl.rebuildIndexes();
-
-        ArrayList<GridH2IndexBase> idxsAfter = tbl.indexes();
-
-        assertEquals(3, idxsAfter.size());
-
-        for (int i = 0; i < 3; i++) {
-            GridH2IndexBase idxBefore = idxsBefore.get(i);
-            GridH2IndexBase idxAfter = idxsAfter.get(i);
-
-            assertNotSame(idxBefore, idxAfter);
-            assertEquals(idxBefore.getName(), idxAfter.getName());
-            assertSame(idxBefore.getTable(), idxAfter.getTable());
-            assertEquals(idxBefore.getRowCountApproximation(), idxAfter.getRowCountApproximation());
-            assertEquals(idxBefore.getIndexType().isUnique(), idxAfter.getIndexType().isUnique());
-            Assert.assertArrayEquals(idxBefore.getColumns(), idxAfter.getColumns());
-        }
-    }
-
-    /**
      * Check query plan to correctly select index.
      *
      * @param conn Connection.

http://git-wip-us.apache.org/repos/asf/ignite/blob/6fda2c20/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 3ef331f..7bf3887 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -100,7 +100,6 @@ import org.apache.ignite.internal.processors.query.IgniteSqlQueryDedicatedPoolTe
 import org.apache.ignite.internal.processors.query.IgniteSqlEntryCacheModeAgnosticTest;
 import org.apache.ignite.internal.processors.query.IgniteSqlSchemaIndexingTest;
 import org.apache.ignite.internal.processors.query.IgniteSqlSplitterSelfTest;
-import org.apache.ignite.internal.processors.query.h2.GridH2IndexRebuildTest;
 import org.apache.ignite.internal.processors.query.h2.GridH2IndexingInMemSelfTest;
 import org.apache.ignite.internal.processors.query.h2.GridH2IndexingOffheapSelfTest;
 import org.apache.ignite.internal.processors.query.h2.opt.GridH2TableSelfTest;
@@ -125,7 +124,6 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
         suite.addTest(new TestSuite(GridH2TableSelfTest.class));
         suite.addTest(new TestSuite(GridH2IndexingInMemSelfTest.class));
         suite.addTest(new TestSuite(GridH2IndexingOffheapSelfTest.class));
-        suite.addTest(new TestSuite(GridH2IndexRebuildTest.class));
 
         // Parsing
         suite.addTestSuite(GridQueryParsingTest.class);


[30/50] [abbrv] ignite git commit: ignite-4577 Add non-reachable addresses at the end of addresses list

Posted by sb...@apache.org.
ignite-4577 Add non-reachable addresses at the end of addresses list


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

Branch: refs/heads/ignite-4705-2
Commit: f79471501d3d629a8cf942875bd883f42ba5c712
Parents: 4972020
Author: Evgenii Zhuravlev <ez...@gridgain.com>
Authored: Tue Mar 7 14:32:28 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Mar 7 14:32:28 2017 +0300

----------------------------------------------------------------------
 .../ignite/internal/util/IgniteUtils.java       | 14 ++++++-----
 .../communication/tcp/TcpCommunicationSpi.java  | 25 ++++++++++++++++++++
 2 files changed, 33 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f7947150/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index f6c8163..74e4450 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -1850,15 +1850,16 @@ public abstract class IgniteUtils {
 
     /**
      * @param addrs Addresses.
+     * @return List of reachable addresses.
      */
-    public static List<InetAddress> filterReachable(List<InetAddress> addrs) {
+    public static List<InetAddress> filterReachable(Collection<InetAddress> addrs) {
         final int reachTimeout = 2000;
 
         if (addrs.isEmpty())
             return Collections.emptyList();
 
         if (addrs.size() == 1) {
-            InetAddress addr = addrs.get(0);
+            InetAddress addr = F.first(addrs);
 
             if (reachable(addr, reachTimeout))
                 return Collections.singletonList(addr);
@@ -1874,8 +1875,7 @@ public abstract class IgniteUtils {
 
         for (final InetAddress addr : addrs) {
             futs.add(executor.submit(new Runnable() {
-                @Override
-                public void run() {
+                @Override public void run() {
                     if (reachable(addr, reachTimeout)) {
                         synchronized (res) {
                             res.add(addr);
@@ -1888,11 +1888,13 @@ public abstract class IgniteUtils {
         for (Future<?> fut : futs) {
             try {
                 fut.get();
-            } catch (InterruptedException e) {
+            }
+            catch (InterruptedException e) {
                 Thread.currentThread().interrupt();
 
                 throw new IgniteException("Thread has been interrupted.", e);
-            } catch (ExecutionException e) {
+            }
+            catch (ExecutionException e) {
                 throw new IgniteException(e);
             }
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7947150/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index 2664505..30c6976 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -2776,6 +2776,31 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
         if (isExtAddrsExist)
             addrs.addAll(extAddrs);
 
+        Set<InetAddress> allInetAddrs = U.newHashSet(addrs.size());
+
+        for (InetSocketAddress addr : addrs)
+            allInetAddrs.add(addr.getAddress());
+
+        List<InetAddress> reachableInetAddrs = U.filterReachable(allInetAddrs);
+
+        if (reachableInetAddrs.size() < allInetAddrs.size()) {
+            LinkedHashSet<InetSocketAddress> addrs0 = U.newLinkedHashSet(addrs.size());
+
+            for (InetSocketAddress addr : addrs) {
+                if (reachableInetAddrs.contains(addr.getAddress()))
+                    addrs0.add(addr);
+            }
+            for (InetSocketAddress addr : addrs) {
+                if (!reachableInetAddrs.contains(addr.getAddress()))
+                    addrs0.add(addr);
+            }
+
+            addrs = addrs0;
+        }
+
+        if (log.isDebugEnabled())
+            log.debug("Addresses to connect for node [rmtNode=" + node.id() + ", addrs=" + addrs.toString() + ']');
+
         boolean conn = false;
         GridCommunicationClient client = null;
         IgniteCheckedException errs = null;


[10/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/domains-import.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/domains-import.jade b/modules/web-console/frontend/views/configuration/domains-import.jade
deleted file mode 100644
index bbcb391..0000000
--- a/modules/web-console/frontend/views/configuration/domains-import.jade
+++ /dev/null
@@ -1,170 +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.
-
-include /app/helpers/jade/mixins.jade
-
-mixin chk(mdl, change, tip)
-    input(type='checkbox' ng-model=mdl ng-change=change bs-tooltip='' data-title=tip data-trigger='hover' data-placement='top')
-
-mixin td-ellipses-lbl(w, lbl)
-    td.td-ellipsis(width='#{w}' style='min-width: #{w}; max-width: #{w}')
-        label #{lbl}
-
-.modal.modal-domain-import.center(role='dialog')
-    .modal-dialog.domains-import-dialog
-        .modal-content(ignite-loading='importDomainFromDb' ignite-loading-text='{{importDomain.loadingOptions.text}}')
-            #errors-container.modal-header.header
-                button.close(ng-click='$hide()' aria-hidden='true') &times;
-                h4.modal-title() 
-                    i.fa.fa-database
-                    span(ng-if='!importDomain.demo') Import domain models from database
-                    span(ng-if='importDomain.demo') Import domain models from demo database
-            .modal-body
-                .import-domain-model-wizard-page(ng-if='importDomain.action == "drivers" && !importDomain.jdbcDriversNotFound')
-                .import-domain-model-wizard-page(ng-if='importDomain.action == "drivers" && importDomain.jdbcDriversNotFound')
-                    | Domain model could not be imported
-                    ul
-                        li Agent failed to find JDBC drivers
-                        li Copy required JDBC drivers into agent 'jdbc-drivers' folder and try again
-                        li Refer to agent README.txt for more information
-                .import-domain-model-wizard-page(ng-if='importDomain.action == "connect" && importDomain.demo')
-                    div(ng-if='demoConnection.db == "H2"')
-                        label Demo description:
-                        ul
-                            li In-memory H2 database server will be started inside agent
-                            li Database will be populated with sample tables
-                            li You could test domain model generation with this demo database
-                            li Click "Next" to continue
-                    div(ng-if='demoConnection.db != "H2"')
-                        label Demo could not be started
-                            ul
-                                li Agent failed to resolve H2 database jar
-                                li Copy h2-x.x.x.jar into agent 'jdbc-drivers' folder and try again
-                                li Refer to agent README.txt for more information
-                .import-domain-model-wizard-page(ng-if='importDomain.action == "connect" && !importDomain.demo')
-                    -var form = 'connectForm'
-
-                    form.form-horizontal(name=form novalidate)
-                        .settings-row.settings-row_small-label
-                            +ignite-form-field-dropdown('Driver JAR:', 'ui.selectedJdbcDriverJar', '"jdbcDriverJar"', false, true, false,
-                                'Choose JDBC driver', '', 'jdbcDriverJars',
-                                'Select appropriate JAR with JDBC driver<br> To add another driver you need to place it into "/jdbc-drivers" folder of Ignite Web Agent<br> Refer to Ignite Web Agent README.txt for for more information'
-                            )(
-                                data-container='.modal-domain-import'
-                                data-ignite-form-field-input-autofocus='true'
-                            )
-                        .settings-row.settings-row_small-label
-                            +java-class('JDBC driver:', 'selectedPreset.jdbcDriverClass', '"jdbcDriverClass"', true, true, 'Fully qualified class name of JDBC driver that will be used to connect to database')
-                        .settings-row.settings-row_small-label
-                            +text('JDBC URL:', 'selectedPreset.jdbcUrl', '"jdbcUrl"', true, 'JDBC URL', 'JDBC URL for connecting to database<br>Refer to your database documentation for details')
-                        .settings-row.settings-row_small-label
-                            +text('User:', 'selectedPreset.user', '"jdbdUser"', false, '', 'User name for connecting to database')
-                        .settings-row.settings-row_small-label
-                            +password('Password:', 'selectedPreset.password', '"jdbcPassword"', false, '', 'Password for connecting to database<br>Note, password would not be saved in preferences for security reasons')(ignite-on-enter='importDomainNext()')
-                        .settings-row
-                            +checkbox('Tables only', 'selectedPreset.tablesOnly', '"tablesOnly"', 'If selected, then only tables metadata will be parsed<br>Otherwise table and view metadata will be parsed')
-                .import-domain-model-wizard-page(ng-show='importDomain.action == "schemas"')
-                    table.table.metadata(st-table='importDomain.displayedSchemas' st-safe-src='importDomain.schemas')
-                        thead
-                            tr
-                                th.header(colspan='2')
-                                    .col-sm-4.pull-right(style='margin-bottom: 5px')
-                                        input.form-control(type='text' st-search='name' placeholder='Filter schemas...' ng-model='importDomain.displayedSchemasFilter' )
-                            tr
-                                th(width='30px')
-                                    +chk('importDomain.allSchemasSelected',  'selectAllSchemas()', 'Select all schemas')
-                                th
-                                    label Schema
-                            tbody
-                                tr
-                                    td(colspan='2')
-                                        .scrollable-y(style='height: 213px')
-                                            table.table-modal-striped(id='importSchemasData')
-                                                tbody
-                                                    tr(ng-repeat='schema in importDomain.displayedSchemas')
-                                                        td(width='30px')
-                                                            input(type='checkbox' ng-model='schema.use' ng-change='selectSchema()')
-                                                        td
-                                                            label {{schema.name}}
-                .import-domain-model-wizard-page(ng-show='importDomain.action == "tables"')
-                    table.table.metadata(st-table='importDomain.displayedTables' st-safe-src='importDomain.tables')
-                        thead
-                            tr
-                                th.header(colspan='6')
-                                    .col-sm-4.pull-right(style='margin-bottom: 8px')
-                                        input.form-control(type='text' st-search='label' placeholder='Filter tables...' ng-model='importDomain.displayedTablesFilter' ng-change='selectTable()')
-                            tr
-                                th(width='30px')
-                                    +chk('importDomain.allTablesSelected',  'selectAllTables()', 'Select all tables')
-                                th(width='130px')
-                                    label Schema
-                                th(width='160px')
-                                    label Table name
-                                th(colspan=2 width='288px')
-                                    label Cache
-                                th
-                        tbody
-                            tr
-                                td(colspan='6')
-                                    .scrollable-y(style='height: 143px')
-                                        table.table-modal-striped(id='importTableData')
-                                            tbody
-                                                tr(ng-repeat='table in importDomain.displayedTables track by $index')
-                                                    td(width='30px' style='min-width: 30px; max-width: 30px')
-                                                        input(type='checkbox' ng-model='table.use' ng-change='selectTable()')
-                                                    +td-ellipses-lbl('130px', '{{table.schema}}')
-                                                    +td-ellipses-lbl('160px', '{{table.tbl}}')
-                                                    td(colspan='2' width='288px' style='min-width: 160px; max-width: 160px')
-                                                        div.td-ellipsis
-                                                            a(ng-if='!table.edit' ng-click='startEditDbTableCache(table)') {{tableActionView(table)}}
-                                                            div(style='display: flex' ng-if='table.edit')
-                                                                button.select-toggle.form-control(style='width: 35%; margin-right: 5px' bs-select ng-model='table.action' data-container='.modal-domain-import' bs-options='item.value as item.shortLabel for item in importActions')
-                                                                button.select-toggle.form-control(style='width: 65%; margin-right: 0' bs-select ng-model='table.cacheOrTemplate' data-container='.modal-domain-import' bs-options='item.value as item.label for item in table.cachesOrTemplates')
-                                                    td
-                    .settings-row
-                        label Defaults to be applied for filtered tables
-                        i.tipLabel.icon-help(bs-tooltip='' data-title='Select and apply options for caches generation')
-                    .settings-row
-                        .col-sm-11
-                            .col-sm-6(style='padding-right: 5px')
-                                button.select-toggle.form-control(bs-select ng-model='importCommon.action' data-container='.modal-domain-import' bs-options='item.value as item.label for item in importActions')
-                            .col-sm-6(style='padding-left: 5px; padding-right: 5px')
-                                button.select-toggle.form-control(bs-select ng-model='importCommon.cacheOrTemplate' data-container='.modal-domain-import' bs-options='item.value as item.label for item in importCommon.cachesOrTemplates')
-                        .col-sm-1(style='padding-left: 5px')
-                            button.btn.btn-primary(ng-click='applyDefaults()') Apply
-                .import-domain-model-wizard-page(ng-show='importDomain.action == "options"')
-                    -var form = 'optionsForm'
-
-                    form.form-horizontal(name=form novalidate)
-                        .settings-row
-                            +checkbox('Use Java built-in types for keys', 'ui.builtinKeys', '"domainBuiltinKeys"', 'Use Java built-in types like "Integer", "Long", "String" instead of POJO generation in case when table primary key contains only one field')
-                        .settings-row
-                            +checkbox('Use primitive types for NOT NULL table columns', 'ui.usePrimitives', '"domainUsePrimitives"', 'Use primitive types like "int", "long", "double" for POJOs fields generation in case of NOT NULL columns')
-                        .settings-row
-                            +checkbox('Generate aliases for query fields', 'ui.generateAliases', '"domainGenerateAliases"', 'Generate aliases for query fields with database field names when database field name differ from Java field name')
-                        .settings-row
-                            +checkbox('Generate POJO classes', 'ui.generatePojo', '"domainGeneratePojo"', 'If selected then POJO classes will be generated from database tables')
-                        .settings-row.settings-row_small-label(ng-show='ui.generatePojo')
-                            +java-package('Package:', 'ui.packageName', '"domainPackageName"', true, true, 'Package that will be used for POJOs generation')(data-container='.modal-domain-import')
-                        .settings-row.settings-row_small-label
-                            +ignite-form-field-dropdown('Clusters:', 'ui.generatedCachesClusters', '"generatedCachesClusters"', false, false, true,
-                                'Choose clusters for generated caches', '', 'clusters',
-                                'Choose clusters that will be associated with generated caches'
-                            )(data-container='.modal-domain-import')
-            .modal-footer
-                label(ng-hide='importDomain.action == "drivers" || (importDomain.action == "connect" && importDomain.demo)').labelField {{importDomain.info}}
-                a.btn.btn-primary(ng-hide='importDomain.action == "drivers" || importDomain.action == "connect"' ng-click='importDomainPrev()' bs-tooltip='' data-title='{{prevTooltipText()}}' data-placement='bottom') Prev
-                a.btn.btn-primary(ng-click='importDomainNext(optionsForm)' ng-disabled='!importDomainNextAvailable()' bs-tooltip='' data-title='{{nextTooltipText()}}' data-placement='bottom') {{importDomain.button}}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/domains-import.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/domains-import.tpl.pug b/modules/web-console/frontend/views/configuration/domains-import.tpl.pug
new file mode 100644
index 0000000..baaa2d3
--- /dev/null
+++ b/modules/web-console/frontend/views/configuration/domains-import.tpl.pug
@@ -0,0 +1,170 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+mixin chk(mdl, change, tip)
+    input(type='checkbox' ng-model=mdl ng-change=change bs-tooltip='' data-title=tip data-trigger='hover' data-placement='top')
+
+mixin td-ellipses-lbl(w, lbl)
+    td.td-ellipsis(width=`${w}` style=`min-width: ${w}; max-width: ${w}`)
+        label #{lbl}
+
+.modal.modal-domain-import.center(role='dialog')
+    .modal-dialog.domains-import-dialog
+        .modal-content(ignite-loading='importDomainFromDb' ignite-loading-text='{{importDomain.loadingOptions.text}}')
+            #errors-container.modal-header.header
+                button.close(ng-click='$hide()' aria-hidden='true') &times;
+                h4.modal-title() 
+                    i.fa.fa-database
+                    span(ng-if='!importDomain.demo') Import domain models from database
+                    span(ng-if='importDomain.demo') Import domain models from demo database
+            .modal-body
+                .import-domain-model-wizard-page(ng-if='importDomain.action == "drivers" && !importDomain.jdbcDriversNotFound')
+                .import-domain-model-wizard-page(ng-if='importDomain.action == "drivers" && importDomain.jdbcDriversNotFound')
+                    | Domain model could not be imported
+                    ul
+                        li Agent failed to find JDBC drivers
+                        li Copy required JDBC drivers into agent 'jdbc-drivers' folder and try again
+                        li Refer to agent README.txt for more information
+                .import-domain-model-wizard-page(ng-if='importDomain.action == "connect" && importDomain.demo')
+                    div(ng-if='demoConnection.db == "H2"')
+                        label Demo description:
+                        ul
+                            li In-memory H2 database server will be started inside agent
+                            li Database will be populated with sample tables
+                            li You could test domain model generation with this demo database
+                            li Click "Next" to continue
+                    div(ng-if='demoConnection.db != "H2"')
+                        label Demo could not be started
+                            ul
+                                li Agent failed to resolve H2 database jar
+                                li Copy h2-x.x.x.jar into agent 'jdbc-drivers' folder and try again
+                                li Refer to agent README.txt for more information
+                .import-domain-model-wizard-page(ng-if='importDomain.action == "connect" && !importDomain.demo')
+                    -var form = 'connectForm'
+
+                    form.form-horizontal(name=form novalidate)
+                        .settings-row.settings-row_small-label
+                            +ignite-form-field-dropdown('Driver JAR:', 'ui.selectedJdbcDriverJar', '"jdbcDriverJar"', false, true, false,
+                                'Choose JDBC driver', '', 'jdbcDriverJars',
+                                'Select appropriate JAR with JDBC driver<br> To add another driver you need to place it into "/jdbc-drivers" folder of Ignite Web Agent<br> Refer to Ignite Web Agent README.txt for for more information'
+                            )(
+                                data-container='.modal-domain-import'
+                                data-ignite-form-field-input-autofocus='true'
+                            )
+                        .settings-row.settings-row_small-label
+                            +java-class('JDBC driver:', 'selectedPreset.jdbcDriverClass', '"jdbcDriverClass"', true, true, 'Fully qualified class name of JDBC driver that will be used to connect to database')
+                        .settings-row.settings-row_small-label
+                            +text('JDBC URL:', 'selectedPreset.jdbcUrl', '"jdbcUrl"', true, 'JDBC URL', 'JDBC URL for connecting to database<br>Refer to your database documentation for details')
+                        .settings-row.settings-row_small-label
+                            +text('User:', 'selectedPreset.user', '"jdbdUser"', false, '', 'User name for connecting to database')
+                        .settings-row.settings-row_small-label
+                            +password('Password:', 'selectedPreset.password', '"jdbcPassword"', false, '', 'Password for connecting to database<br>Note, password would not be saved in preferences for security reasons')(ignite-on-enter='importDomainNext()')
+                        .settings-row
+                            +checkbox('Tables only', 'selectedPreset.tablesOnly', '"tablesOnly"', 'If selected, then only tables metadata will be parsed<br>Otherwise table and view metadata will be parsed')
+                .import-domain-model-wizard-page(ng-show='importDomain.action == "schemas"')
+                    table.table.metadata(st-table='importDomain.displayedSchemas' st-safe-src='importDomain.schemas')
+                        thead
+                            tr
+                                th.header(colspan='2')
+                                    .col-sm-4.pull-right(style='margin-bottom: 5px')
+                                        input.form-control(type='text' st-search='name' placeholder='Filter schemas...' ng-model='importDomain.displayedSchemasFilter' )
+                            tr
+                                th(width='30px')
+                                    +chk('importDomain.allSchemasSelected',  'selectAllSchemas()', 'Select all schemas')
+                                th
+                                    label Schema
+                            tbody
+                                tr
+                                    td(colspan='2')
+                                        .scrollable-y(style='height: 213px')
+                                            table.table-modal-striped(id='importSchemasData')
+                                                tbody
+                                                    tr(ng-repeat='schema in importDomain.displayedSchemas')
+                                                        td(width='30px')
+                                                            input(type='checkbox' ng-model='schema.use' ng-change='selectSchema()')
+                                                        td
+                                                            label {{schema.name}}
+                .import-domain-model-wizard-page(ng-show='importDomain.action == "tables"')
+                    table.table.metadata(st-table='importDomain.displayedTables' st-safe-src='importDomain.tables')
+                        thead
+                            tr
+                                th.header(colspan='6')
+                                    .col-sm-4.pull-right(style='margin-bottom: 8px')
+                                        input.form-control(type='text' st-search='label' placeholder='Filter tables...' ng-model='importDomain.displayedTablesFilter' ng-change='selectTable()')
+                            tr
+                                th(width='30px')
+                                    +chk('importDomain.allTablesSelected',  'selectAllTables()', 'Select all tables')
+                                th(width='130px')
+                                    label Schema
+                                th(width='160px')
+                                    label Table name
+                                th(colspan=2 width='288px')
+                                    label Cache
+                                th
+                        tbody
+                            tr
+                                td(colspan='6')
+                                    .scrollable-y(style='height: 143px')
+                                        table.table-modal-striped(id='importTableData')
+                                            tbody
+                                                tr(ng-repeat='table in importDomain.displayedTables track by $index')
+                                                    td(width='30px' style='min-width: 30px; max-width: 30px')
+                                                        input(type='checkbox' ng-model='table.use' ng-change='selectTable()')
+                                                    +td-ellipses-lbl('130px', '{{table.schema}}')
+                                                    +td-ellipses-lbl('160px', '{{table.tbl}}')
+                                                    td(colspan='2' width='288px' style='min-width: 160px; max-width: 160px')
+                                                        div.td-ellipsis
+                                                            a(ng-if='!table.edit' ng-click='startEditDbTableCache(table)') {{tableActionView(table)}}
+                                                            div(style='display: flex' ng-if='table.edit')
+                                                                button.select-toggle.form-control(style='width: 35%; margin-right: 5px' bs-select ng-model='table.action' data-container='.modal-domain-import' bs-options='item.value as item.shortLabel for item in importActions')
+                                                                button.select-toggle.form-control(style='width: 65%; margin-right: 0' bs-select ng-model='table.cacheOrTemplate' data-container='.modal-domain-import' bs-options='item.value as item.label for item in table.cachesOrTemplates')
+                                                    td
+                    .settings-row
+                        label Defaults to be applied for filtered tables
+                        i.tipLabel.icon-help(bs-tooltip='' data-title='Select and apply options for caches generation')
+                    .settings-row
+                        .col-sm-11
+                            .col-sm-6(style='padding-right: 5px')
+                                button.select-toggle.form-control(bs-select ng-model='importCommon.action' data-container='.modal-domain-import' bs-options='item.value as item.label for item in importActions')
+                            .col-sm-6(style='padding-left: 5px; padding-right: 5px')
+                                button.select-toggle.form-control(bs-select ng-model='importCommon.cacheOrTemplate' data-container='.modal-domain-import' bs-options='item.value as item.label for item in importCommon.cachesOrTemplates')
+                        .col-sm-1(style='padding-left: 5px')
+                            button.btn.btn-primary(ng-click='applyDefaults()') Apply
+                .import-domain-model-wizard-page(ng-show='importDomain.action == "options"')
+                    -var form = 'optionsForm'
+
+                    form.form-horizontal(name=form novalidate)
+                        .settings-row
+                            +checkbox('Use Java built-in types for keys', 'ui.builtinKeys', '"domainBuiltinKeys"', 'Use Java built-in types like "Integer", "Long", "String" instead of POJO generation in case when table primary key contains only one field')
+                        .settings-row
+                            +checkbox('Use primitive types for NOT NULL table columns', 'ui.usePrimitives', '"domainUsePrimitives"', 'Use primitive types like "int", "long", "double" for POJOs fields generation in case of NOT NULL columns')
+                        .settings-row
+                            +checkbox('Generate aliases for query fields', 'ui.generateAliases', '"domainGenerateAliases"', 'Generate aliases for query fields with database field names when database field name differ from Java field name')
+                        .settings-row
+                            +checkbox('Generate POJO classes', 'ui.generatePojo', '"domainGeneratePojo"', 'If selected then POJO classes will be generated from database tables')
+                        .settings-row.settings-row_small-label(ng-show='ui.generatePojo')
+                            +java-package('Package:', 'ui.packageName', '"domainPackageName"', true, true, 'Package that will be used for POJOs generation')(data-container='.modal-domain-import')
+                        .settings-row.settings-row_small-label
+                            +ignite-form-field-dropdown('Clusters:', 'ui.generatedCachesClusters', '"generatedCachesClusters"', false, false, true,
+                                'Choose clusters for generated caches', '', 'clusters',
+                                'Choose clusters that will be associated with generated caches'
+                            )(data-container='.modal-domain-import')
+            .modal-footer
+                label(ng-hide='importDomain.action == "drivers" || (importDomain.action == "connect" && importDomain.demo)').labelField {{importDomain.info}}
+                a.btn.btn-primary(ng-hide='importDomain.action == "drivers" || importDomain.action == "connect"' ng-click='importDomainPrev()' bs-tooltip='' data-title='{{prevTooltipText()}}' data-placement='bottom') Prev
+                a.btn.btn-primary(ng-click='importDomainNext(optionsForm)' ng-disabled='!importDomainNextAvailable()' bs-tooltip='' data-title='{{nextTooltipText()}}' data-placement='bottom') {{importDomain.button}}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/domains.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/domains.jade b/modules/web-console/frontend/views/configuration/domains.jade
deleted file mode 100644
index 14e9ca5..0000000
--- a/modules/web-console/frontend/views/configuration/domains.jade
+++ /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.
-
-include /app/helpers/jade/mixins.jade
-
-.docs-header
-    h1 Configure Domain Model And SQL Queries
-.docs-body(ng-controller='domainsController')
-    ignite-information
-        ul: li Import database schemas
-            li Configure indexed types
-    div(ignite-loading='loadingDomainModelsScreen' ignite-loading-text='Loading domain models...' ignite-loading-position='top')
-        div(ng-show='ui.ready')
-            hr
-            .padding-bottom-dflt(ng-show='domains && domains.length > 0')
-                table.links(st-table='displayedRows' st-safe-src='domains')
-                    thead
-                        tr
-                            th
-                                .col-sm-9
-                                    .col-sm-6
-                                        lable.labelHeader.labelFormField {{domainModelTitle()}}
-                                    .col-sm-6
-                                        .pull-right.labelLogin.additional-filter(ng-if='(domains | domainsValidation:false:true).length > 0')
-                                            a.labelFormField(ng-if='ui.showValid' ng-click='toggleValid()' bs-tooltip='' data-title='{{::ui.invalidKeyFieldsTooltip}}') Key fields should be configured: {{(displayedRows | domainsValidation:false:true).length}}&nbsp
-                                            a.labelFormField(ng-if='!ui.showValid' ng-click='toggleValid()') Show all domain models: {{displayedRows.length}}&nbsp
-                                .col-sm-3
-                                    input.form-control.pull-right(type='text' st-search='valueType' placeholder='Filter domain models...')
-                        tbody
-                            tr
-                                td
-                                    .scrollable-y(ng-show='(displayedRows | domainsValidation:ui.showValid:true).length > 0' style='max-height: 200px')
-                                        table
-                                            tbody
-                                                tr(ng-repeat='row in (displayedRows | domainsValidation:ui.showValid:true) track by row._id' ignite-bs-affix-update)
-                                                    td
-                                                        a(ng-class='{active: row._id == selectedItem._id}' ng-click='selectItem(row)') {{$index + 1}}) {{row.valueType}}
-                                    label.placeholder(ng-show='(displayedRows | domainsValidation:ui.showValid:true).length == 0') No domain models found
-            .padding-top-dflt(bs-affix)
-                .panel-tip-container(data-placement='bottom' bs-tooltip='' data-title='Create new domain model')
-                    button.btn.btn-primary(id='new-item' ng-click='createItem()') Add domain model
-                .panel-tip-container(bs-tooltip='' data-title='Import domain models from database' data-placement='bottom')
-                    button.btn.btn-primary(ng-click='showImportDomainModal()') Import from database
-                +save-remove-clone-undo-buttons('domain model')
-                .btn-group.panel-tip-container.pull-right(bs-tooltip='' data-title='Import domain models from demo database' data-placement='bottom')
-                hr
-            .bs-affix-fix
-            div(bs-collapse='' data-allow-multiple='true' ng-model='ui.activePanels')
-                form.form-horizontal(name='ui.inputForm' novalidate ng-if='contentVisible()')
-                    .panel-group
-                        include /app/modules/states/configuration/domains/general.jade
-                        include /app/modules/states/configuration/domains/query.jade
-                        include /app/modules/states/configuration/domains/store.jade

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/domains.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/domains.tpl.pug b/modules/web-console/frontend/views/configuration/domains.tpl.pug
new file mode 100644
index 0000000..33528c7
--- /dev/null
+++ b/modules/web-console/frontend/views/configuration/domains.tpl.pug
@@ -0,0 +1,66 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+.docs-header
+    h1 Configure Domain Model And SQL Queries
+.docs-body(ng-controller='domainsController')
+    ignite-information
+        ul: li Import database schemas
+            li Configure indexed types
+    div(ignite-loading='loadingDomainModelsScreen' ignite-loading-text='Loading domain models...' ignite-loading-position='top')
+        div(ng-show='ui.ready')
+            hr
+            .padding-bottom-dflt(ng-show='domains && domains.length > 0')
+                table.links(st-table='displayedRows' st-safe-src='domains')
+                    thead
+                        tr
+                            th
+                                .col-sm-9
+                                    .col-sm-6
+                                        lable.labelHeader.labelFormField {{domainModelTitle()}}
+                                    .col-sm-6
+                                        .pull-right.labelLogin.additional-filter(ng-if='(domains | domainsValidation:false:true).length > 0')
+                                            a.labelFormField(ng-if='ui.showValid' ng-click='toggleValid()' bs-tooltip='' data-title='{{::ui.invalidKeyFieldsTooltip}}') Key fields should be configured: {{(displayedRows | domainsValidation:false:true).length}}&nbsp
+                                            a.labelFormField(ng-if='!ui.showValid' ng-click='toggleValid()') Show all domain models: {{displayedRows.length}}&nbsp
+                                .col-sm-3
+                                    input.form-control.pull-right(type='text' st-search='valueType' placeholder='Filter domain models...')
+                        tbody
+                            tr
+                                td
+                                    .scrollable-y(ng-show='(displayedRows | domainsValidation:ui.showValid:true).length > 0' style='max-height: 200px')
+                                        table
+                                            tbody
+                                                tr(ng-repeat='row in (displayedRows | domainsValidation:ui.showValid:true) track by row._id' ignite-bs-affix-update)
+                                                    td
+                                                        a(ng-class='{active: row._id == selectedItem._id}' ng-click='selectItem(row)') {{$index + 1}}) {{row.valueType}}
+                                    label.placeholder(ng-show='(displayedRows | domainsValidation:ui.showValid:true).length == 0') No domain models found
+            .padding-top-dflt(bs-affix)
+                .panel-tip-container(data-placement='bottom' bs-tooltip='' data-title='Create new domain model')
+                    button.btn.btn-primary(id='new-item' ng-click='createItem()') Add domain model
+                .panel-tip-container(bs-tooltip='' data-title='Import domain models from database' data-placement='bottom')
+                    button.btn.btn-primary(ng-click='showImportDomainModal()') Import from database
+                +save-remove-clone-undo-buttons('domain model')
+                .btn-group.panel-tip-container.pull-right(bs-tooltip='' data-title='Import domain models from demo database' data-placement='bottom')
+                hr
+            .bs-affix-fix
+            div(bs-collapse='' data-allow-multiple='true' ng-model='ui.activePanels')
+                form.form-horizontal(name='ui.inputForm' novalidate ng-if='contentVisible()')
+                    .panel-group
+                        include /app/modules/states/configuration/domains/general
+                        include /app/modules/states/configuration/domains/query
+                        include /app/modules/states/configuration/domains/store

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/igfs.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/igfs.jade b/modules/web-console/frontend/views/configuration/igfs.jade
deleted file mode 100644
index 10c902b..0000000
--- a/modules/web-console/frontend/views/configuration/igfs.jade
+++ /dev/null
@@ -1,51 +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.
-
-include /app/helpers/jade/mixins.jade
-
-.docs-header
-    h1 Configure Ignite In-memory File Systems
-.docs-body(ng-controller='igfsController')
-    ignite-information(data-title='Configure IGFS only if you are going to use In-memory File System')
-        ul
-            li Ignite File System (#[a(href='https://apacheignite-fs.readme.io/docs/in-memory-file-system' target='_blank') IGFS]) is an in-memory file system allowing work with files and directories over existing cache infrastructure
-            li IGFS can either work as purely in-memory file system, or delegate to another file system (e.g. various Hadoop file system implementations) acting as a caching layer (see #[a(href='https://apacheignite-fs.readme.io/docs/secondary-file-system' target='_blank') secondary file system]  for more detail)
-            li In addition IGFS provides API to execute map-reduce tasks over file system data
-    div(ignite-loading='loadingIgfsScreen' ignite-loading-text='Loading IGFS screen...' ignite-loading-position='top')
-        div(ng-show='ui.ready')
-            hr
-            +main-table('IGFS', 'igfss', 'igfsName', 'selectItem(row)', '{{$index + 1}}) {{row.name}}', 'name')
-            .padding-top-dflt(bs-affix)
-                .panel-tip-container(data-placement='bottom' bs-tooltip='' data-title='Create new IGFS')
-                    button.btn.btn-primary(id='new-item' ng-click='createItem()') Add IGFS
-                +save-remove-clone-undo-buttons('IGFS')
-                hr
-            .bs-affix-fix
-            div(bs-collapse='' data-allow-multiple='true' ng-model='ui.activePanels')
-                form.form-horizontal(name='ui.inputForm' novalidate ng-if='contentVisible()')
-                    .panel-group
-                        include /app/modules/states/configuration/igfs/general.jade
-
-                        +advanced-options-toggle-default
-
-                        div(ng-show='ui.expanded')
-                            include /app/modules/states/configuration/igfs/secondary.jade
-                            include /app/modules/states/configuration/igfs/ipc.jade
-                            include /app/modules/states/configuration/igfs/fragmentizer.jade
-                            include /app/modules/states/configuration/igfs/dual.jade
-                            include /app/modules/states/configuration/igfs/misc.jade
-
-                            +advanced-options-toggle-default

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/igfs.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/igfs.tpl.pug b/modules/web-console/frontend/views/configuration/igfs.tpl.pug
new file mode 100644
index 0000000..89e0920
--- /dev/null
+++ b/modules/web-console/frontend/views/configuration/igfs.tpl.pug
@@ -0,0 +1,51 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+.docs-header
+    h1 Configure Ignite In-memory File Systems
+.docs-body(ng-controller='igfsController')
+    ignite-information(data-title='Configure IGFS only if you are going to use In-memory File System')
+        ul
+            li Ignite File System (#[a(href='https://apacheignite-fs.readme.io/docs/in-memory-file-system' target='_blank') IGFS]) is an in-memory file system allowing work with files and directories over existing cache infrastructure
+            li IGFS can either work as purely in-memory file system, or delegate to another file system (e.g. various Hadoop file system implementations) acting as a caching layer (see #[a(href='https://apacheignite-fs.readme.io/docs/secondary-file-system' target='_blank') secondary file system]  for more detail)
+            li In addition IGFS provides API to execute map-reduce tasks over file system data
+    div(ignite-loading='loadingIgfsScreen' ignite-loading-text='Loading IGFS screen...' ignite-loading-position='top')
+        div(ng-show='ui.ready')
+            hr
+            +main-table('IGFS', 'igfss', 'igfsName', 'selectItem(row)', '{{$index + 1}}) {{row.name}}', 'name')
+            .padding-top-dflt(bs-affix)
+                .panel-tip-container(data-placement='bottom' bs-tooltip='' data-title='Create new IGFS')
+                    button.btn.btn-primary(id='new-item' ng-click='createItem()') Add IGFS
+                +save-remove-clone-undo-buttons('IGFS')
+                hr
+            .bs-affix-fix
+            div(bs-collapse='' data-allow-multiple='true' ng-model='ui.activePanels')
+                form.form-horizontal(name='ui.inputForm' novalidate ng-if='contentVisible()')
+                    .panel-group
+                        include /app/modules/states/configuration/igfs/general
+
+                        +advanced-options-toggle-default
+
+                        div(ng-show='ui.expanded')
+                            include /app/modules/states/configuration/igfs/secondary
+                            include /app/modules/states/configuration/igfs/ipc
+                            include /app/modules/states/configuration/igfs/fragmentizer
+                            include /app/modules/states/configuration/igfs/dual
+                            include /app/modules/states/configuration/igfs/misc
+
+                            +advanced-options-toggle-default

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/sidebar.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/sidebar.jade b/modules/web-console/frontend/views/configuration/sidebar.jade
deleted file mode 100644
index bba6b25..0000000
--- a/modules/web-console/frontend/views/configuration/sidebar.jade
+++ /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.
-
-.row
-    .col-xs-3.col-sm-3.col-md-2.border-right.section-left.greedy
-        .sidebar-nav(bs-affix)
-            ul.menu(ignite-sidebar)
-                li(ng-repeat='item in sidebar.items')
-                    a(ui-sref-active='active' ui-sref='{{::item.sref}}')
-                        span.fa-stack
-                            i.fa.fa-circle-thin.fa-stack-2x
-                            i.fa.fa-stack-1x {{::$index + 1}}
-                        | {{::item.text}}
-
-    .col-xs-9.col-sm-9.col-md-10.border-left.section-right
-        .docs-content(ui-view='')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/sidebar.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/sidebar.tpl.pug b/modules/web-console/frontend/views/configuration/sidebar.tpl.pug
new file mode 100644
index 0000000..bba6b25
--- /dev/null
+++ b/modules/web-console/frontend/views/configuration/sidebar.tpl.pug
@@ -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.
+
+.row
+    .col-xs-3.col-sm-3.col-md-2.border-right.section-left.greedy
+        .sidebar-nav(bs-affix)
+            ul.menu(ignite-sidebar)
+                li(ng-repeat='item in sidebar.items')
+                    a(ui-sref-active='active' ui-sref='{{::item.sref}}')
+                        span.fa-stack
+                            i.fa.fa-circle-thin.fa-stack-2x
+                            i.fa.fa-stack-1x {{::$index + 1}}
+                        | {{::item.text}}
+
+    .col-xs-9.col-sm-9.col-md-10.border-left.section-right
+        .docs-content(ui-view='')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/summary-project-structure.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/summary-project-structure.jade b/modules/web-console/frontend/views/configuration/summary-project-structure.jade
deleted file mode 100644
index 29d4538..0000000
--- a/modules/web-console/frontend/views/configuration/summary-project-structure.jade
+++ /dev/null
@@ -1,27 +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.
-.popover.summary-project-structure
-    h3.popover-title
-        label.labelField Project structure
-        button.close(id='summary-project-structure-close' ng-click='$hide()') &times;
-    .popover-content
-        treecontrol.tree-classic(tree-model='projectStructure' options='projectStructureOptions' expanded-nodes='projectStructureExpanded')
-            span(ng-switch='node.type')
-                span(ng-switch-when='folder')
-                    label {{node.name}}
-                span(ng-switch-when='file')
-                    i.fa.fa-file-text-o
-                    label {{node.name}}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/summary-project-structure.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/summary-project-structure.tpl.pug b/modules/web-console/frontend/views/configuration/summary-project-structure.tpl.pug
new file mode 100644
index 0000000..31a557f
--- /dev/null
+++ b/modules/web-console/frontend/views/configuration/summary-project-structure.tpl.pug
@@ -0,0 +1,28 @@
+//-
+    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.
+
+.popover.summary-project-structure
+    h3.popover-title
+        label.labelField Project structure
+        button.close(id='summary-project-structure-close' ng-click='$hide()') &times;
+    .popover-content
+        treecontrol.tree-classic(tree-model='projectStructure' options='projectStructureOptions' expanded-nodes='projectStructureExpanded')
+            span(ng-switch='node.type')
+                span(ng-switch-when='folder')
+                    label {{node.name}}
+                span(ng-switch-when='file')
+                    i.fa.fa-file-text-o
+                    label {{node.name}}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/summary-tabs.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/summary-tabs.jade b/modules/web-console/frontend/views/configuration/summary-tabs.jade
deleted file mode 100644
index 847b42f..0000000
--- a/modules/web-console/frontend/views/configuration/summary-tabs.jade
+++ /dev/null
@@ -1,25 +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.
-
-ul.nav(ng-class='$navClass', role='tablist')
-    li(role='presentation' ng-repeat='$pane in $panes track by $index' ng-class='[ $isActive($pane, $index) ? $activeClass : "", $pane.disabled ? "disabled" : "" ]')
-        a.summary-tab(ng-show='$pane.title != "POJO" || (cluster | hasPojo)' ng-switch='$pane.title' role='tab' data-toggle='tab' ng-click='!$pane.disabled && $setActive($pane.name || $index)' data-index='{{ $index }}' aria-controls='$pane.title') {{$pane.title}}
-            img(ng-switch-when='XML' src='/images/xml.png')
-            img(ng-switch-when='Java' src='/images/java.png')
-            img(ng-switch-when='POM' src='/images/xml.png')
-            img(ng-switch-when='POJO' src='/images/java.png')
-            img(ng-switch-when='Dockerfile' src='/images/docker.png')
-.tab-content(ng-transclude style='fontSize: 12px; min-height: 25em')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/summary-tabs.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/summary-tabs.pug b/modules/web-console/frontend/views/configuration/summary-tabs.pug
new file mode 100644
index 0000000..d05e3a9
--- /dev/null
+++ b/modules/web-console/frontend/views/configuration/summary-tabs.pug
@@ -0,0 +1,25 @@
+//-
+    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.
+
+ul.nav(ng-class='$navClass' role='tablist')
+    li(role='presentation' ng-repeat='$pane in $panes track by $index' ng-class='[ $isActive($pane, $index) ? $activeClass : "", $pane.disabled ? "disabled" : "" ]')
+        a.summary-tab(ng-show='$pane.title != "POJO" || (cluster | hasPojo)' ng-switch='$pane.title' role='tab' data-toggle='tab' ng-click='!$pane.disabled && $setActive($pane.name || $index)' data-index='{{ $index }}' aria-controls='$pane.title') {{$pane.title}}
+            img(ng-switch-when='XML' src='/images/xml.png')
+            img(ng-switch-when='Java' src='/images/java.png')
+            img(ng-switch-when='POM' src='/images/xml.png')
+            img(ng-switch-when='POJO' src='/images/java.png')
+            img(ng-switch-when='Dockerfile' src='/images/docker.png')
+.tab-content(ng-transclude style='fontSize: 12px; min-height: 25em')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/summary.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/summary.jade b/modules/web-console/frontend/views/configuration/summary.jade
deleted file mode 100644
index a04f0db..0000000
--- a/modules/web-console/frontend/views/configuration/summary.jade
+++ /dev/null
@@ -1,90 +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.
-
-include /app/helpers/jade/mixins.jade
-
-mixin hard-link(ref, txt)
-    a(style='color:#ec1c24' href=ref target='_blank') #{txt}
-
-.docs-header
-    h1 Configurations Summary
-.docs-body.summary
-    ignite-information
-        ul
-            li Preview XML configurations for #[a(href='https://apacheignite.readme.io/docs/clients-vs-servers' target='_blank') server and client] nodes
-            li Preview code configuration
-            li Preview #[a(href='https://apacheignite.readme.io/docs/docker-deployment' target='_blank') Docker file]
-            li Preview POM dependencies
-            li Download ready-to-use Maven project
-    hr
-    .padding-dflt(ng-if='ui.ready && (!clusters || clusters.length == 0)')
-        | You have no clusters configured. Please configure them #[a(ui-sref='base.configuration.clusters') here].
-
-    div(ng-show='clusters && clusters.length > 0' ignite-loading='summaryPage' ignite-loading-text='Loading summary screen...' ignite-loading-position='top')
-        +main-table('clusters', 'clustersView', 'clusterName', 'selectItem(row)', '{{$index + 1}}) {{row.name}}', 'name')
-        div(ng-show='selectedItem && contentVisible(displayedRows, selectedItem)')
-            .actions.padding-top-dflt(bs-affix)
-                div
-                    button.btn.btn-primary(id='download' ng-click='downloadConfiguration()' bs-tooltip='' data-title='Download project' data-placement='bottom' ng-disabled='isPrepareDownloading')
-                        div
-                            i.fa.fa-fw.fa-download(ng-hide='isPrepareDownloading')
-                            i.fa.fa-fw.fa-refresh.fa-spin(ng-show='isPrepareDownloading')
-                            span.tipLabel Download project
-                    button.btn.btn-primary(bs-tooltip='' data-title='Preview generated project structure' data-placement='bottom')
-                        div(bs-popover data-template-url='/configuration/summary-project-structure.html', data-placement='bottom', data-trigger='click' data-auto-close='true')
-                            i.fa.fa-sitemap
-                            label.tipLabel Project structure
-                    button.btn.btn-primary(id='proprietary-jdbc-drivers' ng-if='downloadJdbcDriversVisible()' ng-click='downloadJdbcDrivers()' bs-tooltip='' data-title='Open proprietary JDBC drivers download pages' data-placement='bottom') Download JDBC drivers
-                .actions-note(ng-show='ui.isSafari')
-                    i.icon-note
-                    label "Download project" is not fully supported in Safari. Please rename downloaded file from "Unknown" to "&lt;project-name&gt;.zip"
-                hr
-            .bs-affix-fix
-            .panel-group(bs-collapse ng-init='ui.activePanels=[0,1]' ng-model='ui.activePanels' data-allow-multiple='true')
-                .panel.panel-default
-                    .panel-heading(role='tab' bs-collapse-toggle)
-                        ignite-form-panel-chevron
-                        label Server
-
-                    .panel-collapse(id='server' role='tabpanel' bs-collapse-target)
-                        .summary-tabs(ignite-ui-ace-tabs)
-                            div(bs-tabs data-bs-active-pane="tabsServer.activeTab" template='configuration/summary-tabs.html')
-                                div(bs-pane title='XML')
-                                    ignite-ui-ace-spring(ng-if='tabsServer.activeTab == 0 || tabsServer.init[0]' ng-init='tabsServer.init[0] = true' data-master='cluster' data-generator='igniteConfiguration' data-no-deep-watch)
-                                div(bs-pane title='Java')
-                                    ignite-ui-ace-java(ng-if='tabsServer.activeTab == 1 || tabsServer.init[1]' ng-init='tabsServer.init[1] = true' data-master='cluster' data-generator='igniteConfiguration' data-no-deep-watch)
-                                div(bs-pane title='POM')
-                                    ignite-ui-ace-pom(ng-if='tabsServer.activeTab == 2 || tabsServer.init[2]' ng-init='tabsServer.init[2] = true' data-cluster='cluster' data-generator='igniteConfiguration' data-no-deep-watch)
-                                div(bs-pane title='Dockerfile')
-                                    ignite-ui-ace-docker(ng-if='tabsServer.activeTab == 3 || tabsServer.init[3]' ng-init='tabsServer.init[3] = true' data-cluster='cluster' data-generator='igniteConfiguration' data-no-deep-watch ng-model='ctrl.data.docker')
-
-                .panel.panel-default
-                    .panel-heading(role='tab' bs-collapse-toggle)
-                        ignite-form-panel-chevron
-                        label Client
-
-                    .panel-collapse(id='client' role='tabpanel' bs-collapse-target)
-                        .summary-tabs(ignite-ui-ace-tabs)
-                            div(bs-tabs data-bs-active-pane="tabsClient.activeTab" template='configuration/summary-tabs.html')
-                                div(bs-pane title='XML')
-                                    ignite-ui-ace-spring(ng-if='tabsClient.activeTab == 0 || tabsClient.init[0]' ng-init='tabsClient.init[0] = true' data-master='cluster' data-generator='igniteConfiguration' data-client='true' data-no-deep-watch)
-                                div(bs-pane title='Java')
-                                    ignite-ui-ace-java(ng-if='tabsClient.activeTab == 1 || tabsClient.init[1]' ng-init='tabsClient.init[1] = true' data-master='cluster' data-generator='igniteConfiguration' data-client='true' data-no-deep-watch)
-                                div(bs-pane title='POM')
-                                    ignite-ui-ace-pom(ng-if='tabsClient.activeTab == 2 || tabsClient.init[2]' ng-init='tabsClient.init[2] = true' data-cluster='cluster' data-generator='igniteConfiguration' data-client='true' data-no-deep-watch)
-                                div(bs-pane title='POJO' ng-if='cluster | hasPojo')
-                                    ignite-ui-ace-pojos(ng-if='tabsClient.activeTab == 3 || tabsClient.init[3]' ng-init='tabsClient.init[3] = true' data-cluster='cluster' data-no-deep-watch ng-model='ctrl.data.pojos')
-                        

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/configuration/summary.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/summary.tpl.pug b/modules/web-console/frontend/views/configuration/summary.tpl.pug
new file mode 100644
index 0000000..9fdd0de
--- /dev/null
+++ b/modules/web-console/frontend/views/configuration/summary.tpl.pug
@@ -0,0 +1,90 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+mixin hard-link(ref, txt)
+    a(style='color:#ec1c24' href=ref target='_blank') #{txt}
+
+.docs-header
+    h1 Configurations Summary
+.docs-body.summary
+    ignite-information
+        ul
+            li Preview XML configurations for #[a(href='https://apacheignite.readme.io/docs/clients-vs-servers' target='_blank') server and client] nodes
+            li Preview code configuration
+            li Preview #[a(href='https://apacheignite.readme.io/docs/docker-deployment' target='_blank') Docker file]
+            li Preview POM dependencies
+            li Download ready-to-use Maven project
+    hr
+    .padding-dflt(ng-if='ui.ready && (!clusters || clusters.length == 0)')
+        | You have no clusters configured. Please configure them #[a(ui-sref='base.configuration.clusters') here].
+
+    div(ng-show='clusters && clusters.length > 0' ignite-loading='summaryPage' ignite-loading-text='Loading summary screen...' ignite-loading-position='top')
+        +main-table('clusters', 'clustersView', 'clusterName', 'selectItem(row)', '{{$index + 1}}) {{row.name}}', 'name')
+        div(ng-show='selectedItem && contentVisible(displayedRows, selectedItem)')
+            .actions.padding-top-dflt(bs-affix)
+                div
+                    button.btn.btn-primary(id='download' ng-click='downloadConfiguration()' bs-tooltip='' data-title='Download project' data-placement='bottom' ng-disabled='isPrepareDownloading')
+                        div
+                            i.fa.fa-fw.fa-download(ng-hide='isPrepareDownloading')
+                            i.fa.fa-fw.fa-refresh.fa-spin(ng-show='isPrepareDownloading')
+                            span.tipLabel Download project
+                    button.btn.btn-primary(bs-tooltip='' data-title='Preview generated project structure' data-placement='bottom')
+                        div(bs-popover data-template-url='{{ ctrl.summaryProjectStructureTemplateUrl }}', data-placement='bottom', data-trigger='click' data-auto-close='true')
+                            i.fa.fa-sitemap
+                            label.tipLabel Project structure
+                    button.btn.btn-primary(id='proprietary-jdbc-drivers' ng-if='downloadJdbcDriversVisible()' ng-click='downloadJdbcDrivers()' bs-tooltip='' data-title='Open proprietary JDBC drivers download pages' data-placement='bottom') Download JDBC drivers
+                .actions-note(ng-show='ui.isSafari')
+                    i.icon-note
+                    label "Download project" is not fully supported in Safari. Please rename downloaded file from "Unknown" to "&lt;project-name&gt;.zip"
+                hr
+            .bs-affix-fix
+            .panel-group(bs-collapse ng-init='ui.activePanels=[0,1]' ng-model='ui.activePanels' data-allow-multiple='true')
+                .panel.panel-default
+                    .panel-heading(role='tab' bs-collapse-toggle)
+                        ignite-form-panel-chevron
+                        label Server
+
+                    .panel-collapse(id='server' role='tabpanel' bs-collapse-target)
+                        .summary-tabs(ignite-ui-ace-tabs)
+                            div(bs-tabs data-bs-active-pane='tabsServer.activeTab' data-template='summary-tabs.html')
+                                div(bs-pane title='XML')
+                                    ignite-ui-ace-spring(ng-if='tabsServer.activeTab == 0 || tabsServer.init[0]' ng-init='tabsServer.init[0] = true' data-master='cluster' data-generator='igniteConfiguration' data-no-deep-watch)
+                                div(bs-pane title='Java')
+                                    ignite-ui-ace-java(ng-if='tabsServer.activeTab == 1 || tabsServer.init[1]' ng-init='tabsServer.init[1] = true' data-master='cluster' data-generator='igniteConfiguration' data-no-deep-watch)
+                                div(bs-pane title='POM')
+                                    ignite-ui-ace-pom(ng-if='tabsServer.activeTab == 2 || tabsServer.init[2]' ng-init='tabsServer.init[2] = true' data-cluster='cluster' data-generator='igniteConfiguration' data-no-deep-watch)
+                                div(bs-pane title='Dockerfile')
+                                    ignite-ui-ace-docker(ng-if='tabsServer.activeTab == 3 || tabsServer.init[3]' ng-init='tabsServer.init[3] = true' data-cluster='cluster' data-generator='igniteConfiguration' data-no-deep-watch ng-model='ctrl.data.docker')
+
+                .panel.panel-default
+                    .panel-heading(role='tab' bs-collapse-toggle)
+                        ignite-form-panel-chevron
+                        label Client
+
+                    .panel-collapse(id='client' role='tabpanel' bs-collapse-target)
+                        .summary-tabs(ignite-ui-ace-tabs)
+                            div(bs-tabs data-bs-active-pane='tabsClient.activeTab' data-template='summary-tabs.html')
+                                div(bs-pane title='XML')
+                                    ignite-ui-ace-spring(ng-if='tabsClient.activeTab == 0 || tabsClient.init[0]' ng-init='tabsClient.init[0] = true' data-master='cluster' data-generator='igniteConfiguration' data-client='true' data-no-deep-watch)
+                                div(bs-pane title='Java')
+                                    ignite-ui-ace-java(ng-if='tabsClient.activeTab == 1 || tabsClient.init[1]' ng-init='tabsClient.init[1] = true' data-master='cluster' data-generator='igniteConfiguration' data-client='true' data-no-deep-watch)
+                                div(bs-pane title='POM')
+                                    ignite-ui-ace-pom(ng-if='tabsClient.activeTab == 2 || tabsClient.init[2]' ng-init='tabsClient.init[2] = true' data-cluster='cluster' data-generator='igniteConfiguration' data-client='true' data-no-deep-watch)
+                                div(bs-pane title='POJO' ng-if='cluster | hasPojo')
+                                    ignite-ui-ace-pojos(ng-if='tabsClient.activeTab == 3 || tabsClient.init[3]' ng-init='tabsClient.init[3] = true' data-cluster='cluster' data-no-deep-watch ng-model='ctrl.data.pojos')
+                        

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/includes/footer.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/includes/footer.jade b/modules/web-console/frontend/views/includes/footer.jade
deleted file mode 100644
index 4ef3bf6..0000000
--- a/modules/web-console/frontend/views/includes/footer.jade
+++ /dev/null
@@ -1,23 +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.
-
-.container.container-footer
-    footer
-        .col-md-offset-1.col-md-10
-            ignite-footer
-        .col-md-1
-            .pull-right
-                ignite-powered-by-apache

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/includes/footer.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/includes/footer.pug b/modules/web-console/frontend/views/includes/footer.pug
new file mode 100644
index 0000000..4ef3bf6
--- /dev/null
+++ b/modules/web-console/frontend/views/includes/footer.pug
@@ -0,0 +1,23 @@
+//-
+    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.
+
+.container.container-footer
+    footer
+        .col-md-offset-1.col-md-10
+            ignite-footer
+        .col-md-1
+            .pull-right
+                ignite-powered-by-apache

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/includes/header.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/includes/header.jade b/modules/web-console/frontend/views/includes/header.jade
deleted file mode 100644
index 99bcea9..0000000
--- a/modules/web-console/frontend/views/includes/header.jade
+++ /dev/null
@@ -1,52 +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.
-
-header#header.header
-    .viewedUser(ng-show='$root.user.becomeUsed')
-        | Currently assuming #[strong {{$root.user.firstName}} {{$root.user.lastName}}], #[a(ng-click='$root.revertIdentity()') revert to your identity].
-    table.container
-        tr
-            td.col-xs-3.col-sm-3.col-md-2
-                ignite-header-logo
-            td(ng-if='$root.user' style='padding-top: 20px')
-                ul.nav.navbar-nav(ignite-sidebar ignite-navbar)
-                    li(ng-class='{active: $state.includes("base.configuration")}' bs-dropdown='sidebar.items' data-placement='bottom-right' data-trigger='hover focus' data-container='self' data-animation='' ng-click='$event.stopPropagation()')
-                        a.dropdown-toggle Configure
-                            span.caret
-
-                ul.nav.navbar-nav(ng-controller='notebookController')
-                    li.sql-notebooks(ng-if='IgniteDemoMode' ng-class='{active: $state.includes("base.sql")}')
-                        a(ui-sref='base.sql.demo') Queries
-
-                    li.sql-notebooks(ng-if='!IgniteDemoMode && !notebooks.length' ng-class='{active: $state.includes("base.sql")}')
-                        a(ng-click='createNotebook()') Queries
-
-                    li.sql-notebooks(ng-if='!IgniteDemoMode && notebooks.length' ng-class='{active: $state.includes("base.sql")}' bs-dropdown='notebooks' data-placement='bottom-left' data-trigger='hover focus' data-container='self' data-animation='' ng-click='$event.stopPropagation()' aria-haspopup='true' aria-expanded='false')
-                        a.dropdown-toggle Queries
-                            span.caret
-
-                    li(ui-sref-active='active' ng-repeat='item in navbar.items' ng-class='{active: $state.includes("base.monitoring")}' bs-dropdown='item.children' data-placement='bottom-left' data-trigger='hover focus' data-container='self' data-animation='' ng-click='$event.stopPropagation()' aria-haspopup='true' aria-expanded='false')
-                        a.dropdown-toggle {{::item.text}}
-                            span.caret
-
-                a(ng-controller='demoController')
-                    button.btn.btn-info(ng-if='IgniteDemoMode' ng-click='closeDemo()') Close demo
-                    button.btn.btn-info(ng-if='!IgniteDemoMode' ng-click='startDemo()') Start demo
-
-                ul.nav.navbar-nav.pull-right(ignite-userbar)
-                    li(bs-dropdown='userbar.items' data-placement='bottom-right' data-trigger='hover focus' data-container='self' data-animation='' ng-class='{active: $state.includes("settings")}' ng-click='$event.stopPropagation()')
-                        a.dropdown-toggle {{user.firstName}} {{user.lastName}}
-                            span.caret

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/includes/header.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/includes/header.pug b/modules/web-console/frontend/views/includes/header.pug
new file mode 100644
index 0000000..99bcea9
--- /dev/null
+++ b/modules/web-console/frontend/views/includes/header.pug
@@ -0,0 +1,52 @@
+//-
+    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.
+
+header#header.header
+    .viewedUser(ng-show='$root.user.becomeUsed')
+        | Currently assuming #[strong {{$root.user.firstName}} {{$root.user.lastName}}], #[a(ng-click='$root.revertIdentity()') revert to your identity].
+    table.container
+        tr
+            td.col-xs-3.col-sm-3.col-md-2
+                ignite-header-logo
+            td(ng-if='$root.user' style='padding-top: 20px')
+                ul.nav.navbar-nav(ignite-sidebar ignite-navbar)
+                    li(ng-class='{active: $state.includes("base.configuration")}' bs-dropdown='sidebar.items' data-placement='bottom-right' data-trigger='hover focus' data-container='self' data-animation='' ng-click='$event.stopPropagation()')
+                        a.dropdown-toggle Configure
+                            span.caret
+
+                ul.nav.navbar-nav(ng-controller='notebookController')
+                    li.sql-notebooks(ng-if='IgniteDemoMode' ng-class='{active: $state.includes("base.sql")}')
+                        a(ui-sref='base.sql.demo') Queries
+
+                    li.sql-notebooks(ng-if='!IgniteDemoMode && !notebooks.length' ng-class='{active: $state.includes("base.sql")}')
+                        a(ng-click='createNotebook()') Queries
+
+                    li.sql-notebooks(ng-if='!IgniteDemoMode && notebooks.length' ng-class='{active: $state.includes("base.sql")}' bs-dropdown='notebooks' data-placement='bottom-left' data-trigger='hover focus' data-container='self' data-animation='' ng-click='$event.stopPropagation()' aria-haspopup='true' aria-expanded='false')
+                        a.dropdown-toggle Queries
+                            span.caret
+
+                    li(ui-sref-active='active' ng-repeat='item in navbar.items' ng-class='{active: $state.includes("base.monitoring")}' bs-dropdown='item.children' data-placement='bottom-left' data-trigger='hover focus' data-container='self' data-animation='' ng-click='$event.stopPropagation()' aria-haspopup='true' aria-expanded='false')
+                        a.dropdown-toggle {{::item.text}}
+                            span.caret
+
+                a(ng-controller='demoController')
+                    button.btn.btn-info(ng-if='IgniteDemoMode' ng-click='closeDemo()') Close demo
+                    button.btn.btn-info(ng-if='!IgniteDemoMode' ng-click='startDemo()') Start demo
+
+                ul.nav.navbar-nav.pull-right(ignite-userbar)
+                    li(bs-dropdown='userbar.items' data-placement='bottom-right' data-trigger='hover focus' data-container='self' data-animation='' ng-class='{active: $state.includes("settings")}' ng-click='$event.stopPropagation()')
+                        a.dropdown-toggle {{user.firstName}} {{user.lastName}}
+                            span.caret

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/index.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/index.jade b/modules/web-console/frontend/views/index.jade
deleted file mode 100644
index c561c3e..0000000
--- a/modules/web-console/frontend/views/index.jade
+++ /dev/null
@@ -1,47 +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-console' id='app' ng-strict-di)
-    head
-        base(href='/')
-
-        meta(http-equiv='content-type' content='text/html; charset=UTF8')
-        meta(http-equiv='content-language' content='en')
-
-        title(ng-bind='$meta.title')
-
-        meta(name='fragment' content='!')
-        meta(name='description' content='{{$meta.description}}')
-        meta(name='keywords' content='{{$meta.keywords}}')
-        meta(ng-repeat='(key, value) in $meta.properties' name='{{::key}}' content='{{::value}}')
-
-    body.theme-line.body-overlap.greedy
-
-        .splash.splash-max-foreground(hide-on-state-change)
-            .splash-wrapper
-                .spinner
-                    .bounce1
-                    .bounce2
-                    .bounce3
-
-                .splash-wellcome Loading...
-
-        .ribbon-wrapper.right(ng-cloak)
-            .ribbon(ng-style='IgniteDemoMode && {"background": "#1b6d88"}')
-                label {{IgniteDemoMode ? "Demo" : "Beta" }}
-
-        .wrapper(ui-view='')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/views/index.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/index.pug b/modules/web-console/frontend/views/index.pug
new file mode 100644
index 0000000..c561c3e
--- /dev/null
+++ b/modules/web-console/frontend/views/index.pug
@@ -0,0 +1,47 @@
+//-
+    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-console' id='app' ng-strict-di)
+    head
+        base(href='/')
+
+        meta(http-equiv='content-type' content='text/html; charset=UTF8')
+        meta(http-equiv='content-language' content='en')
+
+        title(ng-bind='$meta.title')
+
+        meta(name='fragment' content='!')
+        meta(name='description' content='{{$meta.description}}')
+        meta(name='keywords' content='{{$meta.keywords}}')
+        meta(ng-repeat='(key, value) in $meta.properties' name='{{::key}}' content='{{::value}}')
+
+    body.theme-line.body-overlap.greedy
+
+        .splash.splash-max-foreground(hide-on-state-change)
+            .splash-wrapper
+                .spinner
+                    .bounce1
+                    .bounce2
+                    .bounce3
+
+                .splash-wellcome Loading...
+
+        .ribbon-wrapper.right(ng-cloak)
+            .ribbon(ng-style='IgniteDemoMode && {"background": "#1b6d88"}')
+                label {{IgniteDemoMode ? "Demo" : "Beta" }}
+
+        .wrapper(ui-view='')


[14/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.jade
deleted file mode 100644
index 5db89f5..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.jade
+++ /dev/null
@@ -1,24 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.discovery.ZooKeeper.retryPolicy'
--var retry = model + '.Custom'
--var required = 'backupItem.discovery.kind === "ZooKeeper" && backupItem.discovery.ZooKeeper.retryPolicy.kind === "Custom"'
-
-.details-row
-    +java-class('Class name:', retry + '.className', '"customClassName"', 'true', required, 'Custom retry policy implementation class name', required)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.pug
new file mode 100644
index 0000000..884a7d6
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/custom.pug
@@ -0,0 +1,24 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.discovery.ZooKeeper.retryPolicy'
+-var retry = `${model}.Custom`
+-var required = 'backupItem.discovery.kind === "ZooKeeper" && backupItem.discovery.ZooKeeper.retryPolicy.kind === "Custom"'
+
+.details-row
+    +java-class('Class name:', `${retry}.className`, '"customClassName"', 'true', required, 'Custom retry policy implementation class name', required)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.jade
deleted file mode 100644
index 0a072f7..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.jade
+++ /dev/null
@@ -1,27 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.discovery.ZooKeeper.retryPolicy.ExponentialBackoff'
-
-div
-    .details-row
-        +number('Base interval:', model + '.baseSleepTimeMs', '"expBaseSleepTimeMs"', 'true', '1000', '0', 'Initial amount of time in ms to wait between retries')
-    .details-row
-        +number-min-max('Max retries:', model + '.maxRetries', '"expMaxRetries"', 'true', '10', '0', '29', 'Max number of times to retry')
-    .details-row
-        +number('Max interval:', model + '.maxSleepMs', '"expMaxSleepMs"', 'true', 'Integer.MAX_VALUE', '0', 'Max time in ms to sleep on each retry')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.pug
new file mode 100644
index 0000000..93b2709
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/exponential-backoff.pug
@@ -0,0 +1,27 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.discovery.ZooKeeper.retryPolicy.ExponentialBackoff'
+
+div
+    .details-row
+        +number('Base interval:', `${model}.baseSleepTimeMs`, '"expBaseSleepTimeMs"', 'true', '1000', '0', 'Initial amount of time in ms to wait between retries')
+    .details-row
+        +number-min-max('Max retries:', `${model}.maxRetries`, '"expMaxRetries"', 'true', '10', '0', '29', 'Max number of times to retry')
+    .details-row
+        +number('Max interval:', `${model}.maxSleepMs`, '"expMaxSleepMs"', 'true', 'Integer.MAX_VALUE', '0', 'Max time in ms to sleep on each retry')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.jade
deleted file mode 100644
index a7bfd20..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.jade
+++ /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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.discovery.ZooKeeper.retryPolicy.Forever'
-
-.details-row
-    +number('Interval:', model + '.retryIntervalMs', '"feRetryIntervalMs"', 'true', '1000', '0', 'Time in ms between retry attempts')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.pug
new file mode 100644
index 0000000..2d7d2e8
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/forever.pug
@@ -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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.discovery.ZooKeeper.retryPolicy.Forever'
+
+.details-row
+    +number('Interval:', `${model}.retryIntervalMs`, '"feRetryIntervalMs"', 'true', '1000', '0', 'Time in ms between retry attempts')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.jade
deleted file mode 100644
index 1746232..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.jade
+++ /dev/null
@@ -1,25 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.discovery.ZooKeeper.retryPolicy.NTimes'
-
-div
-    .details-row
-        +number('Retries:', model + '.n', '"n"', 'true', '10', '0', 'Number of times to retry')
-    .details-row
-        +number('Interval:', model + '.sleepMsBetweenRetries', '"ntSleepMsBetweenRetries"', 'true', '1000', '0', 'Time in ms between retry attempts')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.pug
new file mode 100644
index 0000000..fdaead1
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/n-times.pug
@@ -0,0 +1,25 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.discovery.ZooKeeper.retryPolicy.NTimes'
+
+div
+    .details-row
+        +number('Retries:', `${model}.n`, '"n"', 'true', '10', '0', 'Number of times to retry')
+    .details-row
+        +number('Interval:', `${model}.sleepMsBetweenRetries`, '"ntSleepMsBetweenRetries"', 'true', '1000', '0', 'Time in ms between retry attempts')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.jade
deleted file mode 100644
index 5a7e3fe..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.jade
+++ /dev/null
@@ -1,23 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.discovery.ZooKeeper.retryPolicy.OneTime'
-
-div
-    .details-row
-        +number('Interval:', model + '.sleepMsBetweenRetry', '"oneSleepMsBetweenRetry"', 'true', '1000', '0', 'Time in ms to retry attempt')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.pug
new file mode 100644
index 0000000..53fc9be
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/one-time.pug
@@ -0,0 +1,23 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.discovery.ZooKeeper.retryPolicy.OneTime'
+
+div
+    .details-row
+        +number('Interval:', `${model}.sleepMsBetweenRetry`, '"oneSleepMsBetweenRetry"', 'true', '1000', '0', 'Time in ms to retry attempt')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.jade
deleted file mode 100644
index 548211c..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.jade
+++ /dev/null
@@ -1,25 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.discovery.ZooKeeper.retryPolicy.UntilElapsed'
-
-div
-    .details-row
-        +number('Total time:', model + '.maxElapsedTimeMs', '"ueMaxElapsedTimeMs"', 'true', '60000', '0', 'Total time in ms for execution of retry attempt')
-    .details-row
-        +number('Interval:', model + '.sleepMsBetweenRetries', '"ueSleepMsBetweenRetries"', 'true', '1000', '0', 'Time in ms between retry attempts')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.pug
new file mode 100644
index 0000000..16ddfc5
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general/discovery/zookeeper/retrypolicy/until-elapsed.pug
@@ -0,0 +1,25 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.discovery.ZooKeeper.retryPolicy.UntilElapsed'
+
+div
+    .details-row
+        +number('Total time:', `${model}.maxElapsedTimeMs`, '"ueMaxElapsedTimeMs"', 'true', '60000', '0', 'Total time in ms for execution of retry attempt')
+    .details-row
+        +number('Interval:', `${model}.sleepMsBetweenRetries`, '"ueSleepMsBetweenRetries"', 'true', '1000', '0', 'Time in ms between retry attempts')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/igfs.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/igfs.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/igfs.jade
deleted file mode 100644
index 25bd5b0..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/igfs.jade
+++ /dev/null
@@ -1,38 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'igfs'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label IGFS
-        ignite-form-field-tooltip.tipLabel
-            | IGFS (Ignite In-Memory File System) configurations assigned to cluster#[br]
-            | #[a(href="https://apacheignite-fs.readme.io/docs/in-memory-file-system" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown-multiple('<span>IGFS:</span><a ui-sref="base.configuration.igfs({linkId: linkId()})"> (add)</a>',
-                        model + '.igfss', '"igfss"', true, 'Choose IGFS', 'No IGFS configured', 'igfss',
-                        'Select IGFS to start in cluster or add a new IGFS')
-            .col-sm-6
-                +preview-xml-java(model, 'igfss', 'igfss')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/igfs.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/igfs.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/igfs.pug
new file mode 100644
index 0000000..8c20a45
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/igfs.pug
@@ -0,0 +1,38 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'igfs'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label IGFS
+        ignite-form-field-tooltip.tipLabel
+            | IGFS (Ignite In-Memory File System) configurations assigned to cluster#[br]
+            | #[a(href="https://apacheignite-fs.readme.io/docs/in-memory-file-system" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown-multiple('<span>IGFS:</span><a ui-sref="base.configuration.igfs({linkId: linkId()})"> (add)</a>',
+                        `${model}.igfss`, '"igfss"', true, 'Choose IGFS', 'No IGFS configured', 'igfss',
+                        'Select IGFS to start in cluster or add a new IGFS')
+            .col-sm-6
+                +preview-xml-java(model, 'igfss', 'igfss')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.jade
deleted file mode 100644
index 9fa9fc9..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.jade
+++ /dev/null
@@ -1,107 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem'
--var form = 'loadBalancing'
--var loadBalancingSpi = model + '.loadBalancingSpi'
--var loadBalancingCustom = 'model.kind === "Custom"'
--var loadProbeCustom = 'model.kind === "Adaptive" && model.Adaptive.loadProbe.kind === "Custom"'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Load balancing configuration
-        ignite-form-field-tooltip.tipLabel
-            | Load balancing component balances job distribution among cluster nodes#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/load-balancing" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row(ng-init='loadBalancingSpiTbl={type: "loadBalancingSpi", model: "loadBalancingSpi", focusId: "kind", ui: "load-balancing-table"}')
-                    +ignite-form-group()
-                        ignite-form-field-label
-                            | Load balancing configurations
-                        ignite-form-group-tooltip
-                            | Load balancing component balances job distribution among cluster nodes
-                        ignite-form-group-add(ng-click='tableNewItem(loadBalancingSpiTbl)')
-                            | Add load balancing configuration
-                        .group-content-empty(ng-if='!(#{loadBalancingSpi} && #{loadBalancingSpi}.length > 0)')
-                            | Not defined
-                        .group-content(ng-show='#{loadBalancingSpi} && #{loadBalancingSpi}.length > 0' ng-repeat='model in #{loadBalancingSpi} track by $index')
-                            hr(ng-if='$index != 0')
-                            .settings-row
-                                +dropdown-required-autofocus('Load balancing:', 'model.kind', '"loadBalancingKind" + $index', 'true', 'true', 'Choose load balancing SPI', '[\
-                                        {value: "RoundRobin", label: "Round-robin"},\
-                                        {value: "Adaptive", label: "Adaptive"},\
-                                        {value: "WeightedRandom", label: "Random"},\
-                                        {value: "Custom", label: "Custom"}\
-                                    ]', 'Provides the next best balanced node for job execution\
-                                    <ul>\
-                                        <li>Round-robin - Iterates through nodes in round-robin fashion and pick the next sequential node</li>\
-                                        <li>Adaptive - Adapts to overall node performance</li>\
-                                        <li>Random - Picks a random node for job execution</li>\
-                                        <li>Custom - Custom load balancing implementation</li>\
-                                    </ul>')
-
-                                    +table-remove-button(loadBalancingSpi, 'Remove load balancing SPI')
-                            .settings-row(ng-show='model.kind === "RoundRobin"')
-                                +checkbox('Per task', 'model.RoundRobin.perTask', '"loadBalancingRRPerTask" + $index', 'A new round robin order should be created for every task flag')
-                            .settings-row(ng-show='model.kind === "Adaptive"')
-                                +dropdown('Load probe:', 'model.Adaptive.loadProbe.kind', '"loadBalancingAdaptiveLoadProbeKind" + $index', 'true', 'Default', '[\
-                                        {value: "Job", label: "Job count"},\
-                                        {value: "CPU", label: "CPU load"},\
-                                        {value: "ProcessingTime", label: "Processing time"},\
-                                        {value: "Custom", label: "Custom"},\
-                                        {value: undefined, label: "Default"}\
-                                    ]', 'Implementation of node load probing\
-                                    <ul>\
-                                        <li>Job count - Based on active and waiting job count</li>\
-                                        <li>CPU load - Based on CPU load</li>\
-                                        <li>Processing time - Based on total job processing time</li>\
-                                        <li>Custom - Custom load probing implementation</li>\
-                                        <li>Default - Default load probing implementation</li>\
-                                    </ul>')
-                            .settings-row(ng-show='model.kind === "Adaptive" && model.Adaptive.loadProbe.kind')
-                                .panel-details(ng-show='model.Adaptive.loadProbe.kind === "Job"')
-                                    .details-row
-                                        +checkbox('Use average', 'model.Adaptive.loadProbe.Job.useAverage', '"loadBalancingAdaptiveJobUseAverage" + $index', 'Use average CPU load vs. current')
-                                .panel-details(ng-show='model.Adaptive.loadProbe.kind === "CPU"')
-                                    .details-row
-                                        +checkbox('Use average', 'model.Adaptive.loadProbe.CPU.useAverage', '"loadBalancingAdaptiveCPUUseAverage" + $index', 'Use average CPU load vs. current')
-                                    .details-row
-                                        +checkbox('Use processors', 'model.Adaptive.loadProbe.CPU.useProcessors', '"loadBalancingAdaptiveCPUUseProcessors" + $index', "divide each node's CPU load by the number of processors on that node")
-                                    .details-row
-                                        +number-min-max-step('Processor coefficient:', 'model.Adaptive.loadProbe.CPU.processorCoefficient',
-                                            '"loadBalancingAdaptiveCPUProcessorCoefficient" + $index', 'true', '1', '0.001', '1', '0.05', 'Coefficient of every CPU')
-                                .panel-details(ng-show='model.Adaptive.loadProbe.kind === "ProcessingTime"')
-                                    .details-row
-                                        +checkbox('Use average', 'model.Adaptive.loadProbe.ProcessingTime.useAverage', '"loadBalancingAdaptiveJobUseAverage" + $index', 'Use average execution time vs. current')
-                                .panel-details(ng-show=loadProbeCustom)
-                                    .details-row
-                                        +java-class('Load brobe implementation:', 'model.Adaptive.loadProbe.Custom.className', '"loadBalancingAdaptiveJobUseClass" + $index', 'true', loadProbeCustom,
-                                            'Custom load balancing SPI implementation class name.', loadProbeCustom)
-                            .settings-row(ng-show='model.kind === "WeightedRandom"')
-                                +number('Node weight:', 'model.WeightedRandom.nodeWeight', '"loadBalancingWRNodeWeight" + $index', 'true', 10, '1', 'Weight of node')
-                            .settings-row(ng-show='model.kind === "WeightedRandom"')
-                                +checkbox('Use weights', 'model.WeightedRandom.useWeights', '"loadBalancingWRUseWeights" + $index', 'Node weights should be checked when doing random load balancing')
-                            .settings-row(ng-show=loadBalancingCustom)
-                                +java-class('Load balancing SPI implementation:', 'model.Custom.className', '"loadBalancingClass" + $index', 'true', loadBalancingCustom,
-                                    'Custom load balancing SPI implementation class name.', loadBalancingCustom)
-            .col-sm-6
-                +preview-xml-java(model, 'clusterLoadBalancing')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.pug
new file mode 100644
index 0000000..b80f430
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/load-balancing.pug
@@ -0,0 +1,107 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem'
+-var form = 'loadBalancing'
+-var loadBalancingSpi = model + '.loadBalancingSpi'
+-var loadBalancingCustom = 'model.kind === "Custom"'
+-var loadProbeCustom = 'model.kind === "Adaptive" && model.Adaptive.loadProbe.kind === "Custom"'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Load balancing configuration
+        ignite-form-field-tooltip.tipLabel
+            | Load balancing component balances job distribution among cluster nodes#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/load-balancing" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row(ng-init='loadBalancingSpiTbl={type: "loadBalancingSpi", model: "loadBalancingSpi", focusId: "kind", ui: "load-balancing-table"}')
+                    +ignite-form-group()
+                        ignite-form-field-label
+                            | Load balancing configurations
+                        ignite-form-group-tooltip
+                            | Load balancing component balances job distribution among cluster nodes
+                        ignite-form-group-add(ng-click='tableNewItem(loadBalancingSpiTbl)')
+                            | Add load balancing configuration
+                        .group-content-empty(ng-if=`!(${loadBalancingSpi} && ${loadBalancingSpi}.length > 0)`)
+                            | Not defined
+                        .group-content(ng-show=`${loadBalancingSpi} && ${loadBalancingSpi}.length > 0` ng-repeat=`model in ${loadBalancingSpi} track by $index`)
+                            hr(ng-if='$index != 0')
+                            .settings-row
+                                +dropdown-required-autofocus('Load balancing:', 'model.kind', '"loadBalancingKind" + $index', 'true', 'true', 'Choose load balancing SPI', '[\
+                                        {value: "RoundRobin", label: "Round-robin"},\
+                                        {value: "Adaptive", label: "Adaptive"},\
+                                        {value: "WeightedRandom", label: "Random"},\
+                                        {value: "Custom", label: "Custom"}\
+                                    ]', 'Provides the next best balanced node for job execution\
+                                    <ul>\
+                                        <li>Round-robin - Iterates through nodes in round-robin fashion and pick the next sequential node</li>\
+                                        <li>Adaptive - Adapts to overall node performance</li>\
+                                        <li>Random - Picks a random node for job execution</li>\
+                                        <li>Custom - Custom load balancing implementation</li>\
+                                    </ul>')
+
+                                    +table-remove-button(loadBalancingSpi, 'Remove load balancing SPI')
+                            .settings-row(ng-show='model.kind === "RoundRobin"')
+                                +checkbox('Per task', 'model.RoundRobin.perTask', '"loadBalancingRRPerTask" + $index', 'A new round robin order should be created for every task flag')
+                            .settings-row(ng-show='model.kind === "Adaptive"')
+                                +dropdown('Load probe:', 'model.Adaptive.loadProbe.kind', '"loadBalancingAdaptiveLoadProbeKind" + $index', 'true', 'Default', '[\
+                                        {value: "Job", label: "Job count"},\
+                                        {value: "CPU", label: "CPU load"},\
+                                        {value: "ProcessingTime", label: "Processing time"},\
+                                        {value: "Custom", label: "Custom"},\
+                                        {value: undefined, label: "Default"}\
+                                    ]', 'Implementation of node load probing\
+                                    <ul>\
+                                        <li>Job count - Based on active and waiting job count</li>\
+                                        <li>CPU load - Based on CPU load</li>\
+                                        <li>Processing time - Based on total job processing time</li>\
+                                        <li>Custom - Custom load probing implementation</li>\
+                                        <li>Default - Default load probing implementation</li>\
+                                    </ul>')
+                            .settings-row(ng-show='model.kind === "Adaptive" && model.Adaptive.loadProbe.kind')
+                                .panel-details(ng-show='model.Adaptive.loadProbe.kind === "Job"')
+                                    .details-row
+                                        +checkbox('Use average', 'model.Adaptive.loadProbe.Job.useAverage', '"loadBalancingAdaptiveJobUseAverage" + $index', 'Use average CPU load vs. current')
+                                .panel-details(ng-show='model.Adaptive.loadProbe.kind === "CPU"')
+                                    .details-row
+                                        +checkbox('Use average', 'model.Adaptive.loadProbe.CPU.useAverage', '"loadBalancingAdaptiveCPUUseAverage" + $index', 'Use average CPU load vs. current')
+                                    .details-row
+                                        +checkbox('Use processors', 'model.Adaptive.loadProbe.CPU.useProcessors', '"loadBalancingAdaptiveCPUUseProcessors" + $index', "divide each node's CPU load by the number of processors on that node")
+                                    .details-row
+                                        +number-min-max-step('Processor coefficient:', 'model.Adaptive.loadProbe.CPU.processorCoefficient',
+                                            '"loadBalancingAdaptiveCPUProcessorCoefficient" + $index', 'true', '1', '0.001', '1', '0.05', 'Coefficient of every CPU')
+                                .panel-details(ng-show='model.Adaptive.loadProbe.kind === "ProcessingTime"')
+                                    .details-row
+                                        +checkbox('Use average', 'model.Adaptive.loadProbe.ProcessingTime.useAverage', '"loadBalancingAdaptiveJobUseAverage" + $index', 'Use average execution time vs. current')
+                                .panel-details(ng-show=loadProbeCustom)
+                                    .details-row
+                                        +java-class('Load brobe implementation:', 'model.Adaptive.loadProbe.Custom.className', '"loadBalancingAdaptiveJobUseClass" + $index', 'true', loadProbeCustom,
+                                            'Custom load balancing SPI implementation class name.', loadProbeCustom)
+                            .settings-row(ng-show='model.kind === "WeightedRandom"')
+                                +number('Node weight:', 'model.WeightedRandom.nodeWeight', '"loadBalancingWRNodeWeight" + $index', 'true', 10, '1', 'Weight of node')
+                            .settings-row(ng-show='model.kind === "WeightedRandom"')
+                                +checkbox('Use weights', 'model.WeightedRandom.useWeights', '"loadBalancingWRUseWeights" + $index', 'Node weights should be checked when doing random load balancing')
+                            .settings-row(ng-show=loadBalancingCustom)
+                                +java-class('Load balancing SPI implementation:', 'model.Custom.className', '"loadBalancingClass" + $index', 'true', loadBalancingCustom,
+                                    'Custom load balancing SPI implementation class name.', loadBalancingCustom)
+            .col-sm-6
+                +preview-xml-java(model, 'clusterLoadBalancing')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.jade
deleted file mode 100644
index 983d818..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.jade
+++ /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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'logger'
--var model = 'backupItem.logger'
--var kind = model + '.kind'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Logger configuration
-        ignite-form-field-tooltip.tipLabel
-            | Logging functionality used throughout the system
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown('Logger:', kind, '"logger"', 'true', 'Default',
-                        '[\
-                            {value: "Log4j", label: "Apache Log4j"},\
-                            {value: "Log4j2", label: "Apache Log4j 2"},\
-                            {value: "SLF4J", label: "Simple Logging Facade (SLF4J)"},\
-                            {value: "Java", label: "Java logger (JUL)"},\
-                            {value: "JCL", label: "Jakarta Commons Logging (JCL)"},\
-                            {value: "Null", label: "Null logger"},\
-                            {value: "Custom", label: "Custom"},\
-                            {value: undefined, label: "Default"}\
-                        ]',
-                        'Logger implementations\
-                        <ul>\
-                            <li>Apache Log4j - log4j-based logger</li>\
-                            <li>Apache Log4j 2 - Log4j2-based logger</li>\
-                            <li>Simple Logging Facade (SLF4J) - SLF4j-based logger</li>\
-                            <li>Java logger (JUL) - built in java logger</li>\
-                            <li>Jakarta Commons Logging (JCL) - wraps any JCL (Jakarta Commons Logging) loggers</li>\
-                            <li>Null logger - logger which does not output anything</li>\
-                            <li>Custom - custom logger implementation</li>\
-                            <li>Default - Apache Log4j if awailable on classpath or Java logger otherwise</li>\
-                        </ul>')
-                .settings-row(ng-show='#{kind} && (#{kind} === "Log4j2" || #{kind} === "Log4j" || #{kind} === "Custom")')
-                    .panel-details
-                        div(ng-show='#{kind} === "Log4j2"')
-                            include ./logger/log4j2.jade
-                        div(ng-show='#{kind} === "Log4j"')
-                            include ./logger/log4j.jade
-                        div(ng-show='#{kind} === "Custom"')
-                            include ./logger/custom.jade
-            .col-sm-6
-                -var model = 'backupItem.logger'
-                +preview-xml-java(model, 'clusterLogger')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.pug
new file mode 100644
index 0000000..f135114
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger.pug
@@ -0,0 +1,66 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'logger'
+-var model = 'backupItem.logger'
+-var kind = model + '.kind'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Logger configuration
+        ignite-form-field-tooltip.tipLabel
+            | Logging functionality used throughout the system
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown('Logger:', kind, '"logger"', 'true', 'Default',
+                        '[\
+                            {value: "Log4j", label: "Apache Log4j"},\
+                            {value: "Log4j2", label: "Apache Log4j 2"},\
+                            {value: "SLF4J", label: "Simple Logging Facade (SLF4J)"},\
+                            {value: "Java", label: "Java logger (JUL)"},\
+                            {value: "JCL", label: "Jakarta Commons Logging (JCL)"},\
+                            {value: "Null", label: "Null logger"},\
+                            {value: "Custom", label: "Custom"},\
+                            {value: undefined, label: "Default"}\
+                        ]',
+                        'Logger implementations\
+                        <ul>\
+                            <li>Apache Log4j - log4j-based logger</li>\
+                            <li>Apache Log4j 2 - Log4j2-based logger</li>\
+                            <li>Simple Logging Facade (SLF4J) - SLF4j-based logger</li>\
+                            <li>Java logger (JUL) - built in java logger</li>\
+                            <li>Jakarta Commons Logging (JCL) - wraps any JCL (Jakarta Commons Logging) loggers</li>\
+                            <li>Null logger - logger which does not output anything</li>\
+                            <li>Custom - custom logger implementation</li>\
+                            <li>Default - Apache Log4j if awailable on classpath or Java logger otherwise</li>\
+                        </ul>')
+                .settings-row(ng-show=`${kind} && (${kind} === 'Log4j2' || ${kind} === 'Log4j' || ${kind} === 'Custom')`)
+                    .panel-details
+                        div(ng-show=`${kind} === 'Log4j2'`)
+                            include ./logger/log4j2
+                        div(ng-show=`${kind} === 'Log4j'`)
+                            include ./logger/log4j
+                        div(ng-show=`${kind} === 'Custom'`)
+                            include ./logger/custom
+            .col-sm-6
+                -var model = 'backupItem.logger'
+                +preview-xml-java(model, 'clusterLogger')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.jade
deleted file mode 100644
index 87d2b7d..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.jade
+++ /dev/null
@@ -1,25 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'logger'
--var model = 'backupItem.logger.Custom'
--var required = 'backupItem.logger.kind === "Custom"'
-
-div
-    .details-row
-        +java-class('Class:', model + '.class', '"customLogger"', 'true', required, 'Logger implementation class name', required)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.pug
new file mode 100644
index 0000000..9852e94
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/custom.pug
@@ -0,0 +1,25 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'logger'
+-var model = 'backupItem.logger.Custom'
+-var required = 'backupItem.logger.kind === "Custom"'
+
+div
+    .details-row
+        +java-class('Class:', `${model}.class`, '"customLogger"', 'true', required, 'Logger implementation class name', required)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.jade
deleted file mode 100644
index 1eaa529..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.jade
+++ /dev/null
@@ -1,50 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'logger'
--var model = 'backupItem.logger.Log4j'
--var pathRequired = model + '.mode === "Path" && backupItem.logger.kind === "Log4j"'
-
-div
-    .details-row
-        +dropdown('Level:', model + '.level', '"log4jLevel"', 'true', 'Default',
-            '[\
-                {value: "OFF", label: "OFF"},\
-                {value: "FATAL", label: "FATAL"},\
-                {value: "ERROR", label: "ERROR"},\
-                {value: "WARN", label: "WARN"},\
-                {value: "INFO", label: "INFO"},\
-                {value: "DEBUG", label: "DEBUG"},\
-                {value: "TRACE", label: "TRACE"},\
-                {value: "ALL", label: "ALL"},\
-                {value: undefined, label: "Default"}\
-            ]',
-            'Level for internal log4j implementation')
-    .details-row
-        +dropdown-required('Logger configuration:', model + '.mode', '"log4jMode"', 'true', 'true', 'Choose logger mode',
-            '[\
-                {value: "Default", label: "Default"},\
-                {value: "Path", label: "Path"}\
-            ]',
-            'Choose logger configuration\
-            <ul>\
-                <li>Default - default logger</li>\
-                <li>Path - path or URI to XML configuration</li>\
-            </ul>')
-    .details-row(ng-show=pathRequired)
-        +text('Path:', model + '.path', '"log4jPath"', pathRequired, 'Input path', 'Path or URI to XML configuration')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.pug
new file mode 100644
index 0000000..fadaea4
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j.pug
@@ -0,0 +1,50 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'logger'
+-var model = 'backupItem.logger.Log4j'
+-var pathRequired = model + '.mode === "Path" && backupItem.logger.kind === "Log4j"'
+
+div
+    .details-row
+        +dropdown('Level:', `${model}.level`, '"log4jLevel"', 'true', 'Default',
+            '[\
+                {value: "OFF", label: "OFF"},\
+                {value: "FATAL", label: "FATAL"},\
+                {value: "ERROR", label: "ERROR"},\
+                {value: "WARN", label: "WARN"},\
+                {value: "INFO", label: "INFO"},\
+                {value: "DEBUG", label: "DEBUG"},\
+                {value: "TRACE", label: "TRACE"},\
+                {value: "ALL", label: "ALL"},\
+                {value: undefined, label: "Default"}\
+            ]',
+            'Level for internal log4j implementation')
+    .details-row
+        +dropdown-required('Logger configuration:', `${model}.mode`, '"log4jMode"', 'true', 'true', 'Choose logger mode',
+            '[\
+                {value: "Default", label: "Default"},\
+                {value: "Path", label: "Path"}\
+            ]',
+            'Choose logger configuration\
+            <ul>\
+                <li>Default - default logger</li>\
+                <li>Path - path or URI to XML configuration</li>\
+            </ul>')
+    .details-row(ng-show=pathRequired)
+        +text('Path:', `${model}.path`, '"log4jPath"', pathRequired, 'Input path', 'Path or URI to XML configuration')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.jade
deleted file mode 100644
index 17df481..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.jade
+++ /dev/null
@@ -1,39 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'logger'
--var model = 'backupItem.logger.Log4j2'
--var log4j2Required = 'backupItem.logger.kind === "Log4j2"'
-
-div
-    .details-row
-        +dropdown('Level:', model + '.level', '"log4j2Level"', 'true', 'Default',
-            '[\
-                {value: "OFF", label: "OFF"},\
-                {value: "FATAL", label: "FATAL"},\
-                {value: "ERROR", label: "ERROR"},\
-                {value: "WARN", label: "WARN"},\
-                {value: "INFO", label: "INFO"},\
-                {value: "DEBUG", label: "DEBUG"},\
-                {value: "TRACE", label: "TRACE"},\
-                {value: "ALL", label: "ALL"},\
-                {value: undefined, label: "Default"}\
-            ]',
-            'Level for internal log4j2 implementation')
-    .details-row
-        +text('Path:', model + '.path', '"log4j2Path"', log4j2Required, 'Input path', 'Path or URI to XML configuration')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.pug
new file mode 100644
index 0000000..d90ca09
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/logger/log4j2.pug
@@ -0,0 +1,39 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'logger'
+-var model = 'backupItem.logger.Log4j2'
+-var log4j2Required = 'backupItem.logger.kind === "Log4j2"'
+
+div
+    .details-row
+        +dropdown('Level:', `${model}.level`, '"log4j2Level"', 'true', 'Default',
+            '[\
+                {value: "OFF", label: "OFF"},\
+                {value: "FATAL", label: "FATAL"},\
+                {value: "ERROR", label: "ERROR"},\
+                {value: "WARN", label: "WARN"},\
+                {value: "INFO", label: "INFO"},\
+                {value: "DEBUG", label: "DEBUG"},\
+                {value: "TRACE", label: "TRACE"},\
+                {value: "ALL", label: "ALL"},\
+                {value: undefined, label: "Default"}\
+            ]',
+            'Level for internal log4j2 implementation')
+    .details-row
+        +text('Path:', `${model}.path`, '"log4j2Path"', log4j2Required, 'Input path', 'Path or URI to XML configuration')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.jade
deleted file mode 100644
index 9316e79..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.jade
+++ /dev/null
@@ -1,76 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'marshaller'
--var model = 'backupItem'
--var marshaller = model + '.marshaller'
--var optMarshaller = marshaller + '.OptimizedMarshaller'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Marshaller
-        ignite-form-field-tooltip.tipLabel
-            | Marshaller allows to marshal or unmarshal objects in grid#[br]
-            | It provides serialization/deserialization mechanism for all instances that are sent across networks or are otherwise serialized
-            | By default BinaryMarshaller will be used#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/binary-marshaller" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true', 'Choose marshaller',
-                        '[\
-                            {value: "OptimizedMarshaller", label: "OptimizedMarshaller"},\
-                            {value: "JdkMarshaller", label: "JdkMarshaller"},\
-                            {value: undefined, label: "Not set"}\
-                        ]',
-                        'Instance of marshaller to use in grid<br/>\
-                        <ul>\
-                            <li>OptimizedMarshaller - Optimized implementation of marshaller</li>\
-                            <li>JdkMarshaller - Marshaller based on JDK serialization mechanism</li>\
-                            <li>Not set - BinaryMarshaller serialize and deserialize all objects in the binary format</li>\
-                        </ul>')
-                    a.customize(
-                        ng-if='#{marshaller}.kind && #{marshaller}.kind === "OptimizedMarshaller"'
-                        ng-click='#{marshaller}.expanded = !#{marshaller}.expanded'
-                    ) {{ #{marshaller}.expanded ? "Hide settings" : "Show settings"}}
-                .settings-row
-                    .panel-details(ng-show='#{marshaller}.expanded && #{marshaller}.kind === "OptimizedMarshaller"')
-                        .details-row
-                            +number('Streams pool size:', optMarshaller + '.poolSize', '"poolSize"', 'true', '0', '0',
-                                'Specifies size of cached object streams used by marshaller<br/>\
-                                Object streams are cached for performance reason to avoid costly recreation for every serialization routine<br/>\
-                                If 0 (default), pool is not used and each thread has its own cached object stream which it keeps reusing<br/>\
-                                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<br/>\
-                                Consider using pool in this case. This will limit number of streams that can be created and, therefore, decrease memory consumption<br/>\
-                                NOTE: Using streams pool can decrease performance since streams will be shared between different threads which will lead to more frequent context switching')
-                        .details-row
-                            +checkbox('Require serializable', optMarshaller + '.requireSerializable', '"requireSerializable"',
-                                'Whether marshaller should require Serializable interface or not')
-                .settings-row
-                    +checkbox('Marshal local jobs', model + '.marshalLocalJobs', '"marshalLocalJobs"', 'If this flag is enabled, jobs mapped to local node will be marshalled as if it was remote node')
-                .settings-row
-                    +number('Keep alive time:', model + '.marshallerCacheKeepAliveTime', '"marshallerCacheKeepAliveTime"', 'true', '10000', '0',
-                        'Keep alive time of thread pool that is in charge of processing marshaller messages')
-                .settings-row
-                    +number('Pool size:', model + '.marshallerCacheThreadPoolSize', '"marshallerCacheThreadPoolSize"', 'true', 'max(8, availableProcessors) * 2', '1',
-                        'Default size of thread pool that is in charge of processing marshaller messages')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterMarshaller')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
new file mode 100644
index 0000000..f9d29b5
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/marshaller.pug
@@ -0,0 +1,76 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'marshaller'
+-var model = 'backupItem'
+-var marshaller = model + '.marshaller'
+-var optMarshaller = marshaller + '.OptimizedMarshaller'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Marshaller
+        ignite-form-field-tooltip.tipLabel
+            | Marshaller allows to marshal or unmarshal objects in grid#[br]
+            | It provides serialization/deserialization mechanism for all instances that are sent across networks or are otherwise serialized
+            | By default BinaryMarshaller will be used#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/binary-marshaller" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true', 'Choose marshaller',
+                        '[\
+                            {value: "OptimizedMarshaller", label: "OptimizedMarshaller"},\
+                            {value: "JdkMarshaller", label: "JdkMarshaller"},\
+                            {value: undefined, label: "Not set"}\
+                        ]',
+                        'Instance of marshaller to use in grid<br/>\
+                        <ul>\
+                            <li>OptimizedMarshaller - Optimized implementation of marshaller</li>\
+                            <li>JdkMarshaller - Marshaller based on JDK serialization mechanism</li>\
+                            <li>Not set - BinaryMarshaller serialize and deserialize all objects in the binary format</li>\
+                        </ul>')
+                    a.customize(
+                        ng-if=`${marshaller}.kind && ${marshaller}.kind === 'OptimizedMarshaller'`
+                        ng-click=`${marshaller}.expanded = !${marshaller}.expanded`
+                    ) {{ #{marshaller}.expanded ? 'Hide settings' : 'Show settings'}}
+                .settings-row
+                    .panel-details(ng-show=`${marshaller}.expanded && ${marshaller}.kind === 'OptimizedMarshaller'`)
+                        .details-row
+                            +number('Streams pool size:', `${optMarshaller}.poolSize`, '"poolSize"', 'true', '0', '0',
+                                'Specifies size of cached object streams used by marshaller<br/>\
+                                Object streams are cached for performance reason to avoid costly recreation for every serialization routine<br/>\
+                                If 0 (default), pool is not used and each thread has its own cached object stream which it keeps reusing<br/>\
+                                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<br/>\
+                                Consider using pool in this case. This will limit number of streams that can be created and, therefore, decrease memory consumption<br/>\
+                                NOTE: Using streams pool can decrease performance since streams will be shared between different threads which will lead to more frequent context switching')
+                        .details-row
+                            +checkbox('Require serializable', `${optMarshaller}.requireSerializable`, '"requireSerializable"',
+                                'Whether marshaller should require Serializable interface or not')
+                .settings-row
+                    +checkbox('Marshal local jobs', `${model}.marshalLocalJobs`, '"marshalLocalJobs"', 'If this flag is enabled, jobs mapped to local node will be marshalled as if it was remote node')
+                .settings-row
+                    +number('Keep alive time:', `${model}.marshallerCacheKeepAliveTime`, '"marshallerCacheKeepAliveTime"', 'true', '10000', '0',
+                        'Keep alive time of thread pool that is in charge of processing marshaller messages')
+                .settings-row
+                    +number('Pool size:', `${model}.marshallerCacheThreadPoolSize`, '"marshallerCacheThreadPoolSize"', 'true', 'max(8, availableProcessors) * 2', '1',
+                        'Default size of thread pool that is in charge of processing marshaller messages')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterMarshaller')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.jade
deleted file mode 100644
index d5212a9..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.jade
+++ /dev/null
@@ -1,51 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'metrics'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Metrics
-        ignite-form-field-tooltip.tipLabel
-            | Cluster runtime metrics settings
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +number('Elapsed time:', model + '.metricsExpireTime', '"metricsExpireTime"', 'true', 'Long.MAX_VALUE', '1',
-                        'Time in milliseconds after which a certain metric value is considered expired')
-                .settings-row
-                    +number('History size:', model + '.metricsHistorySize', '"metricsHistorySize"', 'true', '10000', '1',
-                        'Number of metrics kept in history to compute totals and averages')
-                .settings-row
-                    +number('Log frequency:', model + '.metricsLogFrequency', '"metricsLogFrequency"', 'true', '60000', '0',
-                        'Frequency of metrics log print out<br/>\ ' +
-                        'When <b>0</b> log print of metrics is disabled')
-                .settings-row
-                    +number('Update frequency:', model + '.metricsUpdateFrequency', '"metricsUpdateFrequency"', 'true', '2000', '0',
-                        '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>')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterMetrics')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.pug
new file mode 100644
index 0000000..6810e6b
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/metrics.pug
@@ -0,0 +1,51 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'metrics'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Metrics
+        ignite-form-field-tooltip.tipLabel
+            | Cluster runtime metrics settings
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +number('Elapsed time:', `${model}.metricsExpireTime`, '"metricsExpireTime"', 'true', 'Long.MAX_VALUE', '1',
+                        'Time in milliseconds after which a certain metric value is considered expired')
+                .settings-row
+                    +number('History size:', `${model}.metricsHistorySize`, '"metricsHistorySize"', 'true', '10000', '1',
+                        'Number of metrics kept in history to compute totals and averages')
+                .settings-row
+                    +number('Log frequency:', `${model}.metricsLogFrequency`, '"metricsLogFrequency"', 'true', '60000', '0',
+                        'Frequency of metrics log print out<br/>\ ' +
+                        'When <b>0</b> log print of metrics is disabled')
+                .settings-row
+                    +number('Update frequency:', `${model}.metricsUpdateFrequency`, '"metricsUpdateFrequency"', 'true', '2000', '0',
+                        '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>')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterMetrics')


[25/50] [abbrv] ignite git commit: IGNITE-4753: DOAP: Node.JS => Node.js (cherry picked from commit 72c2ef6)

Posted by sb...@apache.org.
IGNITE-4753: DOAP: Node.JS => Node.js
(cherry picked from commit 72c2ef6)


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

Branch: refs/heads/ignite-4705-2
Commit: bcdba2a87856a645c97087e11b5ce90683e16b01
Parents: 59ed1d7
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Feb 28 02:16:26 2017 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Thu Mar 2 14:23:30 2017 +0300

----------------------------------------------------------------------
 doap_Ignite.rdf | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bcdba2a8/doap_Ignite.rdf
----------------------------------------------------------------------
diff --git a/doap_Ignite.rdf b/doap_Ignite.rdf
index fb51a15..afe4035 100644
--- a/doap_Ignite.rdf
+++ b/doap_Ignite.rdf
@@ -36,7 +36,6 @@
     <programming-language>Java</programming-language>
     <programming-language>C#</programming-language>
     <programming-language>C++</programming-language>
-    <programming-language>Node.JS</programming-language>
     <programming-language>SQL</programming-language>
     <programming-language>JDBC</programming-language>
     <programming-language>ODBC</programming-language>


[16/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.pug
new file mode 100644
index 0000000..cd93565
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.pug
@@ -0,0 +1,100 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'communication'
+-var model = 'backupItem'
+-var communication = model + '.communication'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Communication
+        ignite-form-field-tooltip.tipLabel
+            | Configuration of communication with other nodes by TCP/IP
+            | Provide basic plumbing to send and receive grid messages and is utilized for all distributed grid operations#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/network-config" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +number('Timeout:', `${model}.networkTimeout`, '"commNetworkTimeout"', 'true', '5000', '1', 'Maximum timeout in milliseconds for network requests')
+                .settings-row
+                    +number('Send retry delay:', `${model}.networkSendRetryDelay`, '"networkSendRetryDelay"', 'true', '1000', '1', 'Interval in milliseconds between message send retries')
+                .settings-row
+                    +number('Send retry count:', `${model}.networkSendRetryCount`, '"networkSendRetryCount"', 'true', '3', '1', 'Message send retries count')
+                .settings-row
+                    +number('Discovery startup delay:', `${model}.discoveryStartupDelay`, '"discoveryStartupDelay"', 'true', '60000', '1', 'This value is used to expire messages from waiting list whenever node discovery discrepancies happen')
+                .settings-row
+                    +java-class('Communication listener:', `${communication}.listener`, '"comListener"', 'true', 'false', 'Listener of communication events')
+                .settings-row
+                    +text-ip-address('Local IP address:', `${communication}.localAddress`, '"comLocalAddress"', 'true', '0.0.0.0',
+                        'Local host address for socket binding<br/>\
+                        If not specified use all available addres on local host')
+                .settings-row
+                    +number-min-max('Local port:', `${communication}.localPort`, '"comLocalPort"', 'true', '47100', '1024', '65535', 'Local port for socket binding')
+                .settings-row
+                    +number('Local port range:', `${communication}.localPortRange`, '"comLocalPortRange"', 'true', '100', '1', 'Local port range for local host ports')
+                .settings-row
+                    +number-min-max('Shared memory port:', `${communication}.sharedMemoryPort`, '"sharedMemoryPort"', 'true', '48100', '-1', '65535',
+                        'Local port to accept shared memory connections<br/>\
+                        If set to #[b -1] shared memory communication will be disabled')
+                .settings-row
+                    +number('Idle connection timeout:', `${communication}.idleConnectionTimeout`, '"idleConnectionTimeout"', 'true', '30000', '1',
+                        'Maximum idle connection timeout upon which a connection to client will be closed')
+                .settings-row
+                    +number('Connect timeout:', `${communication}.connectTimeout`, '"connectTimeout"', 'true', '5000', '0', 'Connect timeout used when establishing connection with remote nodes')
+                .settings-row
+                    +number('Maximum connect timeout:', `${communication}.maxConnectTimeout`, '"maxConnectTimeout"', 'true', '600000', '0', 'Maximum connect timeout')
+                .settings-row
+                    +number('Reconnect count:', `${communication}.reconnectCount`, '"comReconnectCount"', 'true', '10', '1',
+                        'Maximum number of reconnect attempts used when establishing connection with remote nodes')
+                .settings-row
+                    +number('Socket send buffer:', `${communication}.socketSendBuffer`, '"socketSendBuffer"', 'true', '32768', '0', 'Send buffer size for sockets created or accepted by this SPI')
+                .settings-row
+                    +number('Socket receive buffer:', `${communication}.socketReceiveBuffer`, '"socketReceiveBuffer"', 'true', '32768', '0', 'Receive buffer size for sockets created or accepted by this SPI')
+                .settings-row
+                    +number('Slow client queue limit:', `${communication}.slowClientQueueLimit`, '"slowClientQueueLimit"', 'true', '0', '0', 'Slow client queue limit')
+                .settings-row
+                    +number('Ack send threshold:', `${communication}.ackSendThreshold`, '"ackSendThreshold"', 'true', '16', '1', 'Number of received messages per connection to node after which acknowledgment message is sent')
+                .settings-row
+                    +number('Message queue limit:', `${communication}.messageQueueLimit`, '"messageQueueLimit"', 'true', '1024', '0', 'Message queue limit for incoming and outgoing messages')
+                .settings-row
+                    +number('Unacknowledged messages:', `${communication}.unacknowledgedMessagesBufferSize`, '"unacknowledgedMessagesBufferSize"', 'true', '0', '0',
+                        'Maximum number of stored unacknowledged messages per connection to node<br/>\
+                        If specified non zero value it should be\
+                        <ul>\
+                            <li>At least ack send threshold * 5</li>\
+                            <li>At least message queue limit * 5</li>\
+                        </ul>')
+                .settings-row
+                    +number('Socket write timeout:', `${communication}.socketWriteTimeout`, '"socketWriteTimeout"', 'true', '2000', '0', 'Socket write timeout')
+                .settings-row
+                    +number('Selectors count:', `${communication}.selectorsCount`, '"selectorsCount"', 'true', 'min(4, availableProcessors)', '1', 'Count of selectors te be used in TCP server')
+                .settings-row
+                    +java-class('Address resolver:', `${communication}.addressResolver`, '"comAddressResolver"', 'true', 'false', 'Provides resolution between external and internal addresses')
+                .settings-row
+                    +checkbox('Direct buffer', `${communication}.directBuffer`, '"directBuffer"',
+                    'If value is true, then SPI will use ByteBuffer.allocateDirect(int) call<br/>\
+                    Otherwise, SPI will use ByteBuffer.allocate(int) call')
+                .settings-row
+                    +checkbox('Direct send buffer', `${communication}.directSendBuffer`, '"directSendBuffer"', 'Flag defining whether direct send buffer should be used')
+                .settings-row
+                    +checkbox('TCP_NODELAY option', `${communication}.tcpNoDelay`, '"tcpNoDelay"', 'Value for TCP_NODELAY socket option')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterCommunication')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/connector.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/connector.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/connector.jade
deleted file mode 100644
index 40d65af..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/connector.jade
+++ /dev/null
@@ -1,104 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'connector'
--var model = 'backupItem.connector'
--var enabled = model + '.enabled'
--var sslEnabled = enabled + ' && ' + model + '.sslEnabled'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Connector configuration
-        ignite-form-field-tooltip.tipLabel
-            | Configure HTTP REST configuration to enable HTTP server features#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/configuration" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +checkbox('Enabled', enabled, '"restEnabled"', 'Flag indicating whether to configure connector configuration')
-                .settings-row
-                    +text-enabled('Jetty configuration path:', model + '.jettyPath', '"connectorJettyPath"', enabled, 'false', 'Input path to Jetty configuration',
-                        'Path, either absolute or relative to IGNITE_HOME, to Jetty XML configuration file<br/>\
-                        Jetty is used to support REST over HTTP protocol for accessing Ignite APIs remotely<br/>\
-                        If not provided, Jetty instance with default configuration will be started picking IgniteSystemProperties.IGNITE_JETTY_HOST and IgniteSystemProperties.IGNITE_JETTY_PORT as host and port respectively')
-                .settings-row
-                    +text-ip-address('TCP host:', model + '.host', '"connectorHost"', enabled, 'IgniteConfiguration#getLocalHost()',
-                        'Host for TCP binary protocol server<br/>\
-                        This can be either an IP address or a domain name<br/>\
-                        If not defined, system - wide local address will be used IgniteConfiguration#getLocalHost()<br/>\
-                        You can also use "0.0.0.0" value to bind to all locally - available IP addresses')
-                .settings-row
-                    +number-min-max('TCP port:', model + '.port', '"connectorPort"', enabled, '11211', '1024', '65535', 'Port for TCP binary protocol server')
-                .settings-row
-                    +number('TCP port range:', model + '.portRange', '"connectorPortRange"', enabled, '100', '1', 'Number of ports for TCP binary protocol server to try if configured port is already in use')
-                .settings-row
-                    +number('Idle query cursor timeout:', model + '.idleQueryCursorTimeout', '"connectorIdleQueryCursorTimeout"', enabled, '600000', '0',
-                        'Reject open query cursors that is not used timeout<br/>\
-                        If no fetch query request come within idle timeout, it will be removed on next check for old query cursors')
-                .settings-row
-                    +number('Idle query cursor check frequency:', model + '.idleQueryCursorCheckFrequency', '"connectorIdleQueryCursorCheckFrequency"', enabled, '60000', '0',
-                        'Idle query cursors check frequency<br/>\
-                        This setting is used to reject open query cursors that is not used')
-                .settings-row
-                    +number('Idle timeout:', model + '.idleTimeout', '"connectorIdleTimeout"', enabled, '7000', '0',
-                        'Idle timeout for REST server<br/>\
-                        This setting is used to reject half - opened sockets<br/>\
-                        If no packets come within idle timeout, the connection is closed')
-                .settings-row
-                    +number('Receive buffer size:', model + '.receiveBufferSize', '"connectorReceiveBufferSize"', enabled, '32768', '0', 'REST TCP server receive buffer size')
-                .settings-row
-                    +number('Send buffer size:', model + '.sendBufferSize', '"connectorSendBufferSize"', enabled, '32768', '0', 'REST TCP server send buffer size')
-                .settings-row
-                    +number('Send queue limit:', model + '.sendQueueLimit', '"connectorSendQueueLimit"', enabled, 'unlimited', '0',
-                        'REST TCP server send queue limit<br/>\
-                        If the limit exceeds, all successive writes will block until the queue has enough capacity')
-                .settings-row
-                    +checkbox-enabled('Direct buffer', model + '.directBuffer', '"connectorDirectBuffer"', enabled,
-                        'Flag indicating whether REST TCP server should use direct buffers<br/>\
-                        A direct buffer is a buffer that is allocated and accessed using native system calls, without using JVM heap<br/>\
-                        Enabling direct buffer may improve performance and avoid memory issues(long GC pauses due to huge buffer size)')
-                .settings-row
-                    +checkbox-enabled('TCP_NODELAY option', model + '.noDelay', '"connectorNoDelay"', enabled,
-                        'Flag indicating whether TCP_NODELAY option should be set for accepted client connections<br/>\
-                        Setting this option reduces network latency and should be enabled in majority of cases<br/>\
-                        For more information, see Socket#setTcpNoDelay(boolean)')
-                .settings-row
-                    +number('Selector count:', model + '.selectorCount', '"connectorSelectorCount"', enabled, 'min(4, availableProcessors)', '1',
-                        'Number of selector threads in REST TCP server<br/>\
-                        Higher value for this parameter may increase throughput, but also increases context switching')
-                .settings-row
-                    +number('Thread pool size:', model + '.threadPoolSize', '"connectorThreadPoolSize"', enabled, 'max(8, availableProcessors) * 2', '1',
-                        'Thread pool size to use for processing of client messages (REST requests)')
-                .settings-row
-                    +java-class('Message interceptor:', model + '.messageInterceptor', '"connectorMessageInterceptor"', enabled, 'false',
-                        'Interceptor allows to transform all objects exchanged via REST protocol<br/>\
-                        For example if you use custom serialisation on client you can write interceptor to transform binary representations received from client to Java objects and later access them from java code directly')
-                .settings-row
-                    +text-enabled('Secret key:', model + '.secretKey', '"connectorSecretKey"', enabled, 'false', 'Specify to enable authentication', 'Secret key to authenticate REST requests')
-                .settings-row
-                    +checkbox-enabled('Enable SSL', model + '.sslEnabled', '"connectorSslEnabled"', enabled, 'Enables/disables SSL for REST TCP binary protocol')
-                .settings-row
-                    +checkbox-enabled('Enable SSL client auth', model + '.sslClientAuth', '"connectorSslClientAuth"', sslEnabled, 'Flag indicating whether or not SSL client authentication is required')
-                .settings-row
-                    +java-class('SSL factory:', model + '.sslFactory', '"connectorSslFactory"', sslEnabled, sslEnabled,
-                        'Instance of Factory that will be used to create an instance of SSLContext for Secure Socket Layer on TCP binary protocol')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterConnector')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/connector.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/connector.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/connector.pug
new file mode 100644
index 0000000..b145ce2
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/connector.pug
@@ -0,0 +1,104 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'connector'
+-var model = 'backupItem.connector'
+-var enabled = model + '.enabled'
+-var sslEnabled = enabled + ' && ' + model + '.sslEnabled'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Connector configuration
+        ignite-form-field-tooltip.tipLabel
+            | Configure HTTP REST configuration to enable HTTP server features#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/configuration" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +checkbox('Enabled', enabled, '"restEnabled"', 'Flag indicating whether to configure connector configuration')
+                .settings-row
+                    +text-enabled('Jetty configuration path:', `${model}.jettyPath`, '"connectorJettyPath"', enabled, 'false', 'Input path to Jetty configuration',
+                        'Path, either absolute or relative to IGNITE_HOME, to Jetty XML configuration file<br/>\
+                        Jetty is used to support REST over HTTP protocol for accessing Ignite APIs remotely<br/>\
+                        If not provided, Jetty instance with default configuration will be started picking IgniteSystemProperties.IGNITE_JETTY_HOST and IgniteSystemProperties.IGNITE_JETTY_PORT as host and port respectively')
+                .settings-row
+                    +text-ip-address('TCP host:', `${model}.host`, '"connectorHost"', enabled, 'IgniteConfiguration#getLocalHost()',
+                        'Host for TCP binary protocol server<br/>\
+                        This can be either an IP address or a domain name<br/>\
+                        If not defined, system - wide local address will be used IgniteConfiguration#getLocalHost()<br/>\
+                        You can also use "0.0.0.0" value to bind to all locally - available IP addresses')
+                .settings-row
+                    +number-min-max('TCP port:', `${model}.port`, '"connectorPort"', enabled, '11211', '1024', '65535', 'Port for TCP binary protocol server')
+                .settings-row
+                    +number('TCP port range:', `${model}.portRange`, '"connectorPortRange"', enabled, '100', '1', 'Number of ports for TCP binary protocol server to try if configured port is already in use')
+                .settings-row
+                    +number('Idle query cursor timeout:', `${model}.idleQueryCursorTimeout`, '"connectorIdleQueryCursorTimeout"', enabled, '600000', '0',
+                        'Reject open query cursors that is not used timeout<br/>\
+                        If no fetch query request come within idle timeout, it will be removed on next check for old query cursors')
+                .settings-row
+                    +number('Idle query cursor check frequency:', `${model}.idleQueryCursorCheckFrequency`, '"connectorIdleQueryCursorCheckFrequency"', enabled, '60000', '0',
+                        'Idle query cursors check frequency<br/>\
+                        This setting is used to reject open query cursors that is not used')
+                .settings-row
+                    +number('Idle timeout:', `${model}.idleTimeout`, '"connectorIdleTimeout"', enabled, '7000', '0',
+                        'Idle timeout for REST server<br/>\
+                        This setting is used to reject half - opened sockets<br/>\
+                        If no packets come within idle timeout, the connection is closed')
+                .settings-row
+                    +number('Receive buffer size:', `${model}.receiveBufferSize`, '"connectorReceiveBufferSize"', enabled, '32768', '0', 'REST TCP server receive buffer size')
+                .settings-row
+                    +number('Send buffer size:', `${model}.sendBufferSize`, '"connectorSendBufferSize"', enabled, '32768', '0', 'REST TCP server send buffer size')
+                .settings-row
+                    +number('Send queue limit:', `${model}.sendQueueLimit`, '"connectorSendQueueLimit"', enabled, 'unlimited', '0',
+                        'REST TCP server send queue limit<br/>\
+                        If the limit exceeds, all successive writes will block until the queue has enough capacity')
+                .settings-row
+                    +checkbox-enabled('Direct buffer', `${model}.directBuffer`, '"connectorDirectBuffer"', enabled,
+                        'Flag indicating whether REST TCP server should use direct buffers<br/>\
+                        A direct buffer is a buffer that is allocated and accessed using native system calls, without using JVM heap<br/>\
+                        Enabling direct buffer may improve performance and avoid memory issues(long GC pauses due to huge buffer size)')
+                .settings-row
+                    +checkbox-enabled('TCP_NODELAY option', `${model}.noDelay`, '"connectorNoDelay"', enabled,
+                        'Flag indicating whether TCP_NODELAY option should be set for accepted client connections<br/>\
+                        Setting this option reduces network latency and should be enabled in majority of cases<br/>\
+                        For more information, see Socket#setTcpNoDelay(boolean)')
+                .settings-row
+                    +number('Selector count:', `${model}.selectorCount`, '"connectorSelectorCount"', enabled, 'min(4, availableProcessors)', '1',
+                        'Number of selector threads in REST TCP server<br/>\
+                        Higher value for this parameter may increase throughput, but also increases context switching')
+                .settings-row
+                    +number('Thread pool size:', `${model}.threadPoolSize`, '"connectorThreadPoolSize"', enabled, 'max(8, availableProcessors) * 2', '1',
+                        'Thread pool size to use for processing of client messages (REST requests)')
+                .settings-row
+                    +java-class('Message interceptor:', `${model}.messageInterceptor`, '"connectorMessageInterceptor"', enabled, 'false',
+                        'Interceptor allows to transform all objects exchanged via REST protocol<br/>\
+                        For example if you use custom serialisation on client you can write interceptor to transform binary representations received from client to Java objects and later access them from java code directly')
+                .settings-row
+                    +text-enabled('Secret key:', `${model}.secretKey`, '"connectorSecretKey"', enabled, 'false', 'Specify to enable authentication', 'Secret key to authenticate REST requests')
+                .settings-row
+                    +checkbox-enabled('Enable SSL', `${model}.sslEnabled`, '"connectorSslEnabled"', enabled, 'Enables/disables SSL for REST TCP binary protocol')
+                .settings-row
+                    +checkbox-enabled('Enable SSL client auth', `${model}.sslClientAuth`, '"connectorSslClientAuth"', sslEnabled, 'Flag indicating whether or not SSL client authentication is required')
+                .settings-row
+                    +java-class('SSL factory:', `${model}.sslFactory`, '"connectorSslFactory"', sslEnabled, sslEnabled,
+                        'Instance of Factory that will be used to create an instance of SSLContext for Secure Socket Layer on TCP binary protocol')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterConnector')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/deployment.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/deployment.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/deployment.jade
deleted file mode 100644
index aa99b49..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/deployment.jade
+++ /dev/null
@@ -1,237 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'deployment'
--var model = 'backupItem'
--var modelDeployment = 'backupItem.deploymentSpi'
--var exclude = model + '.peerClassLoadingLocalClassPathExclude'
--var enabled = 'backupItem.peerClassLoadingEnabled'
--var uriListModel = modelDeployment + '.URI.uriList'
--var scannerModel = modelDeployment + '.URI.scanners'
--var uriDeployment = modelDeployment + '.kind === "URI"'
--var localDeployment = modelDeployment + '.kind === "Local"'
--var customDeployment = modelDeployment + '.kind === "Custom"'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Class deployment
-        ignite-form-field-tooltip.tipLabel
-            | Task and resources deployment in cluster#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/deployment-modes" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id='deployment')
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown('Deployment mode:', model + '.deploymentMode', '"deploymentMode"', 'true', 'SHARED',
-                        '[\
-                            {value: "PRIVATE", label: "PRIVATE"},\
-                            {value: "ISOLATED", label: "ISOLATED"}, \
-                            {value: "SHARED", label: "SHARED"},\
-                            {value: "CONTINUOUS", label: "CONTINUOUS"}\
-                        ]',
-                        'Task classes and resources sharing mode<br/>\
-                        The following deployment modes are supported:\
-                        <ul>\
-                            <li>PRIVATE - in this mode deployed classes do not share resources</li>\
-                            <li>ISOLATED - in this mode tasks or classes deployed within the same class loader will share the same instances of resources</li>\
-                            <li>SHARED - same as ISOLATED, but now tasks from different master nodes with the same user version and same class loader will share the same class loader on remote nodes</li>\
-                            <li>CONTINUOUS - same as SHARED deployment mode, but resources will not be undeployed even after all master nodes left grid</li>\
-                        </ul>')
-                .settings-row
-                    +checkbox('Enable peer class loading', model + '.peerClassLoadingEnabled', '"peerClassLoadingEnabled"', 'Enables/disables peer class loading')
-                .settings-row
-                    +number('Missed resources cache size:', model + '.peerClassLoadingMissedResourcesCacheSize', '"peerClassLoadingMissedResourcesCacheSize"', enabled, '100', '0',
-                        'If size greater than 0, missed resources will be cached and next resource request ignored<br/>\
-                        If size is 0, then request for the resource will be sent to the remote node every time this resource is requested')
-                .settings-row
-                    +number('Pool size:', model + '.peerClassLoadingThreadPoolSize', '"peerClassLoadingThreadPoolSize"', enabled, '2', '1', 'Thread pool size to use for peer class loading')
-                .settings-row
-                    +ignite-form-group
-                        -var uniqueTip = 'Such package already exists'
-
-                        ignite-form-field-label
-                            | Local class path exclude
-                        ignite-form-group-tooltip
-                            | List of packages from the system classpath that need to be peer-to-peer loaded from task originating node<br/>
-                            | '*' 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
-                        ignite-form-group-add(ng-show='#{enabled}' ng-click='(group.add = [{}])')
-                            | Add package name.
-
-                        .group-content(ng-if=exclude + '.length')
-                            -var model = 'obj.model';
-                            -var name = '"edit" + $index'
-                            -var valid = form + '[' + name + '].$valid'
-                            -var save = exclude + '[$index] = ' + model
-
-                            div(ng-show=enabled)
-                                div(ng-repeat='model in #{exclude} track by $index' ng-init='obj = {}')
-                                    label.col-xs-12.col-sm-12.col-md-12
-                                        .indexField
-                                            | {{ $index+1 }})
-                                        +table-remove-button(exclude, 'Remove package name')
-                                        span(ng-hide='field.edit')
-                                            a.labelFormField(ng-click='(field.edit = true) && (#{model} = model)') {{ model }}
-                                        span(ng-if='field.edit')
-                                            +table-java-package-field(name, model, exclude, valid, save, false)
-                                                +table-save-button(valid, save, false)
-                                                +unique-feedback(name, uniqueTip)
-
-                            div(ng-hide=enabled)
-                                div(ng-repeat='model in #{exclude} track by $index')
-                                    label.col-xs-12.col-sm-12.col-md-12
-                                        .labelFormField.labelField
-                                            | {{ $index+1 }})
-                                        span.labelFormField
-                                            | {{ model }}
-
-                        .group-content(ng-repeat='field in group.add')
-                            -var model = 'new';
-                            -var name = '"new"'
-                            -var valid = form + '[' + name + '].$valid'
-                            -var save = exclude + '.push(' + model + ')'
-
-                            div(type='internal' name='Package name')
-                                label.col-xs-12.col-sm-12.col-md-12
-                                    +table-java-package-field(name, model, exclude, valid, save, true)
-                                        +table-save-button(valid, save, true)
-                                        +unique-feedback(name, uniqueTip)
-
-                        .group-content-empty(ng-if='!(#{exclude}.length) && !group.add.length')
-                            | Not defined
-                .settings-row
-                    +dropdown('Deployment variant:', modelDeployment + '.kind', '"deploymentKind"', 'true', 'Default',
-                        '[\
-                            {value: "URI", label: "URI"},\
-                            {value: "Local", label: "Local"}, \
-                            {value: "Custom", label: "Custom"},\
-                            {value: undefined, label: "Default"}\
-                        ]',
-                        'Grid deployment SPI is in charge of deploying tasks and classes from different sources:\
-                        <ul>\
-                            <li>URI - Deploy tasks from different sources like file system folders, email and HTTP</li>\
-                            <li>Local - Only within VM deployment on local node</li>\
-                            <li>Custom - Custom implementation of DeploymentSpi</li>\
-                            <li>Default - Default configuration of LocalDeploymentSpi will be used</li>\
-                        </ul>')
-                .panel-details(ng-show=uriDeployment)
-                    .details-row
-                        +ignite-form-group()
-                            -var uniqueTip = 'Such URI already configured'
-
-                            ignite-form-field-label
-                                | URI list
-                            ignite-form-group-tooltip
-                                | List of URI which point to GAR file and which should be scanned by SPI for the new tasks
-                            ignite-form-group-add(ng-click='(group.add = [{}])')
-                                | Add URI.
-
-                            .group-content(ng-if=uriListModel + '.length')
-                                -var model = 'obj.model';
-                                -var name = '"edit" + $index'
-                                -var valid = form + '[' + name + '].$valid'
-                                -var save = uriListModel + '[$index] = ' + model
-
-                                div(ng-repeat='model in #{uriListModel} track by $index' ng-init='obj = {}')
-                                    label.col-xs-12.col-sm-12.col-md-12
-                                        .indexField
-                                            | {{ $index+1 }})
-                                        +table-remove-button(uriListModel, 'Remove URI')
-                                        span(ng-hide='field.edit')
-                                            a.labelFormField(ng-click='(field.edit = true) && (#{model} = model)') {{ model }}
-                                        span(ng-if='field.edit')
-                                            +table-url-field(name, model, uriListModel, valid, save, false)
-                                                +table-save-button(valid, save, false)
-                                                +unique-feedback(name, uniqueTip)
-
-                            .group-content(ng-repeat='field in group.add')
-                                -var model = 'new';
-                                -var name = '"new"'
-                                -var valid = form + '[' + name + '].$valid'
-                                -var save = uriListModel + '.push(' + model + ')'
-
-                                div(type='internal' name='URI')
-                                    label.col-xs-12.col-sm-12.col-md-12
-                                        +table-url-field(name, model, uriListModel, valid, save, true)
-                                            +table-save-button(valid, save, true)
-                                            +unique-feedback(name, uniqueTip)
-
-                            .group-content-empty(ng-if='!(#{uriListModel}.length) && !group.add.length')
-                                | Not defined
-                    .details-row
-                        +text('Temporary directory path:', modelDeployment + '.URI.temporaryDirectoryPath', '"DeploymentURITemporaryDirectoryPath"', 'false', 'Temporary directory path',
-                        'Absolute path to temporary directory which will be used by deployment SPI to keep all deployed classes in')
-                    .details-row
-                        +ignite-form-group()
-                            -var uniqueTip = 'Such scanner already configured'
-
-                            ignite-form-field-label
-                                | Scanner list
-                            ignite-form-group-tooltip
-                                | List of URI deployment scanners
-                            ignite-form-group-add(ng-click='(group.add = [{}])')
-                                | Add scanner
-
-                            .group-content(ng-if=scannerModel + '.length')
-                                -var model = 'obj.model';
-                                -var name = '"edit" + $index'
-                                -var valid = form + '[' + name + '].$valid'
-                                -var save = scannerModel + '[$index] = ' + model
-
-                                div(ng-repeat='model in #{scannerModel} track by $index' ng-init='obj = {}')
-                                    label.col-xs-12.col-sm-12.col-md-12
-                                        .indexField
-                                            | {{ $index+1 }})
-                                        +table-remove-button(scannerModel, 'Remove scanner')
-                                        span(ng-hide='field.edit')
-                                            a.labelFormField(ng-click='(field.edit = true) && (#{model} = model)') {{ model }}
-                                        span(ng-if='field.edit')
-                                            +table-java-class-field('Scanner:', name, model, scannerModel, valid, save, false)
-                                                +table-save-button(valid, save, false)
-                                                +unique-feedback(name, uniqueTip)
-
-                            .group-content(ng-repeat='field in group.add')
-                                -var model = 'new';
-                                -var name = '"new"'
-                                -var valid = form + '[' + name + '].$valid'
-                                -var save = scannerModel + '.push(' + model + ')'
-
-                                div(type='internal' name='Scanner')
-                                    label.col-xs-12.col-sm-12.col-md-12
-                                        // (lbl, name, model, items, valid, save, newItem)
-                                        +table-java-class-field('Scanner:', name, model, scannerModel, valid, save, true)
-                                            +table-save-button(valid, save, true)
-                                            +unique-feedback(name, uniqueTip)
-
-                            .group-content-empty(ng-if='!(#{scannerModel}.length) && !group.add.length')
-                                | Not defined
-                    .details-row
-                        +java-class('Listener:', modelDeployment + '.URI.listener', '"DeploymentURIListener"', 'true', 'false', 'Deployment event listener', uriDeployment)
-                    .details-row
-                        +checkbox('Check MD5', modelDeployment + '.URI.checkMd5', '"DeploymentURICheckMd5"', 'Exclude files with same md5s from deployment')
-                    .details-row
-                        +checkbox('Encode URI', modelDeployment + '.URI.encodeUri', '"DeploymentURIEncodeUri"', 'URI must be encoded before usage')
-                .panel-details(ng-show=localDeployment)
-                    .details-row
-                        +java-class('Listener:', modelDeployment + '.Local.listener', '"DeploymentLocalListener"', 'true', 'false', 'Deployment event listener', localDeployment)
-                .panel-details(ng-show=customDeployment)
-                    .details-row
-                        +java-class('Class:', modelDeployment + '.Custom.className', '"DeploymentCustom"', 'true', customDeployment, 'DeploymentSpi implementation class', customDeployment)
-            .col-sm-6
-                +preview-xml-java(model, 'clusterDeployment')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/deployment.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/deployment.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/deployment.pug
new file mode 100644
index 0000000..2021c1c
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/deployment.pug
@@ -0,0 +1,237 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'deployment'
+-var model = 'backupItem'
+-var modelDeployment = 'backupItem.deploymentSpi'
+-var exclude = model + '.peerClassLoadingLocalClassPathExclude'
+-var enabled = 'backupItem.peerClassLoadingEnabled'
+-var uriListModel = modelDeployment + '.URI.uriList'
+-var scannerModel = modelDeployment + '.URI.scanners'
+-var uriDeployment = modelDeployment + '.kind === "URI"'
+-var localDeployment = modelDeployment + '.kind === "Local"'
+-var customDeployment = modelDeployment + '.kind === "Custom"'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Class deployment
+        ignite-form-field-tooltip.tipLabel
+            | Task and resources deployment in cluster#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/deployment-modes" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id='deployment')
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown('Deployment mode:', `${model}.deploymentMode`, '"deploymentMode"', 'true', 'SHARED',
+                        '[\
+                            {value: "PRIVATE", label: "PRIVATE"},\
+                            {value: "ISOLATED", label: "ISOLATED"}, \
+                            {value: "SHARED", label: "SHARED"},\
+                            {value: "CONTINUOUS", label: "CONTINUOUS"}\
+                        ]',
+                        'Task classes and resources sharing mode<br/>\
+                        The following deployment modes are supported:\
+                        <ul>\
+                            <li>PRIVATE - in this mode deployed classes do not share resources</li>\
+                            <li>ISOLATED - in this mode tasks or classes deployed within the same class loader will share the same instances of resources</li>\
+                            <li>SHARED - same as ISOLATED, but now tasks from different master nodes with the same user version and same class loader will share the same class loader on remote nodes</li>\
+                            <li>CONTINUOUS - same as SHARED deployment mode, but resources will not be undeployed even after all master nodes left grid</li>\
+                        </ul>')
+                .settings-row
+                    +checkbox('Enable peer class loading', `${model}.peerClassLoadingEnabled`, '"peerClassLoadingEnabled"', 'Enables/disables peer class loading')
+                .settings-row
+                    +number('Missed resources cache size:', `${model}.peerClassLoadingMissedResourcesCacheSize`, '"peerClassLoadingMissedResourcesCacheSize"', enabled, '100', '0',
+                        'If size greater than 0, missed resources will be cached and next resource request ignored<br/>\
+                        If size is 0, then request for the resource will be sent to the remote node every time this resource is requested')
+                .settings-row
+                    +number('Pool size:', `${model}.peerClassLoadingThreadPoolSize`, '"peerClassLoadingThreadPoolSize"', enabled, '2', '1', 'Thread pool size to use for peer class loading')
+                .settings-row
+                    +ignite-form-group
+                        -var uniqueTip = 'Such package already exists'
+
+                        ignite-form-field-label
+                            | Local class path exclude
+                        ignite-form-group-tooltip
+                            | List of packages from the system classpath that need to be peer-to-peer loaded from task originating node<br/>
+                            | '*' 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
+                        ignite-form-group-add(ng-show=`${enabled}` ng-click='(group.add = [{}])')
+                            | Add package name.
+
+                        .group-content(ng-if=`${exclude}.length`)
+                            -var model = 'obj.model';
+                            -var name = '"edit" + $index'
+                            -var valid = `${form}[${name}].$valid`
+                            -var save = `${exclude}[$index] = ${model}`
+
+                            div(ng-show=enabled)
+                                div(ng-repeat=`model in ${exclude} track by $index` ng-init='obj = {}')
+                                    label.col-xs-12.col-sm-12.col-md-12
+                                        .indexField
+                                            | {{ $index+1 }})
+                                        +table-remove-button(exclude, 'Remove package name')
+                                        span(ng-hide='field.edit')
+                                            a.labelFormField(ng-click=`(field.edit = true) && (${model} = model)`) {{ model }}
+                                        span(ng-if='field.edit')
+                                            +table-java-package-field(name, model, exclude, valid, save, false)
+                                                +table-save-button(valid, save, false)
+                                                +unique-feedback(name, uniqueTip)
+
+                            div(ng-hide=enabled)
+                                div(ng-repeat=`model in ${exclude} track by $index`)
+                                    label.col-xs-12.col-sm-12.col-md-12
+                                        .labelFormField.labelField
+                                            | {{ $index+1 }})
+                                        span.labelFormField
+                                            | {{ model }}
+
+                        .group-content(ng-repeat='field in group.add')
+                            -var model = 'new';
+                            -var name = '"new"'
+                            -var valid = `${form}[${name}].$valid`
+                            -var save = `${exclude}.push(${model})`
+
+                            div(type='internal' name='Package name')
+                                label.col-xs-12.col-sm-12.col-md-12
+                                    +table-java-package-field(name, model, exclude, valid, save, true)
+                                        +table-save-button(valid, save, true)
+                                        +unique-feedback(name, uniqueTip)
+
+                        .group-content-empty(ng-if=`!(${exclude}.length) && !group.add.length`)
+                            | Not defined
+                .settings-row
+                    +dropdown('Deployment variant:', modelDeployment + '.kind', '"deploymentKind"', 'true', 'Default',
+                        '[\
+                            {value: "URI", label: "URI"},\
+                            {value: "Local", label: "Local"}, \
+                            {value: "Custom", label: "Custom"},\
+                            {value: undefined, label: "Default"}\
+                        ]',
+                        'Grid deployment SPI is in charge of deploying tasks and classes from different sources:\
+                        <ul>\
+                            <li>URI - Deploy tasks from different sources like file system folders, email and HTTP</li>\
+                            <li>Local - Only within VM deployment on local node</li>\
+                            <li>Custom - Custom implementation of DeploymentSpi</li>\
+                            <li>Default - Default configuration of LocalDeploymentSpi will be used</li>\
+                        </ul>')
+                .panel-details(ng-show=uriDeployment)
+                    .details-row
+                        +ignite-form-group()
+                            -var uniqueTip = 'Such URI already configured'
+
+                            ignite-form-field-label
+                                | URI list
+                            ignite-form-group-tooltip
+                                | List of URI which point to GAR file and which should be scanned by SPI for the new tasks
+                            ignite-form-group-add(ng-click='(group.add = [{}])')
+                                | Add URI.
+
+                            .group-content(ng-if=uriListModel + '.length')
+                                -var model = 'obj.model';
+                                -var name = '"edit" + $index'
+                                -var valid = `${form}[${name}].$valid`
+                                -var save = `${uriListModel}[$index] = ${model}`
+
+                                div(ng-repeat=`model in ${uriListModel} track by $index` ng-init='obj = {}')
+                                    label.col-xs-12.col-sm-12.col-md-12
+                                        .indexField
+                                            | {{ $index+1 }})
+                                        +table-remove-button(uriListModel, 'Remove URI')
+                                        span(ng-hide='field.edit')
+                                            a.labelFormField(ng-click=`(field.edit = true) && (${model} = model)`) {{ model }}
+                                        span(ng-if='field.edit')
+                                            +table-url-field(name, model, uriListModel, valid, save, false)
+                                                +table-save-button(valid, save, false)
+                                                +unique-feedback(name, uniqueTip)
+
+                            .group-content(ng-repeat='field in group.add')
+                                -var model = 'new';
+                                -var name = '"new"'
+                                -var valid = `${form}[${name}].$valid`
+                                -var save = `${uriListModel}.push(${model})`
+
+                                div(type='internal' name='URI')
+                                    label.col-xs-12.col-sm-12.col-md-12
+                                        +table-url-field(name, model, uriListModel, valid, save, true)
+                                            +table-save-button(valid, save, true)
+                                            +unique-feedback(name, uniqueTip)
+
+                            .group-content-empty(ng-if=`!(${uriListModel}.length) && !group.add.length`)
+                                | Not defined
+                    .details-row
+                        +text('Temporary directory path:', modelDeployment + '.URI.temporaryDirectoryPath', '"DeploymentURITemporaryDirectoryPath"', 'false', 'Temporary directory path',
+                        'Absolute path to temporary directory which will be used by deployment SPI to keep all deployed classes in')
+                    .details-row
+                        +ignite-form-group()
+                            -var uniqueTip = 'Such scanner already configured'
+
+                            ignite-form-field-label
+                                | Scanner list
+                            ignite-form-group-tooltip
+                                | List of URI deployment scanners
+                            ignite-form-group-add(ng-click='(group.add = [{}])')
+                                | Add scanner
+
+                            .group-content(ng-if=scannerModel + '.length')
+                                -var model = 'obj.model';
+                                -var name = '"edit" + $index'
+                                -var valid = `${form}[${name}].$valid`
+                                -var save = `${scannerModel}[$index] = ${model}`
+
+                                div(ng-repeat=`model in ${scannerModel} track by $index` ng-init='obj = {}')
+                                    label.col-xs-12.col-sm-12.col-md-12
+                                        .indexField
+                                            | {{ $index+1 }})
+                                        +table-remove-button(scannerModel, 'Remove scanner')
+                                        span(ng-hide='field.edit')
+                                            a.labelFormField(ng-click=`(field.edit = true) && (${model} = model)`) {{ model }}
+                                        span(ng-if='field.edit')
+                                            +table-java-class-field('Scanner:', name, model, scannerModel, valid, save, false)
+                                                +table-save-button(valid, save, false)
+                                                +unique-feedback(name, uniqueTip)
+
+                            .group-content(ng-repeat='field in group.add')
+                                -var model = 'new';
+                                -var name = '"new"'
+                                -var valid = `${form}[${name}].$valid`
+                                -var save = `${scannerModel}.push(${model})`
+
+                                div(type='internal' name='Scanner')
+                                    label.col-xs-12.col-sm-12.col-md-12
+                                        // (lbl, name, model, items, valid, save, newItem)
+                                        +table-java-class-field('Scanner:', name, model, scannerModel, valid, save, true)
+                                            +table-save-button(valid, save, true)
+                                            +unique-feedback(name, uniqueTip)
+
+                            .group-content-empty(ng-if=`!(${scannerModel}.length) && !group.add.length`)
+                                | Not defined
+                    .details-row
+                        +java-class('Listener:', `${modelDeployment}.URI.listener`, '"DeploymentURIListener"', 'true', 'false', 'Deployment event listener', uriDeployment)
+                    .details-row
+                        +checkbox('Check MD5', `${modelDeployment}.URI.checkMd5`, '"DeploymentURICheckMd5"', 'Exclude files with same md5s from deployment')
+                    .details-row
+                        +checkbox('Encode URI', `${modelDeployment}.URI.encodeUri`, '"DeploymentURIEncodeUri"', 'URI must be encoded before usage')
+                .panel-details(ng-show=localDeployment)
+                    .details-row
+                        +java-class('Listener:', `${modelDeployment}.Local.listener`, '"DeploymentLocalListener"', 'true', 'false', 'Deployment event listener', localDeployment)
+                .panel-details(ng-show=customDeployment)
+                    .details-row
+                        +java-class('Class:', `${modelDeployment}.Custom.className`, '"DeploymentCustom"', 'true', customDeployment, 'DeploymentSpi implementation class', customDeployment)
+            .col-sm-6
+                +preview-xml-java(model, 'clusterDeployment')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/discovery.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/discovery.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/discovery.jade
deleted file mode 100644
index 3bf0e29..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/discovery.jade
+++ /dev/null
@@ -1,88 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'discovery'
--var model = 'backupItem.discovery'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Discovery
-        ignite-form-field-tooltip.tipLabel
-            | TCP/IP discovery configuration#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/cluster-config" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +text-ip-address('Local address:', model + '.localAddress', '"discoLocalAddress"', 'true', '228.1.2.4',
-                        'Local host IP address that discovery SPI uses<br/>\
-                        If not provided a first found non-loopback address will be used')
-                .settings-row
-                    +number-min-max('Local port:', model + '.localPort', '"discoLocalPort"', 'true', '47500', '1024', '65535', 'Local port which node uses')
-                .settings-row
-                    +number('Local port range:', model + '.localPortRange', '"discoLocalPortRange"', 'true', '100', '1', 'Local port range')
-                .settings-row
-                    +java-class('Address resolver:', model + '.addressResolver', '"discoAddressResolver"', 'true', 'false',
-                        'Provides resolution between external and internal addresses')
-                .settings-row
-                    +number('Socket timeout:', model + '.socketTimeout', '"socketTimeout"', 'true', '5000', '0', 'Socket operations timeout')
-                .settings-row
-                    +number('Acknowledgement timeout:', model + '.ackTimeout', '"ackTimeout"', 'true', '5000', '0', 'Message acknowledgement timeout')
-                .settings-row
-                    +number('Max acknowledgement timeout:', model + '.maxAckTimeout', '"maxAckTimeout"', 'true', '600000', '0', 'Maximum message acknowledgement timeout')
-                .settings-row
-                    +number('Network timeout:', model + '.networkTimeout', '"discoNetworkTimeout"', 'true', '5000', '1', 'Timeout to use for network operations')
-                .settings-row
-                    +number('Join timeout:', model + '.joinTimeout', '"joinTimeout"', 'true', '0', '0',
-                        'Join timeout<br/>' +
-                        '0 means wait forever')
-                .settings-row
-                    +number('Thread priority:', model + '.threadPriority', '"threadPriority"', 'true', '10', '1', 'Thread priority for all threads started by SPI')
-                .settings-row
-                    +number('Heartbeat frequency:', model + '.heartbeatFrequency', '"heartbeatFrequency"', 'true', '2000', '1', 'Heartbeat messages issuing frequency')
-                .settings-row
-                    +number('Max heartbeats miss w/o init:', model + '.maxMissedHeartbeats', '"maxMissedHeartbeats"', 'true', '1', '1',
-                        'Max heartbeats count node can miss without initiating status check')
-                .settings-row
-                    +number('Max missed client heartbeats:', model + '.maxMissedClientHeartbeats', '"maxMissedClientHeartbeats"', 'true', '5', '1',
-                        'Max heartbeats count node can miss without failing client node')
-                .settings-row
-                    +number('Topology history:', model + '.topHistorySize', '"topHistorySize"', 'true', '1000', '0', 'Size of topology snapshots history')
-                .settings-row
-                    +java-class('Discovery listener:', model + '.listener', '"discoListener"', 'true', 'false', 'Listener for grid node discovery events')
-                .settings-row
-                    +java-class('Data exchange:', model + '.dataExchange', '"dataExchange"', 'true', 'false', 'Class name of handler for initial data exchange between Ignite nodes')
-                .settings-row
-                    +java-class('Metrics provider:', model + '.metricsProvider', '"metricsProvider"', 'true', 'false', 'Class name of metric provider to discovery SPI')
-                .settings-row
-                    +number('Reconnect count:', model + '.reconnectCount', '"discoReconnectCount"', 'true', '10', '1', 'Reconnect attempts count')
-                .settings-row
-                    +number('Statistics frequency:', model + '.statisticsPrintFrequency', '"statisticsPrintFrequency"', 'true', '0', '1', 'Statistics print frequency')
-                .settings-row
-                    +number('IP finder clean frequency:', model + '.ipFinderCleanFrequency', '"ipFinderCleanFrequency"', 'true', '60000', '1', 'IP finder clean frequency')
-                .settings-row
-                    +java-class('Node authenticator:', model + '.authenticator', '"authenticator"', 'true', 'false', 'Class name of node authenticator implementation')
-                .settings-row
-                    +checkbox('Force server mode', model + '.forceServerMode', '"forceServerMode"', 'Force start TCP/IP discovery in server mode')
-                .settings-row
-                    +checkbox('Client reconnect disabled', model + '.clientReconnectDisabled', '"clientReconnectDisabled"',
-                        'Disable try of client to reconnect after server detected client node failure')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterDiscovery')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/discovery.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/discovery.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/discovery.pug
new file mode 100644
index 0000000..af9d875
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/discovery.pug
@@ -0,0 +1,88 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'discovery'
+-var model = 'backupItem.discovery'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Discovery
+        ignite-form-field-tooltip.tipLabel
+            | TCP/IP discovery configuration#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/cluster-config" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +text-ip-address('Local address:', `${model}.localAddress`, '"discoLocalAddress"', 'true', '228.1.2.4',
+                        'Local host IP address that discovery SPI uses<br/>\
+                        If not provided a first found non-loopback address will be used')
+                .settings-row
+                    +number-min-max('Local port:', `${model}.localPort`, '"discoLocalPort"', 'true', '47500', '1024', '65535', 'Local port which node uses')
+                .settings-row
+                    +number('Local port range:', `${model}.localPortRange`, '"discoLocalPortRange"', 'true', '100', '1', 'Local port range')
+                .settings-row
+                    +java-class('Address resolver:', `${model}.addressResolver`, '"discoAddressResolver"', 'true', 'false',
+                        'Provides resolution between external and internal addresses')
+                .settings-row
+                    +number('Socket timeout:', `${model}.socketTimeout`, '"socketTimeout"', 'true', '5000', '0', 'Socket operations timeout')
+                .settings-row
+                    +number('Acknowledgement timeout:', `${model}.ackTimeout`, '"ackTimeout"', 'true', '5000', '0', 'Message acknowledgement timeout')
+                .settings-row
+                    +number('Max acknowledgement timeout:', `${model}.maxAckTimeout`, '"maxAckTimeout"', 'true', '600000', '0', 'Maximum message acknowledgement timeout')
+                .settings-row
+                    +number('Network timeout:', `${model}.networkTimeout`, '"discoNetworkTimeout"', 'true', '5000', '1', 'Timeout to use for network operations')
+                .settings-row
+                    +number('Join timeout:', `${model}.joinTimeout`, '"joinTimeout"', 'true', '0', '0',
+                        'Join timeout<br/>' +
+                        '0 means wait forever')
+                .settings-row
+                    +number('Thread priority:', `${model}.threadPriority`, '"threadPriority"', 'true', '10', '1', 'Thread priority for all threads started by SPI')
+                .settings-row
+                    +number('Heartbeat frequency:', `${model}.heartbeatFrequency`, '"heartbeatFrequency"', 'true', '2000', '1', 'Heartbeat messages issuing frequency')
+                .settings-row
+                    +number('Max heartbeats miss w/o init:', `${model}.maxMissedHeartbeats`, '"maxMissedHeartbeats"', 'true', '1', '1',
+                        'Max heartbeats count node can miss without initiating status check')
+                .settings-row
+                    +number('Max missed client heartbeats:', `${model}.maxMissedClientHeartbeats`, '"maxMissedClientHeartbeats"', 'true', '5', '1',
+                        'Max heartbeats count node can miss without failing client node')
+                .settings-row
+                    +number('Topology history:', `${model}.topHistorySize`, '"topHistorySize"', 'true', '1000', '0', 'Size of topology snapshots history')
+                .settings-row
+                    +java-class('Discovery listener:', `${model}.listener`, '"discoListener"', 'true', 'false', 'Listener for grid node discovery events')
+                .settings-row
+                    +java-class('Data exchange:', `${model}.dataExchange`, '"dataExchange"', 'true', 'false', 'Class name of handler for initial data exchange between Ignite nodes')
+                .settings-row
+                    +java-class('Metrics provider:', `${model}.metricsProvider`, '"metricsProvider"', 'true', 'false', 'Class name of metric provider to discovery SPI')
+                .settings-row
+                    +number('Reconnect count:', `${model}.reconnectCount`, '"discoReconnectCount"', 'true', '10', '1', 'Reconnect attempts count')
+                .settings-row
+                    +number('Statistics frequency:', `${model}.statisticsPrintFrequency`, '"statisticsPrintFrequency"', 'true', '0', '1', 'Statistics print frequency')
+                .settings-row
+                    +number('IP finder clean frequency:', `${model}.ipFinderCleanFrequency`, '"ipFinderCleanFrequency"', 'true', '60000', '1', 'IP finder clean frequency')
+                .settings-row
+                    +java-class('Node authenticator:', `${model}.authenticator`, '"authenticator"', 'true', 'false', 'Class name of node authenticator implementation')
+                .settings-row
+                    +checkbox('Force server mode', `${model}.forceServerMode`, '"forceServerMode"', 'Force start TCP/IP discovery in server mode')
+                .settings-row
+                    +checkbox('Client reconnect disabled', `${model}.clientReconnectDisabled`, '"clientReconnectDisabled"',
+                        'Disable try of client to reconnect after server detected client node failure')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterDiscovery')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/events.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/events.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/events.jade
deleted file mode 100644
index 643ea97..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/events.jade
+++ /dev/null
@@ -1,68 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'events'
--var model = 'backupItem'
--var modelEventStorage = model + '.eventStorage'
--var modelEventStorageKind = modelEventStorage + '.kind'
--var eventStorageMemory = modelEventStorageKind + ' === "Memory"'
--var eventStorageCustom = modelEventStorageKind + ' === "Custom"'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Events
-        ignite-form-field-tooltip.tipLabel
-            | Grid events are used for notification about what happens within the grid#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/events" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown-multiple('Include type:', model + '.includeEventTypes', '"includeEventTypes"', true, 'Choose recorded event types', '', 'eventGroups',
-                    'Array of event types, which will be recorded by GridEventStorageManager#record(Event)<br/>\
-                    Note, that either the include event types or the exclude event types can be established')
-
-                .settings-row
-                    +dropdown('Event storage:', modelEventStorageKind, '"eventStorageKind"', 'true', '',
-                    '[\
-                        {value: "Memory", label: "Memory"},\
-                        {value: "Custom", label: "Custom"}\
-                    ]',
-                    'Regulate how grid store events locally on node\
-                    <ul>\
-                        <li>Memory - All events are kept in the FIFO queue in-memory</li>\
-                        <li>Custom - Custom implementation of event storage SPI</li>\
-                    </ul>')
-
-                div(ng-show=eventStorageMemory)
-                    .settings-row
-                        +number('Events expiration time:', modelEventStorage + '.Memory.expireAgeMs', '"EventStorageExpireAgeMs"', 'true', 'Long.MAX_VALUE', '1', 'All events that exceed this value will be removed from the queue when next event comes')
-                    .settings-row
-                        +number('Events queue size:', modelEventStorage + '.Memory.expireCount', '"EventStorageExpireCount"', 'true', '10000', '1', 'Events will be filtered out when new request comes')
-                    .settings-row
-                        +java-class('Filter:', modelEventStorage + '.Memory.filter', '"EventStorageFilter"', 'true', 'false',
-                        'Filter for events to be recorded<br/>\
-                        Should be implementation of o.a.i.lang.IgnitePredicate&lt;o.a.i.events.Event&gt;', eventStorageMemory)
-
-                .settings-row(ng-show=eventStorageCustom)
-                    +java-class('Class:', modelEventStorage + '.Custom.className', '"EventStorageCustom"', 'true', eventStorageCustom, 'Event storage implementation class name', eventStorageCustom)
-
-            .col-sm-6
-                +preview-xml-java(model, 'clusterEvents')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/events.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/events.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/events.pug
new file mode 100644
index 0000000..70fb714
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/events.pug
@@ -0,0 +1,68 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'events'
+-var model = 'backupItem'
+-var modelEventStorage = model + '.eventStorage'
+-var modelEventStorageKind = modelEventStorage + '.kind'
+-var eventStorageMemory = modelEventStorageKind + ' === "Memory"'
+-var eventStorageCustom = modelEventStorageKind + ' === "Custom"'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Events
+        ignite-form-field-tooltip.tipLabel
+            | Grid events are used for notification about what happens within the grid#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/events" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown-multiple('Include type:', `${model}.includeEventTypes`, '"includeEventTypes"', true, 'Choose recorded event types', '', 'eventGroups',
+                    'Array of event types, which will be recorded by GridEventStorageManager#record(Event)<br/>\
+                    Note, that either the include event types or the exclude event types can be established')
+
+                .settings-row
+                    +dropdown('Event storage:', modelEventStorageKind, '"eventStorageKind"', 'true', '',
+                    '[\
+                        {value: "Memory", label: "Memory"},\
+                        {value: "Custom", label: "Custom"}\
+                    ]',
+                    'Regulate how grid store events locally on node\
+                    <ul>\
+                        <li>Memory - All events are kept in the FIFO queue in-memory</li>\
+                        <li>Custom - Custom implementation of event storage SPI</li>\
+                    </ul>')
+
+                div(ng-show=eventStorageMemory)
+                    .settings-row
+                        +number('Events expiration time:', `${modelEventStorage}.Memory.expireAgeMs`, '"EventStorageExpireAgeMs"', 'true', 'Long.MAX_VALUE', '1', 'All events that exceed this value will be removed from the queue when next event comes')
+                    .settings-row
+                        +number('Events queue size:', `${modelEventStorage}.Memory.expireCount`, '"EventStorageExpireCount"', 'true', '10000', '1', 'Events will be filtered out when new request comes')
+                    .settings-row
+                        +java-class('Filter:', `${modelEventStorage}.Memory.filter`, '"EventStorageFilter"', 'true', 'false',
+                        'Filter for events to be recorded<br/>\
+                        Should be implementation of o.a.i.lang.IgnitePredicate&lt;o.a.i.events.Event&gt;', eventStorageMemory)
+
+                .settings-row(ng-show=eventStorageCustom)
+                    +java-class('Class:', `${modelEventStorage}.Custom.className`, '"EventStorageCustom"', 'true', eventStorageCustom, 'Event storage implementation class name', eventStorageCustom)
+
+            .col-sm-6
+                +preview-xml-java(model, 'clusterEvents')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/failover.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/failover.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/failover.jade
deleted file mode 100644
index 1665659..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/failover.jade
+++ /dev/null
@@ -1,73 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem'
--var form = 'failoverSpi'
--var failoverSpi = model + '.failoverSpi'
--var failoverCustom = 'model.kind === "Custom"'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Failover configuration
-        ignite-form-field-tooltip.tipLabel
-            | Failover SPI provides ability to supply custom logic for handling failed execution of a grid job#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/fault-tolerance" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row(ng-init='failoverSpiTbl={type: "failoverSpi", model: "failoverSpi", focusId: "kind", ui: "failover-table"}')
-                    +ignite-form-group()
-                        ignite-form-field-label
-                            | Failover SPI configurations
-                        ignite-form-group-tooltip
-                            | Failover SPI configurations
-                        ignite-form-group-add(ng-click='tableNewItem(failoverSpiTbl)')
-                            | Add failover SPI
-                        .group-content-empty(ng-if='!(#{failoverSpi} && #{failoverSpi}.length > 0)')
-                            | Not defined
-                        .group-content(ng-show='#{failoverSpi} && #{failoverSpi}.length > 0' ng-repeat='model in #{failoverSpi} track by $index')
-                            hr(ng-if='$index != 0')
-                            .settings-row
-                                +dropdown-required-autofocus('Failover SPI:', 'model.kind', '"failoverKind" + $index', 'true', 'true', 'Choose Failover SPI', '[\
-                                        {value: "JobStealing", label: "Job stealing"},\
-                                        {value: "Never", label: "Never"},\
-                                        {value: "Always", label: "Always"},\
-                                        {value: "Custom", label: "Custom"}\
-                                    ]', 'Provides ability to supply custom logic for handling failed execution of a grid job\
-                                    <ul>\
-                                        <li>Job stealing - Supports job stealing from over-utilized nodes to under-utilized nodes</li>\
-                                        <li>Never - Jobs are ordered as they arrived</li>\
-                                        <li>Always - Jobs are first ordered by their priority</li>\
-                                        <li>Custom - Jobs are activated immediately on arrival to mapped node</li>\
-                                        <li>Default - Default FailoverSpi implementation</li>\
-                                    </ul>')
-
-                                    +table-remove-button(failoverSpi, 'Remove Failover SPI')
-                            .settings-row(ng-show='model.kind === "JobStealing"')
-                                +number('Maximum failover attempts:', 'model.JobStealing.maximumFailoverAttempts', '"jsMaximumFailoverAttempts" + $index', 'true', '5', '0',
-                                    'Maximum number of attempts to execute a failed job on another node')
-                            .settings-row(ng-show='model.kind === "Always"')
-                                +number('Maximum failover attempts:', 'model.Always.maximumFailoverAttempts', '"alwaysMaximumFailoverAttempts" + $index', 'true', '5', '0',
-                                    'Maximum number of attempts to execute a failed job on another node')
-                            .settings-row(ng-show=failoverCustom)
-                                +java-class('SPI implementation', 'model.Custom.class', '"failoverSpiClass" + $index', 'true', failoverCustom,
-                                    'Custom FailoverSpi implementation class name.', failoverCustom)
-            .col-sm-6
-                +preview-xml-java(model, 'clusterFailover')


[33/50] [abbrv] ignite git commit: ignite-4779 Missed discovery data snapshot during exchange processing (do not use discovery manager cache to handle exchange)

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
index b5cb5cf..56acc26 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
@@ -28,6 +28,7 @@ import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.GridNodeOrderComparator;
 import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
+import org.apache.ignite.internal.managers.discovery.DiscoCache;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -71,17 +72,19 @@ public class GridDhtAssignmentFetchFuture extends GridFutureAdapter<GridDhtAffin
      * @param ctx Context.
      * @param cacheName Cache name.
      * @param topVer Topology version.
+     * @param discoCache Discovery cache.
      */
     public GridDhtAssignmentFetchFuture(
         GridCacheSharedContext ctx,
         String cacheName,
-        AffinityTopologyVersion topVer
+        AffinityTopologyVersion topVer,
+        DiscoCache discoCache
     ) {
         this.ctx = ctx;
         int cacheId = CU.cacheId(cacheName);
         this.key = new T2<>(cacheId, topVer);
 
-        Collection<ClusterNode> availableNodes = ctx.discovery().cacheAffinityNodes(cacheId, topVer);
+        Collection<ClusterNode> availableNodes = discoCache.cacheAffinityNodes(cacheId);
 
         LinkedList<ClusterNode> tmp = new LinkedList<>();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index 966a186..84ff96b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@ -36,6 +36,7 @@ import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.events.DiscoveryEvent;
 import org.apache.ignite.internal.IgniteFutureTimeoutCheckedException;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
+import org.apache.ignite.internal.managers.discovery.DiscoCache;
 import org.apache.ignite.internal.processors.affinity.AffinityAssignment;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
@@ -95,6 +96,9 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
     /** */
     private volatile AffinityTopologyVersion topVer = AffinityTopologyVersion.NONE;
 
+    /** Discovery cache. */
+    private volatile DiscoCache discoCache;
+
     /** */
     private volatile boolean stopping;
 
@@ -151,6 +155,8 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
             rebalancedTopVer = AffinityTopologyVersion.NONE;
 
             topVer = AffinityTopologyVersion.NONE;
+
+            discoCache = cctx.discovery().discoCache();
         }
         finally {
             lock.writeLock().unlock();
@@ -293,6 +299,8 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
             rebalancedTopVer = AffinityTopologyVersion.NONE;
 
             topVer = exchId.topologyVersion();
+
+            discoCache = exchFut.discoCache();
         }
         finally {
             lock.writeLock().unlock();
@@ -349,7 +357,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
     private void initPartitions0(GridDhtPartitionsExchangeFuture exchFut, long updateSeq) {
         ClusterNode loc = cctx.localNode();
 
-        ClusterNode oldest = currentCoordinator();
+        ClusterNode oldest = discoCache.oldestAliveServerNodeWithCache();
 
         GridDhtPartitionExchangeId exchId = exchFut.exchangeId();
 
@@ -474,7 +482,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
             if (exchId.isLeft())
                 removeNode(exchId.nodeId());
 
-            ClusterNode oldest = currentCoordinator();
+            ClusterNode oldest = discoCache.oldestAliveServerNodeWithCache();
 
             if (log.isDebugEnabled())
                 log.debug("Partition map beforeExchange [exchId=" + exchId + ", fullMap=" + fullMapString() + ']');
@@ -876,7 +884,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
         AffinityTopologyVersion topVer,
         GridDhtPartitionState state,
         GridDhtPartitionState... states) {
-        Collection<UUID> allIds = topVer.topologyVersion() > 0 ? F.nodeIds(CU.affinityNodes(cctx, topVer)) : null;
+        Collection<UUID> allIds = topVer.topologyVersion() > 0 ? F.nodeIds(discoCache.cacheAffinityNodes(cctx.cacheId())) : null;
 
         lock.readLock().lock();
 
@@ -973,7 +981,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
 
     /** {@inheritDoc} */
     @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
-    @Nullable @Override public boolean update(@Nullable GridDhtPartitionExchangeId exchId,
+    @Override public boolean update(@Nullable GridDhtPartitionExchangeId exchId,
         GridDhtPartitionFullMap partMap,
         @Nullable Map<Integer, Long> cntrMap) {
         if (log.isDebugEnabled())
@@ -1106,7 +1114,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public boolean update(@Nullable GridDhtPartitionExchangeId exchId,
+    @Override public boolean update(@Nullable GridDhtPartitionExchangeId exchId,
         GridDhtPartitionMap2 parts,
         @Nullable Map<Integer, Long> cntrMap,
         boolean checkEvictions) {
@@ -1278,7 +1286,8 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
                 List<ClusterNode> affNodes = aff.get(p);
 
                 if (!affNodes.contains(cctx.localNode())) {
-                    Collection<UUID> nodeIds = F.nodeIds(nodes(p, topVer, OWNING));
+                    List<ClusterNode> nodes = nodes(p, topVer, OWNING);
+                    Collection<UUID> nodeIds = F.nodeIds(nodes);
 
                     // If all affinity nodes are owners, then evict partition from local node.
                     if (nodeIds.containsAll(F.nodeIds(affNodes))) {
@@ -1296,15 +1305,13 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
                         int affCnt = affNodes.size();
 
                         if (ownerCnt > affCnt) {
-                            List<ClusterNode> sorted = new ArrayList<>(cctx.discovery().nodes(nodeIds));
-
                             // Sort by node orders in ascending order.
-                            Collections.sort(sorted, CU.nodeComparator(true));
+                            Collections.sort(nodes, CU.nodeComparator(true));
 
-                            int diff = sorted.size() - affCnt;
+                            int diff = nodes.size() - affCnt;
 
                             for (int i = 0; i < diff; i++) {
-                                ClusterNode n = sorted.get(i);
+                                ClusterNode n = nodes.get(i);
 
                                 if (locId.equals(n.id())) {
                                     part.rent(false);
@@ -1330,17 +1337,6 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
     }
 
     /**
-     * @return Current coordinator node.
-     */
-    @Nullable private ClusterNode currentCoordinator() {
-        ClusterNode oldest = cctx.discovery().oldestAliveCacheServerNode(topVer);
-
-        assert oldest != null || cctx.kernalContext().clientNode();
-
-        return oldest;
-    }
-
-    /**
      * Updates value for single partition.
      *
      * @param p Partition.
@@ -1350,7 +1346,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
      */
     @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
     private long updateLocal(int p, GridDhtPartitionState state, long updateSeq) {
-        ClusterNode oldest = currentCoordinator();
+        ClusterNode oldest = discoCache.oldestAliveServerNodeWithCache();
 
         assert oldest != null || cctx.kernalContext().clientNode();
 
@@ -1415,7 +1411,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
     private void removeNode(UUID nodeId) {
         assert nodeId != null;
 
-        ClusterNode oldest = CU.oldest(cctx.discovery().serverNodes(topVer));
+        ClusterNode oldest = discoCache.oldestAliveServerNode();
 
         assert oldest != null;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index a334fd5..46fb144 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -44,7 +44,7 @@ import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
 import org.apache.ignite.internal.events.DiscoveryCustomEvent;
-import org.apache.ignite.internal.managers.discovery.GridDiscoveryTopologySnapshot;
+import org.apache.ignite.internal.managers.discovery.DiscoCache;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache;
 import org.apache.ignite.internal.processors.cache.CacheAffinityChangeMessage;
@@ -101,6 +101,10 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
     /** Dummy reassign flag. */
     private final boolean reassign;
 
+    /** */
+    @GridToStringExclude
+    private volatile DiscoCache discoCache;
+
     /** Discovery event. */
     private volatile DiscoveryEvent discoEvt;
 
@@ -145,9 +149,6 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
     /** */
     private boolean init;
 
-    /** Topology snapshot. */
-    private AtomicReference<GridDiscoveryTopologySnapshot> topSnapshot = new AtomicReference<>();
-
     /** Last committed cache version before next topology version use. */
     private AtomicReference<GridCacheVersion> lastVer = new AtomicReference<>();
 
@@ -335,6 +336,13 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
     }
 
     /**
+     * @return Discovery cache.
+     */
+    public DiscoCache discoCache() {
+        return discoCache;
+    }
+
+    /**
      * @param cacheId Cache ID to check.
      * @param topVer Topology version.
      * @return {@code True} if cache was added during this exchange.
@@ -377,11 +385,13 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
      *
      * @param exchId Exchange ID.
      * @param discoEvt Discovery event.
+     * @param discoCache Discovery data cache.
      */
-    public void onEvent(GridDhtPartitionExchangeId exchId, DiscoveryEvent discoEvt) {
+    public void onEvent(GridDhtPartitionExchangeId exchId, DiscoveryEvent discoEvt, DiscoCache discoCache) {
         assert exchId.equals(this.exchId);
 
         this.discoEvt = discoEvt;
+        this.discoCache = discoCache;
 
         evtLatch.countDown();
     }
@@ -445,7 +455,9 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
         assert !dummy && !forcePreload : this;
 
         try {
-            srvNodes = new ArrayList<>(cctx.discovery().serverNodes(topologyVersion()));
+            discoCache.updateAlives(cctx.discovery());
+
+            srvNodes = new ArrayList<>(discoCache.serverNodes());
 
             remaining.addAll(F.nodeIds(F.view(srvNodes, F.remoteNodes(cctx.localNodeId()))));
 
@@ -560,7 +572,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
                     exchId.topologyVersion().equals(cacheCtx.startTopologyVersion());
 
                 if (updateTop && clientTop != null)
-                    cacheCtx.topology().update(exchId, clientTop.partitionMap(true), clientTop.updateCounters(false));
+                    top.update(exchId, clientTop.partitionMap(true), clientTop.updateCounters(false));
             }
 
             top.updateTopologyVersion(exchId, this, updSeq, stopping(cacheCtx.cacheId()));
@@ -852,7 +864,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
         List<String> cachesWithoutNodes = null;
 
         for (String name : cctx.cache().cacheNames()) {
-            if (cctx.discovery().cacheAffinityNodes(name, topologyVersion()).isEmpty()) {
+            if (discoCache.cacheAffinityNodes(name).isEmpty()) {
                 if (cachesWithoutNodes == null)
                     cachesWithoutNodes = new ArrayList<>();
 
@@ -1106,7 +1118,6 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
      * Cleans up resources to avoid excessive memory usage.
      */
     public void cleanUp() {
-        topSnapshot.set(null);
         singleMsgs.clear();
         fullMsgs.clear();
         crd = null;
@@ -1261,7 +1272,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
         try {
             assert crd.isLocal();
 
-            if (!crd.equals(cctx.discovery().serverNodes(topologyVersion()).get(0))) {
+            if (!crd.equals(discoCache.serverNodes().get(0))) {
                 for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
                     if (!cacheCtx.isLocal())
                         cacheCtx.topology().beforeExchange(GridDhtPartitionsExchangeFuture.this, !centralizedAff);
@@ -1570,6 +1581,8 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
 
                         ClusterNode crd0;
 
+                        discoCache.updateAlives(node);
+
                         synchronized (mux) {
                             if (!srvNodes.remove(node))
                                 return;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index d26242d..99146aa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -48,7 +48,6 @@ import org.apache.ignite.compute.ComputeJobContext;
 import org.apache.ignite.configuration.DeploymentMode;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.events.DiscoveryEvent;
-import org.apache.ignite.events.Event;
 import org.apache.ignite.events.EventType;
 import org.apache.ignite.internal.GridClosureCallMode;
 import org.apache.ignite.internal.GridKernalContext;
@@ -58,8 +57,9 @@ import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
 import org.apache.ignite.internal.events.DiscoveryCustomEvent;
+import org.apache.ignite.internal.managers.discovery.DiscoCache;
 import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
-import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
+import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener;
 import org.apache.ignite.internal.processors.GridProcessorAdapter;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheAffinityChangeMessage;
@@ -167,7 +167,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
     private IgniteInternalCache<Object, Object> cache;
 
     /** Topology listener. */
-    private GridLocalEventListener topLsnr = new TopologyListener();
+    private DiscoveryEventListener topLsnr = new TopologyListener();
 
     static {
         Set<IgniteProductVersion> versions = new TreeSet<>(new Comparator<IgniteProductVersion>() {
@@ -251,7 +251,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
         cache = ctx.cache().utilityCache();
 
         if (!ctx.clientNode())
-            ctx.event().addLocalEventListener(topLsnr, EVTS);
+            ctx.event().addDiscoveryEventListener(topLsnr, EVTS);
 
         try {
             if (ctx.deploy().enabled())
@@ -314,7 +314,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
         busyLock.block();
 
         if (!ctx.clientNode())
-            ctx.event().removeLocalEventListener(topLsnr);
+            ctx.event().removeDiscoveryEventListener(topLsnr);
 
         Collection<ServiceContextImpl> ctxs = new ArrayList<>();
 
@@ -1568,9 +1568,9 @@ public class GridServiceProcessor extends GridProcessorAdapter {
     /**
      * Topology listener.
      */
-    private class TopologyListener implements GridLocalEventListener {
+    private class TopologyListener implements DiscoveryEventListener {
         /** {@inheritDoc} */
-        @Override public void onEvent(Event evt) {
+        @Override public void onEvent(DiscoveryEvent evt, final DiscoCache discoCache) {
             if (!busyLock.enterBusy())
                 return;
 
@@ -1588,11 +1588,14 @@ public class GridServiceProcessor extends GridProcessorAdapter {
                     }
                 }
                 else
-                    topVer = new AffinityTopologyVersion(((DiscoveryEvent)evt).topologyVersion(), 0);
+                    topVer = new AffinityTopologyVersion((evt).topologyVersion(), 0);
 
                 depExe.execute(new BusyRunnable() {
                     @Override public void run0() {
-                        ClusterNode oldest = ctx.discovery().oldestAliveCacheServerNode(topVer);
+                        // In case the cache instance isn't tracked by DiscoveryManager anymore.
+                        discoCache.updateAlives(ctx.discovery());
+
+                        ClusterNode oldest = discoCache.oldestAliveServerNodeWithCache();
 
                         if (oldest != null && oldest.isLocal()) {
                             final Collection<GridServiceDeployment> retries = new ConcurrentLinkedQueue<>();


[02/50] [abbrv] ignite git commit: Merge remote-tracking branch 'origin/master'

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/ignite-4705-2
Commit: 2ba80057ce30874db0e7db4d809b20693682b3f8
Parents: 5a4c12b 78ce14b
Author: Alexey Kuznetsov <ak...@gridgain.com>
Authored: Wed Mar 1 21:58:31 2017 +0700
Committer: Alexey Kuznetsov <ak...@gridgain.com>
Committed: Wed Mar 1 21:58:31 2017 +0700

----------------------------------------------------------------------

----------------------------------------------------------------------



[34/50] [abbrv] ignite git commit: ignite-4779 Missed discovery data snapshot during exchange processing (do not use discovery manager cache to handle exchange)

Posted by sb...@apache.org.
ignite-4779 Missed discovery data snapshot during exchange processing (do not use discovery manager cache to handle exchange)


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

Branch: refs/heads/ignite-4705-2
Commit: a61a98ad3908770b77d0ffb071effbc92f4d5c5a
Parents: 2d385c5
Author: Igor Seliverstov <gv...@gmail.com>
Authored: Thu Mar 9 21:01:41 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Mar 9 21:01:41 2017 +0300

----------------------------------------------------------------------
 .../internal/managers/discovery/DiscoCache.java | 310 +++++++++++
 .../discovery/GridDiscoveryManager.java         | 550 ++++++-------------
 .../eventstorage/DiscoveryEventListener.java    |  33 ++
 .../eventstorage/GridEventStorageManager.java   | 162 +++++-
 .../affinity/GridAffinityAssignmentCache.java   |   7 +-
 .../cache/CacheAffinitySharedManager.java       |  35 +-
 .../cache/GridCacheAffinityManager.java         |   3 +-
 .../GridCachePartitionExchangeManager.java      |  64 ++-
 .../dht/GridClientPartitionTopology.java        |  20 +-
 .../dht/GridDhtAssignmentFetchFuture.java       |   7 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |  44 +-
 .../GridDhtPartitionsExchangeFuture.java        |  33 +-
 .../service/GridServiceProcessor.java           |  21 +-
 13 files changed, 806 insertions(+), 483 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoCache.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoCache.java
new file mode 100644
index 0000000..5247ac1
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoCache.java
@@ -0,0 +1,310 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.managers.discovery;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.util.GridConcurrentHashSet;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.P1;
+import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ *
+ */
+public class DiscoCache {
+    /** Local node. */
+    private final ClusterNode loc;
+
+    /** Remote nodes. */
+    private final List<ClusterNode> rmtNodes;
+
+    /** All nodes. */
+    private final List<ClusterNode> allNodes;
+
+    /** All server nodes. */
+    private final List<ClusterNode> srvNodes;
+
+    /** Daemon nodes. */
+    private final List<ClusterNode> daemonNodes;
+
+    /** All server nodes. */
+    private final List<ClusterNode> srvNodesWithCaches;
+
+    /** All nodes with at least one cache configured. */
+    @GridToStringInclude
+    private final List<ClusterNode> allNodesWithCaches;
+
+    /** All remote nodes with at least one cache configured. */
+    @GridToStringInclude
+    private final List<ClusterNode> rmtNodesWithCaches;
+
+    /** Cache nodes by cache name. */
+    @GridToStringInclude
+    private final Map<Integer, List<ClusterNode>> allCacheNodes;
+
+    /** Affinity cache nodes by cache name. */
+    @GridToStringInclude
+    private final Map<Integer, List<ClusterNode>> affCacheNodes;
+
+    /** Node map. */
+    private final Map<UUID, ClusterNode> nodeMap;
+
+    /** Caches where at least one node has near cache enabled. */
+    @GridToStringInclude
+    private final Set<Integer> nearEnabledCaches;
+
+    /** Alive nodes. */
+    private final Set<UUID> alives = new GridConcurrentHashSet<>();
+
+    /**
+     * @param loc Local node.
+     * @param rmtNodes Remote nodes.
+     * @param allNodes All nodes.
+     * @param srvNodes Server nodes.
+     * @param daemonNodes Daemon nodes.
+     * @param srvNodesWithCaches Server nodes with at least one cache configured.
+     * @param allNodesWithCaches All nodes with at least one cache configured.
+     * @param rmtNodesWithCaches Remote nodes with at least one cache configured.
+     * @param allCacheNodes Cache nodes by cache name.
+     * @param affCacheNodes Affinity cache nodes by cache name.
+     * @param nodeMap Node map.
+     * @param nearEnabledCaches Caches where at least one node has near cache enabled.
+     * @param alives Alive nodes.
+     */
+    DiscoCache(ClusterNode loc,
+        List<ClusterNode> rmtNodes,
+        List<ClusterNode> allNodes,
+        List<ClusterNode> srvNodes,
+        List<ClusterNode> daemonNodes,
+        List<ClusterNode> srvNodesWithCaches,
+        List<ClusterNode> allNodesWithCaches,
+        List<ClusterNode> rmtNodesWithCaches,
+        Map<Integer, List<ClusterNode>> allCacheNodes,
+        Map<Integer, List<ClusterNode>> affCacheNodes,
+        Map<UUID, ClusterNode> nodeMap,
+        Set<Integer> nearEnabledCaches,
+        Set<UUID> alives) {
+        this.loc = loc;
+        this.rmtNodes = rmtNodes;
+        this.allNodes = allNodes;
+        this.srvNodes = srvNodes;
+        this.daemonNodes = daemonNodes;
+        this.srvNodesWithCaches = srvNodesWithCaches;
+        this.allNodesWithCaches = allNodesWithCaches;
+        this.rmtNodesWithCaches = rmtNodesWithCaches;
+        this.allCacheNodes = allCacheNodes;
+        this.affCacheNodes = affCacheNodes;
+        this.nodeMap = nodeMap;
+        this.nearEnabledCaches = nearEnabledCaches;
+        this.alives.addAll(alives);
+    }
+
+    /** @return Local node. */
+    public ClusterNode localNode() {
+        return loc;
+    }
+
+    /** @return Remote nodes. */
+    public List<ClusterNode> remoteNodes() {
+        return rmtNodes;
+    }
+
+    /** @return All nodes. */
+    public List<ClusterNode> allNodes() {
+        return allNodes;
+    }
+
+    /** @return Server nodes. */
+    public List<ClusterNode> serverNodes() {
+        return srvNodes;
+    }
+
+    /** @return Daemon nodes. */
+    public List<ClusterNode> daemonNodes() {
+        return daemonNodes;
+    }
+
+    /** @return Server nodes with at least one cache configured. */
+    public List<ClusterNode> serverNodesWithCaches() {
+        return srvNodesWithCaches;
+    }
+
+    /**
+     * Gets all remote nodes that have at least one cache configured.
+     *
+     * @return Collection of nodes.
+     */
+    public List<ClusterNode> remoteNodesWithCaches() {
+        return rmtNodesWithCaches;
+    }
+
+    /**
+     * Gets collection of nodes with at least one cache configured.
+     *
+     * @return Collection of nodes.
+     */
+    public List<ClusterNode> allNodesWithCaches() {
+        return allNodesWithCaches;
+    }
+
+    /**
+     * Gets collection of server nodes with at least one cache configured.
+     *
+     * @return Collection of nodes.
+     */
+    public Collection<ClusterNode> aliveServerNodes() {
+        return F.view(serverNodes(), new P1<ClusterNode>() {
+            @Override public boolean apply(ClusterNode node) {
+                return alives.contains(node.id());
+            }
+        });
+    }
+
+    /**
+     * Gets collection of server nodes with at least one cache configured.
+     *
+     * @return Collection of nodes.
+     */
+    public Collection<ClusterNode> aliveServerNodesWithCaches() {
+        return F.view(serverNodesWithCaches(), new P1<ClusterNode>() {
+            @Override public boolean apply(ClusterNode node) {
+                return alives.contains(node.id());
+            }
+        });
+    }
+
+    /**
+     * @return Oldest alive server node.
+     */
+    public @Nullable ClusterNode oldestAliveServerNode(){
+        Iterator<ClusterNode> it = aliveServerNodes().iterator();
+        return it.hasNext() ? it.next() : null;
+    }
+
+    /**
+     * @return Oldest alive server node with at least one cache configured.
+     */
+    public @Nullable ClusterNode oldestAliveServerNodeWithCache(){
+        Iterator<ClusterNode> it = aliveServerNodesWithCaches().iterator();
+        return it.hasNext() ? it.next() : null;
+    }
+
+    /**
+     * Gets all nodes that have cache with given name.
+     *
+     * @param cacheName Cache name.
+     * @return Collection of nodes.
+     */
+    public List<ClusterNode> cacheNodes(@Nullable String cacheName) {
+        return cacheNodes(CU.cacheId(cacheName));
+    }
+
+    /**
+     * Gets all nodes that have cache with given ID.
+     *
+     * @param cacheId Cache ID.
+     * @return Collection of nodes.
+     */
+    public List<ClusterNode> cacheNodes(Integer cacheId) {
+        return emptyIfNull(allCacheNodes.get(cacheId));
+    }
+
+    /**
+     * Gets all nodes that have cache with given ID and should participate in affinity calculation. With
+     * partitioned cache nodes with near-only cache do not participate in affinity node calculation.
+     *
+     * @param cacheName Cache name.
+     * @return Collection of nodes.
+     */
+    public List<ClusterNode> cacheAffinityNodes(@Nullable String cacheName) {
+        return cacheAffinityNodes(CU.cacheId(cacheName));
+    }
+
+    /**
+     * Gets all nodes that have cache with given ID and should participate in affinity calculation. With
+     * partitioned cache nodes with near-only cache do not participate in affinity node calculation.
+     *
+     * @param cacheId Cache ID.
+     * @return Collection of nodes.
+     */
+    public List<ClusterNode> cacheAffinityNodes(int cacheId) {
+        return emptyIfNull(affCacheNodes.get(cacheId));
+    }
+
+    /**
+     * Checks if cache with given ID has at least one node with near cache enabled.
+     *
+     * @param cacheId Cache ID.
+     * @return {@code True} if cache with given name has at least one node with near cache enabled.
+     */
+    public boolean hasNearCache(int cacheId) {
+        return nearEnabledCaches.contains(cacheId);
+    }
+
+    /**
+     * @param id Node ID.
+     * @return Node.
+     */
+    public @Nullable ClusterNode node(UUID id) {
+        return nodeMap.get(id);
+    }
+
+    /**
+     * Removes left node from alives lists.
+     *
+     * @param rmvd Removed node.
+     */
+    public void updateAlives(ClusterNode rmvd) {
+        alives.remove(rmvd.id());
+    }
+
+    /**
+     * Removes left nodes from cached alives lists.
+     *
+     * @param discovery Discovery manager.
+     */
+    public void updateAlives(GridDiscoveryManager discovery) {
+        for (UUID alive : alives) {
+            if (!discovery.alive(alive))
+                alives.remove(alive);
+        }
+    }
+
+    /**
+     * @param nodes Cluster nodes.
+     * @return Empty collection if nodes list is {@code null}
+     */
+    private List<ClusterNode> emptyIfNull(List<ClusterNode> nodes) {
+        return nodes == null ? Collections.<ClusterNode>emptyList() : nodes;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(DiscoCache.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 9ea707d..db9638d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -34,14 +34,12 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.NavigableMap;
 import java.util.Set;
-import java.util.TreeMap;
+import java.util.TreeSet;
 import java.util.UUID;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ConcurrentSkipListMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.LinkedBlockingQueue;
@@ -79,19 +77,17 @@ import org.apache.ignite.internal.processors.jobmetrics.GridJobMetrics;
 import org.apache.ignite.internal.processors.security.SecurityContext;
 import org.apache.ignite.internal.processors.service.GridServiceProcessor;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
-import org.apache.ignite.internal.util.F0;
 import org.apache.ignite.internal.util.GridBoundedConcurrentLinkedHashMap;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
-import org.apache.ignite.internal.util.lang.GridTuple5;
+import org.apache.ignite.internal.util.lang.GridTuple6;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.C1;
 import org.apache.ignite.internal.util.typedef.CI1;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.G;
 import org.apache.ignite.internal.util.typedef.P1;
+import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.LT;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -99,7 +95,6 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.internal.util.worker.GridWorker;
 import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.lang.IgniteProductVersion;
 import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.plugin.security.SecurityCredentials;
 import org.apache.ignite.plugin.segmentation.SegmentationPolicy;
@@ -113,6 +108,7 @@ import org.apache.ignite.spi.discovery.DiscoverySpiListener;
 import org.apache.ignite.spi.discovery.DiscoverySpiNodeAuthenticator;
 import org.apache.ignite.spi.discovery.DiscoverySpiOrderSupport;
 import org.apache.ignite.thread.IgniteThread;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.jsr166.ConcurrentHashMap8;
 
@@ -230,7 +226,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
     private long segChkFreq;
 
     /** Local node join to topology event. */
-    private GridFutureAdapter<DiscoveryEvent> locJoinEvt = new GridFutureAdapter<>();
+    private GridFutureAdapter<T2<DiscoveryEvent, DiscoCache>> locJoin = new GridFutureAdapter<>();
 
     /** GC CPU load. */
     private volatile double gcCpuLoad;
@@ -539,20 +535,25 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                     }
                 }
 
+                final DiscoCache discoCache;
+
                 // Put topology snapshot into discovery history.
                 // There is no race possible between history maintenance and concurrent discovery
                 // event notifications, since SPI notifies manager about all events from this listener.
                 if (verChanged) {
-                    DiscoCache cache = new DiscoCache(locNode, F.view(topSnapshot, F.remoteNodes(locNode.id())));
+                    discoCache = createDiscoCache(locNode, topSnapshot);
 
-                    discoCacheHist.put(nextTopVer, cache);
+                    discoCacheHist.put(nextTopVer, discoCache);
 
-                    boolean set = updateTopologyVersionIfGreater(nextTopVer, cache);
+                    boolean set = updateTopologyVersionIfGreater(nextTopVer, discoCache);
 
                     assert set || topVer == 0 : "Topology version has not been updated [this.topVer=" +
                         topSnap + ", topVer=" + topVer + ", node=" + node +
                         ", evt=" + U.gridEventName(type) + ']';
                 }
+                else
+                    // Current version.
+                    discoCache = discoCache();
 
                 // If this is a local join event, just save it and do not notify listeners.
                 if (type == EVT_NODE_JOINED && node.id().equals(locNode.id())) {
@@ -560,7 +561,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                         gridStartTime = getSpi().getGridStartTime();
 
                     updateTopologyVersionIfGreater(new AffinityTopologyVersion(locNode.order()),
-                        new DiscoCache(localNode(), F.view(topSnapshot, F.remoteNodes(locNode.id()))));
+                        discoCache);
 
                     startLatch.countDown();
 
@@ -570,14 +571,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                     discoEvt.eventNode(node);
                     discoEvt.type(EVT_NODE_JOINED);
 
-                    discoEvt.topologySnapshot(topVer, new ArrayList<>(
-                        F.viewReadOnly(topSnapshot, new C1<ClusterNode, ClusterNode>() {
-                            @Override public ClusterNode apply(ClusterNode e) {
-                                return e;
-                            }
-                        }, FILTER_DAEMON)));
+                    discoEvt.topologySnapshot(topVer, new ArrayList<>(F.view(topSnapshot, FILTER_DAEMON)));
 
-                    locJoinEvt.onDone(discoEvt);
+                    locJoin.onDone(new T2<>(discoEvt, discoCache));
 
                     return;
                 }
@@ -592,7 +588,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
 
                     ((IgniteKernal)ctx.grid()).onDisconnected();
 
-                    locJoinEvt = new GridFutureAdapter<>();
+                    locJoin = new GridFutureAdapter<>();
 
                     registeredCaches.clear();
 
@@ -605,7 +601,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                     topHist.clear();
 
                     topSnap.set(new Snapshot(AffinityTopologyVersion.ZERO,
-                        new DiscoCache(locNode, Collections.<ClusterNode>emptySet())));
+                        createDiscoCache(locNode, Collections.<ClusterNode>emptySet())));
                 }
                 else if (type == EVT_CLIENT_NODE_RECONNECTED) {
                     assert locNode.isClient() : locNode;
@@ -622,7 +618,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                             try {
                                 fut.get();
 
-                                discoWrk.addEvent(type, nextTopVer, node, topSnapshot, null);
+                                discoWrk.addEvent(type, nextTopVer, node, discoCache, topSnapshot, null);
                             }
                             catch (IgniteException ignore) {
                                 // No-op.
@@ -634,7 +630,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                 }
 
                 if (type == EVT_CLIENT_NODE_DISCONNECTED || type == EVT_NODE_SEGMENTED || !ctx.clientDisconnected())
-                    discoWrk.addEvent(type, nextTopVer, node, topSnapshot, customMsg);
+                    discoWrk.addEvent(type, nextTopVer, node, discoCache, topSnapshot, customMsg);
             }
         });
 
@@ -1330,8 +1326,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
             U.join(segChkThread, log);
         }
 
-        if (!locJoinEvt.isDone())
-            locJoinEvt.onDone(
+        if (!locJoin.isDone())
+            locJoin.onDone(
                 new IgniteCheckedException("Failed to wait for local node joined event (grid is stopping)."));
     }
 
@@ -1525,7 +1521,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
      *
      * @return Discovery collection cache.
      */
-    private DiscoCache discoCache() {
+    public DiscoCache discoCache() {
         Snapshot cur = topSnap.get();
 
         assert cur != null;
@@ -1582,7 +1578,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
      * @return All server nodes for given topology version.
      */
     public List<ClusterNode> serverNodes(AffinityTopologyVersion topVer) {
-        return resolveDiscoCache(CU.cacheId(null), topVer).srvNodes;
+        return resolveDiscoCache(CU.cacheId(null), topVer).serverNodes();
     }
 
     /**
@@ -1604,7 +1600,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
      * @return Collection of cache nodes.
      */
     public Collection<ClusterNode> cacheNodes(@Nullable String cacheName, AffinityTopologyVersion topVer) {
-        return resolveDiscoCache(CU.cacheId(cacheName), topVer).cacheNodes(cacheName, topVer.topologyVersion());
+        return resolveDiscoCache(CU.cacheId(cacheName), topVer).cacheNodes(cacheName);
     }
 
     /**
@@ -1615,7 +1611,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
      * @return Collection of cache nodes.
      */
     public Collection<ClusterNode> cacheNodes(int cacheId, AffinityTopologyVersion topVer) {
-        return resolveDiscoCache(cacheId, topVer).cacheNodes(cacheId, topVer.topologyVersion());
+        return resolveDiscoCache(cacheId, topVer).cacheNodes(cacheId);
     }
 
     /**
@@ -1625,7 +1621,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
      * @return Collection of cache nodes.
      */
     public Collection<ClusterNode> cacheNodes(AffinityTopologyVersion topVer) {
-        return resolveDiscoCache(CU.cacheId(null), topVer).allNodesWithCaches(topVer.topologyVersion());
+        return resolveDiscoCache(CU.cacheId(null), topVer).allNodesWithCaches();
     }
 
     /**
@@ -1635,7 +1631,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
      * @return Collection of cache nodes.
      */
     public Collection<ClusterNode> remoteCacheNodes(AffinityTopologyVersion topVer) {
-        return resolveDiscoCache(CU.cacheId(null), topVer).remoteCacheNodes(topVer.topologyVersion());
+        return resolveDiscoCache(CU.cacheId(null), topVer).remoteNodesWithCaches();
     }
 
     /**
@@ -1643,11 +1639,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
      * @return Oldest alive server nodes with at least one cache configured.
      */
     @Nullable public ClusterNode oldestAliveCacheServerNode(AffinityTopologyVersion topVer) {
-        DiscoCache cache = resolveDiscoCache(CU.cacheId(null), topVer);
-
-        Map.Entry<ClusterNode, Boolean> e = cache.aliveSrvNodesWithCaches.firstEntry();
-
-        return e != null ? e.getKey() : null;
+        return resolveDiscoCache(CU.cacheId(null), topVer).oldestAliveServerNodeWithCache();
     }
 
     /**
@@ -1660,7 +1652,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
     public Collection<ClusterNode> cacheAffinityNodes(@Nullable String cacheName, AffinityTopologyVersion topVer) {
         int cacheId = CU.cacheId(cacheName);
 
-        return resolveDiscoCache(cacheId, topVer).cacheAffinityNodes(cacheId, topVer.topologyVersion());
+        return resolveDiscoCache(cacheId, topVer).cacheAffinityNodes(cacheId);
     }
 
     /**
@@ -1671,7 +1663,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
      * @return Collection of cache affinity nodes.
      */
     public Collection<ClusterNode> cacheAffinityNodes(int cacheId, AffinityTopologyVersion topVer) {
-        return resolveDiscoCache(cacheId, topVer).cacheAffinityNodes(cacheId, topVer.topologyVersion());
+        return resolveDiscoCache(cacheId, topVer).cacheAffinityNodes(cacheId);
     }
 
     /**
@@ -1819,7 +1811,19 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
     /** @return Event that represents a local node joined to topology. */
     public DiscoveryEvent localJoinEvent() {
         try {
-            return locJoinEvt.get();
+            return locJoin.get().get1();
+        }
+        catch (IgniteCheckedException e) {
+            throw new IgniteException(e);
+        }
+    }
+
+    /**
+     * @return Tuple that consists of a local join event and discovery cache at the join time.
+     */
+    public T2<DiscoveryEvent, DiscoCache> localJoin() {
+        try {
+            return locJoin.get();
         }
         catch (IgniteCheckedException e) {
             throw new IgniteException(e);
@@ -1893,6 +1897,114 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
     }
 
     /**
+     * @param loc Local node.
+     * @param topSnapshot Topology snapshot.
+     * @return Newly created discovery cache.
+     */
+    @NotNull private DiscoCache createDiscoCache(ClusterNode loc, Collection<ClusterNode> topSnapshot) {
+        HashSet<UUID> alives = U.newHashSet(topSnapshot.size());
+        HashMap<UUID, ClusterNode> nodeMap = U.newHashMap(topSnapshot.size());
+
+        ArrayList<ClusterNode> daemonNodes = new ArrayList<>(topSnapshot.size());
+        ArrayList<ClusterNode> srvNodes = new ArrayList<>(topSnapshot.size());
+        ArrayList<ClusterNode> rmtNodes = new ArrayList<>(topSnapshot.size());
+        ArrayList<ClusterNode> allNodes = new ArrayList<>(topSnapshot.size());
+
+        for (ClusterNode node : topSnapshot) {
+            if (alive(node))
+                alives.add(node.id());
+
+            if (node.isDaemon())
+                daemonNodes.add(node);
+            else {
+                allNodes.add(node);
+
+                if (!node.isLocal())
+                    rmtNodes.add(node);
+
+                if (!CU.clientNode(node))
+                    srvNodes.add(node);
+            }
+
+            nodeMap.put(node.id(), node);
+        }
+
+        assert !rmtNodes.contains(loc) : "Remote nodes collection shouldn't contain local node" +
+            " [rmtNodes=" + rmtNodes + ", loc=" + loc + ']';
+
+        Map<Integer, List<ClusterNode>> allCacheNodes = U.newHashMap(allNodes.size());
+        Map<Integer, List<ClusterNode>> affCacheNodes = U.newHashMap(allNodes.size());
+
+        Set<ClusterNode> allNodesWithCaches = new TreeSet<>(GridNodeOrderComparator.INSTANCE);
+        Set<ClusterNode> rmtNodesWithCaches = new TreeSet<>(GridNodeOrderComparator.INSTANCE);
+        Set<ClusterNode> srvNodesWithCaches = new TreeSet<>(GridNodeOrderComparator.INSTANCE);
+
+        Set<Integer> nearEnabledCaches = new HashSet<>();
+
+        for (ClusterNode node : allNodes) {
+            assert node.order() != 0 : "Invalid node order [locNode=" + loc + ", node=" + node + ']';
+            assert !node.isDaemon();
+
+            for (Map.Entry<String, CachePredicate> entry : registeredCaches.entrySet()) {
+                String cacheName = entry.getKey();
+                CachePredicate filter = entry.getValue();
+
+                if (filter.cacheNode(node)) {
+                    allNodesWithCaches.add(node);
+
+                    if(!CU.clientNode(node))
+                        srvNodesWithCaches.add(node);
+
+                    if (!node.isLocal())
+                        rmtNodesWithCaches.add(node);
+
+                    addToMap(allCacheNodes, cacheName, node);
+
+                    if (filter.dataNode(node))
+                        addToMap(affCacheNodes, cacheName, node);
+
+                    if (filter.nearNode(node))
+                        nearEnabledCaches.add(CU.cacheId(cacheName));
+                }
+            }
+        }
+
+        return new DiscoCache(
+            loc,
+            Collections.unmodifiableList(rmtNodes),
+            Collections.unmodifiableList(allNodes),
+            Collections.unmodifiableList(srvNodes),
+            Collections.unmodifiableList(daemonNodes),
+            U.sealList(srvNodesWithCaches),
+            U.sealList(allNodesWithCaches),
+            U.sealList(rmtNodesWithCaches),
+            Collections.unmodifiableMap(allCacheNodes),
+            Collections.unmodifiableMap(affCacheNodes),
+            Collections.unmodifiableMap(nodeMap),
+            Collections.unmodifiableSet(nearEnabledCaches),
+            alives);
+    }
+
+    /**
+     * Adds node to map.
+     *
+     * @param cacheMap Map to add to.
+     * @param cacheName Cache name.
+     * @param rich Node to add
+     */
+    private void addToMap(Map<Integer, List<ClusterNode>> cacheMap, String cacheName, ClusterNode rich) {
+        List<ClusterNode> cacheNodes = cacheMap.get(CU.cacheId(cacheName));
+
+        if (cacheNodes == null) {
+            cacheNodes = new ArrayList<>();
+
+            cacheMap.put(CU.cacheId(cacheName), cacheNodes);
+        }
+
+        cacheNodes.add(rich);
+    }
+
+    /**
      * Updates topology version if current version is smaller than updated.
      *
      * @param updated Updated topology version.
@@ -1993,8 +2105,16 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                     lastChk = now;
 
                     if (!segValid) {
-                        discoWrk.addEvent(EVT_NODE_SEGMENTED, AffinityTopologyVersion.NONE, getSpi().getLocalNode(),
-                            Collections.<ClusterNode>emptyList(), null);
+                        List<ClusterNode> empty = Collections.emptyList();
+
+                        ClusterNode node = getSpi().getLocalNode();
+
+                        discoWrk.addEvent(EVT_NODE_SEGMENTED,
+                            AffinityTopologyVersion.NONE,
+                            node,
+                            createDiscoCache(node, empty),
+                            empty,
+                            null);
 
                         lastSegChkRes.set(false);
                     }
@@ -2014,8 +2134,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
     /** Worker for discovery events. */
     private class DiscoveryWorker extends GridWorker {
         /** Event queue. */
-        private final BlockingQueue<GridTuple5<Integer, AffinityTopologyVersion, ClusterNode, Collection<ClusterNode>,
-            DiscoveryCustomMessage>> evts = new LinkedBlockingQueue<>();
+        private final BlockingQueue<GridTuple6<Integer, AffinityTopologyVersion, ClusterNode,
+            DiscoCache, Collection<ClusterNode>, DiscoveryCustomMessage>> evts = new LinkedBlockingQueue<>();
 
         /** Node segmented event fired flag. */
         private boolean nodeSegFired;
@@ -2033,10 +2153,11 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
          * @param type Discovery event type. See {@link DiscoveryEvent} for more details.
          * @param topVer Topology version.
          * @param node Remote node this event is connected with.
+         * @param discoCache Discovery cache.
          * @param topSnapshot Topology snapshot.
          */
         @SuppressWarnings("RedundantTypeArguments")
-        private void recordEvent(int type, long topVer, ClusterNode node, Collection<ClusterNode> topSnapshot) {
+        private void recordEvent(int type, long topVer, ClusterNode node, DiscoCache discoCache, Collection<ClusterNode> topSnapshot) {
             assert node != null;
 
             if (ctx.event().isRecordable(type)) {
@@ -2045,7 +2166,6 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                 evt.node(ctx.discovery().localNode());
                 evt.eventNode(node);
                 evt.type(type);
-
                 evt.topologySnapshot(topVer, U.<ClusterNode, ClusterNode>arrayList(topSnapshot, FILTER_DAEMON));
 
                 if (type == EVT_NODE_METRICS_UPDATED)
@@ -2072,7 +2192,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                 else
                     assert false;
 
-                ctx.event().record(evt);
+                ctx.event().record(evt, discoCache);
             }
         }
 
@@ -2080,6 +2200,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
          * @param type Event type.
          * @param topVer Topology version.
          * @param node Node.
+         * @param discoCache Discovery cache.
          * @param topSnapshot Topology snapshot.
          * @param data Custom message.
          */
@@ -2087,12 +2208,13 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
             int type,
             AffinityTopologyVersion topVer,
             ClusterNode node,
+            DiscoCache discoCache,
             Collection<ClusterNode> topSnapshot,
             @Nullable DiscoveryCustomMessage data
         ) {
             assert node != null : data;
 
-            evts.add(new GridTuple5<>(type, topVer, node, topSnapshot, data));
+            evts.add(new GridTuple6<>(type, topVer, node, discoCache, topSnapshot, data));
         }
 
         /** {@inheritDoc} */
@@ -2116,7 +2238,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
         /** @throws InterruptedException If interrupted. */
         @SuppressWarnings("DuplicateCondition")
         private void body0() throws InterruptedException {
-            GridTuple5<Integer, AffinityTopologyVersion, ClusterNode, Collection<ClusterNode>,
+            GridTuple6<Integer, AffinityTopologyVersion, ClusterNode, DiscoCache, Collection<ClusterNode>,
                 DiscoveryCustomMessage> evt = evts.take();
 
             int type = evt.get1();
@@ -2249,11 +2371,11 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                         customEvt.node(ctx.discovery().localNode());
                         customEvt.eventNode(node);
                         customEvt.type(type);
-                        customEvt.topologySnapshot(topVer.topologyVersion(), evt.get4());
+                        customEvt.topologySnapshot(topVer.topologyVersion(), evt.get5());
                         customEvt.affinityTopologyVersion(topVer);
-                        customEvt.customMessage(evt.get5());
+                        customEvt.customMessage(evt.get6());
 
-                        ctx.event().record(customEvt);
+                        ctx.event().record(customEvt, evt.get4());
                     }
 
                     return;
@@ -2267,7 +2389,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                     assert false : "Invalid discovery event: " + type;
             }
 
-            recordEvent(type, topVer.topologyVersion(), node, evt.get4());
+            recordEvent(type, topVer.topologyVersion(), node, evt.get4(), evt.get5());
 
             if (segmented)
                 onSegmentation();
@@ -2472,328 +2594,6 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
         }
     }
 
-    /** Cache for discovery collections. */
-    private class DiscoCache {
-        /** Remote nodes. */
-        private final List<ClusterNode> rmtNodes;
-
-        /** All nodes. */
-        private final List<ClusterNode> allNodes;
-
-        /** All server nodes. */
-        private final List<ClusterNode> srvNodes;
-
-        /** All nodes with at least one cache configured. */
-        @GridToStringInclude
-        private final Collection<ClusterNode> allNodesWithCaches;
-
-        /** All nodes with at least one cache configured. */
-        @GridToStringInclude
-        private final Collection<ClusterNode> rmtNodesWithCaches;
-
-        /** Cache nodes by cache name. */
-        @GridToStringInclude
-        private final Map<Integer, Collection<ClusterNode>> allCacheNodes;
-
-        /** Cache nodes by cache name. */
-        @GridToStringInclude
-        private final Map<Integer, Collection<ClusterNode>> affCacheNodes;
-
-        /** Caches where at least one node has near cache enabled. */
-        @GridToStringInclude
-        private final Set<Integer> nearEnabledCaches;
-
-        /** Nodes grouped by version. */
-        private final NavigableMap<IgniteProductVersion, Collection<ClusterNode>> nodesByVer;
-
-        /** Daemon nodes. */
-        private final List<ClusterNode> daemonNodes;
-
-        /** Node map. */
-        private final Map<UUID, ClusterNode> nodeMap;
-
-        /** Local node. */
-        private final ClusterNode loc;
-
-        /** Highest node order. */
-        private final long maxOrder;
-
-        /**
-         * Cached alive server remote nodes with caches.
-         */
-        private final ConcurrentSkipListMap<ClusterNode, Boolean> aliveSrvNodesWithCaches;
-
-        /**
-         * @param loc Local node.
-         * @param rmts Remote nodes.
-         */
-        private DiscoCache(ClusterNode loc, Collection<ClusterNode> rmts) {
-            this.loc = loc;
-
-            rmtNodes = Collections.unmodifiableList(new ArrayList<>(F.view(rmts, FILTER_DAEMON)));
-
-            assert !rmtNodes.contains(loc) : "Remote nodes collection shouldn't contain local node" +
-                " [rmtNodes=" + rmtNodes + ", loc=" + loc + ']';
-
-            List<ClusterNode> all = new ArrayList<>(rmtNodes.size() + 1);
-
-            if (!loc.isDaemon())
-                all.add(loc);
-
-            all.addAll(rmtNodes);
-
-            Collections.sort(all, GridNodeOrderComparator.INSTANCE);
-
-            allNodes = Collections.unmodifiableList(all);
-
-            Map<Integer, Collection<ClusterNode>> cacheMap = U.newHashMap(allNodes.size());
-            Map<Integer, Collection<ClusterNode>> dhtNodesMap = U.newHashMap(allNodes.size());
-            Collection<ClusterNode> nodesWithCaches = U.newHashSet(allNodes.size());
-            Collection<ClusterNode> rmtNodesWithCaches = U.newHashSet(allNodes.size());
-
-            aliveSrvNodesWithCaches = new ConcurrentSkipListMap<>(GridNodeOrderComparator.INSTANCE);
-            nodesByVer = new TreeMap<>();
-
-            long maxOrder0 = 0;
-
-            Set<Integer> nearEnabledSet = new HashSet<>();
-
-            List<ClusterNode> srvNodes = new ArrayList<>();
-
-            for (ClusterNode node : allNodes) {
-                assert node.order() != 0 : "Invalid node order [locNode=" + loc + ", node=" + node + ']';
-                assert !node.isDaemon();
-
-                if (!CU.clientNode(node))
-                    srvNodes.add(node);
-
-                if (node.order() > maxOrder0)
-                    maxOrder0 = node.order();
-
-                boolean hasCaches = false;
-
-                for (Map.Entry<String, CachePredicate> entry : registeredCaches.entrySet()) {
-                    String cacheName = entry.getKey();
-
-                    CachePredicate filter = entry.getValue();
-
-                    if (filter.cacheNode(node)) {
-                        nodesWithCaches.add(node);
-
-                        if (!loc.id().equals(node.id()))
-                            rmtNodesWithCaches.add(node);
-
-                        addToMap(cacheMap, cacheName, node);
-
-                        if (filter.dataNode(node))
-                            addToMap(dhtNodesMap, cacheName, node);
-
-                        if (filter.nearNode(node))
-                            nearEnabledSet.add(CU.cacheId(cacheName));
-
-                        hasCaches = true;
-                    }
-                }
-
-                if (hasCaches && alive(node.id()) && !CU.clientNode(node))
-                    aliveSrvNodesWithCaches.put(node, Boolean.TRUE);
-
-                IgniteProductVersion nodeVer = U.productVersion(node);
-
-                // Create collection for this version if it does not exist.
-                Collection<ClusterNode> nodes = nodesByVer.get(nodeVer);
-
-                if (nodes == null) {
-                    nodes = new ArrayList<>(allNodes.size());
-
-                    nodesByVer.put(nodeVer, nodes);
-                }
-
-                nodes.add(node);
-            }
-
-            Collections.sort(srvNodes, CU.nodeComparator(true));
-
-            // Need second iteration to add this node to all previous node versions.
-            for (ClusterNode node : allNodes) {
-                IgniteProductVersion nodeVer = U.productVersion(node);
-
-                // Get all versions lower or equal node's version.
-                NavigableMap<IgniteProductVersion, Collection<ClusterNode>> updateView =
-                    nodesByVer.headMap(nodeVer, false);
-
-                for (Collection<ClusterNode> prevVersions : updateView.values())
-                    prevVersions.add(node);
-            }
-
-            maxOrder = maxOrder0;
-
-            allCacheNodes = Collections.unmodifiableMap(cacheMap);
-            affCacheNodes = Collections.unmodifiableMap(dhtNodesMap);
-            allNodesWithCaches = Collections.unmodifiableCollection(nodesWithCaches);
-            this.rmtNodesWithCaches = Collections.unmodifiableCollection(rmtNodesWithCaches);
-            nearEnabledCaches = Collections.unmodifiableSet(nearEnabledSet);
-            this.srvNodes = Collections.unmodifiableList(srvNodes);
-
-            daemonNodes = Collections.unmodifiableList(new ArrayList<>(
-                F.view(F.concat(false, loc, rmts), F0.not(FILTER_DAEMON))));
-
-            Map<UUID, ClusterNode> nodeMap = U.newHashMap(allNodes().size() + daemonNodes.size());
-
-            for (ClusterNode n : F.concat(false, allNodes(), daemonNodes()))
-                nodeMap.put(n.id(), n);
-
-            this.nodeMap = nodeMap;
-        }
-
-        /**
-         * Adds node to map.
-         *
-         * @param cacheMap Map to add to.
-         * @param cacheName Cache name.
-         * @param rich Node to add
-         */
-        private void addToMap(Map<Integer, Collection<ClusterNode>> cacheMap, String cacheName, ClusterNode rich) {
-            Collection<ClusterNode> cacheNodes = cacheMap.get(CU.cacheId(cacheName));
-
-            if (cacheNodes == null) {
-                cacheNodes = new ArrayList<>(allNodes.size());
-
-                cacheMap.put(CU.cacheId(cacheName), cacheNodes);
-            }
-
-            cacheNodes.add(rich);
-        }
-
-        /** @return Local node. */
-        ClusterNode localNode() {
-            return loc;
-        }
-
-        /** @return Remote nodes. */
-        Collection<ClusterNode> remoteNodes() {
-            return rmtNodes;
-        }
-
-        /** @return All nodes. */
-        Collection<ClusterNode> allNodes() {
-            return allNodes;
-        }
-
-        /**
-         * Gets collection of nodes with at least one cache configured.
-         *
-         * @param topVer Topology version (maximum allowed node order).
-         * @return Collection of nodes.
-         */
-        Collection<ClusterNode> allNodesWithCaches(final long topVer) {
-            return filter(topVer, allNodesWithCaches);
-        }
-
-        /**
-         * Gets all nodes that have cache with given name.
-         *
-         * @param cacheName Cache name.
-         * @param topVer Topology version.
-         * @return Collection of nodes.
-         */
-        Collection<ClusterNode> cacheNodes(@Nullable String cacheName, final long topVer) {
-            return filter(topVer, allCacheNodes.get(CU.cacheId(cacheName)));
-        }
-
-        /**
-         * Gets all nodes that have cache with given ID.
-         *
-         * @param cacheId Cache ID.
-         * @param topVer Topology version.
-         * @return Collection of nodes.
-         */
-        Collection<ClusterNode> cacheNodes(Integer cacheId, final long topVer) {
-            return filter(topVer, allCacheNodes.get(cacheId));
-        }
-
-        /**
-         * Gets all remote nodes that have at least one cache configured.
-         *
-         * @param topVer Topology version.
-         * @return Collection of nodes.
-         */
-        Collection<ClusterNode> remoteCacheNodes(final long topVer) {
-            return filter(topVer, rmtNodesWithCaches);
-        }
-
-        /**
-         * Gets all nodes that have cache with given ID and should participate in affinity calculation. With
-         * partitioned cache nodes with near-only cache do not participate in affinity node calculation.
-         *
-         * @param cacheId Cache ID.
-         * @param topVer Topology version.
-         * @return Collection of nodes.
-         */
-        Collection<ClusterNode> cacheAffinityNodes(int cacheId, final long topVer) {
-            return filter(topVer, affCacheNodes.get(cacheId));
-        }
-
-        /**
-         * Checks if cache with given ID has at least one node with near cache enabled.
-         *
-         * @param cacheId Cache ID.
-         * @return {@code True} if cache with given name has at least one node with near cache enabled.
-         */
-        boolean hasNearCache(int cacheId) {
-            return nearEnabledCaches.contains(cacheId);
-        }
-
-        /**
-         * Removes left node from cached alives lists.
-         *
-         * @param leftNode Left node.
-         */
-        void updateAlives(ClusterNode leftNode) {
-            if (leftNode.order() > maxOrder)
-                return;
-
-            aliveSrvNodesWithCaches.remove(leftNode);
-        }
-
-        /**
-         * @param topVer Topology version.
-         * @param nodes Nodes.
-         * @return Filtered collection (potentially empty, but never {@code null}).
-         */
-        private Collection<ClusterNode> filter(final long topVer, @Nullable Collection<ClusterNode> nodes) {
-            if (nodes == null)
-                return Collections.emptyList();
-
-            // If no filtering needed, return original collection.
-            return nodes.isEmpty() || topVer < 0 || topVer >= maxOrder ?
-                nodes :
-                F.view(nodes, new P1<ClusterNode>() {
-                    @Override public boolean apply(ClusterNode node) {
-                        return node.order() <= topVer;
-                    }
-                });
-        }
-
-        /** @return Daemon nodes. */
-        Collection<ClusterNode> daemonNodes() {
-            return daemonNodes;
-        }
-
-        /**
-         * @param id Node ID.
-         * @return Node.
-         */
-        @Nullable ClusterNode node(UUID id) {
-            return nodeMap.get(id);
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return S.toString(DiscoCache.class, this, "allNodesWithDaemons", U.toShortString(allNodes));
-        }
-    }
-
     /**
      * Cache predicate.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/DiscoveryEventListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/DiscoveryEventListener.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/DiscoveryEventListener.java
new file mode 100644
index 0000000..963d97e
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/DiscoveryEventListener.java
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.managers.eventstorage;
+
+import java.util.EventListener;
+import org.apache.ignite.events.DiscoveryEvent;
+import org.apache.ignite.internal.managers.discovery.DiscoCache;
+
+/**
+ * Internal listener for discovery events.
+ */
+public interface DiscoveryEventListener extends EventListener {
+    /**
+     * @param evt Discovery event.
+     * @param discoCache Discovery cache.
+     */
+    public void onEvent(DiscoveryEvent evt, DiscoCache discoCache);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
index b5d5ee2..5464a8f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
@@ -47,6 +47,7 @@ import org.apache.ignite.internal.managers.GridManagerAdapter;
 import org.apache.ignite.internal.managers.communication.GridIoManager;
 import org.apache.ignite.internal.managers.communication.GridMessageListener;
 import org.apache.ignite.internal.managers.deployment.GridDeployment;
+import org.apache.ignite.internal.managers.discovery.DiscoCache;
 import org.apache.ignite.internal.processors.platform.PlatformEventFilterListener;
 import org.apache.ignite.internal.util.GridConcurrentLinkedHashSet;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -79,6 +80,9 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
     /** Local event listeners. */
     private final ConcurrentMap<Integer, Set<GridLocalEventListener>> lsnrs = new ConcurrentHashMap8<>();
 
+    /** Internal discovery listeners. */
+    private final ConcurrentMap<Integer, Set<DiscoveryEventListener>> discoLsnrs = new ConcurrentHashMap8<>();
+
     /** Busy lock to control activity of threads. */
     private final ReadWriteLock busyLock = new ReentrantReadWriteLock();
 
@@ -248,6 +252,7 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
             msgLsnr = null;
 
             lsnrs.clear();
+            discoLsnrs.clear();
 
             stopped = true;
         }
@@ -320,6 +325,30 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
     }
 
     /**
+     * Records discovery events.
+     *
+     * @param evt Event to record.
+     * @param discoCache Discovery cache.
+     */
+    public void record(DiscoveryEvent evt, DiscoCache discoCache) {
+        assert evt != null;
+
+        if (!enterBusy())
+            return;
+
+        try {
+            // Notify internal discovery listeners first.
+            notifyDiscoveryListeners(evt, discoCache);
+
+            // Notify all other registered listeners.
+            record(evt);
+        }
+        finally {
+            leaveBusy();
+        }
+    }
+
+    /**
      * Gets types of enabled user-recordable events.
      *
      * @return Array of types of enabled user-recordable events.
@@ -590,7 +619,7 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
 
         try {
             for (int t : types) {
-                getOrCreate(t).add(lsnr);
+                getOrCreate(lsnrs, t).add(lsnr);
 
                 if (!isRecordable(t))
                     U.warn(log, "Added listener for disabled event type: " + U.gridEventName(t));
@@ -615,14 +644,14 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
             return;
 
         try {
-            getOrCreate(type).add(lsnr);
+            getOrCreate(lsnrs, type).add(lsnr);
 
             if (!isRecordable(type))
                 U.warn(log, "Added listener for disabled event type: " + U.gridEventName(type));
 
             if (types != null) {
                 for (int t : types) {
-                    getOrCreate(t).add(lsnr);
+                    getOrCreate(lsnrs, t).add(lsnr);
 
                     if (!isRecordable(t))
                         U.warn(log, "Added listener for disabled event type: " + U.gridEventName(t));
@@ -635,16 +664,70 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
     }
 
     /**
+     * Adds discovery event listener. Note that this method specifically disallow an empty
+     * array of event type to prevent accidental subscription for all system event that
+     * may lead to a drastic performance decrease.
+     *
+     * @param lsnr Listener to add.
+     * @param types Event types to subscribe listener for.
+     */
+    public void addDiscoveryEventListener(DiscoveryEventListener lsnr, int[] types) {
+        assert lsnr != null;
+        assert types != null;
+        assert types.length > 0;
+
+        if (!enterBusy())
+            return;
+
+        try {
+            for (int t : types) {
+                getOrCreate(discoLsnrs, t).add(lsnr);
+            }
+        }
+        finally {
+            leaveBusy();
+        }
+    }
+
+    /**
+     * Adds discovery event listener.
+     *
+     * @param lsnr Listener to add.
+     * @param type Event type to subscribe listener for.
+     * @param types Additional event types to subscribe listener for.
+     */
+    public void addDiscoveryEventListener(DiscoveryEventListener lsnr, int type, @Nullable int... types) {
+        assert lsnr != null;
+
+        if (!enterBusy())
+            return;
+
+        try {
+            getOrCreate(discoLsnrs, type).add(lsnr);
+
+            if (types != null) {
+                for (int t : types) {
+                    getOrCreate(discoLsnrs, t).add(lsnr);
+                }
+            }
+        }
+        finally {
+            leaveBusy();
+        }
+    }
+
+    /**
+     * @param lsnrs Listeners map.
      * @param type Event type.
      * @return Listeners for given event type.
      */
-    private Collection<GridLocalEventListener> getOrCreate(Integer type) {
-        Set<GridLocalEventListener> set = lsnrs.get(type);
+    private <T> Collection<T> getOrCreate(ConcurrentMap<Integer, Set<T>> lsnrs, Integer type) {
+        Set<T> set = lsnrs.get(type);
 
         if (set == null) {
             set = new GridConcurrentLinkedHashSet<>();
 
-            Set<GridLocalEventListener> prev = lsnrs.putIfAbsent(type, set);
+            Set<T> prev = lsnrs.putIfAbsent(type, set);
 
             if (prev != null)
                 set = prev;
@@ -708,6 +791,38 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
     }
 
     /**
+     * Removes listener for specified events, if any. If no event types provided - it
+     * remove the listener for all its registered events.
+     *
+     * @param lsnr Listener.
+     * @param types Event types.
+     * @return Returns {@code true} if removed.
+     */
+    public boolean removeDiscoveryEventListener(DiscoveryEventListener lsnr, @Nullable int... types) {
+        assert lsnr != null;
+
+        boolean found = false;
+
+        if (F.isEmpty(types)) {
+            for (Set<DiscoveryEventListener> set : discoLsnrs.values())
+                if (set.remove(lsnr))
+                    found = true;
+        }
+        else {
+            assert types != null;
+
+            for (int type : types) {
+                Set<DiscoveryEventListener> set = discoLsnrs.get(type);
+
+                if (set != null && set.remove(lsnr))
+                    found = true;
+            }
+        }
+
+        return found;
+    }
+
+    /**
      *
      * @param p Optional predicate.
      * @param types Event types to wait for.
@@ -800,6 +915,41 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
     }
 
     /**
+     * @param evt Discovery event
+     * @param cache Discovery cache.
+     */
+    private void notifyDiscoveryListeners(DiscoveryEvent evt, DiscoCache cache) {
+        assert evt != null;
+
+        notifyDiscoveryListeners(discoLsnrs.get(evt.type()), evt, cache);
+    }
+
+    /**
+     * @param set Set of listeners.
+     * @param evt Discovery event.
+     * @param cache Discovery cache.
+     */
+    private void notifyDiscoveryListeners(@Nullable Collection<DiscoveryEventListener> set, DiscoveryEvent evt, DiscoCache cache) {
+        assert evt != null;
+
+        if (!F.isEmpty(set)) {
+            assert set != null;
+
+            for (DiscoveryEventListener lsnr : set) {
+                try {
+                    lsnr.onEvent(evt, cache);
+                }
+                catch (Throwable e) {
+                    U.error(log, "Unexpected exception in listener notification for event: " + evt, e);
+
+                    if (e instanceof Error)
+                        throw (Error)e;
+                }
+            }
+        }
+    }
+
+    /**
      * @param p Grid event predicate.
      * @return Collection of grid events.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
index 144b162..2399493 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
@@ -39,6 +39,7 @@ import org.apache.ignite.events.DiscoveryEvent;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.GridNodeOrderComparator;
 import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.managers.discovery.DiscoCache;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.CU;
@@ -252,10 +253,12 @@ public class GridAffinityAssignmentCache {
      *
      * @param topVer Topology version to calculate affinity cache for.
      * @param discoEvt Discovery event that caused this topology version change.
+     * @param discoCache Discovery cache.
      * @return Affinity assignments.
      */
     @SuppressWarnings("IfMayBeConditional")
-    public List<List<ClusterNode>> calculate(AffinityTopologyVersion topVer, DiscoveryEvent discoEvt) {
+    public List<List<ClusterNode>> calculate(AffinityTopologyVersion topVer, DiscoveryEvent discoEvt,
+        DiscoCache discoCache) {
         if (log.isDebugEnabled())
             log.debug("Calculating affinity [topVer=" + topVer + ", locNodeId=" + ctx.localNodeId() +
                 ", discoEvt=" + discoEvt + ']');
@@ -266,7 +269,7 @@ public class GridAffinityAssignmentCache {
         List<ClusterNode> sorted;
 
         if (!locCache) {
-            sorted = new ArrayList<>(ctx.discovery().cacheAffinityNodes(cacheId(), topVer));
+            sorted = new ArrayList<>(discoCache.cacheAffinityNodes(cacheId()));
 
             Collections.sort(sorted, GridNodeOrderComparator.INSTANCE);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
index 7bf5fd8..d287188 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
@@ -382,7 +382,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
                 cctx.cache().prepareCacheStart(req, fut.topologyVersion());
 
                 if (fut.isCacheAdded(cacheId, fut.topologyVersion())) {
-                    if (cctx.discovery().cacheAffinityNodes(req.cacheName(), fut.topologyVersion()).isEmpty())
+                    if (fut.discoCache().cacheAffinityNodes(req.cacheName()).isEmpty())
                         U.quietAndWarn(log, "No server nodes found for cache client: " + req.cacheName());
                 }
 
@@ -403,7 +403,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
                             assert aff.lastVersion().equals(AffinityTopologyVersion.NONE) : aff.lastVersion();
 
                             List<List<ClusterNode>> assignment = aff.calculate(fut.topologyVersion(),
-                                fut.discoveryEvent());
+                                fut.discoveryEvent(), fut.discoCache());
 
                             aff.initialize(fut.topologyVersion(), assignment);
                         }
@@ -753,7 +753,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
 
             assert old == null : old;
 
-            List<List<ClusterNode>> newAff = cache.affinity().calculate(fut.topologyVersion(), fut.discoveryEvent());
+            List<List<ClusterNode>> newAff = cache.affinity().calculate(fut.topologyVersion(), fut.discoveryEvent(), fut.discoCache());
 
             cache.affinity().initialize(fut.topologyVersion(), newAff);
         }
@@ -791,7 +791,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
 
                     if (cache.affinity().lastVersion().equals(AffinityTopologyVersion.NONE)) {
                         List<List<ClusterNode>> assignment =
-                            cache.affinity().calculate(fut.topologyVersion(), fut.discoveryEvent());
+                            cache.affinity().calculate(fut.topologyVersion(), fut.discoveryEvent(), fut.discoCache());
 
                         cache.affinity().initialize(fut.topologyVersion(), assignment);
                     }
@@ -817,14 +817,15 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
     private void initAffinity(GridAffinityAssignmentCache aff, GridDhtPartitionsExchangeFuture fut, boolean fetch)
         throws IgniteCheckedException {
         if (!fetch && canCalculateAffinity(aff, fut)) {
-            List<List<ClusterNode>> assignment = aff.calculate(fut.topologyVersion(), fut.discoveryEvent());
+            List<List<ClusterNode>> assignment = aff.calculate(fut.topologyVersion(), fut.discoveryEvent(), fut.discoCache());
 
             aff.initialize(fut.topologyVersion(), assignment);
         }
         else {
             GridDhtAssignmentFetchFuture fetchFut = new GridDhtAssignmentFetchFuture(cctx,
                 aff.cacheName(),
-                fut.topologyVersion());
+                fut.topologyVersion(),
+                fut.discoCache());
 
             fetchFut.init();
 
@@ -878,7 +879,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
 
                             CacheHolder cache = cache(fut, cacheDesc);
 
-                            List<List<ClusterNode>> newAff = cache.affinity().calculate(topVer, fut.discoveryEvent());
+                            List<List<ClusterNode>> newAff = cache.affinity().calculate(topVer, fut.discoveryEvent(), fut.discoCache());
 
                             cache.affinity().initialize(topVer, newAff);
                         }
@@ -945,14 +946,15 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
 
             if (cctx.localNodeId().equals(cacheDesc.receivedFrom())) {
                 List<List<ClusterNode>> assignment =
-                    cacheCtx.affinity().affinityCache().calculate(fut.topologyVersion(), fut.discoveryEvent());
+                    cacheCtx.affinity().affinityCache().calculate(fut.topologyVersion(), fut.discoveryEvent(), fut.discoCache());
 
                 cacheCtx.affinity().affinityCache().initialize(fut.topologyVersion(), assignment);
             }
             else {
                 GridDhtAssignmentFetchFuture fetchFut = new GridDhtAssignmentFetchFuture(cctx,
                     cacheCtx.name(),
-                    topVer);
+                    topVer,
+                    fut.discoCache());
 
                 fetchFut.init();
 
@@ -986,7 +988,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
         GridDhtAffinityAssignmentResponse res = fetchFut.get();
 
         if (res == null) {
-            List<List<ClusterNode>> aff = affCache.calculate(topVer, fut.discoveryEvent());
+            List<List<ClusterNode>> aff = affCache.calculate(topVer, fut.discoveryEvent(), fut.discoCache());
 
             affCache.initialize(topVer, aff);
         }
@@ -998,7 +1000,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
             else {
                 assert !affCache.centralizedAffinityFunction() || !lateAffAssign;
 
-                affCache.calculate(topVer, fut.discoveryEvent());
+                affCache.calculate(topVer, fut.discoveryEvent(), fut.discoCache());
             }
 
             List<List<ClusterNode>> aff = res.affinityAssignment(cctx.discovery());
@@ -1028,7 +1030,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
                 if (cacheCtx.isLocal())
                     continue;
 
-                cacheCtx.affinity().affinityCache().calculate(fut.topologyVersion(), fut.discoveryEvent());
+                cacheCtx.affinity().affinityCache().calculate(fut.topologyVersion(), fut.discoveryEvent(), fut.discoCache());
             }
 
             centralizedAff = true;
@@ -1078,7 +1080,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
 
                 if (cache != null) {
                     if (cache.client())
-                        cache.affinity().calculate(fut.topologyVersion(), fut.discoveryEvent());
+                        cache.affinity().calculate(fut.topologyVersion(), fut.discoveryEvent(), fut.discoCache());
 
                     return;
                 }
@@ -1118,7 +1120,8 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
 
                     GridDhtAssignmentFetchFuture fetchFut = new GridDhtAssignmentFetchFuture(cctx,
                         aff.cacheName(),
-                        prev.topologyVersion());
+                        prev.topologyVersion(),
+                        prev.discoCache());
 
                     fetchFut.init();
 
@@ -1129,7 +1132,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
                             throws IgniteCheckedException {
                             fetchAffinity(prev, aff, (GridDhtAssignmentFetchFuture)fetchFut);
 
-                            aff.calculate(fut.topologyVersion(), fut.discoveryEvent());
+                            aff.calculate(fut.topologyVersion(), fut.discoveryEvent(), fut.discoCache());
 
                             affFut.onDone(fut.topologyVersion());
                         }
@@ -1269,7 +1272,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
 
         assert aff.idealAssignment() != null : "Previous assignment is not available.";
 
-        List<List<ClusterNode>> idealAssignment = aff.calculate(topVer, fut.discoveryEvent());
+        List<List<ClusterNode>> idealAssignment = aff.calculate(topVer, fut.discoveryEvent(), fut.discoCache());
         List<List<ClusterNode>> newAssignment = null;
 
         if (latePrimary) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
index d85e76e..17c9319 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
@@ -28,7 +28,6 @@ import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.affinity.AffinityAssignment;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache;
-import org.apache.ignite.internal.util.GridLeanSet;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.lang.IgniteFuture;
@@ -77,7 +76,7 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
     @Override protected void onKernalStart0() throws IgniteCheckedException {
         if (cctx.isLocal())
             // No discovery event needed for local affinity.
-            aff.calculate(LOC_CACHE_TOP_VER, null);
+            aff.calculate(LOC_CACHE_TOP_VER, null, null);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index e44f4a8..86dd4ea 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -48,14 +48,14 @@ import org.apache.ignite.cache.affinity.AffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.events.DiscoveryEvent;
-import org.apache.ignite.events.Event;
 import org.apache.ignite.internal.IgniteClientDisconnectedCheckedException;
 import org.apache.ignite.internal.IgniteFutureTimeoutCheckedException;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
 import org.apache.ignite.internal.events.DiscoveryCustomEvent;
-import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
+import org.apache.ignite.internal.managers.discovery.DiscoCache;
+import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridClientPartitionTopology;
@@ -173,35 +173,33 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
     private DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss.SSS");
 
     /** Discovery listener. */
-    private final GridLocalEventListener discoLsnr = new GridLocalEventListener() {
-        @Override public void onEvent(Event evt) {
+    private final DiscoveryEventListener discoLsnr = new DiscoveryEventListener() {
+        @Override public void onEvent(DiscoveryEvent evt, DiscoCache cache) {
             if (!enterBusy())
                 return;
 
             try {
-                DiscoveryEvent e = (DiscoveryEvent)evt;
-
                 ClusterNode loc = cctx.localNode();
 
-                assert e.type() == EVT_NODE_JOINED || e.type() == EVT_NODE_LEFT || e.type() == EVT_NODE_FAILED ||
-                    e.type() == EVT_DISCOVERY_CUSTOM_EVT;
+                assert evt.type() == EVT_NODE_JOINED || evt.type() == EVT_NODE_LEFT || evt.type() == EVT_NODE_FAILED ||
+                    evt.type() == EVT_DISCOVERY_CUSTOM_EVT;
 
-                final ClusterNode n = e.eventNode();
+                final ClusterNode n = evt.eventNode();
 
                 GridDhtPartitionExchangeId exchId = null;
                 GridDhtPartitionsExchangeFuture exchFut = null;
 
-                if (e.type() != EVT_DISCOVERY_CUSTOM_EVT) {
+                if (evt.type() != EVT_DISCOVERY_CUSTOM_EVT) {
                     assert !loc.id().equals(n.id());
 
-                    if (e.type() == EVT_NODE_LEFT || e.type() == EVT_NODE_FAILED) {
+                    if (evt.type() == EVT_NODE_LEFT || evt.type() == EVT_NODE_FAILED) {
                         assert cctx.discovery().node(n.id()) == null;
 
                         // Avoid race b/w initial future add and discovery event.
                         GridDhtPartitionsExchangeFuture initFut = null;
 
                         if (readyTopVer.get().equals(AffinityTopologyVersion.NONE)) {
-                            initFut = exchangeFuture(initialExchangeId(), null, null, null);
+                            initFut = exchangeFuture(initialExchangeId(), null, null, null, null);
 
                             initFut.onNodeLeft(n);
                         }
@@ -213,18 +211,18 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                     }
 
                     assert
-                        e.type() != EVT_NODE_JOINED || n.order() > loc.order() :
+                        evt.type() != EVT_NODE_JOINED || n.order() > loc.order() :
                         "Node joined with smaller-than-local " +
                             "order [newOrder=" + n.order() + ", locOrder=" + loc.order() + ']';
 
                     exchId = exchangeId(n.id(),
-                        affinityTopologyVersion(e),
-                        e.type());
+                        affinityTopologyVersion(evt),
+                        evt.type());
 
-                    exchFut = exchangeFuture(exchId, e, null, null);
+                    exchFut = exchangeFuture(exchId, evt, cache,null, null);
                 }
                 else {
-                    DiscoveryCustomEvent customEvt = (DiscoveryCustomEvent)e;
+                    DiscoveryCustomEvent customEvt = (DiscoveryCustomEvent)evt;
 
                     if (customEvt.customMessage() instanceof DynamicCacheChangeBatch) {
                         DynamicCacheChangeBatch batch = (DynamicCacheChangeBatch)customEvt.customMessage();
@@ -254,9 +252,9 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                         }
 
                         if (!F.isEmpty(valid)) {
-                            exchId = exchangeId(n.id(), affinityTopologyVersion(e), e.type());
+                            exchId = exchangeId(n.id(), affinityTopologyVersion(evt), evt.type());
 
-                            exchFut = exchangeFuture(exchId, e, valid, null);
+                            exchFut = exchangeFuture(exchId, evt, cache, valid, null);
                         }
                     }
                     else if (customEvt.customMessage() instanceof CacheAffinityChangeMessage) {
@@ -264,13 +262,13 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
 
                         if (msg.exchangeId() == null) {
                             if (msg.exchangeNeeded()) {
-                                exchId = exchangeId(n.id(), affinityTopologyVersion(e), e.type());
+                                exchId = exchangeId(n.id(), affinityTopologyVersion(evt), evt.type());
 
-                                exchFut = exchangeFuture(exchId, e, null, msg);
+                                exchFut = exchangeFuture(exchId, evt, cache, null, msg);
                             }
                         }
                         else
-                            exchangeFuture(msg.exchangeId(), null, null, null).onAffinityChangeMessage(customEvt.eventNode(), msg);
+                            exchangeFuture(msg.exchangeId(), null, null, null, null).onAffinityChangeMessage(customEvt.eventNode(), msg);
                     }
                 }
 
@@ -279,7 +277,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                         log.debug("Discovery event (will start exchange): " + exchId);
 
                     // Event callback - without this callback future will never complete.
-                    exchFut.onEvent(exchId, e);
+                    exchFut.onEvent(exchId, evt, cache);
 
                     // Start exchange process.
                     addFuture(exchFut);
@@ -301,7 +299,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
 
         exchWorker = new ExchangeWorker();
 
-        cctx.gridEvents().addLocalEventListener(discoLsnr, EVT_NODE_JOINED, EVT_NODE_LEFT, EVT_NODE_FAILED,
+        cctx.gridEvents().addDiscoveryEventListener(discoLsnr, EVT_NODE_JOINED, EVT_NODE_LEFT, EVT_NODE_FAILED,
             EVT_DISCOVERY_CUSTOM_EVT);
 
         cctx.io().addHandler(0, GridDhtPartitionsSingleMessage.class,
@@ -359,11 +357,14 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
         assert startTime > 0;
 
         // Generate dummy discovery event for local node joining.
-        DiscoveryEvent discoEvt = cctx.discovery().localJoinEvent();
+        T2<DiscoveryEvent, DiscoCache> localJoin = cctx.discovery().localJoin();
+
+        DiscoveryEvent discoEvt = localJoin.get1();
+        DiscoCache discoCache = localJoin.get2();
 
         GridDhtPartitionExchangeId exchId = initialExchangeId();
 
-        GridDhtPartitionsExchangeFuture fut = exchangeFuture(exchId, discoEvt, null, null);
+        GridDhtPartitionsExchangeFuture fut = exchangeFuture(exchId, discoEvt, discoCache, null, null);
 
         if (reconnect)
             reconnectExchangeFut = new GridFutureAdapter<>();
@@ -470,7 +471,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
 
     /** {@inheritDoc} */
     @Override protected void onKernalStop0(boolean cancel) {
-        cctx.gridEvents().removeLocalEventListener(discoLsnr);
+        cctx.gridEvents().removeDiscoveryEventListener(discoLsnr);
 
         cctx.io().removeHandler(0, GridDhtPartitionsSingleMessage.class);
         cctx.io().removeHandler(0, GridDhtPartitionsFullMessage.class);
@@ -1067,12 +1068,14 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
     /**
      * @param exchId Exchange ID.
      * @param discoEvt Discovery event.
+     * @param cache Discovery data cache.
      * @param reqs Cache change requests.
      * @param affChangeMsg Affinity change message.
      * @return Exchange future.
      */
     private GridDhtPartitionsExchangeFuture exchangeFuture(GridDhtPartitionExchangeId exchId,
         @Nullable DiscoveryEvent discoEvt,
+        @Nullable DiscoCache cache,
         @Nullable Collection<DynamicCacheChangeRequest> reqs,
         @Nullable CacheAffinityChangeMessage affChangeMsg) {
         GridDhtPartitionsExchangeFuture fut;
@@ -1091,7 +1094,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
         }
 
         if (discoEvt != null)
-            fut.onEvent(exchId, discoEvt);
+            fut.onEvent(exchId, discoEvt, cache);
 
         if (stopErr != null)
             fut.onDone(stopErr);
@@ -1235,7 +1238,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                     refreshPartitions();
             }
             else
-                exchangeFuture(msg.exchangeId(), null, null, null).onReceive(node, msg);
+                exchangeFuture(msg.exchangeId(), null, null, null, null).onReceive(node, msg);
         }
         finally {
             leaveBusy();
@@ -1291,6 +1294,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                     final GridDhtPartitionsExchangeFuture exchFut = exchangeFuture(msg.exchangeId(),
                         null,
                         null,
+                        null,
                         null);
 
                     exchFut.listen(new CI1<IgniteInternalFuture<AffinityTopologyVersion>>() {
@@ -1301,7 +1305,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                     });
                 }
                 else
-                    exchangeFuture(msg.exchangeId(), null, null, null).onReceive(node, msg);
+                    exchangeFuture(msg.exchangeId(), null, null, null, null).onReceive(node, msg);
             }
         }
         finally {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a61a98ad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
index a1fbd72..9c4e4ef 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
@@ -31,6 +31,7 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
+import org.apache.ignite.internal.managers.discovery.DiscoCache;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionExchangeId;
@@ -41,7 +42,6 @@ import org.apache.ignite.internal.util.GridAtomicLong;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.X;
-import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
@@ -102,6 +102,9 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
     /** */
     private final Object similarAffKey;
 
+    /** */
+    private volatile DiscoCache discoCache;
+
     /**
      * @param cctx Context.
      * @param cacheId Cache ID.
@@ -120,6 +123,8 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
 
         topVer = exchFut.topologyVersion();
 
+        discoCache = exchFut.discoCache();
+
         log = cctx.logger(getClass());
 
         lock.writeLock().lock();
@@ -190,6 +195,7 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
             this.stopping = stopping;
 
             topVer = exchId.topologyVersion();
+            discoCache = exchFut.discoCache();
 
             updateSeq.setIfGreater(updSeq);
 
@@ -263,7 +269,7 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
             removeNode(exchId.nodeId());
 
         // In case if node joins, get topology at the time of joining node.
-        ClusterNode oldest = cctx.discovery().oldestAliveCacheServerNode(topVer);
+        ClusterNode oldest = discoCache.oldestAliveServerNodeWithCache();
 
         assert oldest != null;
 
@@ -416,7 +422,7 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
 
             if (!F.isEmpty(nodeIds)) {
                 for (UUID nodeId : nodeIds) {
-                    ClusterNode n = cctx.discovery().node(nodeId);
+                    ClusterNode n = discoCache.node(nodeId);
 
                     if (n != null && (topVer.topologyVersion() < 0 || n.order() <= topVer.topologyVersion())) {
                         if (nodes == null)
@@ -442,7 +448,7 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
      * @return List of nodes for the partition.
      */
     private List<ClusterNode> nodes(int p, AffinityTopologyVersion topVer, GridDhtPartitionState state, GridDhtPartitionState... states) {
-        Collection<UUID> allIds = topVer.topologyVersion() > 0 ? F.nodeIds(CU.allNodes(cctx, topVer)) : null;
+        Collection<UUID> allIds = topVer.topologyVersion() > 0 ? F.nodeIds(discoCache.allNodesWithCaches()) : null;
 
         lock.readLock().lock();
 
@@ -465,7 +471,7 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
                     continue;
 
                 if (hasState(p, id, state, states)) {
-                    ClusterNode n = cctx.discovery().node(id);
+                    ClusterNode n = discoCache.node(id);
 
                     if (n != null && (topVer.topologyVersion() < 0 || n.order() <= topVer.topologyVersion()))
                         nodes.add(n);
@@ -758,7 +764,7 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
         assert nodeId.equals(cctx.localNodeId());
 
         // In case if node joins, get topology at the time of joining node.
-        ClusterNode oldest = cctx.discovery().oldestAliveCacheServerNode(topVer);
+        ClusterNode oldest = discoCache.oldestAliveServerNodeWithCache();
 
         // If this node became the oldest node.
         if (oldest.id().equals(cctx.localNodeId())) {
@@ -808,7 +814,7 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
         assert nodeId != null;
         assert lock.writeLock().isHeldByCurrentThread();
 
-        ClusterNode oldest = cctx.discovery().oldestAliveCacheServerNode(topVer);
+        ClusterNode oldest = discoCache.oldestAliveServerNodeWithCache();
 
         ClusterNode loc = cctx.localNode();
 


[22/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.


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

Branch: refs/heads/ignite-4705-2
Commit: 1080e6861288b229630e24c9b8f282c09bede030
Parents: f71e4b4
Author: Dmitriy Shabalin <ds...@gridgain.com>
Authored: Thu Mar 2 16:05:15 2017 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Thu Mar 2 16:05:16 2017 +0700

----------------------------------------------------------------------
 modules/web-console/frontend/.eslintrc          |   1 +
 modules/web-console/frontend/.gitignore         |   1 +
 modules/web-console/frontend/app/app.config.js  |  12 +-
 modules/web-console/frontend/app/app.js         |   7 +-
 .../activities-user-dialog.jade                 |  36 --
 .../activities-user-dialog.tpl.pug              |  36 ++
 .../components/activities-user-dialog/index.js  |   2 +-
 .../form-field-datepicker.jade                  |  55 --
 .../form-field-datepicker.pug                   |  55 ++
 .../list-of-registered-users/index.js           |   2 +-
 .../list-of-registered-users.controller.js      |  11 +-
 .../list-of-registered-users.jade               |  58 --
 .../list-of-registered-users.tpl.pug            |  58 ++
 .../ui-grid-header/ui-grid-header.jade          |  27 -
 .../ui-grid-header/ui-grid-header.scss          |   1 +
 .../ui-grid-header/ui-grid-header.tpl.pug       |  27 +
 .../ui-grid-settings/ui-grid-settings.jade      |  33 -
 .../ui-grid-settings/ui-grid-settings.pug       |  33 +
 .../app/directives/centered/centered.css        |  37 --
 .../directives/centered/centered.directive.js   |   2 +-
 .../app/directives/centered/centered.scss       |  37 ++
 .../information/information.directive.js        |   4 +-
 .../app/directives/information/information.jade |  20 -
 .../app/directives/information/information.pug  |  20 +
 .../ui-ace-docker/ui-ace-docker.directive.js    |   4 +-
 .../directives/ui-ace-docker/ui-ace-docker.jade |  31 -
 .../directives/ui-ace-docker/ui-ace-docker.pug  |  31 +
 .../ui-ace-java/ui-ace-java.directive.js        |   4 +-
 .../app/directives/ui-ace-java/ui-ace-java.jade |  22 -
 .../app/directives/ui-ace-java/ui-ace-java.pug  |  22 +
 .../ui-ace-pojos/ui-ace-pojos.directive.js      |   4 +-
 .../directives/ui-ace-pojos/ui-ace-pojos.jade   |  40 --
 .../directives/ui-ace-pojos/ui-ace-pojos.pug    |  40 ++
 .../ui-ace-pom/ui-ace-pom.directive.js          |   4 +-
 .../app/directives/ui-ace-pom/ui-ace-pom.jade   |  17 -
 .../app/directives/ui-ace-pom/ui-ace-pom.pug    |  17 +
 .../ui-ace-sharp/ui-ace-sharp.directive.js      |   4 +-
 .../directives/ui-ace-sharp/ui-ace-sharp.jade   |  22 -
 .../directives/ui-ace-sharp/ui-ace-sharp.pug    |  22 +
 .../ui-ace-spring/ui-ace-spring.directive.js    |   4 +-
 .../directives/ui-ace-spring/ui-ace-spring.jade |  17 -
 .../directives/ui-ace-spring/ui-ace-spring.pug  |  17 +
 .../frontend/app/helpers/jade/form.jade         |  28 -
 .../frontend/app/helpers/jade/form.pug          |  28 +
 .../helpers/jade/form/form-field-checkbox.jade  |  38 --
 .../helpers/jade/form/form-field-checkbox.pug   |  38 ++
 .../helpers/jade/form/form-field-datalist.jade  |  51 --
 .../helpers/jade/form/form-field-datalist.pug   |  51 ++
 .../app/helpers/jade/form/form-field-down.jade  |  18 -
 .../app/helpers/jade/form/form-field-down.pug   |  18 +
 .../helpers/jade/form/form-field-dropdown.jade  |  51 --
 .../helpers/jade/form/form-field-dropdown.pug   |  51 ++
 .../helpers/jade/form/form-field-feedback.jade  |  32 -
 .../helpers/jade/form/form-field-feedback.pug   |  32 +
 .../app/helpers/jade/form/form-field-label.jade |  23 -
 .../app/helpers/jade/form/form-field-label.pug  |  23 +
 .../helpers/jade/form/form-field-number.jade    |  53 --
 .../app/helpers/jade/form/form-field-number.pug |  53 ++
 .../helpers/jade/form/form-field-password.jade  |  47 --
 .../helpers/jade/form/form-field-password.pug   |  47 ++
 .../app/helpers/jade/form/form-field-text.jade  |  64 --
 .../app/helpers/jade/form/form-field-text.pug   |  64 ++
 .../app/helpers/jade/form/form-field-up.jade    |  18 -
 .../app/helpers/jade/form/form-field-up.pug     |  18 +
 .../app/helpers/jade/form/form-group.jade       |  23 -
 .../app/helpers/jade/form/form-group.pug        |  23 +
 .../frontend/app/helpers/jade/mixins.jade       | 609 -------------------
 .../frontend/app/helpers/jade/mixins.pug        | 609 +++++++++++++++++++
 .../frontend/app/modules/agent/agent.module.js  |   4 +-
 .../modules/branding/header-logo.directive.js   |   4 +-
 .../app/modules/branding/header-logo.jade       |  18 -
 .../app/modules/branding/header-logo.pug        |  18 +
 .../branding/powered-by-apache.directive.js     |   4 +-
 .../app/modules/branding/powered-by-apache.jade |  18 -
 .../app/modules/branding/powered-by-apache.pug  |  18 +
 .../frontend/app/modules/demo/Demo.module.js    |   3 +-
 .../app/modules/dialog/dialog.factory.js        |   2 +-
 .../frontend/app/modules/dialog/dialog.jade     |  26 -
 .../frontend/app/modules/dialog/dialog.tpl.pug  |  26 +
 .../getting-started/GettingStarted.provider.js  |   3 +-
 .../frontend/app/modules/loading/loading.css    |  73 ---
 .../app/modules/loading/loading.directive.js    |   8 +-
 .../frontend/app/modules/loading/loading.jade   |  23 -
 .../frontend/app/modules/loading/loading.pug    |  23 +
 .../frontend/app/modules/loading/loading.scss   |  73 +++
 .../frontend/app/modules/nodes/Nodes.service.js |   4 +-
 .../app/modules/nodes/nodes-dialog.jade         |  35 --
 .../app/modules/nodes/nodes-dialog.tpl.pug      |  35 ++
 .../app/modules/sql/notebook.controller.js      |   4 +-
 .../frontend/app/modules/sql/sql.controller.js  |  15 +-
 .../frontend/app/modules/sql/sql.module.js      |  15 +-
 .../frontend/app/modules/states/admin.state.js  |   4 +-
 .../app/modules/states/configuration.state.js   |  23 +-
 .../states/configuration/caches/affinity.jade   |  82 ---
 .../states/configuration/caches/affinity.pug    |  82 +++
 .../configuration/caches/client-near-cache.jade |  50 --
 .../configuration/caches/client-near-cache.pug  |  50 ++
 .../configuration/caches/concurrency.jade       |  65 --
 .../states/configuration/caches/concurrency.pug |  65 ++
 .../states/configuration/caches/general.jade    |  69 ---
 .../states/configuration/caches/general.pug     |  69 +++
 .../states/configuration/caches/memory.jade     | 109 ----
 .../states/configuration/caches/memory.pug      | 108 ++++
 .../configuration/caches/near-cache-client.jade |  51 --
 .../configuration/caches/near-cache-client.pug  |  51 ++
 .../configuration/caches/near-cache-server.jade |  52 --
 .../configuration/caches/near-cache-server.pug  |  52 ++
 .../configuration/caches/node-filter.jade       |  59 --
 .../states/configuration/caches/node-filter.pug |  59 ++
 .../states/configuration/caches/query.jade      | 114 ----
 .../states/configuration/caches/query.pug       | 114 ++++
 .../states/configuration/caches/rebalance.jade  |  66 --
 .../states/configuration/caches/rebalance.pug   |  66 ++
 .../states/configuration/caches/statistics.jade |  39 --
 .../states/configuration/caches/statistics.pug  |  39 ++
 .../states/configuration/caches/store.jade      | 250 --------
 .../states/configuration/caches/store.pug       | 250 ++++++++
 .../states/configuration/clusters/atomic.jade   |  54 --
 .../states/configuration/clusters/atomic.pug    |  54 ++
 .../configuration/clusters/attributes.jade      |  57 --
 .../configuration/clusters/attributes.pug       |  57 ++
 .../states/configuration/clusters/binary.jade   |  77 ---
 .../states/configuration/clusters/binary.pug    |  77 +++
 .../configuration/clusters/cache-key-cfg.jade   |  50 --
 .../configuration/clusters/cache-key-cfg.pug    |  50 ++
 .../configuration/clusters/checkpoint.jade      |  86 ---
 .../configuration/clusters/checkpoint.pug       |  86 +++
 .../configuration/clusters/checkpoint/fs.jade   |  66 --
 .../configuration/clusters/checkpoint/fs.pug    |  66 ++
 .../configuration/clusters/checkpoint/jdbc.jade |  48 --
 .../configuration/clusters/checkpoint/jdbc.pug  |  48 ++
 .../configuration/clusters/checkpoint/s3.jade   | 178 ------
 .../configuration/clusters/checkpoint/s3.pug    | 178 ++++++
 .../configuration/clusters/collision.jade       |  63 --
 .../states/configuration/clusters/collision.pug |  63 ++
 .../clusters/collision/custom.jade              |  24 -
 .../configuration/clusters/collision/custom.pug |  24 +
 .../clusters/collision/fifo-queue.jade          |  27 -
 .../clusters/collision/fifo-queue.pug           |  27 +
 .../clusters/collision/job-stealing.jade        |  63 --
 .../clusters/collision/job-stealing.pug         |  63 ++
 .../clusters/collision/priority-queue.jade      |  42 --
 .../clusters/collision/priority-queue.pug       |  42 ++
 .../configuration/clusters/communication.jade   | 100 ---
 .../configuration/clusters/communication.pug    | 100 +++
 .../configuration/clusters/connector.jade       | 104 ----
 .../states/configuration/clusters/connector.pug | 104 ++++
 .../configuration/clusters/deployment.jade      | 237 --------
 .../configuration/clusters/deployment.pug       | 237 ++++++++
 .../configuration/clusters/discovery.jade       |  88 ---
 .../states/configuration/clusters/discovery.pug |  88 +++
 .../states/configuration/clusters/events.jade   |  68 ---
 .../states/configuration/clusters/events.pug    |  68 +++
 .../states/configuration/clusters/failover.jade |  73 ---
 .../states/configuration/clusters/failover.pug  |  73 +++
 .../states/configuration/clusters/general.jade  |  76 ---
 .../states/configuration/clusters/general.pug   |  76 +++
 .../clusters/general/discovery/cloud.jade       | 134 ----
 .../clusters/general/discovery/cloud.pug        | 134 ++++
 .../clusters/general/discovery/google.jade      |  38 --
 .../clusters/general/discovery/google.pug       |  38 ++
 .../clusters/general/discovery/jdbc.jade        |  31 -
 .../clusters/general/discovery/jdbc.pug         |  31 +
 .../clusters/general/discovery/multicast.jade   |  99 ---
 .../clusters/general/discovery/multicast.pug    |  99 +++
 .../clusters/general/discovery/s3.jade          |  27 -
 .../clusters/general/discovery/s3.pug           |  27 +
 .../clusters/general/discovery/shared.jade      |  23 -
 .../clusters/general/discovery/shared.pug       |  23 +
 .../clusters/general/discovery/vm.jade          |  79 ---
 .../clusters/general/discovery/vm.pug           |  79 +++
 .../clusters/general/discovery/zookeeper.jade   |  85 ---
 .../clusters/general/discovery/zookeeper.pug    |  85 +++
 .../bounded-exponential-backoff.jade            |  27 -
 .../retrypolicy/bounded-exponential-backoff.pug |  27 +
 .../discovery/zookeeper/retrypolicy/custom.jade |  24 -
 .../discovery/zookeeper/retrypolicy/custom.pug  |  24 +
 .../retrypolicy/exponential-backoff.jade        |  27 -
 .../retrypolicy/exponential-backoff.pug         |  27 +
 .../zookeeper/retrypolicy/forever.jade          |  22 -
 .../discovery/zookeeper/retrypolicy/forever.pug |  22 +
 .../zookeeper/retrypolicy/n-times.jade          |  25 -
 .../discovery/zookeeper/retrypolicy/n-times.pug |  25 +
 .../zookeeper/retrypolicy/one-time.jade         |  23 -
 .../zookeeper/retrypolicy/one-time.pug          |  23 +
 .../zookeeper/retrypolicy/until-elapsed.jade    |  25 -
 .../zookeeper/retrypolicy/until-elapsed.pug     |  25 +
 .../states/configuration/clusters/igfs.jade     |  38 --
 .../states/configuration/clusters/igfs.pug      |  38 ++
 .../configuration/clusters/load-balancing.jade  | 107 ----
 .../configuration/clusters/load-balancing.pug   | 107 ++++
 .../states/configuration/clusters/logger.jade   |  66 --
 .../states/configuration/clusters/logger.pug    |  66 ++
 .../configuration/clusters/logger/custom.jade   |  25 -
 .../configuration/clusters/logger/custom.pug    |  25 +
 .../configuration/clusters/logger/log4j.jade    |  50 --
 .../configuration/clusters/logger/log4j.pug     |  50 ++
 .../configuration/clusters/logger/log4j2.jade   |  39 --
 .../configuration/clusters/logger/log4j2.pug    |  39 ++
 .../configuration/clusters/marshaller.jade      |  76 ---
 .../configuration/clusters/marshaller.pug       |  76 +++
 .../states/configuration/clusters/metrics.jade  |  51 --
 .../states/configuration/clusters/metrics.pug   |  51 ++
 .../states/configuration/clusters/odbc.jade     |  48 --
 .../states/configuration/clusters/odbc.pug      |  48 ++
 .../states/configuration/clusters/ssl.jade      | 110 ----
 .../states/configuration/clusters/ssl.pug       | 110 ++++
 .../states/configuration/clusters/swap.jade     |  72 ---
 .../states/configuration/clusters/swap.pug      |  72 +++
 .../states/configuration/clusters/thread.jade   |  48 --
 .../states/configuration/clusters/thread.pug    |  48 ++
 .../states/configuration/clusters/time.jade     |  47 --
 .../states/configuration/clusters/time.pug      |  47 ++
 .../configuration/clusters/transactions.jade    |  69 ---
 .../configuration/clusters/transactions.pug     |  69 +++
 .../states/configuration/domains/general.jade   |  52 --
 .../states/configuration/domains/general.pug    |  52 ++
 .../states/configuration/domains/query.jade     | 172 ------
 .../states/configuration/domains/query.pug      | 172 ++++++
 .../states/configuration/domains/store.jade     | 127 ----
 .../states/configuration/domains/store.pug      | 127 ++++
 .../modules/states/configuration/igfs/dual.jade |  42 --
 .../modules/states/configuration/igfs/dual.pug  |  42 ++
 .../states/configuration/igfs/fragmentizer.jade |  43 --
 .../states/configuration/igfs/fragmentizer.pug  |  43 ++
 .../states/configuration/igfs/general.jade      |  57 --
 .../states/configuration/igfs/general.pug       |  57 ++
 .../modules/states/configuration/igfs/ipc.jade  |  60 --
 .../modules/states/configuration/igfs/ipc.pug   |  60 ++
 .../modules/states/configuration/igfs/misc.jade | 108 ----
 .../modules/states/configuration/igfs/misc.pug  | 108 ++++
 .../states/configuration/igfs/secondary.jade    |  45 --
 .../states/configuration/igfs/secondary.pug     |  45 ++
 .../configuration/summary/summary.controller.js |   5 +
 .../frontend/app/modules/states/errors.state.js |   4 +-
 .../app/modules/states/password.state.js        |   6 +-
 .../app/modules/states/profile.state.js         |   4 +-
 .../frontend/app/modules/states/signin.state.js |   2 +-
 .../frontend/app/services/Clone.service.js      |   4 +-
 .../frontend/app/services/Confirm.service.js    |   4 +-
 .../app/services/ConfirmBatch.service.js        |   4 +-
 .../frontend/controllers/caches-controller.js   |   4 +-
 .../frontend/controllers/domains-controller.js  |   4 +-
 .../frontend/gulpfile.babel.js/paths.js         |  28 +-
 .../frontend/gulpfile.babel.js/tasks/build.js   |   2 +-
 .../frontend/gulpfile.babel.js/tasks/bundle.js  |   8 +-
 .../frontend/gulpfile.babel.js/tasks/jade.js    |  49 --
 .../frontend/gulpfile.babel.js/tasks/watch.js   |   5 +-
 .../gulpfile.babel.js/webpack/common.js         | 292 ++++-----
 .../webpack/environments/development.js         |  90 ++-
 .../webpack/environments/production.js          |  41 +-
 .../webpack/environments/test.js                |  52 +-
 .../frontend/gulpfile.babel.js/webpack/index.js |   4 +-
 modules/web-console/frontend/package.json       |  60 +-
 .../frontend/test/e2e/exampe.test.js            |   4 +-
 .../frontend/test/karma.conf.babel.js           |   7 +-
 .../frontend/test/protractor.conf.js            |  16 +-
 .../frontend/test/unit/JavaTransformer.test.js  |   2 +-
 .../frontend/test/unit/JavaTypes.test.js        | 137 ++---
 .../frontend/test/unit/SharpTransformer.test.js |   2 +-
 .../test/unit/SpringTransformer.test.js         |   2 +-
 .../frontend/test/unit/SqlTypes.test.js         |   7 +-
 .../frontend/test/unit/UserAuth.test.js         |   4 +-
 .../frontend/test/unit/Version.test.js          |   1 +
 .../test/unit/defaultName.filter.test.js        |  27 +-
 modules/web-console/frontend/views/403.jade     |  22 -
 modules/web-console/frontend/views/403.pug      |  22 +
 modules/web-console/frontend/views/404.jade     |  22 -
 modules/web-console/frontend/views/404.pug      |  22 +
 modules/web-console/frontend/views/base.jade    |  22 -
 modules/web-console/frontend/views/base.pug     |  22 +
 .../frontend/views/configuration/caches.jade    |  55 --
 .../frontend/views/configuration/caches.tpl.pug |  55 ++
 .../frontend/views/configuration/clusters.jade  |  68 ---
 .../views/configuration/clusters.tpl.pug        |  68 +++
 .../views/configuration/domains-import.jade     | 170 ------
 .../views/configuration/domains-import.tpl.pug  | 170 ++++++
 .../frontend/views/configuration/domains.jade   |  66 --
 .../views/configuration/domains.tpl.pug         |  66 ++
 .../frontend/views/configuration/igfs.jade      |  51 --
 .../frontend/views/configuration/igfs.tpl.pug   |  51 ++
 .../frontend/views/configuration/sidebar.jade   |  29 -
 .../views/configuration/sidebar.tpl.pug         |  29 +
 .../summary-project-structure.jade              |  27 -
 .../summary-project-structure.tpl.pug           |  28 +
 .../views/configuration/summary-tabs.jade       |  25 -
 .../views/configuration/summary-tabs.pug        |  25 +
 .../frontend/views/configuration/summary.jade   |  90 ---
 .../views/configuration/summary.tpl.pug         |  90 +++
 .../frontend/views/includes/footer.jade         |  23 -
 .../frontend/views/includes/footer.pug          |  23 +
 .../frontend/views/includes/header.jade         |  52 --
 .../frontend/views/includes/header.pug          |  52 ++
 modules/web-console/frontend/views/index.jade   |  47 --
 modules/web-console/frontend/views/index.pug    |  47 ++
 modules/web-console/frontend/views/reset.jade   |  48 --
 .../web-console/frontend/views/reset.tpl.pug    |  48 ++
 .../frontend/views/settings/admin.jade          |  25 -
 .../frontend/views/settings/admin.tpl.pug       |  25 +
 .../frontend/views/settings/profile.jade        |  76 ---
 .../frontend/views/settings/profile.tpl.pug     |  76 +++
 modules/web-console/frontend/views/signin.jade  | 163 -----
 .../web-console/frontend/views/signin.tpl.pug   | 163 +++++
 .../frontend/views/sql/cache-metadata.jade      |  40 --
 .../frontend/views/sql/cache-metadata.tpl.pug   |  40 ++
 .../frontend/views/sql/chart-settings.jade      |  40 --
 .../frontend/views/sql/chart-settings.tpl.pug   |  40 ++
 .../frontend/views/sql/notebook-new.jade        |  33 -
 .../frontend/views/sql/notebook-new.tpl.pug     |  33 +
 .../frontend/views/sql/paragraph-rate.jade      |  31 -
 .../frontend/views/sql/paragraph-rate.tpl.pug   |  31 +
 modules/web-console/frontend/views/sql/sql.jade | 278 ---------
 .../web-console/frontend/views/sql/sql.tpl.pug  | 278 +++++++++
 .../views/templates/agent-download.jade         |  50 --
 .../views/templates/agent-download.tpl.pug      |  50 ++
 .../frontend/views/templates/alert.jade         |  21 -
 .../frontend/views/templates/alert.tpl.pug      |  21 +
 .../frontend/views/templates/batch-confirm.jade |  34 --
 .../views/templates/batch-confirm.tpl.pug       |  34 ++
 .../frontend/views/templates/clone.jade         |  39 --
 .../frontend/views/templates/clone.tpl.pug      |  39 ++
 .../frontend/views/templates/confirm.jade       |  33 -
 .../frontend/views/templates/confirm.tpl.pug    |  33 +
 .../frontend/views/templates/demo-info.jade     |  47 --
 .../frontend/views/templates/demo-info.tpl.pug  |  47 ++
 .../frontend/views/templates/dropdown.jade      |  24 -
 .../frontend/views/templates/dropdown.tpl.pug   |  24 +
 .../views/templates/getting-started.jade        |  34 --
 .../views/templates/getting-started.tpl.pug     |  34 ++
 .../frontend/views/templates/message.jade       |  28 -
 .../frontend/views/templates/message.tpl.pug    |  28 +
 .../frontend/views/templates/pagination.jade    |  32 -
 .../frontend/views/templates/select.jade        |  26 -
 .../frontend/views/templates/select.tpl.pug     |  26 +
 .../views/templates/validation-error.jade       |  25 -
 .../views/templates/validation-error.tpl.pug    |  25 +
 336 files changed, 8866 insertions(+), 8917 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/.eslintrc
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/.eslintrc b/modules/web-console/frontend/.eslintrc
index 988cfa0..958c6d1 100644
--- a/modules/web-console/frontend/.eslintrc
+++ b/modules/web-console/frontend/.eslintrc
@@ -32,6 +32,7 @@ globals:
     $generatorOptional: true
     saveAs: true
     process: true
+    require: true
 
 rules:
     arrow-parens: [1, "always"]

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/.gitignore
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/.gitignore b/modules/web-console/frontend/.gitignore
index 46bca13..27138f6 100644
--- a/modules/web-console/frontend/.gitignore
+++ b/modules/web-console/frontend/.gitignore
@@ -1,5 +1,6 @@
 *.idea
 *.log
+*.log.*
 .npmrc
 build/*
 node_modules

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/app.config.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/app.config.js b/modules/web-console/frontend/app/app.config.js
index 39d761f..3ca5c3b 100644
--- a/modules/web-console/frontend/app/app.config.js
+++ b/modules/web-console/frontend/app/app.config.js
@@ -16,6 +16,7 @@
  */
 
 import _ from 'lodash';
+import angular from 'angular';
 
 const nonNil = _.negate(_.isNil);
 const nonEmpty = _.negate(_.isEmpty);
@@ -25,7 +26,10 @@ _.mixin({
     nonEmpty
 });
 
-import alertTemplateUrl from '../views/templates/alert.jade';
+import alertTemplateUrl from 'views/templates/alert.tpl.pug';
+import selectTemplateUrl from 'views/templates/select.tpl.pug';
+import dropdownTemplateUrl from 'views/templates/dropdown.tpl.pug';
+import validationTemplateUrl from 'views/templates/validation-error.tpl.pug';
 
 const igniteConsoleCfg = angular.module('ignite-console.config', ['ngAnimate', 'mgcrea.ngStrap']);
 
@@ -48,7 +52,7 @@ igniteConsoleCfg.config(['$popoverProvider', ($popoverProvider) => {
         trigger: 'manual',
         placement: 'right',
         container: 'body',
-        templateUrl: '/templates/validation-error.html'
+        templateUrl: validationTemplateUrl
     });
 }]);
 
@@ -70,7 +74,7 @@ igniteConsoleCfg.config(['$selectProvider', ($selectProvider) => {
         maxLength: '5',
         allText: 'Select All',
         noneText: 'Clear All',
-        templateUrl: '/templates/select.html',
+        templateUrl: selectTemplateUrl,
         iconCheckmark: 'fa fa-check',
         caretHtml: ''
     });
@@ -91,7 +95,7 @@ igniteConsoleCfg.config(['$alertProvider', ($alertProvider) => {
 // AngularStrap dropdowns () configuration.
 igniteConsoleCfg.config(['$dropdownProvider', ($dropdownProvider) => {
     angular.extend($dropdownProvider.defaults, {
-        templateUrl: 'templates/dropdown.html'
+        templateUrl: dropdownTemplateUrl
     });
 }]);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/app.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/app.js b/modules/web-console/frontend/app/app.js
index 9958cb5..5e3bb07 100644
--- a/modules/web-console/frontend/app/app.js
+++ b/modules/web-console/frontend/app/app.js
@@ -19,7 +19,6 @@ import '../public/stylesheets/style.scss';
 import '../app/components/ui-grid-header/ui-grid-header.scss';
 import '../app/components/ui-grid-settings/ui-grid-settings.scss';
 import '../app/components/form-field-datepicker/form-field-datepicker.scss';
-import './helpers/jade/mixins.jade';
 
 import './app.config';
 
@@ -122,7 +121,7 @@ import IgniteActivitiesUserDialog from './components/activities-user-dialog';
 // Inject external modules.
 import 'ignite_modules_temp/index';
 
-import baseTemplate from '../views/base.jade';
+import baseTemplate from 'views/base.pug';
 
 angular
 .module('ignite-console', [
@@ -242,12 +241,12 @@ angular
         .state('base', {
             url: '',
             abstract: true,
-            templateUrl: baseTemplate
+            template: baseTemplate
         })
         .state('settings', {
             url: '/settings',
             abstract: true,
-            templateUrl: baseTemplate
+            template: baseTemplate
         });
 
     $urlRouterProvider.otherwise('/404');

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.jade b/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.jade
deleted file mode 100644
index 074851c..0000000
--- a/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.jade
+++ /dev/null
@@ -1,36 +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.
-
-.modal(tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            .modal-header
-                h4.modal-title 
-                    i.fa.fa-info-circle
-                    | Activities: {{ ctrl.user.userName }}
-            .modal-body.modal-body-with-scroll(id='activities-user-dialog')
-                table.table.table-striped.table-bordered.table-hover(scrollable-container='#activities-user-dialog' st-table='displayedRows' st-safe-src='ctrl.data')
-                    thead
-                        th.text-center(st-sort='action | translate') Description
-                        th.text-center(st-sort='action') Action
-                        th.text-center(st-sort='amount') Visited
-                    tbody
-                        tr(ng-repeat='row in displayedRows')
-                            td.text-left {{ row.action | translate }}
-                            td.text-left {{ row.action }}
-                            td.text-left {{ row.amount }}
-            .modal-footer
-                button.btn.btn-primary(id='confirm-btn-confirm' ng-click='$hide()') Close

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.tpl.pug b/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.tpl.pug
new file mode 100644
index 0000000..074851c
--- /dev/null
+++ b/modules/web-console/frontend/app/components/activities-user-dialog/activities-user-dialog.tpl.pug
@@ -0,0 +1,36 @@
+//-
+    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.
+
+.modal(tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            .modal-header
+                h4.modal-title 
+                    i.fa.fa-info-circle
+                    | Activities: {{ ctrl.user.userName }}
+            .modal-body.modal-body-with-scroll(id='activities-user-dialog')
+                table.table.table-striped.table-bordered.table-hover(scrollable-container='#activities-user-dialog' st-table='displayedRows' st-safe-src='ctrl.data')
+                    thead
+                        th.text-center(st-sort='action | translate') Description
+                        th.text-center(st-sort='action') Action
+                        th.text-center(st-sort='amount') Visited
+                    tbody
+                        tr(ng-repeat='row in displayedRows')
+                            td.text-left {{ row.action | translate }}
+                            td.text-left {{ row.action }}
+                            td.text-left {{ row.amount }}
+            .modal-footer
+                button.btn.btn-primary(id='confirm-btn-confirm' ng-click='$hide()') Close

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/activities-user-dialog/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/activities-user-dialog/index.js b/modules/web-console/frontend/app/components/activities-user-dialog/index.js
index dca6ba9..2f8fdef 100644
--- a/modules/web-console/frontend/app/components/activities-user-dialog/index.js
+++ b/modules/web-console/frontend/app/components/activities-user-dialog/index.js
@@ -16,7 +16,7 @@
  */
 
  import controller from './activities-user-dialog.controller';
- import templateUrl from './activities-user-dialog.jade';
+ import templateUrl from './activities-user-dialog.tpl.pug';
 
  export default ['$modal', ($modal) => ({ show = true, user }) => {
      const ActivitiesUserDialog = $modal({

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/form-field-datepicker/form-field-datepicker.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/form-field-datepicker/form-field-datepicker.jade b/modules/web-console/frontend/app/components/form-field-datepicker/form-field-datepicker.jade
deleted file mode 100644
index 2578cf4..0000000
--- a/modules/web-console/frontend/app/components/form-field-datepicker/form-field-datepicker.jade
+++ /dev/null
@@ -1,55 +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.
-
-mixin ignite-form-field-datepicker(label, model, name, disabled, required, placeholder, tip)
-    mixin form-field-input()
-        input.form-control(
-            id='{{ #{name} }}Input'
-            name='{{ #{name} }}'
-
-            placeholder=placeholder
-            
-            data-ng-model=model
-
-            data-ng-required=required && '#{required}'
-            data-ng-disabled=disabled && '#{disabled}'
-
-            bs-datepicker
-            data-date-format='MMM yyyy'
-            data-start-view='1'
-            data-min-view='1' 
-            data-max-date='today'
-
-            data-container='body > .wrapper'
-
-            tabindex='0'
-
-            onkeydown="return false"
-
-            data-ignite-form-panel-field=''
-        )&attributes(attributes.attributes)
-
-    .ignite-form-field
-        +ignite-form-field__label(label, name, required)
-        .ignite-form-field__control
-            if tip
-                i.tipField.icon-help(bs-tooltip='' data-title=tip)
-
-            if block
-                block
-
-            .input-tip
-                +form-field-input(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/form-field-datepicker/form-field-datepicker.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/form-field-datepicker/form-field-datepicker.pug b/modules/web-console/frontend/app/components/form-field-datepicker/form-field-datepicker.pug
new file mode 100644
index 0000000..c9d382c
--- /dev/null
+++ b/modules/web-console/frontend/app/components/form-field-datepicker/form-field-datepicker.pug
@@ -0,0 +1,55 @@
+//-
+    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.
+
+mixin ignite-form-field-datepicker(label, model, name, disabled, required, placeholder, tip)
+    mixin form-field-input()
+        input.form-control(
+            id=`{{ ${name} }}Input`
+            name=`{{ ${name} }}`
+
+            placeholder=placeholder
+            
+            data-ng-model=model
+
+            data-ng-required=required && `${required}`
+            data-ng-disabled=disabled && `${disabled}`
+
+            bs-datepicker
+            data-date-format='MMM yyyy'
+            data-start-view='1'
+            data-min-view='1' 
+            data-max-date='today'
+
+            data-container='body > .wrapper'
+
+            tabindex='0'
+
+            onkeydown="return false"
+
+            data-ignite-form-panel-field=''
+        )&attributes(attributes.attributes)
+
+    .ignite-form-field
+        +ignite-form-field__label(label, name, required)
+        .ignite-form-field__control
+            if tip
+                i.tipField.icon-help(bs-tooltip='' data-title=tip)
+
+            if block
+                block
+
+            .input-tip
+                +form-field-input(attributes=attributes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/list-of-registered-users/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/list-of-registered-users/index.js b/modules/web-console/frontend/app/components/list-of-registered-users/index.js
index 32a34f4..22a89da 100644
--- a/modules/web-console/frontend/app/components/list-of-registered-users/index.js
+++ b/modules/web-console/frontend/app/components/list-of-registered-users/index.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import templateUrl from './list-of-registered-users.jade';
+import templateUrl from './list-of-registered-users.tpl.pug';
 import controller from './list-of-registered-users.controller';
 
 export default [() => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.controller.js b/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.controller.js
index f65958b..54971b1 100644
--- a/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.controller.js
+++ b/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.controller.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import headerTemplate from 'app/components/ui-grid-header/ui-grid-header.jade';
+import headerTemplate from 'app/components/ui-grid-header/ui-grid-header.tpl.pug';
 
 import columnDefs from './list-of-registered-users.column-defs';
 import categories from './list-of-registered-users.categories';
@@ -30,9 +30,9 @@ const rowTemplate = `<div
   ui-grid-cell/>`;
 
 export default class IgniteListOfRegisteredUsersCtrl {
-    static $inject = ['$scope', '$state', '$filter', '$templateCache', 'User', 'uiGridConstants', 'IgniteAdminData', 'IgniteNotebookData', 'IgniteConfirm', 'IgniteActivitiesUserDialog'];
+    static $inject = ['$scope', '$state', '$filter', 'User', 'uiGridConstants', 'IgniteAdminData', 'IgniteNotebookData', 'IgniteConfirm', 'IgniteActivitiesUserDialog'];
 
-    constructor($scope, $state, $filter, $templateCache, User, uiGridConstants, AdminData, NotebookData, Confirm, ActivitiesUserDialog) {
+    constructor($scope, $state, $filter, User, uiGridConstants, AdminData, NotebookData, Confirm, ActivitiesUserDialog) {
         const $ctrl = this;
 
         const companySelectOptions = [];
@@ -110,7 +110,7 @@ export default class IgniteListOfRegisteredUsersCtrl {
             columnVirtualizationThreshold: 30,
             columnDefs,
             categories,
-            headerTemplate: $templateCache.get(headerTemplate),
+            headerTemplate,
             rowTemplate,
             enableFiltering: true,
             enableRowSelection: true,
@@ -154,6 +154,9 @@ export default class IgniteListOfRegisteredUsersCtrl {
             AdminData.loadUsers(params)
                 .then((data) => $ctrl.gridOptions.data = data)
                 .then((data) => {
+                    companySelectOptions.length = 0;
+                    countrySelectOptions.length = 0;
+
                     companySelectOptions.push(...usersToFilterOptions('company'));
                     countrySelectOptions.push(...usersToFilterOptions('countryCode'));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.jade b/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.jade
deleted file mode 100644
index 1195910..0000000
--- a/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.jade
+++ /dev/null
@@ -1,58 +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.
-
-include /app/helpers/jade/mixins.jade
-include /app/components/form-field-datepicker/form-field-datepicker.jade
-
-mixin grid-settings()
-    i.fa.fa-bars(data-animation='am-flip-x' bs-dropdown='' aria-haspopup='true' aria-expanded='expanded' data-auto-close='1' data-trigger='click')
-    ul.select.dropdown-menu(role='menu')
-        li(ng-repeat='item in $ctrl.gridOptions.categories|filter:{selectable:true}')
-            a(ng-click='$ctrl.toggleColumns(item, !item.visible)')
-                i.fa.fa-check-square-o.pull-left(ng-if='item.visible')
-                i.fa.fa-square-o.pull-left(ng-if='!item.visible')
-                span {{::item.name}}
-        li.divider
-        li
-            a(ng-click='$ctrl.selectAllColumns()') Select all
-        li
-            a(ng-click='$ctrl.clearAllColumns()') Clear all
-        li.divider
-        li
-            a(ng-click='$hide()') Close
-
-.panel.panel-default
-    .panel-heading.ui-grid-settings
-        +grid-settings
-        label Total users: 
-            strong {{ $ctrl.gridOptions.data.length }}&nbsp;&nbsp;&nbsp;
-        label Showing users:
-            strong {{ $ctrl.gridApi.grid.getVisibleRows().length }}
-            sub(ng-show='users.length === $ctrl.gridApi.grid.getVisibleRows().length') all
-
-        form.pull-right(ng-form=form novalidate)
-            -var form = 'admin'
-
-            button.btn.btn-primary(ng-click='$ctrl.exportCsv()' bs-tooltip data-title='Export table to csv') Export
-
-            .ui-grid-settings-dateperiod
-                +ignite-form-field-datepicker('Period:', '$ctrl.params.startDate', '"period"')
-
-            .ui-grid-settings-filter
-                +ignite-form-field-text('Exclude:', '$ctrl.params.companiesExclude', '"exclude"', false, false, 'Exclude by company name...')
-
-    .panel-collapse
-        .grid.ui-grid--ignite(ui-grid='$ctrl.gridOptions' ui-grid-resize-columns ui-grid-selection ui-grid-exporter ui-grid-pinning)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.tpl.pug b/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.tpl.pug
new file mode 100644
index 0000000..52975b9
--- /dev/null
+++ b/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.tpl.pug
@@ -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.
+
+include /app/helpers/jade/mixins
+include /app/components/form-field-datepicker/form-field-datepicker.pug
+
+mixin grid-settings()
+    i.fa.fa-bars(data-animation='am-flip-x' bs-dropdown='' aria-haspopup='true' aria-expanded='expanded' data-auto-close='1' data-trigger='click')
+    ul.select.dropdown-menu(role='menu')
+        li(ng-repeat='item in $ctrl.gridOptions.categories|filter:{selectable:true}')
+            a(ng-click='$ctrl.toggleColumns(item, !item.visible)')
+                i.fa.fa-check-square-o.pull-left(ng-if='item.visible')
+                i.fa.fa-square-o.pull-left(ng-if='!item.visible')
+                span {{::item.name}}
+        li.divider
+        li
+            a(ng-click='$ctrl.selectAllColumns()') Select all
+        li
+            a(ng-click='$ctrl.clearAllColumns()') Clear all
+        li.divider
+        li
+            a(ng-click='$hide()') Close
+
+.panel.panel-default
+    .panel-heading.ui-grid-settings
+        +grid-settings
+        label Total users: 
+            strong {{ $ctrl.gridOptions.data.length }}&nbsp;&nbsp;&nbsp;
+        label Showing users:
+            strong {{ $ctrl.gridApi.grid.getVisibleRows().length }}
+            sub(ng-show='users.length === $ctrl.gridApi.grid.getVisibleRows().length') all
+
+        form.pull-right(ng-form=form novalidate)
+            -var form = 'admin'
+
+            button.btn.btn-primary(ng-click='$ctrl.exportCsv()' bs-tooltip data-title='Export table to csv') Export
+
+            .ui-grid-settings-dateperiod
+                +ignite-form-field-datepicker('Period:', '$ctrl.params.startDate', '"period"')
+
+            .ui-grid-settings-filter
+                +ignite-form-field-text('Exclude:', '$ctrl.params.companiesExclude', '"exclude"', false, false, 'Exclude by company name...')
+
+    .panel-collapse
+        .grid.ui-grid--ignite(ui-grid='$ctrl.gridOptions' ui-grid-resize-columns ui-grid-selection ui-grid-exporter ui-grid-pinning)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.jade b/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.jade
deleted file mode 100644
index 7e44d94..0000000
--- a/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.jade
+++ /dev/null
@@ -1,27 +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.
-
-.ui-grid-header.ui-grid-header--subcategories(role='rowgroup')
-    .ui-grid-top-panel
-        .ui-grid-header-viewport
-            .ui-grid-header-canvas
-                .ui-grid-header-cell-wrapper(ng-style='colContainer.headerCellWrapperStyle()')
-                    .ui-grid-header-cell-row(role='row')
-                        .ui-grid-header-span.ui-grid-header-cell.ui-grid-clearfix(ng-repeat='cat in grid.options.categories')
-                            div(ng-show='(colContainer.renderedColumns|uiGridSubcategories:cat.name).length > 1')
-                                .ui-grid-cell-contents {{ cat.name }}
-                            .ui-grid-header-cell-row
-                                .ui-grid-header-cell.ui-grid-clearfix(ng-repeat='col in (colContainer.renderedColumns|uiGridSubcategories:cat.name) track by col.uid' ui-grid-header-cell='' col='col' render-index='$index')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.scss b/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.scss
index c390504..c6e7bdf 100644
--- a/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.scss
+++ b/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.scss
@@ -50,6 +50,7 @@
     .ui-grid-header-span {
         position: relative;
         border-right: 0;
+        background: #f5f5f5;
 
         .ng-hide + .ui-grid-header-cell-row .ui-grid-header-cell {
             height: 58px;

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.tpl.pug b/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.tpl.pug
new file mode 100644
index 0000000..7e44d94
--- /dev/null
+++ b/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.tpl.pug
@@ -0,0 +1,27 @@
+//-
+    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.
+
+.ui-grid-header.ui-grid-header--subcategories(role='rowgroup')
+    .ui-grid-top-panel
+        .ui-grid-header-viewport
+            .ui-grid-header-canvas
+                .ui-grid-header-cell-wrapper(ng-style='colContainer.headerCellWrapperStyle()')
+                    .ui-grid-header-cell-row(role='row')
+                        .ui-grid-header-span.ui-grid-header-cell.ui-grid-clearfix(ng-repeat='cat in grid.options.categories')
+                            div(ng-show='(colContainer.renderedColumns|uiGridSubcategories:cat.name).length > 1')
+                                .ui-grid-cell-contents {{ cat.name }}
+                            .ui-grid-header-cell-row
+                                .ui-grid-header-cell.ui-grid-clearfix(ng-repeat='col in (colContainer.renderedColumns|uiGridSubcategories:cat.name) track by col.uid' ui-grid-header-cell='' col='col' render-index='$index')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/ui-grid-settings/ui-grid-settings.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ui-grid-settings/ui-grid-settings.jade b/modules/web-console/frontend/app/components/ui-grid-settings/ui-grid-settings.jade
deleted file mode 100644
index 8f1487e..0000000
--- a/modules/web-console/frontend/app/components/ui-grid-settings/ui-grid-settings.jade
+++ /dev/null
@@ -1,33 +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.
-
-mixin ui-grid-settings()
-    .ui-grid-settings
-        i.fa.fa-bars(data-animation='am-flip-x' bs-dropdown='' aria-haspopup='true' aria-expanded='expanded' data-auto-close='1' data-trigger='click')
-        ul.select.dropdown-menu(role='menu')
-            li(ng-repeat='item in paragraph.gridOptions.categories|filter:{selectable:true}')
-                a(ng-click='paragraph.toggleColumns(item, !item.visible)')
-                    i.fa.fa-check-square-o.pull-left(ng-if='item.visible')
-                    i.fa.fa-square-o.pull-left(ng-if='!item.visible')
-                    span {{::item.name}}
-            li.divider
-            li
-                a(ng-click='paragraph.selectAllColumns()') Select all
-            li
-                a(ng-click='paragraph.clearAllColumns()') Clear all
-            li.divider
-            li
-                a(ng-click='$hide()') Close

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/components/ui-grid-settings/ui-grid-settings.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ui-grid-settings/ui-grid-settings.pug b/modules/web-console/frontend/app/components/ui-grid-settings/ui-grid-settings.pug
new file mode 100644
index 0000000..8f1487e
--- /dev/null
+++ b/modules/web-console/frontend/app/components/ui-grid-settings/ui-grid-settings.pug
@@ -0,0 +1,33 @@
+//-
+    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.
+
+mixin ui-grid-settings()
+    .ui-grid-settings
+        i.fa.fa-bars(data-animation='am-flip-x' bs-dropdown='' aria-haspopup='true' aria-expanded='expanded' data-auto-close='1' data-trigger='click')
+        ul.select.dropdown-menu(role='menu')
+            li(ng-repeat='item in paragraph.gridOptions.categories|filter:{selectable:true}')
+                a(ng-click='paragraph.toggleColumns(item, !item.visible)')
+                    i.fa.fa-check-square-o.pull-left(ng-if='item.visible')
+                    i.fa.fa-square-o.pull-left(ng-if='!item.visible')
+                    span {{::item.name}}
+            li.divider
+            li
+                a(ng-click='paragraph.selectAllColumns()') Select all
+            li
+                a(ng-click='paragraph.clearAllColumns()') Clear all
+            li.divider
+            li
+                a(ng-click='$hide()') Close

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/centered/centered.css
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/centered/centered.css b/modules/web-console/frontend/app/directives/centered/centered.css
deleted file mode 100644
index 694c1d2..0000000
--- a/modules/web-console/frontend/app/directives/centered/centered.css
+++ /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.
- */
-
-.center-container {
-    position: fixed;
-    top: 0;
-    left: 0;
-    height: 100%;
-    width: 100%;
-    display: table;
-    pointer-events: none;
-    z-index: 9999;
-}
-
-.centered {
-    display: table-cell;
-    vertical-align: middle;
-    text-align: center;
-}
-
-.centered > * {
-    pointer-events: auto;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/centered/centered.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/centered/centered.directive.js b/modules/web-console/frontend/app/directives/centered/centered.directive.js
index 4abd086..77bbb94 100644
--- a/modules/web-console/frontend/app/directives/centered/centered.directive.js
+++ b/modules/web-console/frontend/app/directives/centered/centered.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import './centered.css';
+import './centered.scss';
 
 export default ['centered', [() => {
     return {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/centered/centered.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/centered/centered.scss b/modules/web-console/frontend/app/directives/centered/centered.scss
new file mode 100644
index 0000000..694c1d2
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/centered/centered.scss
@@ -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.
+ */
+
+.center-container {
+    position: fixed;
+    top: 0;
+    left: 0;
+    height: 100%;
+    width: 100%;
+    display: table;
+    pointer-events: none;
+    z-index: 9999;
+}
+
+.centered {
+    display: table-cell;
+    vertical-align: middle;
+    text-align: center;
+}
+
+.centered > * {
+    pointer-events: auto;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/information/information.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/information/information.directive.js b/modules/web-console/frontend/app/directives/information/information.directive.js
index a9a2f8c..6f304ef 100644
--- a/modules/web-console/frontend/app/directives/information/information.directive.js
+++ b/modules/web-console/frontend/app/directives/information/information.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import templateUrl from './information.jade';
+import template from './information.pug';
 
 export default ['igniteInformation', [() => {
     return {
@@ -23,7 +23,7 @@ export default ['igniteInformation', [() => {
             title: '@'
         },
         restrict: 'E',
-        templateUrl,
+        template,
         replace: true,
         transclude: true
     };

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/information/information.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/information/information.jade b/modules/web-console/frontend/app/directives/information/information.jade
deleted file mode 100644
index b805d4a..0000000
--- a/modules/web-console/frontend/app/directives/information/information.jade
+++ /dev/null
@@ -1,20 +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.
-
-.block-information
-    span.icon.fa.fa-info-circle(ng-if='title')
-    h3(ng-if='title') {{::title}}
-    div(ng-transclude='')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/information/information.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/information/information.pug b/modules/web-console/frontend/app/directives/information/information.pug
new file mode 100644
index 0000000..b805d4a
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/information/information.pug
@@ -0,0 +1,20 @@
+//-
+    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.
+
+.block-information
+    span.icon.fa.fa-info-circle(ng-if='title')
+    h3(ng-if='title') {{::title}}
+    div(ng-transclude='')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js
index 08e4f76..9042acb 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import templateUrl from './ui-ace-docker.jade';
+import template from './ui-ace-docker.pug';
 import controller from './ui-ace-docker.controller';
 
 export default ['igniteUiAceDocker', [() => {
@@ -38,7 +38,7 @@ export default ['igniteUiAceDocker', [() => {
             data: '=ngModel'
         },
         link,
-        templateUrl,
+        template,
         controller,
         controllerAs: 'ctrl',
         require: ['?^igniteUiAceTabs']

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.jade b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.jade
deleted file mode 100644
index 3a24cfb..0000000
--- a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.jade
+++ /dev/null
@@ -1,31 +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.
-
-mixin hard-link(ref, txt)
-    a(style='color:#ec1c24' href=ref target='_blank') #{txt}
-
-.panel-details-noborder
-    .details-row
-        p
-            +hard-link('https://docs.docker.com/engine/reference/builder/', 'Docker')
-            | &nbsp;file is a text file with instructions to create Docker image.<br/>
-            | To build image you have to store following Docker file with your Ignite XML configuration to the same directory.<br>
-            | Also you could use predefined&nbsp;
-            +hard-link('https://ignite.apache.org/download.html#docker', 'Apache Ignite docker image')
-            | . For more information about using Ignite with Docker please read&nbsp;
-            +hard-link('http://apacheignite.readme.io/docs/docker-deployment', 'documentation')
-            |.
-    .details-row(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, mode: "dockerfile"}' ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.pug b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.pug
new file mode 100644
index 0000000..3a24cfb
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.pug
@@ -0,0 +1,31 @@
+//-
+    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.
+
+mixin hard-link(ref, txt)
+    a(style='color:#ec1c24' href=ref target='_blank') #{txt}
+
+.panel-details-noborder
+    .details-row
+        p
+            +hard-link('https://docs.docker.com/engine/reference/builder/', 'Docker')
+            | &nbsp;file is a text file with instructions to create Docker image.<br/>
+            | To build image you have to store following Docker file with your Ignite XML configuration to the same directory.<br>
+            | Also you could use predefined&nbsp;
+            +hard-link('https://ignite.apache.org/download.html#docker', 'Apache Ignite docker image')
+            | . For more information about using Ignite with Docker please read&nbsp;
+            +hard-link('http://apacheignite.readme.io/docs/docker-deployment', 'documentation')
+            |.
+    .details-row(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, mode: "dockerfile"}' ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.directive.js b/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.directive.js
index c21bff7..5f43b23 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.directive.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import templateUrl from './ui-ace-java.jade';
+import template from './ui-ace-java.pug';
 import controller from './ui-ace-java.controller';
 
 export default ['igniteUiAceJava', [() => {
@@ -55,7 +55,7 @@ export default ['igniteUiAceJava', [() => {
             client: '@'
         },
         link,
-        templateUrl,
+        template,
         controller,
         controllerAs: 'ctrl',
         require: ['igniteUiAceJava', '?^igniteUiAceTabs', '?^form', '?ngModel']

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.jade b/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.jade
deleted file mode 100644
index 5acffb8..0000000
--- a/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.jade
+++ /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.
-
-div(ng-if='ctrl.data' 
-    ignite-ace='{onLoad: onLoad, \
-             onChange: onChange, \
-             renderOptions: renderOptions, \
-             mode: "java"}' 
-    ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.pug b/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.pug
new file mode 100644
index 0000000..5acffb8
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.pug
@@ -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.
+
+div(ng-if='ctrl.data' 
+    ignite-ace='{onLoad: onLoad, \
+             onChange: onChange, \
+             renderOptions: renderOptions, \
+             mode: "java"}' 
+    ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
index 7c224b7..8a8d047 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import templateUrl from './ui-ace-pojos.jade';
+import template from './ui-ace-pojos.pug';
 import controller from './ui-ace-pojos.controller';
 
 export default ['igniteUiAcePojos', [() => {
@@ -38,7 +38,7 @@ export default ['igniteUiAcePojos', [() => {
             pojos: '=ngModel'
         },
         link,
-        templateUrl,
+        template,
         controller,
         controllerAs: 'ctrl',
         require: ['?^igniteUiAceTabs']

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.jade b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.jade
deleted file mode 100644
index 581b8c1..0000000
--- a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.jade
+++ /dev/null
@@ -1,40 +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.
-
-mixin check-tooltip(message)
-    i.tipLabel.icon-help(bs-tooltip='"#{message}"')
-
-.panel-details-noborder
-    .details-row
-        .col-xs-2.col-sm-2.col-md-2
-            label POJO class:
-        .col-xs-10.col-sm-10.col-md-10.summary-pojo-list
-            button.select-toggle.form-control(ng-model='ctrl.class' bs-select bs-options='item for item in ctrl.classes' data-container='')
-    .details-row.checkbox
-        .col-xs-2.col-sm-2.col-md-2
-        .col-xs-10.col-sm-10.col-md-10
-            label
-                input(type='checkbox' ng-model='ctrl.useConstructor')
-                | Generate constructors
-            +check-tooltip("Generate empty and full constructors in POJO classes")
-    .details-row.checkbox
-        .col-xs-2.col-sm-2.col-md-2
-        .col-xs-10.col-sm-10.col-md-10
-            label
-                input(type='checkbox' ng-model='ctrl.includeKeyFields')
-                | Include key fields
-            +check-tooltip("Generate key fields in POJO value class")
-    .details-row(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, mode: "java"}' ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.pug b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.pug
new file mode 100644
index 0000000..4bee5e5
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.pug
@@ -0,0 +1,40 @@
+//-
+    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.
+
+mixin check-tooltip(message)
+    i.tipLabel.icon-help(bs-tooltip=`"${message}"`)
+
+.panel-details-noborder
+    .details-row
+        .col-xs-2.col-sm-2.col-md-2
+            label POJO class:
+        .col-xs-10.col-sm-10.col-md-10.summary-pojo-list
+            button.select-toggle.form-control(ng-model='ctrl.class' bs-select bs-options='item for item in ctrl.classes' data-container='')
+    .details-row.checkbox
+        .col-xs-2.col-sm-2.col-md-2
+        .col-xs-10.col-sm-10.col-md-10
+            label
+                input(type='checkbox' ng-model='ctrl.useConstructor')
+                | Generate constructors
+            +check-tooltip("Generate empty and full constructors in POJO classes")
+    .details-row.checkbox
+        .col-xs-2.col-sm-2.col-md-2
+        .col-xs-10.col-sm-10.col-md-10
+            label
+                input(type='checkbox' ng-model='ctrl.includeKeyFields')
+                | Include key fields
+            +check-tooltip("Generate key fields in POJO value class")
+    .details-row(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, mode: "java"}' ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js
index 2a7a878..664d3a0 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import templateUrl from './ui-ace-pom.jade';
+import template from './ui-ace-pom.pug';
 import controller from './ui-ace-pom.controller';
 
 export default ['igniteUiAcePom', [() => {
@@ -33,7 +33,7 @@ export default ['igniteUiAcePom', [() => {
             cluster: '='
         },
         link,
-        templateUrl,
+        template,
         controller,
         controllerAs: 'ctrl',
         require: ['?^igniteUiAceTabs']

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.jade b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.jade
deleted file mode 100644
index b973a74..0000000
--- a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.jade
+++ /dev/null
@@ -1,17 +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.
-
-div(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, mode: "xml"}' ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.pug b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.pug
new file mode 100644
index 0000000..b973a74
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.pug
@@ -0,0 +1,17 @@
+//-
+    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.
+
+div(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, mode: "xml"}' ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.directive.js b/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.directive.js
index 5d9ad79..5a37b80 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.directive.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import templateUrl from './ui-ace-sharp.jade';
+import template from './ui-ace-sharp.pug';
 import controller from './ui-ace-sharp.controller';
 
 export default ['igniteUiAceSharp', ['IgniteSharpTransformer', (generator) => {
@@ -125,7 +125,7 @@ export default ['igniteUiAceSharp', ['IgniteSharpTransformer', (generator) => {
             data: '=?ngModel'
         },
         link,
-        templateUrl,
+        template,
         controller,
         controllerAs: 'ctrl',
         require: ['igniteUiAceSharp', '?^igniteUiAceTabs', '?^form', '?ngModel']

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.jade b/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.jade
deleted file mode 100644
index d3f9e44..0000000
--- a/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.jade
+++ /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.
-
-div(ng-if='ctrl.data' 
-    ignite-ace='{onLoad: onLoad, \
-             onChange: onChange, \
-             renderOptions: renderOptions, \
-             mode: "csharp"}'
-    ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.pug b/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.pug
new file mode 100644
index 0000000..d3f9e44
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.pug
@@ -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.
+
+div(ng-if='ctrl.data' 
+    ignite-ace='{onLoad: onLoad, \
+             onChange: onChange, \
+             renderOptions: renderOptions, \
+             mode: "csharp"}'
+    ng-model='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.directive.js b/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.directive.js
index 42d25b6..de3f434 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.directive.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.directive.js
@@ -17,7 +17,7 @@
 
 import _ from 'lodash';
 
-import templateUrl from './ui-ace-spring.jade';
+import template from './ui-ace-spring.pug';
 import controller from './ui-ace-spring.controller';
 
 export default ['igniteUiAceSpring', [() => {
@@ -58,7 +58,7 @@ export default ['igniteUiAceSpring', [() => {
             client: '@'
         },
         link,
-        templateUrl,
+        template,
         controller,
         controllerAs: 'ctrl',
         require: ['igniteUiAceSpring', '?^igniteUiAceTabs', '?^form', '?ngModel']


[26/50] [abbrv] ignite git commit: IGNITE-4770 Script inside javadoc bottom cause compilation error at 1.8.0_121-b13

Posted by sb...@apache.org.
IGNITE-4770 Script inside javadoc bottom cause compilation error at 1.8.0_121-b13


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

Branch: refs/heads/ignite-4705-2
Commit: 0be92732ec4dcc683b1dbeea6c027c4076579847
Parents: bcdba2a
Author: Vyacheslav Daradur <da...@gmail.com>
Authored: Thu Mar 2 15:57:21 2017 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Thu Mar 2 15:57:21 2017 +0300

----------------------------------------------------------------------
 .../apache/ignite/tools/ant/beautifier/GridJavadocAntTask.java    | 1 +
 parent/pom.xml                                                    | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0be92732/modules/tools/src/main/java/org/apache/ignite/tools/ant/beautifier/GridJavadocAntTask.java
----------------------------------------------------------------------
diff --git a/modules/tools/src/main/java/org/apache/ignite/tools/ant/beautifier/GridJavadocAntTask.java b/modules/tools/src/main/java/org/apache/ignite/tools/ant/beautifier/GridJavadocAntTask.java
index e654231..d34b4e4 100644
--- a/modules/tools/src/main/java/org/apache/ignite/tools/ant/beautifier/GridJavadocAntTask.java
+++ b/modules/tools/src/main/java/org/apache/ignite/tools/ant/beautifier/GridJavadocAntTask.java
@@ -282,6 +282,7 @@ public class GridJavadocAntTask extends MatchingTask {
                             "<script type='text/javascript'>" +
                                 "SyntaxHighlighter.all();" +
                                 "dp.SyntaxHighlighter.HighlightAll('code');" +
+                                "!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');" +
                             "</script>\n" +
                             "</body>\n");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0be92732/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index a17732d..32da7ec 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -469,7 +469,6 @@
                                         </td>
                                         <td width="100%" align="right" valign="center">
                                             <a href="https://twitter.com/ApacheIgnite" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @ApacheIgnite</a>
-                                            <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
                                         </td>
                                     </tr>
                                     <tr>
@@ -937,7 +936,7 @@
                 <jdk>[1.8,)</jdk>
             </activation>
             <properties>
-                <javadoc.opts>-Xdoclint:none --allow-script-in-comments</javadoc.opts>
+                <javadoc.opts>-Xdoclint:none</javadoc.opts>
             </properties>
             <build>
                 <plugins>


[20/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/mixins.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/mixins.pug b/modules/web-console/frontend/app/helpers/jade/mixins.pug
new file mode 100644
index 0000000..db175a2
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/mixins.pug
@@ -0,0 +1,609 @@
+//-
+    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.
+
+include ./form
+
+//- Mixin for advanced options toggle.
+mixin advanced-options-toggle(click, cond, showMessage, hideMessage)
+    .advanced-options
+        i.fa(ng-click=`${click}` ng-class=`${cond} ? 'fa-chevron-circle-down' : 'fa-chevron-circle-right'`)
+        a(ng-click=click) {{ #{cond} ? '#{hideMessage}' : '#{showMessage}' }}
+
+//- Mixin for advanced options toggle with default settings.
+mixin advanced-options-toggle-default
+    +advanced-options-toggle('toggleExpanded()', 'ui.expanded', 'Show advanced settings...', 'Hide advanced settings...')
+
+//- Mixin for main table on screen with list of items.
+mixin main-table(title, rows, focusId, click, rowTemplate, searchField)
+    .padding-bottom-dflt(ng-show=`${rows} && ${rows}.length > 0`)
+        table.links(st-table='displayedRows' st-safe-src=`${rows}`)
+            thead
+                tr
+                    th
+                        lable.labelHeader.labelFormField #{title}:
+                        .col-sm-3.pull-right(style='padding: 0')
+                            input.form-control(type='text' st-search=`${searchField}` placeholder=`Filter ${title}...`)
+            tbody
+                tr
+                    td
+                        .scrollable-y(ng-show='displayedRows.length > 0' style='max-height: 200px')
+                            table
+                                tbody
+                                    tr(ng-repeat='row in displayedRows track by row._id' ignite-bs-affix-update)
+                                        td
+                                            a(ng-class='{active: row._id == selectedItem._id}' ignite-on-click-focus=focusId ng-click=click) #{rowTemplate}
+                        label.placeholder(ng-show='displayedRows.length == 0') No #{title} found
+
+//- Mixin with save, remove, clone and undo buttons.
+mixin save-remove-clone-undo-buttons(objectName)
+    -var removeTip = '"Remove current ' + objectName + '"'
+    -var cloneTip = '"Clone current ' + objectName + '"'
+    -var undoTip = '"Undo all changes for current ' + objectName + '"'
+
+    div(ng-show='contentVisible()' style='display: inline-block;')
+        .panel-tip-container(ng-hide='!backupItem || backupItem._id')
+            a.btn.btn-primary(ng-disabled='!ui.inputForm.$dirty' ng-click='ui.inputForm.$dirty && saveItem()' bs-tooltip='' data-title=`{{saveBtnTipText(ui.inputForm.$dirty, '${objectName}')}}` data-placement='bottom' data-trigger='hover') Save
+        .panel-tip-container(ng-show='backupItem._id')
+            a.btn.btn-primary(id='save-item' ng-disabled='!ui.inputForm.$dirty' ng-click='ui.inputForm.$dirty && saveItem()' bs-tooltip='' data-title=`{{saveBtnTipText(ui.inputForm.$dirty, '${objectName}')}}` data-placement='bottom' data-trigger='hover') Save
+        .panel-tip-container(ng-show='backupItem._id')
+            a.btn.btn-primary(id='clone-item' ng-click='cloneItem()' bs-tooltip=cloneTip data-placement='bottom' data-trigger='hover') Clone
+        .btn-group.panel-tip-container(ng-show='backupItem._id')
+            button.btn.btn-primary(id='remove-item' ng-click='removeItem()' bs-tooltip=removeTip data-placement='bottom' data-trigger='hover') Remove
+            button.btn.dropdown-toggle.btn-primary(id='remove-item-dropdown' data-toggle='dropdown' data-container='body' bs-dropdown='[{ text: "Remove All", click: "removeAllItems()" }]' data-placement='bottom-right')
+                span.caret
+        .panel-tip-container(ng-show='backupItem')
+            i.btn.btn-primary.fa.fa-undo(id='undo-item' ng-disabled='!ui.inputForm.$dirty' ng-click='ui.inputForm.$dirty && resetAll()' bs-tooltip=undoTip data-placement='bottom' data-trigger='hover')
+
+//- Mixin for feedback on specified error.
+mixin error-feedback(visible, error, errorMessage, name)
+    i.fa.fa-exclamation-triangle.form-control-feedback(
+        ng-if=visible
+        bs-tooltip=`'${errorMessage}'`
+        ignite-error=error
+        ignite-error-message=errorMessage
+        name=name
+    )
+
+//- Mixin for feedback on unique violation.
+mixin unique-feedback(name, errorMessage)
+    +form-field-feedback(name, 'igniteUnique', errorMessage)
+
+//- Mixin for feedback on IP address violation.
+mixin ipaddress-feedback(name)
+    +form-field-feedback(name, 'ipaddress', 'Invalid address!')
+
+//- Mixin for feedback on port of IP address violation.
+mixin ipaddress-port-feedback(name)
+    +form-field-feedback(name, 'ipaddressPort', 'Invalid port!')
+
+//- Mixin for feedback on port range violation.
+mixin ipaddress-port-range-feedback(name)
+    +form-field-feedback(name, 'ipaddressPortRange', 'Invalid port range!')
+
+//- Mixin for feedback on UUID violation.
+mixin uuid-feedback(name)
+    +form-field-feedback(name, 'uuid', 'Invalid node ID!')
+
+//- Function that convert enabled state to corresponding disabled state.
+-var enabledToDisabled = function (enabled) {
+-    return (enabled === false || enabled === true) ? !enabled : '!(' + enabled + ')';
+-}
+
+//- Mixin for checkbox.
+mixin checkbox(lbl, model, name, tip)
+    +form-field-checkbox(lbl, model, name, false, false, tip)
+
+//- Mixin for checkbox with enabled condition.
+mixin checkbox-enabled(lbl, model, name, enabled, tip)
+    +form-field-checkbox(lbl, model, name, enabledToDisabled(enabled), false, tip)
+
+//- Mixin for Java class name field with auto focus condition.
+mixin java-class-autofocus-placholder(lbl, model, name, enabled, required, autofocus, placeholder, tip, validationActive)
+    -var errLbl = lbl.substring(0, lbl.length - 1)
+
+    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, placeholder, tip)(
+        data-java-identifier='true'
+        data-java-package-specified='true'
+        data-java-keywords='true'
+        data-java-built-in-class='true'
+        data-ignite-form-field-input-autofocus=autofocus
+        data-validation-active=validationActive ? `{{ ${validationActive} }}` : `'always'`
+    )
+        if  block
+            block
+
+        +form-field-feedback(name, 'javaBuiltInClass', errLbl + ' should not be the Java built-in class!')
+        +form-field-feedback(name, 'javaKeywords', errLbl + ' could not contains reserved Java keyword!')
+        +form-field-feedback(name, 'javaPackageSpecified', errLbl + ' does not have package specified!')
+        +form-field-feedback(name, 'javaIdentifier', errLbl + ' is invalid Java identifier!')
+
+//- Mixin for Java class name field with auto focus condition.
+mixin java-class-autofocus(lbl, model, name, enabled, required, autofocus, tip, validationActive)
+    +java-class-autofocus-placholder(lbl, model, name, enabled, required, autofocus, 'Enter fully qualified class name', tip, validationActive)
+        if  block
+            block
+
+//- Mixin for Java class name field.
+mixin java-class(lbl, model, name, enabled, required, tip, validationActive)
+    +java-class-autofocus(lbl, model, name, enabled, required, 'false', tip, validationActive)
+        if  block
+            block
+
+//- Mixin for text field with enabled condition with options.
+mixin java-class-typeahead(lbl, model, name, options, enabled, required, placeholder, tip, validationActive)
+    -var errLbl = lbl.substring(0, lbl.length - 1)
+
+    +form-field-datalist(lbl, model, name, enabledToDisabled(enabled), required, placeholder, options, tip)(
+        data-java-identifier='true'
+        data-java-package-specified='allow-built-in'
+        data-java-keywords='true'
+        data-validation-active=validationActive ? `{{ ${validationActive} }}` : `'always'`
+    )
+        +form-field-feedback(name, 'javaKeywords', errLbl + ' could not contains reserved Java keyword!')
+        +form-field-feedback(name, 'javaPackageSpecified', errLbl + ' does not have package specified!')
+        +form-field-feedback(name, 'javaIdentifier', errLbl + ' is invalid Java identifier!')
+
+//- Mixin for java package field with enabled condition.
+mixin java-package(lbl, model, name, enabled, required, tip)
+    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, 'Enter package name', tip)(
+        data-java-keywords='true'
+        data-java-package-name='package-only'
+    )
+        +form-field-feedback(name, 'javaPackageName', 'Package name is invalid')
+        +form-field-feedback(name, 'javaKeywords', 'Package name could not contains reserved java keyword')
+
+//- Mixin for text field with IP address check.
+mixin text-ip-address(lbl, model, name, enabled, placeholder, tip)
+    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), false, placeholder, tip)(data-ipaddress='true')
+        +ipaddress-feedback(name)
+
+//- Mixin for text field with IP address and port range check.
+mixin text-ip-address-with-port-range(lbl, model, name, enabled, placeholder, tip)
+    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), false, placeholder, tip)(data-ipaddress='true' data-ipaddress-with-port='true' data-ipaddress-with-port-range='true')
+        +ipaddress-feedback(name)
+        +ipaddress-port-feedback(name)
+        +ipaddress-port-range-feedback(name)
+
+//- Mixin for text field.
+mixin text-enabled(lbl, model, name, enabled, required, placeholder, tip)
+    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, placeholder, tip)
+        if  block
+            block
+
+//- Mixin for text field with autofocus.
+mixin text-enabled-autofocus(lbl, model, name, enabled, required, placeholder, tip)
+    +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, placeholder, tip)(
+        data-ignite-form-field-input-autofocus='true'
+    )
+        if  block
+            block
+
+//- Mixin for text field.
+mixin text(lbl, model, name, required, placeholder, tip)
+    +ignite-form-field-text(lbl, model, name, false, required, placeholder, tip)
+        if  block
+            block
+
+//- Mixin for password field.
+mixin password(lbl, model, name, required, placeholder, tip)
+    +ignite-form-field-password(lbl, model, name, false, required, placeholder, tip)
+        if  block
+            block
+
+//- Mixin for text field with enabled condition with options.
+mixin text-options(lbl, model, name, options, enabled, required, placeholder, tip)
+    +form-field-datalist(lbl, model, name, enabledToDisabled(enabled), required, placeholder, options, tip)
+
+//- Mixin for required numeric field.
+mixin number-required(lbl, model, name, enabled, required, placeholder, min, tip)
+    +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), required, placeholder, min, false, false, tip)
+
+//- Mixin for required numeric field with maximum and minimum limit.
+mixin number-min-max(lbl, model, name, enabled, placeholder, min, max, tip)
+    +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), false, placeholder, min, max, '1', tip)
+
+//- Mixin for required numeric field with maximum and minimum limit.
+mixin number-min-max-step(lbl, model, name, enabled, placeholder, min, max, step, tip)
+    +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), false, placeholder, min, max, step, tip)
+
+//- Mixin for numeric field.
+mixin number(lbl, model, name, enabled, placeholder, min, tip)
+    +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), false, placeholder, min, false, false, tip)
+
+//- Mixin for required dropdown field.
+mixin dropdown-required-empty(lbl, model, name, enabled, required, placeholder, placeholderEmpty, options, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, placeholderEmpty, options, tip)
+        if  block
+            block
+
+//- Mixin for required dropdown field with autofocus.
+mixin dropdown-required-empty-autofocus(lbl, model, name, enabled, required, placeholder, placeholderEmpty, options, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, placeholderEmpty, options, tip)(
+        data-ignite-form-field-input-autofocus='true'
+    )
+        if  block
+            block
+
+//- Mixin for required dropdown field.
+mixin dropdown-required(lbl, model, name, enabled, required, placeholder, options, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, '', options, tip)
+        if  block
+            block
+
+//- Mixin for required dropdown field with autofocus.
+mixin dropdown-required-autofocus(lbl, model, name, enabled, required, placeholder, options, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, '', options, tip)(
+        data-ignite-form-field-input-autofocus='true'
+    )
+        if  block
+            block
+
+//- Mixin for dropdown field.
+mixin dropdown(lbl, model, name, enabled, placeholder, options, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), false, false, placeholder, '', options, tip)
+        if  block
+            block
+
+//- Mixin for dropdown-multiple field.
+mixin dropdown-multiple(lbl, model, name, enabled, placeholder, placeholderEmpty, options, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), false, true, placeholder, placeholderEmpty, options, tip)
+        if  block
+            block
+
+//- Mixin for table text field.
+mixin table-text-field(name, model, items, valid, save, placeholder, newItem)
+    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
+    -var onEnter = `${valid} && (${save}); ${valid} && ${resetOnEnter};`
+
+    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
+
+    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
+    -var onBlur = `${valid} && (${save}); ${resetOnBlur};`
+
+    div(ignite-on-focus-out=onBlur)
+        if block
+            block
+
+        .input-tip
+            +ignite-form-field-input(name, model, false, 'true', placeholder)(
+                data-ignite-unique=items
+                data-ignite-form-field-input-autofocus='true'
+
+                ignite-on-enter=onEnter
+                ignite-on-escape=onEscape
+            )
+
+//- Mixin for table java class field.
+mixin table-java-class-field(lbl, name, model, items, valid, save, newItem)
+    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
+    -var onEnter = `${valid} && (${save}); ${valid} && ${resetOnEnter};`
+
+    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
+
+    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
+    -var onBlur = `${valid} && (${save}); ${resetOnBlur};`
+
+    div(ignite-on-focus-out=onBlur)
+        +form-field-feedback(name, 'javaBuiltInClass', lbl + ' should not be the Java built-in class!')
+        +form-field-feedback(name, 'javaKeywords', lbl + ' could not contains reserved Java keyword!')
+        +form-field-feedback(name, 'javaPackageSpecified', lbl + ' does not have package specified!')
+        +form-field-feedback(name, 'javaIdentifier', lbl + ' is invalid Java identifier!')
+
+        if block
+            block
+
+        .input-tip
+            +ignite-form-field-input(name, model, false, 'true', 'Enter fully qualified class name')(
+                data-java-identifier='true'
+                data-java-package-specified='true'
+                data-java-keywords='true'
+                data-java-built-in-class='true'
+
+                data-ignite-unique=items
+                data-ignite-form-field-input-autofocus='true'
+
+                ignite-on-enter=onEnter
+                ignite-on-escape=onEscape
+            )
+
+//- Mixin for table java package field.
+mixin table-java-package-field(name, model, items, valid, save, newItem)
+    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
+    -var onEnter = `${valid} && (${save}); ${valid} && ${resetOnEnter};`
+
+    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
+
+    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
+    -var onBlur = `${valid} && (${save}); ${resetOnBlur};`
+
+    div(ignite-on-focus-out=onBlur)
+        +form-field-feedback(name, 'javaKeywords', 'Package name could not contains reserved Java keyword!')
+        +form-field-feedback(name, 'javaPackageName', 'Package name is invalid!')
+
+        if block
+            block
+
+        .input-tip
+            +ignite-form-field-input(name, model, false, 'true', 'Enter package name')(
+                data-java-keywords='true'
+                data-java-package-name='package-only'
+
+                data-ignite-unique=items
+                data-ignite-form-field-input-autofocus='true'
+
+                ignite-on-enter=onEnter
+                ignite-on-escape=onEscape
+            )
+
+//- Mixin for table java package field.
+mixin table-url-field(name, model, items, valid, save, newItem)
+    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
+    -var onEnter = `${valid} && (${save}); ${valid} && ${resetOnEnter};`
+
+    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
+
+    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
+    -var onBlur = `${valid} && (${save}); ${resetOnBlur};`
+
+    div(ignite-on-focus-out=onBlur)
+        if block
+            block
+
+        .input-tip
+            +ignite-form-field-url-input(name, model, false, 'true', 'Enter URL')(
+                data-ignite-unique=items
+                data-ignite-form-field-input-autofocus='true'
+
+                ignite-on-enter=onEnter
+                ignite-on-escape=onEscape
+            )
+
+//- Mixin for table address field.
+mixin table-address-field(name, model, items, valid, save, newItem, portRange)
+    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
+    -var onEnter = `${valid} && (${save}); ${valid} && ${resetOnEnter};`
+
+    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
+
+    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
+    -var onBlur = `${valid} && (${save}); ${resetOnBlur};`
+
+    div(ignite-on-focus-out=onBlur)
+        +ipaddress-feedback(name)
+        +ipaddress-port-feedback(name)
+        +ipaddress-port-range-feedback(name)
+        +form-field-feedback(name, 'required', 'IP address:port could not be empty!')
+
+        if block
+            block
+
+        .input-tip
+            +ignite-form-field-input(name, model, false, 'true', 'IP address:port')(
+                data-ipaddress='true'
+                data-ipaddress-with-port='true'
+                data-ipaddress-with-port-range=portRange ? 'true' : null
+                data-ignite-unique=items
+                data-ignite-form-field-input-autofocus='true'
+
+                ignite-on-enter=onEnter
+                ignite-on-escape=onEscape
+            )
+
+//- Mixin for table UUID field.
+mixin table-uuid-field(name, model, items, valid, save, newItem)
+    -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
+    -var onEnter = `${valid} && (${save}); ${valid} && ${resetOnEnter};`
+
+    -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
+
+    -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
+    -var onBlur = `${valid} && (${save}); ${resetOnBlur};`
+
+    div(ignite-on-focus-out=onBlur)
+        if block
+            block
+
+        .input-tip
+            +ignite-form-field-input(name, model, false, 'true', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')(
+                data-uuid='true'
+                data-ignite-unique=items
+                data-ignite-form-field-input-autofocus='true'
+
+                ignite-on-enter=onEnter
+                ignite-on-escape=onEscape
+            )
+
+//- Mixin for table save button.
+   "||" used instead of "&&" to workaround escaping of "&&" to "&amp;&amp;"
+mixin table-save-button(valid, save, newItem)
+    -var reset = newItem ? 'group.add = []' : 'field.edit = false'
+
+    i.fa.fa-floppy-o.form-field-save(
+        ng-show=valid
+        ng-click=`!(${valid}) || (${save}); !(${valid}) || (${reset});`
+        bs-tooltip
+        data-title='Click icon or press [Enter] to save item'
+    )
+
+//- Mixin for table remove button.
+mixin table-remove-conditional-button(items, show, tip, row)
+    i.tipField.fa.fa-remove(
+        ng-hide=`!${show} || field.edit`
+        bs-tooltip
+        data-title=tip
+        ng-click=`${items}.splice(${items}.indexOf(${row}), 1)`
+    )
+
+//- Mixin for table remove button.
+mixin table-remove-button(items, tip)
+    +table-remove-conditional-button(items, 'true', tip, 'model')
+
+//- Mixin for cache mode.
+mixin cacheMode(lbl, model, name, placeholder)
+    +dropdown(lbl, model, name, 'true', placeholder,
+        '[\
+            {value: "LOCAL", label: "LOCAL"},\
+            {value: "REPLICATED", label: "REPLICATED"},\
+            {value: "PARTITIONED", label: "PARTITIONED"}\
+        ]',
+        '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>'
+    )
+
+//- Mixin for eviction policy.
+mixin evictionPolicy(model, name, enabled, required, tip)
+    -var kind = model + '.kind'
+    -var policy = model + '[' + kind + ']'
+
+    +dropdown-required('Eviction policy:', kind, name + '+ "Kind"', enabled, required, 'Not set',
+        '[\
+            {value: "LRU", label: "LRU"},\
+            {value: "FIFO", label: "FIFO"},\
+            {value: "SORTED", label: "Sorted"},\
+            {value: undefined, label: "Not set"}\
+        ]', tip)
+    span(ng-show=kind)
+        +showHideLink('expanded', 'settings')
+            .details-row
+                +number('Batch size', policy + '.batchSize', name + '+ "batchSize"', enabled, '1', '1',
+                    'Number of entries to remove on shrink')
+            .details-row
+                +number('Max memory size', policy + '.maxMemorySize', name + '+ "maxMemorySize"', enabled, '0', '0',
+                    'Maximum allowed cache size in bytes')
+            .details-row
+                +number('Max size', policy + '.maxSize', name + '+ "maxSize"', enabled, '100000', '0',
+                    'Maximum allowed size of cache before entry will start getting evicted')
+
+//- Mixin for clusters dropdown.
+mixin clusters(model, tip)
+    +dropdown-multiple('<span>Clusters:</span>' + '<a ui-sref="base.configuration.clusters({linkId: linkId()})"> (add)</a>',
+        model + '.clusters', '"clusters"', true, 'Choose clusters', 'No clusters configured', 'clusters', tip)
+
+//- Mixin for caches dropdown.
+mixin caches(model, tip)
+    +dropdown-multiple('<span>Caches:</span>' + '<a ui-sref="base.configuration.caches({linkId: linkId()})"> (add)</a>',
+        model + '.caches', '"caches"', true, 'Choose caches', 'No caches configured', 'caches', tip)
+
+//- Mixin for XML, Java, .Net preview.
+mixin preview(master, generator, detail)
+    ignite-ui-ace-tabs
+        .preview-panel(ng-init='mode = "spring"')
+            .preview-legend
+                a(ng-class='{active: mode === "spring"}' ng-click='mode = "spring"') Spring
+                a(ng-class='{active: mode === "java"}' ng-click='mode = "java"') Java
+                a(ng-class='{active: mode === "csharp"}' ng-click='mode = "csharp"') C#
+                //a(ng-class='{active: mode === "app.config"}' ng-click='mode = "app.config"') app.config
+            .preview-content(ng-switch='mode')
+                ignite-ui-ace-spring(ng-switch-when="spring" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
+                ignite-ui-ace-java(ng-switch-when="java" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
+                ignite-ui-ace-sharp(ng-switch-when="csharp" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
+            .preview-content-empty(ng-if='!data')
+                label All Defaults
+
+//- Mixin for XML and Java preview.
+mixin preview-xml-java(master, generator, detail)
+    ignite-ui-ace-tabs
+        .preview-panel(ng-init='mode = "spring"')
+            .preview-legend
+                a(ng-class='{active: mode === "spring"}' ng-click='mode = "spring"') Spring
+                a(ng-class='{active: mode === "java"}' ng-click='mode = "java"') Java
+                //a(ng-class='{active: mode === "csharp"}' ng-click='mode = "csharp"') C#
+                //a(ng-class='{active: mode === "app.config"}' ng-click='mode = "app.config"') app.config
+            .preview-content(ng-switch='mode')
+                ignite-ui-ace-spring(ng-switch-when="spring" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
+                ignite-ui-ace-java(ng-switch-when="java" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
+                //ignite-ui-ace-sharp(ng-switch-when="csharp" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
+            .preview-content-empty(ng-if='!data')
+                label All Defaults
+
+//- LEGACY mixin for LEGACY tables.
+mixin btn-save(show, click)
+    i.tipField.fa.fa-floppy-o(ng-show=show ng-click=click bs-tooltip='' data-title='Click icon or press [Enter] to save item' data-trigger='hover')
+
+//- LEGACY mixin for LEGACY tables.
+mixin btn-add(click, tip)
+    i.tipField.fa.fa-plus(ng-click=click bs-tooltip=tip data-trigger = 'hover')
+
+//- LEGACY mixin for LEGACY tables.
+mixin btn-remove(click, tip)
+    i.tipField.fa.fa-remove(ng-click=click bs-tooltip=tip data-trigger='hover')
+
+//- LEGACY mixin for LEGACY tables.
+mixin btn-remove-cond(cond, click, tip)
+    i.tipField.fa.fa-remove(ng-show=cond ng-click=click bs-tooltip=tip data-trigger='hover')
+
+//- LEGACY mixin for LEGACY pair values tables.
+mixin table-pair-edit(tbl, prefix, keyPlaceholder, valPlaceholder, keyJavaBuiltInTypes, valueJavaBuiltInTypes, focusId, index, divider)
+    -var keyModel = `${tbl}.${prefix}Key`
+    -var valModel = `${tbl}.${prefix}Value`
+
+    -var keyFocusId = `${prefix}Key${focusId}`
+    -var valFocusId = `${prefix}Value${focusId}`
+
+    .col-xs-6.col-sm-6.col-md-6
+        .fieldSep !{divider}
+        .input-tip
+            if keyJavaBuiltInTypes
+                input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' ignite-on-escape='tableReset(false)')
+            else
+                input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder ignite-on-escape='tableReset(false)')
+    .col-xs-6.col-sm-6.col-md-6
+        -var btnVisible = 'tablePairSaveVisible(' + tbl + ', ' + index + ')'
+        -var btnSave = 'tablePairSave(tablePairValid, backupItem, ' + tbl + ', ' + index + ')'
+        -var btnVisibleAndSave = btnVisible + ' && ' + btnSave
+
+        +btn-save(btnVisible, btnSave)
+        .input-tip
+            if valueJavaBuiltInTypes
+                input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
+            else
+                input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
+
+//- Mixin for DB dialect.
+mixin dialect(lbl, model, name, required, tipTitle, genericDialectName, placeholder)
+    +dropdown-required(lbl, model, name, 'true', required, placeholder, '[\
+                {value: "Generic", label: "' + genericDialectName + '"},\
+                {value: "Oracle", label: "Oracle"},\
+                {value: "DB2", label: "IBM DB2"},\
+                {value: "SQLServer", label: "Microsoft SQL Server"},\
+                {value: "MySQL", label: "MySQL"},\
+                {value: "PostgreSQL", label: "PostgreSQL"},\
+                {value: "H2", label: "H2 database"}\
+        ]',
+        tipTitle +
+        '<ul>\
+            <li>' + genericDialectName + '</li>\
+            <li>Oracle database</li>\
+            <li>IBM DB2</li>\
+            <li>Microsoft SQL Server</li>\
+            <li>MySQL</li>\
+            <li>PostgreSQL</li>\
+            <li>H2 database</li>\
+        </ul>')
+
+//- Mixin for show/hide links.
+mixin showHideLink(name, text)
+    span(ng-init='__ = {};')
+        a.customize(ng-show=`__.${name}` ng-click=`__.${name} = false`) Hide #{text}
+        a.customize(ng-hide=`__.${name}` ng-click=`__.${name} = true; ui.loadPanel('${name}');`) Show #{text}
+        div(ng-if=`ui.isPanelLoaded('${name}')`)
+            .panel-details(ng-show=`__.${name}`)
+                if block
+                    block

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/agent/agent.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/agent/agent.module.js b/modules/web-console/frontend/app/modules/agent/agent.module.js
index 7ac39d1..c0e92d5 100644
--- a/modules/web-console/frontend/app/modules/agent/agent.module.js
+++ b/modules/web-console/frontend/app/modules/agent/agent.module.js
@@ -18,6 +18,8 @@
 import angular from 'angular';
 import io from 'socket.io-client'; // eslint-disable-line no-unused-vars
 
+import templateUrl from 'views/templates/agent-download.tpl.pug';
+
 const maskNull = (val) => _.isEmpty(val) ? 'null' : val;
 
 class IgniteAgentMonitor {
@@ -35,7 +37,7 @@ class IgniteAgentMonitor {
         // Pre-fetch modal dialogs.
         this._downloadAgentModal = $modal({
             scope: this._scope,
-            templateUrl: '/templates/agent-download.html',
+            templateUrl,
             show: false,
             backdrop: 'static',
             keyboard: false

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/branding/header-logo.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/header-logo.directive.js b/modules/web-console/frontend/app/modules/branding/header-logo.directive.js
index 423de9c..231411b 100644
--- a/modules/web-console/frontend/app/modules/branding/header-logo.directive.js
+++ b/modules/web-console/frontend/app/modules/branding/header-logo.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import templateUrl from './header-logo.jade';
+import template from './header-logo.pug';
 
 export default ['igniteHeaderLogo', ['IgniteBranding', (branding) => {
     function controller() {
@@ -26,7 +26,7 @@ export default ['igniteHeaderLogo', ['IgniteBranding', (branding) => {
 
     return {
         restrict: 'E',
-        templateUrl,
+        template,
         controller,
         controllerAs: 'logo',
         replace: true

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/branding/header-logo.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/header-logo.jade b/modules/web-console/frontend/app/modules/branding/header-logo.jade
deleted file mode 100644
index b58f670..0000000
--- a/modules/web-console/frontend/app/modules/branding/header-logo.jade
+++ /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.
-
-a(ui-sref='signin')
-    img.navbar-brand(ng-src='{{logo.url}}' height='40')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/branding/header-logo.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/header-logo.pug b/modules/web-console/frontend/app/modules/branding/header-logo.pug
new file mode 100644
index 0000000..b58f670
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/branding/header-logo.pug
@@ -0,0 +1,18 @@
+//-
+    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.
+
+a(ui-sref='signin')
+    img.navbar-brand(ng-src='{{logo.url}}' height='40')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js b/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js
index 2f02446..dce7d55 100644
--- a/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js
+++ b/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import templateUrl from './powered-by-apache.jade';
+import template from './powered-by-apache.pug';
 
 export default ['ignitePoweredByApache', ['IgniteBranding', (branding) => {
     function controller() {
@@ -26,7 +26,7 @@ export default ['ignitePoweredByApache', ['IgniteBranding', (branding) => {
 
     return {
         restrict: 'E',
-        templateUrl,
+        template,
         controller,
         controllerAs: 'poweredBy',
         replace: true

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/branding/powered-by-apache.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/powered-by-apache.jade b/modules/web-console/frontend/app/modules/branding/powered-by-apache.jade
deleted file mode 100644
index af9aadf..0000000
--- a/modules/web-console/frontend/app/modules/branding/powered-by-apache.jade
+++ /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.
-
-a(ng-if='poweredBy.show' href='//ignite.apache.org' target='_blank')
-    img(ng-src='/images/pb-ignite.png' height='65')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/branding/powered-by-apache.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/powered-by-apache.pug b/modules/web-console/frontend/app/modules/branding/powered-by-apache.pug
new file mode 100644
index 0000000..af9aadf
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/branding/powered-by-apache.pug
@@ -0,0 +1,18 @@
+//-
+    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.
+
+a(ng-if='poweredBy.show' href='//ignite.apache.org' target='_blank')
+    img(ng-src='/images/pb-ignite.png' height='65')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/demo/Demo.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/demo/Demo.module.js b/modules/web-console/frontend/app/modules/demo/Demo.module.js
index bd759df..740ab30 100644
--- a/modules/web-console/frontend/app/modules/demo/Demo.module.js
+++ b/modules/web-console/frontend/app/modules/demo/Demo.module.js
@@ -18,6 +18,7 @@
 import angular from 'angular';
 
 import DEMO_INFO from 'app/data/demo-info.json';
+import templateUrl from 'views/templates/demo-info.tpl.pug';
 
 angular
 .module('ignite-console.demo', [
@@ -129,7 +130,7 @@ angular
     }
 
     const dialog = $modal({
-        templateUrl: '/templates/demo-info.html',
+        templateUrl,
         scope,
         placement: 'center',
         show: false,

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/dialog/dialog.factory.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/dialog/dialog.factory.js b/modules/web-console/frontend/app/modules/dialog/dialog.factory.js
index e15891f..2ac8917 100644
--- a/modules/web-console/frontend/app/modules/dialog/dialog.factory.js
+++ b/modules/web-console/frontend/app/modules/dialog/dialog.factory.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import templateUrl from './dialog.jade';
+import templateUrl from './dialog.tpl.pug';
 
 export default ['IgniteDialog', ['$modal', ($modal) => {
     const defaults = {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/dialog/dialog.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/dialog/dialog.jade b/modules/web-console/frontend/app/modules/dialog/dialog.jade
deleted file mode 100644
index 0043709..0000000
--- a/modules/web-console/frontend/app/modules/dialog/dialog.jade
+++ /dev/null
@@ -1,26 +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.
-
-.modal(tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            .modal-header
-                button.close(ng-click='$hide()' aria-hidden='true') &times;
-                h4.modal-title {{title}}
-            .modal-body(ng-show='content')
-                p(ng-bind-html='content' style='text-align: left;')
-            .modal-footer
-                button.btn.btn-primary(id='confirm-btn-confirm' ng-click='$hide()') Ok

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/dialog/dialog.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/dialog/dialog.tpl.pug b/modules/web-console/frontend/app/modules/dialog/dialog.tpl.pug
new file mode 100644
index 0000000..0043709
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/dialog/dialog.tpl.pug
@@ -0,0 +1,26 @@
+//-
+    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.
+
+.modal(tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            .modal-header
+                button.close(ng-click='$hide()' aria-hidden='true') &times;
+                h4.modal-title {{title}}
+            .modal-body(ng-show='content')
+                p(ng-bind-html='content' style='text-align: left;')
+            .modal-footer
+                button.btn.btn-primary(id='confirm-btn-confirm' ng-click='$hide()') Ok

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/getting-started/GettingStarted.provider.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/getting-started/GettingStarted.provider.js b/modules/web-console/frontend/app/modules/getting-started/GettingStarted.provider.js
index cf9f561..f4c834c 100644
--- a/modules/web-console/frontend/app/modules/getting-started/GettingStarted.provider.js
+++ b/modules/web-console/frontend/app/modules/getting-started/GettingStarted.provider.js
@@ -19,6 +19,7 @@ import angular from 'angular';
 
 // Getting started pages.
 import PAGES from 'app/data/getting-started.json';
+import templateUrl from 'views/templates/getting-started.tpl.pug';
 
 angular
     .module('ignite-console.getting-started', [])
@@ -77,7 +78,7 @@ angular
             _fillPage();
         };
 
-        const dialog = $modal({templateUrl: '/templates/getting-started.html', scope, placement: 'center', show: false, backdrop: 'static'});
+        const dialog = $modal({ templateUrl, scope, placement: 'center', show: false, backdrop: 'static'});
 
         scope.close = () => {
             try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/loading/loading.css
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/loading/loading.css b/modules/web-console/frontend/app/modules/loading/loading.css
deleted file mode 100644
index 87bbc6a..0000000
--- a/modules/web-console/frontend/app/modules/loading/loading.css
+++ /dev/null
@@ -1,73 +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.
- */
-
-[ignite-loading] {
-    position: relative;
-}
-
-.loading {
-    position: absolute;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    top: 0;
-    z-index: 1001;
-    opacity: 0;
-    visibility: hidden;
-    background-color: white;
-    transition: visibility 0s 0.5s, opacity 0.5s linear;
-}
-
-.loading-active {
-    opacity: 1;
-    visibility: visible;
-    transition: opacity 0.5s linear;
-}
-
-.loading:before {
-    content: '';
-    display: inline-block;
-    height: 100%;
-    vertical-align: middle;
-}
-
-.loading .loading-wrapper {
-    display: inline-block;
-    vertical-align: middle;
-    position: relative;
-    width: 100%;
-}
-
-.loading.loading-top .loading-wrapper {
-    position: absolute;
-    top: 100px;
-    display: block;
-}
-
-.loading .loading-text {
-    font-size: 18px;
-    margin: 20px 0;
-    text-align: center;
-}
-
-.loading-opacity-80 {
-    opacity: 0.8;
-}
-
-.loading-max-foreground {
-    z-index: 99999;
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/loading/loading.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/loading/loading.directive.js b/modules/web-console/frontend/app/modules/loading/loading.directive.js
index 064b4c2..8a4ca9f 100644
--- a/modules/web-console/frontend/app/modules/loading/loading.directive.js
+++ b/modules/web-console/frontend/app/modules/loading/loading.directive.js
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-import templateUrl from './loading.jade';
-import './loading.css';
+import template from './loading.pug';
+import './loading.scss';
 
-export default ['igniteLoading', ['IgniteLoading', '$templateCache', '$compile', (Loading, $templateCache, $compile) => {
+export default ['igniteLoading', ['IgniteLoading', '$compile', (Loading, $compile) => {
     const link = (scope, element) => {
-        const compiledTemplate = $compile($templateCache.get(templateUrl));
+        const compiledTemplate = $compile(template);
 
         const build = () => {
             scope.position = scope.position || 'middle';

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/loading/loading.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/loading/loading.jade b/modules/web-console/frontend/app/modules/loading/loading.jade
deleted file mode 100644
index cc6cf45..0000000
--- a/modules/web-console/frontend/app/modules/loading/loading.jade
+++ /dev/null
@@ -1,23 +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.
-
-.loading.loading-opacity-80(ng-class='[class, "loading-" + position]')
-    .loading-wrapper
-        .spinner
-            .bounce1
-            .bounce2
-            .bounce3
-        .loading-text {{ text }}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/loading/loading.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/loading/loading.pug b/modules/web-console/frontend/app/modules/loading/loading.pug
new file mode 100644
index 0000000..cc6cf45
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/loading/loading.pug
@@ -0,0 +1,23 @@
+//-
+    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.
+
+.loading.loading-opacity-80(ng-class='[class, "loading-" + position]')
+    .loading-wrapper
+        .spinner
+            .bounce1
+            .bounce2
+            .bounce3
+        .loading-text {{ text }}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/loading/loading.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/loading/loading.scss b/modules/web-console/frontend/app/modules/loading/loading.scss
new file mode 100644
index 0000000..87bbc6a
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/loading/loading.scss
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+[ignite-loading] {
+    position: relative;
+}
+
+.loading {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    top: 0;
+    z-index: 1001;
+    opacity: 0;
+    visibility: hidden;
+    background-color: white;
+    transition: visibility 0s 0.5s, opacity 0.5s linear;
+}
+
+.loading-active {
+    opacity: 1;
+    visibility: visible;
+    transition: opacity 0.5s linear;
+}
+
+.loading:before {
+    content: '';
+    display: inline-block;
+    height: 100%;
+    vertical-align: middle;
+}
+
+.loading .loading-wrapper {
+    display: inline-block;
+    vertical-align: middle;
+    position: relative;
+    width: 100%;
+}
+
+.loading.loading-top .loading-wrapper {
+    position: absolute;
+    top: 100px;
+    display: block;
+}
+
+.loading .loading-text {
+    font-size: 18px;
+    margin: 20px 0;
+    text-align: center;
+}
+
+.loading-opacity-80 {
+    opacity: 0.8;
+}
+
+.loading-max-foreground {
+    z-index: 99999;
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/nodes/Nodes.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/nodes/Nodes.service.js b/modules/web-console/frontend/app/modules/nodes/Nodes.service.js
index b320ae4..4ca1d45 100644
--- a/modules/web-console/frontend/app/modules/nodes/Nodes.service.js
+++ b/modules/web-console/frontend/app/modules/nodes/Nodes.service.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import nodesDialogTemplate from './nodes-dialog.jade';
+import nodesDialogTplUrl from './nodes-dialog.tpl.pug';
 
 const DEFAULT_OPTIONS = {
     grid: {
@@ -41,7 +41,7 @@ class Nodes {
         options.target = cacheName;
 
         const modalInstance = $modal({
-            templateUrl: nodesDialogTemplate,
+            templateUrl: nodesDialogTplUrl,
             show: true,
             resolve: {
                 nodes: () => nodes || [],

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/nodes/nodes-dialog.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/nodes/nodes-dialog.jade b/modules/web-console/frontend/app/modules/nodes/nodes-dialog.jade
deleted file mode 100644
index d9ea68c..0000000
--- a/modules/web-console/frontend/app/modules/nodes/nodes-dialog.jade
+++ /dev/null
@@ -1,35 +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.
-
-.modal.ignite-nodes-dialog(tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            .modal-header
-                button.close(ng-click='$cancel()' aria-hidden='true') &times;
-                h4.modal-title Select Node
-            .modal-body.modal-body-with-scroll
-                p Choose node to execute query for cache: #[strong {{ $ctrl.options.target }}]
-
-                .panel.panel-default.nodes-grid
-                    .panel-heading
-                        label Cache Nodes: {{ $ctrl.nodes.length }}
-
-                    .panel-body.panel-body_collapse
-                        .grid(ui-grid='$ctrl.gridOptions' ui-grid-resize-columns ui-grid-selection ui-grid-pinning)
-
-            .modal-footer
-                button.btn.btn-primary(id='confirm-btn-confirm' ng-click='$ok($ctrl.selected)' ng-disabled='$ctrl.selected.length === 0') Select node
-                button.btn.btn-default(id='confirm-btn-close' ng-click='$cancel()') Cancel

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/nodes/nodes-dialog.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/nodes/nodes-dialog.tpl.pug b/modules/web-console/frontend/app/modules/nodes/nodes-dialog.tpl.pug
new file mode 100644
index 0000000..d9ea68c
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/nodes/nodes-dialog.tpl.pug
@@ -0,0 +1,35 @@
+//-
+    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.
+
+.modal.ignite-nodes-dialog(tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            .modal-header
+                button.close(ng-click='$cancel()' aria-hidden='true') &times;
+                h4.modal-title Select Node
+            .modal-body.modal-body-with-scroll
+                p Choose node to execute query for cache: #[strong {{ $ctrl.options.target }}]
+
+                .panel.panel-default.nodes-grid
+                    .panel-heading
+                        label Cache Nodes: {{ $ctrl.nodes.length }}
+
+                    .panel-body.panel-body_collapse
+                        .grid(ui-grid='$ctrl.gridOptions' ui-grid-resize-columns ui-grid-selection ui-grid-pinning)
+
+            .modal-footer
+                button.btn.btn-primary(id='confirm-btn-confirm' ng-click='$ok($ctrl.selected)' ng-disabled='$ctrl.selected.length === 0') Select node
+                button.btn.btn-default(id='confirm-btn-close' ng-click='$cancel()') Cancel

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/sql/notebook.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/sql/notebook.controller.js b/modules/web-console/frontend/app/modules/sql/notebook.controller.js
index f10a4d0..252dee6 100644
--- a/modules/web-console/frontend/app/modules/sql/notebook.controller.js
+++ b/modules/web-console/frontend/app/modules/sql/notebook.controller.js
@@ -15,11 +15,13 @@
  * limitations under the License.
  */
 
+import templateUrl from 'views/sql/notebook-new.tpl.pug';
+
 // Controller that load notebooks in navigation bar .
 export default ['$scope', '$modal', '$state', 'IgniteMessages', 'IgniteNotebook',
     (scope, $modal, $state, Messages, Notebook) => {
         // Pre-fetch modal dialogs.
-        const nameModal = $modal({scope, templateUrl: '/sql/notebook-new.html', show: false});
+        const nameModal = $modal({scope, templateUrl, show: false});
 
         scope.create = (name) => {
             return Notebook.create(name)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/sql/sql.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/sql/sql.controller.js b/modules/web-console/frontend/app/modules/sql/sql.controller.js
index 4e972ef..e2ead13 100644
--- a/modules/web-console/frontend/app/modules/sql/sql.controller.js
+++ b/modules/web-console/frontend/app/modules/sql/sql.controller.js
@@ -15,6 +15,12 @@
  * limitations under the License.
  */
 
+import paragraphRateTemplateUrl from 'views/sql/paragraph-rate.tpl.pug';
+import cacheMetadataTemplateUrl from 'views/sql/cache-metadata.tpl.pug';
+import chartSettingsTemplateUrl from 'views/sql/chart-settings.tpl.pug';
+import showQueryTemplateUrl from 'views/templates/message.tpl.pug';
+
+
 // Time line X axis descriptor.
 const TIME_LINE = {value: -1, type: 'java.sql.Date', label: 'TIME_LINE'};
 
@@ -188,6 +194,13 @@ class Paragraph {
 // Controller for SQL notebook screen.
 export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval', '$animate', '$location', '$anchorScroll', '$state', '$filter', '$modal', '$popover', 'IgniteLoading', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'IgniteAgentMonitor', 'IgniteChartColors', 'IgniteNotebook', 'IgniteNodes', 'uiGridExporterConstants', 'IgniteVersion', 'IgniteActivitiesData',
     function($root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $filter, $modal, $popover, Loading, LegacyUtils, Messages, Confirm, agentMonitor, IgniteChartColors, Notebook, Nodes, uiGridExporterConstants, Version, ActivitiesData) {
+        const $ctrl = this;
+
+        // Define template urls.
+        $ctrl.paragraphRateTemplateUrl = paragraphRateTemplateUrl;
+        $ctrl.cacheMetadataTemplateUrl = cacheMetadataTemplateUrl;
+        $ctrl.chartSettingsTemplateUrl = chartSettingsTemplateUrl;
+
         let stopTopology = null;
 
         const _tryStopRefresh = function(paragraph) {
@@ -1737,7 +1750,7 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
                 }
 
                 // Show a basic modal from a controller
-                $modal({scope, template: '/templates/message.html', placement: 'center', show: true});
+                $modal({scope, templateUrl: showQueryTemplateUrl, placement: 'center', show: true});
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/sql/sql.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/sql/sql.module.js b/modules/web-console/frontend/app/modules/sql/sql.module.js
index 5875961..670e4f4 100644
--- a/modules/web-console/frontend/app/modules/sql/sql.module.js
+++ b/modules/web-console/frontend/app/modules/sql/sql.module.js
@@ -20,7 +20,9 @@ import angular from 'angular';
 import NotebookData from './Notebook.data';
 import Notebook from './Notebook.service';
 import notebook from './notebook.controller';
-import sql from './sql.controller';
+import controller from './sql.controller';
+
+import sqlTplUrl from 'app/../views/sql/sql.tpl.pug';
 
 angular.module('ignite-console.sql', [
     'ui.router'
@@ -32,11 +34,13 @@ angular.module('ignite-console.sql', [
                 .state('base.sql', {
                     url: '/queries',
                     abstract: true,
-                    template: '<ui-view></ui-view>'
+                    template: '<ui-view></ui-view>',
+                    controller,
+                    controllerAs: '$ctrl'
                 })
                 .state('base.sql.notebook', {
                     url: '/notebook/{noteId}',
-                    templateUrl: '/sql/sql.html',
+                    templateUrl: sqlTplUrl,
                     onEnter: AclRoute.checkAccess('query'),
                     metaTags: {
                         title: 'Query notebook'
@@ -44,7 +48,7 @@ angular.module('ignite-console.sql', [
                 })
                 .state('base.sql.demo', {
                     url: '/demo',
-                    templateUrl: '/sql/sql.html',
+                    templateUrl: sqlTplUrl,
                     onEnter: AclRoute.checkAccess('query'),
                     metaTags: {
                         title: 'SQL demo'
@@ -54,5 +58,4 @@ angular.module('ignite-console.sql', [
     )
     .service('IgniteNotebookData', NotebookData)
     .service('IgniteNotebook', Notebook)
-    .controller('notebookController', notebook)
-    .controller('sqlController', sql);
+    .controller('notebookController', notebook);

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/admin.state.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/admin.state.js b/modules/web-console/frontend/app/modules/states/admin.state.js
index 35c6fbb..93a38dd 100644
--- a/modules/web-console/frontend/app/modules/states/admin.state.js
+++ b/modules/web-console/frontend/app/modules/states/admin.state.js
@@ -17,6 +17,8 @@
 
 import angular from 'angular';
 
+import templateUrl from 'views/settings/admin.tpl.pug';
+
 angular
 .module('ignite-console.states.admin', [
     'ui.router'
@@ -26,7 +28,7 @@ angular
     $stateProvider
     .state('settings.admin', {
         url: '/admin',
-        templateUrl: '/settings/admin.html',
+        templateUrl,
         onEnter: AclRoute.checkAccess('admin_page'),
         metaTags: {
             title: 'Admin panel'

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration.state.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration.state.js b/modules/web-console/frontend/app/modules/states/configuration.state.js
index 61dca13..a609d3a 100644
--- a/modules/web-console/frontend/app/modules/states/configuration.state.js
+++ b/modules/web-console/frontend/app/modules/states/configuration.state.js
@@ -26,6 +26,14 @@ import ConfigurationResource from './configuration/Configuration.resource';
 import summaryTabs from './configuration/summary/summary-tabs.directive';
 import IgniteSummaryZipper from './configuration/summary/summary-zipper.service';
 
+import sidebarTpl from 'views/configuration/sidebar.tpl.pug';
+import clustersTpl from 'views/configuration/clusters.tpl.pug';
+import cachesTpl from 'views/configuration/caches.tpl.pug';
+import domainsTpl from 'views/configuration/domains.tpl.pug';
+import igfsTpl from 'views/configuration/igfs.tpl.pug';
+import summaryTpl from 'views/configuration/summary.tpl.pug';
+import summaryTabsTemplateUrl from 'views/configuration/summary-tabs.pug';
+
 angular.module('ignite-console.states.configuration', ['ui.router'])
     .directive(...previewPanel)
     // Summary screen
@@ -33,18 +41,21 @@ angular.module('ignite-console.states.configuration', ['ui.router'])
     // Services.
     .service('IgniteSummaryZipper', IgniteSummaryZipper)
     .service('IgniteConfigurationResource', ConfigurationResource)
+    .run(['$templateCache', ($templateCache) => {
+        $templateCache.put('summary-tabs.html', summaryTabsTemplateUrl);
+    }])
     // Configure state provider.
     .config(['$stateProvider', 'AclRouteProvider', ($stateProvider, AclRoute) => {
         // Setup the states.
         $stateProvider
             .state('base.configuration', {
                 url: '/configuration',
-                templateUrl: '/configuration/sidebar.html',
+                templateUrl: sidebarTpl,
                 abstract: true
             })
             .state('base.configuration.clusters', {
                 url: '/clusters',
-                templateUrl: '/configuration/clusters.html',
+                templateUrl: clustersTpl,
                 onEnter: AclRoute.checkAccess('configuration'),
                 params: {
                     linkId: null
@@ -55,7 +66,7 @@ angular.module('ignite-console.states.configuration', ['ui.router'])
             })
             .state('base.configuration.caches', {
                 url: '/caches',
-                templateUrl: '/configuration/caches.html',
+                templateUrl: cachesTpl,
                 onEnter: AclRoute.checkAccess('configuration'),
                 params: {
                     linkId: null
@@ -66,7 +77,7 @@ angular.module('ignite-console.states.configuration', ['ui.router'])
             })
             .state('base.configuration.domains', {
                 url: '/domains',
-                templateUrl: '/configuration/domains.html',
+                templateUrl: domainsTpl,
                 onEnter: AclRoute.checkAccess('configuration'),
                 params: {
                     linkId: null
@@ -77,7 +88,7 @@ angular.module('ignite-console.states.configuration', ['ui.router'])
             })
             .state('base.configuration.igfs', {
                 url: '/igfs',
-                templateUrl: '/configuration/igfs.html',
+                templateUrl: igfsTpl,
                 onEnter: AclRoute.checkAccess('configuration'),
                 params: {
                     linkId: null
@@ -88,7 +99,7 @@ angular.module('ignite-console.states.configuration', ['ui.router'])
             })
             .state('base.configuration.summary', {
                 url: '/summary',
-                templateUrl: '/configuration/summary.html',
+                templateUrl: summaryTpl,
                 onEnter: AclRoute.checkAccess('configuration'),
                 controller: ConfigurationSummaryCtrl,
                 controllerAs: 'ctrl',

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/affinity.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/affinity.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/affinity.jade
deleted file mode 100644
index 3c4746b..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/affinity.jade
+++ /dev/null
@@ -1,82 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'affinity'
--var model = 'backupItem'
--var affModel = model + '.affinity'
--var affMapModel = model + '.affinityMapper'
--var rendezvousAff = affModel + '.kind === "Rendezvous"'
--var fairAff = affModel + '.kind === "Fair"'
--var customAff = affModel + '.kind === "Custom"'
--var customAffMapper = affMapModel + '.kind === "Custom"'
--var rendPartitionsRequired = rendezvousAff + ' && ' + affModel + '.Rendezvous.affinityBackupFilter'
--var fairPartitionsRequired = fairAff + ' && ' + affModel + '.Fair.affinityBackupFilter'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Affinity Collocation
-        ignite-form-field-tooltip.tipLabel
-            | Collocate data with data to improve performance and scalability of your application#[br]
-            | #[a(href="http://apacheignite.gridgain.org/docs/affinity-collocation" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown('Function:', affModel + '.kind', '"AffinityKind"', 'true', 'Default',
-                        '[\
-                            {value: "Rendezvous", label: "Rendezvous"},\
-                            {value: "Fair", label: "Fair"},\
-                            {value: "Custom", label: "Custom"},\
-                            {value: undefined, label: "Default"}\
-                        ]',
-                        'Key topology resolver to provide mapping from keys to nodes\
-                        <ul>\
-                            <li>Rendezvous - Based on Highest Random Weight algorithm<br/></li>\
-                            <li>Fair - Tries to ensure that all nodes get equal number of partitions with minimum amount of reassignments between existing nodes<br/></li>\
-                            <li>Custom - Custom implementation of key affinity fynction<br/></li>\
-                            <li>Default - By default rendezvous affinity function  with 1024 partitions is used<br/></li>\
-                        </ul>')
-                .panel-details(ng-if=rendezvousAff)
-                    .details-row
-                        +number-required('Partitions', affModel + '.Rendezvous.partitions', '"RendPartitions"', 'true', rendPartitionsRequired, '1024', '1', 'Number of partitions')
-                    .details-row
-                        +java-class('Backup filter', affModel + '.Rendezvous.affinityBackupFilter', '"RendAffinityBackupFilter"', 'true', 'false',
-                            'Backups will be selected from all nodes that pass this filter')
-                    .details-row
-                        +checkbox('Exclude neighbors', affModel + '.Rendezvous.excludeNeighbors', '"RendExcludeNeighbors"',
-                            'Exclude same - host - neighbors from being backups of each other and specified number of backups')
-                .panel-details(ng-if=fairAff)
-                    .details-row
-                        +number-required('Partitions', affModel + '.Fair.partitions', '"FairPartitions"', 'true', fairPartitionsRequired, '256', '1', 'Number of partitions')
-                    .details-row
-                        +java-class('Backup filter', affModel + '.Fair.affinityBackupFilter', '"FairAffinityBackupFilter"', 'true', 'false',
-                            'Backups will be selected from all nodes that pass this filter')
-                    .details-row
-                        +checkbox('Exclude neighbors', affModel + '.Fair.excludeNeighbors', '"FairExcludeNeighbors"',
-                            'Exclude same - host - neighbors from being backups of each other and specified number of backups')
-                .panel-details(ng-if=customAff)
-                    .details-row
-                        +java-class('Class name:', affModel + '.Custom.className', '"AffCustomClassName"', 'true', customAff,
-                            'Custom key affinity function implementation class name')
-                .settings-row
-                    +java-class('Mapper:', model + '.affinityMapper', '"AffMapCustomClassName"', 'true', 'false',
-                        'Provide custom affinity key for any given key')
-            .col-sm-6
-                +preview-xml-java(model, 'cacheAffinity')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/affinity.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/affinity.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/affinity.pug
new file mode 100644
index 0000000..70b90bd
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/affinity.pug
@@ -0,0 +1,82 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'affinity'
+-var model = 'backupItem'
+-var affModel = model + '.affinity'
+-var affMapModel = model + '.affinityMapper'
+-var rendezvousAff = affModel + '.kind === "Rendezvous"'
+-var fairAff = affModel + '.kind === "Fair"'
+-var customAff = affModel + '.kind === "Custom"'
+-var customAffMapper = affMapModel + '.kind === "Custom"'
+-var rendPartitionsRequired = rendezvousAff + ' && ' + affModel + '.Rendezvous.affinityBackupFilter'
+-var fairPartitionsRequired = fairAff + ' && ' + affModel + '.Fair.affinityBackupFilter'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Affinity Collocation
+        ignite-form-field-tooltip.tipLabel
+            | Collocate data with data to improve performance and scalability of your application#[br]
+            | #[a(href="http://apacheignite.gridgain.org/docs/affinity-collocation" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown('Function:', `${affModel}.kind`, '"AffinityKind"', 'true', 'Default',
+                        '[\
+                            {value: "Rendezvous", label: "Rendezvous"},\
+                            {value: "Fair", label: "Fair"},\
+                            {value: "Custom", label: "Custom"},\
+                            {value: undefined, label: "Default"}\
+                        ]',
+                        'Key topology resolver to provide mapping from keys to nodes\
+                        <ul>\
+                            <li>Rendezvous - Based on Highest Random Weight algorithm<br/></li>\
+                            <li>Fair - Tries to ensure that all nodes get equal number of partitions with minimum amount of reassignments between existing nodes<br/></li>\
+                            <li>Custom - Custom implementation of key affinity fynction<br/></li>\
+                            <li>Default - By default rendezvous affinity function  with 1024 partitions is used<br/></li>\
+                        </ul>')
+                .panel-details(ng-if=rendezvousAff)
+                    .details-row
+                        +number-required('Partitions', `${affModel}.Rendezvous.partitions`, '"RendPartitions"', 'true', rendPartitionsRequired, '1024', '1', 'Number of partitions')
+                    .details-row
+                        +java-class('Backup filter', `${affModel}.Rendezvous.affinityBackupFilter`, '"RendAffinityBackupFilter"', 'true', 'false',
+                            'Backups will be selected from all nodes that pass this filter')
+                    .details-row
+                        +checkbox('Exclude neighbors', `${affModel}.Rendezvous.excludeNeighbors`, '"RendExcludeNeighbors"',
+                            'Exclude same - host - neighbors from being backups of each other and specified number of backups')
+                .panel-details(ng-if=fairAff)
+                    .details-row
+                        +number-required('Partitions', `${affModel}.Fair.partitions`, '"FairPartitions"', 'true', fairPartitionsRequired, '256', '1', 'Number of partitions')
+                    .details-row
+                        +java-class('Backup filter', `${affModel}.Fair.affinityBackupFilter`, '"FairAffinityBackupFilter"', 'true', 'false',
+                            'Backups will be selected from all nodes that pass this filter')
+                    .details-row
+                        +checkbox('Exclude neighbors', `${affModel}.Fair.excludeNeighbors`, '"FairExcludeNeighbors"',
+                            'Exclude same - host - neighbors from being backups of each other and specified number of backups')
+                .panel-details(ng-if=customAff)
+                    .details-row
+                        +java-class('Class name:', `${affModel}.Custom.className`, '"AffCustomClassName"', 'true', customAff,
+                            'Custom key affinity function implementation class name')
+                .settings-row
+                    +java-class('Mapper:', model + '.affinityMapper', '"AffMapCustomClassName"', 'true', 'false',
+                        'Provide custom affinity key for any given key')
+            .col-sm-6
+                +preview-xml-java(model, 'cacheAffinity')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/caches/client-near-cache.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/client-near-cache.jade b/modules/web-console/frontend/app/modules/states/configuration/caches/client-near-cache.jade
deleted file mode 100644
index e3d1a81..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/client-near-cache.jade
+++ /dev/null
@@ -1,50 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'clientNearCache'
--var model = 'backupItem.clientNearConfiguration'
-
-.panel.panel-default(ng-form=form novalidate ng-show='backupItem.cacheMode === "PARTITIONED"')
-    .panel-heading(bs-collapse-toggle='' ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Client near cache
-        ignite-form-field-tooltip.tipLabel
-            | Near cache settings for client nodes#[br]
-            | Near cache is a small local cache that stores most recently or most frequently accessed data#[br]
-            | Should be used in case when it is impossible to send computations to remote nodes
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                -var enabled = model + '.clientNearCacheEnabled'
-
-                .settings-row
-                    +checkbox('Enabled', enabled, '"clientNacheEnabled"', 'Flag indicating whether to configure near cache')
-                .settings-row
-                    +number('Start size:', model + '.nearStartSize', '"clientNearStartSize"', enabled, '375000', '0',
-                        'Initial cache size for near cache which will be used to pre-create internal hash table after start')
-                .settings-row
-                    +evictionPolicy(model + '.nearEvictionPolicy', '"clientNearCacheEvictionPolicy"', enabled, 'false',
-                        'Near cache eviction policy\
-                        <ul>\
-                            <li>Least Recently Used (LRU) - Eviction policy based on LRU algorithm and supports batch eviction</li>\
-                            <li>First In First Out (FIFO) - Eviction policy based on FIFO algorithm and supports batch eviction</li>\
-                            <li>SORTED - Eviction policy which will select the minimum cache entry for eviction</li>\
-                        </ul>')
-            .col-sm-6
-                +preview-xml-java('backupItem', 'cacheClientNearCache')


[13/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.jade
deleted file mode 100644
index 101a11c..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.jade
+++ /dev/null
@@ -1,48 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'odbcConfiguration'
--var model = 'backupItem.odbc'
--var enabled = model + '.odbcEnabled'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label ODBC configuration
-        ignite-form-field-tooltip.tipLabel
-            | ODBC server configuration#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/odbc-driver" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +checkbox('Enabled', enabled, '"odbcEnabled"', 'Flag indicating whether to configure ODBC configuration')
-                .settings-row
-                    +text-ip-address-with-port-range('ODBC endpoint address:', model + '.endpointAddress', '"endpointAddress"', enabled, '0.0.0.0:10800..10810',
-                        'ODBC endpoint address. <br/>\
-                        The following address formats are permitted:\
-                        <ul>\
-                            <li>hostname - will use provided hostname and default port range</li>\
-                            <li>hostname:port - will use provided hostname and port</li>\
-                            <li>hostname:port_from..port_to - will use provided hostname and port range</li>\
-                        </ul>')
-                .settings-row
-                    +number('Maximum open cursors', model + '.maxOpenCursors', '"maxOpenCursors"', enabled, '128', '1', 'Maximum number of opened cursors per connection')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterODBC')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug
new file mode 100644
index 0000000..a69c7ad
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/odbc.pug
@@ -0,0 +1,48 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'odbcConfiguration'
+-var model = 'backupItem.odbc'
+-var enabled = model + '.odbcEnabled'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label ODBC configuration
+        ignite-form-field-tooltip.tipLabel
+            | ODBC server configuration#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/odbc-driver" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +checkbox('Enabled', enabled, '"odbcEnabled"', 'Flag indicating whether to configure ODBC configuration')
+                .settings-row
+                    +text-ip-address-with-port-range('ODBC endpoint address:', `${model}.endpointAddress`, '"endpointAddress"', enabled, '0.0.0.0:10800..10810',
+                        'ODBC endpoint address. <br/>\
+                        The following address formats are permitted:\
+                        <ul>\
+                            <li>hostname - will use provided hostname and default port range</li>\
+                            <li>hostname:port - will use provided hostname and port</li>\
+                            <li>hostname:port_from..port_to - will use provided hostname and port range</li>\
+                        </ul>')
+                .settings-row
+                    +number('Maximum open cursors', `${model}.maxOpenCursors`, '"maxOpenCursors"', enabled, '128', '1', 'Maximum number of opened cursors per connection')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterODBC')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.jade
deleted file mode 100644
index fbd979c..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.jade
+++ /dev/null
@@ -1,110 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'sslConfiguration'
--var cluster = 'backupItem'
--var enabled = 'backupItem.sslEnabled'
--var model = cluster + '.sslContextFactory'
--var trust = model + '.trustManagers'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label(id='sslConfiguration-title') SSL configuration
-        ignite-form-field-tooltip.tipLabel
-            | Settings for SSL configuration for creating a secure socket layer#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/ssltls" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +checkbox('Enabled', enabled, '"sslEnabled"', 'Flag indicating whether to configure SSL configuration')
-                .settings-row
-                    +text-options('Algorithm to create a key manager:', model + '.keyAlgorithm', '"keyAlgorithm"', '["SumX509", "X509"]', enabled, 'false', 'SumX509',
-                        'Sets key manager algorithm that will be used to create a key manager<br/>\
-                        Notice that in most cased default value suites well, however, on Android platform this value need to be set to X509')
-                .settings-row
-                    +text-enabled('Key store file:', model + '.keyStoreFilePath', '"keyStoreFilePath"', enabled, enabled, 'Path to the key store file',
-                        'Path to the key store file<br/>\
-                        This is a mandatory parameter since ssl context could not be initialized without key manager')
-                .settings-row
-                    +text-options('Key store type:', model + '.keyStoreType', '"keyStoreType"', '["JKS", "PCKS11", "PCKS12"]', enabled, 'false', 'JKS',
-                        'Key store type used in context initialization')
-                .settings-row
-                    +text-options('Protocol:', model + '.protocol', '"protocol"', '["TSL", "SSL"]', enabled, 'false', 'TSL', 'Protocol for secure transport')
-                .settings-row
-                    -var form = 'trustManagers'
-
-                    +ignite-form-group(ng-form=form ng-model=trust)
-                        -var uniqueTip = 'Such trust manager already exists!'
-
-                        ignite-form-field-label
-                            | Trust managers
-                        ignite-form-group-tooltip
-                            | Pre-configured trust managers
-                        ignite-form-group-add(ng-show='#{enabled}' ng-click='(group.add = [{}])')
-                            | Add new trust manager
-
-                        .group-content(ng-if='#{trust}.length')
-                            -var model = 'obj.model';
-                            -var name = '"edit" + $index'
-                            -var valid = form + '[' + name + '].$valid'
-                            -var save = trust + '[$index] = ' + model
-                
-                            div(ng-show=enabled)
-                                div(ng-repeat='model in #{trust} track by $index' ng-init='obj = {}')
-                                    label.col-xs-12.col-sm-12.col-md-12
-                                        .indexField
-                                            | {{ $index+1 }})
-                                        +table-remove-conditional-button(trust, enabled, 'Remove trust manager', 'model')
-                                        span(ng-hide='field.edit')
-                                            a.labelFormField(ng-click='#{enabled} && (field.edit = true) && (#{model} = model)') {{ model }}
-                                        span(ng-if='field.edit')
-                                            +table-java-class-field('Trust manager', name, model, trust, valid, save, false)
-                                                +table-save-button(valid, save, false)
-                                                +unique-feedback(name, uniqueTip)
-                            div(ng-hide=enabled)
-                                div(ng-repeat='model in #{trust} track by $index')
-                                    label.col-xs-12.col-sm-12.col-md-12
-                                        .labelFormField.labelField
-                                            | {{ $index+1 }})
-                                        span.labelFormField
-                                            | {{ model }}
-
-                        .group-content(ng-repeat='field in group.add')
-                            -var model = 'new';
-                            -var name = '"new"'
-                            -var valid = form + '[' + name + '].$valid'
-                            -var save = trust + '.push(' + model + ')'
- 
-                            div
-                                label.col-xs-12.col-sm-12.col-md-12
-                                    +table-java-class-field('Trust manager', name, model, trust, valid, save, true)
-                                        +table-save-button(valid, save, true)
-                                        +unique-feedback(name, uniqueTip)
-
-                        .group-content-empty(ng-if='!(#{trust}.length) && !group.add.length')
-                            | Not defined
-
-                .settings-row(ng-show='!#{trust}.length')
-                    +text-enabled('Trust store file:', model + '.trustStoreFilePath', '"trustStoreFilePath"', enabled, 'false', 'Path to the trust store file', 'Path to the trust store file')
-                .settings-row(ng-show='!#{trust}.length')
-                    +text-options('Trust store type:', model + '.trustStoreType', '"trustStoreType"', '["JKS", "PCKS11", "PCKS12"]', enabled, 'false', 'JKS', 'Trust store type used in context initialization')
-            .col-sm-6
-                +preview-xml-java(cluster, 'clusterSsl')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.pug
new file mode 100644
index 0000000..dcb3b21
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.pug
@@ -0,0 +1,110 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'sslConfiguration'
+-var cluster = 'backupItem'
+-var enabled = 'backupItem.sslEnabled'
+-var model = cluster + '.sslContextFactory'
+-var trust = model + '.trustManagers'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label(id='sslConfiguration-title') SSL configuration
+        ignite-form-field-tooltip.tipLabel
+            | Settings for SSL configuration for creating a secure socket layer#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/ssltls" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +checkbox('Enabled', enabled, '"sslEnabled"', 'Flag indicating whether to configure SSL configuration')
+                .settings-row
+                    +text-options('Algorithm to create a key manager:', `${model}.keyAlgorithm`, '"keyAlgorithm"', '["SumX509", "X509"]', enabled, 'false', 'SumX509',
+                        'Sets key manager algorithm that will be used to create a key manager<br/>\
+                        Notice that in most cased default value suites well, however, on Android platform this value need to be set to X509')
+                .settings-row
+                    +text-enabled('Key store file:', `${model}.keyStoreFilePath`, '"keyStoreFilePath"', enabled, enabled, 'Path to the key store file',
+                        'Path to the key store file<br/>\
+                        This is a mandatory parameter since ssl context could not be initialized without key manager')
+                .settings-row
+                    +text-options('Key store type:', `${model}.keyStoreType`, '"keyStoreType"', '["JKS", "PCKS11", "PCKS12"]', enabled, 'false', 'JKS',
+                        'Key store type used in context initialization')
+                .settings-row
+                    +text-options('Protocol:', `${model}.protocol`, '"protocol"', '["TSL", "SSL"]', enabled, 'false', 'TSL', 'Protocol for secure transport')
+                .settings-row
+                    -var form = 'trustManagers'
+
+                    +ignite-form-group(ng-form=form ng-model=trust)
+                        -var uniqueTip = 'Such trust manager already exists!'
+
+                        ignite-form-field-label
+                            | Trust managers
+                        ignite-form-group-tooltip
+                            | Pre-configured trust managers
+                        ignite-form-group-add(ng-show=`${enabled}` ng-click='(group.add = [{}])')
+                            | Add new trust manager
+
+                        .group-content(ng-if=`${trust}.length`)
+                            -var model = 'obj.model';
+                            -var name = '"edit" + $index'
+                            -var valid = `${form}[${name}].$valid`
+                            -var save = `${trust}[$index] = ${model}`
+                
+                            div(ng-show=enabled)
+                                div(ng-repeat=`model in ${trust} track by $index` ng-init='obj = {}')
+                                    label.col-xs-12.col-sm-12.col-md-12
+                                        .indexField
+                                            | {{ $index+1 }})
+                                        +table-remove-conditional-button(trust, enabled, 'Remove trust manager', 'model')
+                                        span(ng-hide='field.edit')
+                                            a.labelFormField(ng-click=`${enabled} && (field.edit = true) && (${model} = model)`) {{ model }}
+                                        span(ng-if='field.edit')
+                                            +table-java-class-field('Trust manager', name, model, trust, valid, save, false)
+                                                +table-save-button(valid, save, false)
+                                                +unique-feedback(name, uniqueTip)
+                            div(ng-hide=enabled)
+                                div(ng-repeat=`model in ${trust} track by $index`)
+                                    label.col-xs-12.col-sm-12.col-md-12
+                                        .labelFormField.labelField
+                                            | {{ $index+1 }})
+                                        span.labelFormField
+                                            | {{ model }}
+
+                        .group-content(ng-repeat='field in group.add')
+                            -var model = 'new';
+                            -var name = '"new"'
+                            -var valid = `${form}[${name}].$valid`
+                            -var save = `${trust}.push(${model})`
+ 
+                            div
+                                label.col-xs-12.col-sm-12.col-md-12
+                                    +table-java-class-field('Trust manager', name, model, trust, valid, save, true)
+                                        +table-save-button(valid, save, true)
+                                        +unique-feedback(name, uniqueTip)
+
+                        .group-content-empty(ng-if=`!(${trust}.length) && !group.add.length`)
+                            | Not defined
+
+                .settings-row(ng-show=`!${trust}.length`)
+                    +text-enabled('Trust store file:', `${model}.trustStoreFilePath`, '"trustStoreFilePath"', enabled, 'false', 'Path to the trust store file', 'Path to the trust store file')
+                .settings-row(ng-show=`!${trust}.length`)
+                    +text-options('Trust store type:', `${model}.trustStoreType`, '"trustStoreType"', '["JKS", "PCKS11", "PCKS12"]', enabled, 'false', 'JKS', 'Trust store type used in context initialization')
+            .col-sm-6
+                +preview-xml-java(cluster, 'clusterSsl')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/swap.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/swap.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/swap.jade
deleted file mode 100644
index 8071f3c..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/swap.jade
+++ /dev/null
@@ -1,72 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'swap'
--var model = 'backupItem'
--var swapModel = model + '.swapSpaceSpi'
--var fileSwapModel = swapModel + '.FileSwapSpaceSpi'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Swap
-        ignite-form-field-tooltip.tipLabel
-            | Settings for overflow data to disk if it cannot fit in memory#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/off-heap-memory#swap-space" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown('Swap space SPI:', swapModel + '.kind', '"swapSpaceSpi"', 'true', 'Choose swap SPI',
-                        '[\
-                            {value: "FileSwapSpaceSpi", label: "File-based swap"},\
-                            {value: undefined, label: "Not set"}\
-                        ]',
-                        'Provides a mechanism in grid for storing data on disk<br/>\
-                        Ignite cache uses swap space to overflow data to disk if it cannot fit in memory\
-                        <ul>\
-                            <li>File-based swap - File-based swap space SPI implementation which holds keys in memory</li>\
-                            <li>Not set - File-based swap space SPI with default configuration when it needed</li>\
-                        </ul>')
-                    a.customize(
-                        ng-if='#{swapModel}.kind'
-                        ng-click='#{swapModel}.expanded = !#{swapModel}.expanded'
-                    ) {{ #{swapModel}.expanded ? "Hide settings" : "Show settings"}}
-                .settings-row
-                    .panel-details(ng-show='#{swapModel}.expanded && #{swapModel}.kind')
-                        .details-row
-                            +text('Base directory:', fileSwapModel + '.baseDirectory', '"baseDirectory"', 'false', 'swapspace',
-                                'Base directory where to write files')
-                        .details-row
-                            +number('Read stripe size:', fileSwapModel + '.readStripesNumber', '"readStripesNumber"', 'true', 'availableProcessors', '0',
-                                'Read stripe size defines number of file channels to be used concurrently')
-                        .details-row
-                            +number-min-max-step('Maximum sparsity:', fileSwapModel + '.maximumSparsity', '"maximumSparsity"', 'true', '0.5', '0', '0.999', '0.05',
-                                'This property defines maximum acceptable wasted file space to whole file size ratio<br/>\
-                                When this ratio becomes higher than specified number compacting thread starts working')
-                        .details-row
-                            +number('Max write queue size:', fileSwapModel + '.maxWriteQueueSize', '"maxWriteQueueSize"', 'true', '1024 * 1024', '0',
-                                'Max write queue size in bytes<br/>\
-                                If there are more values are waiting for being written to disk then specified size, SPI will block on store operation')
-                        .details-row
-                            +number('Write buffer size:', fileSwapModel + '.writeBufferSize', '"writeBufferSize"', 'true', '64 * 1024', '0',
-                                'Write buffer size in bytes<br/>\
-                                Write to disk occurs only when this buffer is full')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterSwap')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/swap.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/swap.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/swap.pug
new file mode 100644
index 0000000..54b6db0
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/swap.pug
@@ -0,0 +1,72 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'swap'
+-var model = 'backupItem'
+-var swapModel = model + '.swapSpaceSpi'
+-var fileSwapModel = swapModel + '.FileSwapSpaceSpi'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Swap
+        ignite-form-field-tooltip.tipLabel
+            | Settings for overflow data to disk if it cannot fit in memory#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/off-heap-memory#swap-space" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown('Swap space SPI:', `${swapModel}.kind`, '"swapSpaceSpi"', 'true', 'Choose swap SPI',
+                        '[\
+                            {value: "FileSwapSpaceSpi", label: "File-based swap"},\
+                            {value: undefined, label: "Not set"}\
+                        ]',
+                        'Provides a mechanism in grid for storing data on disk<br/>\
+                        Ignite cache uses swap space to overflow data to disk if it cannot fit in memory\
+                        <ul>\
+                            <li>File-based swap - File-based swap space SPI implementation which holds keys in memory</li>\
+                            <li>Not set - File-based swap space SPI with default configuration when it needed</li>\
+                        </ul>')
+                    a.customize(
+                        ng-if=`${swapModel}.kind`
+                        ng-click=`${swapModel}.expanded = !${swapModel}.expanded`
+                    ) {{ #{swapModel}.expanded ? 'Hide settings' : 'Show settings'}}
+                .settings-row
+                    .panel-details(ng-show=`${swapModel}.expanded && ${swapModel}.kind`)
+                        .details-row
+                            +text('Base directory:', `${fileSwapModel}.baseDirectory`, '"baseDirectory"', 'false', 'swapspace',
+                                'Base directory where to write files')
+                        .details-row
+                            +number('Read stripe size:', `${fileSwapModel}.readStripesNumber`, '"readStripesNumber"', 'true', 'availableProcessors', '0',
+                                'Read stripe size defines number of file channels to be used concurrently')
+                        .details-row
+                            +number-min-max-step('Maximum sparsity:', `${fileSwapModel}.maximumSparsity`, '"maximumSparsity"', 'true', '0.5', '0', '0.999', '0.05',
+                                'This property defines maximum acceptable wasted file space to whole file size ratio<br/>\
+                                When this ratio becomes higher than specified number compacting thread starts working')
+                        .details-row
+                            +number('Max write queue size:', `${fileSwapModel}.maxWriteQueueSize`, '"maxWriteQueueSize"', 'true', '1024 * 1024', '0',
+                                'Max write queue size in bytes<br/>\
+                                If there are more values are waiting for being written to disk then specified size, SPI will block on store operation')
+                        .details-row
+                            +number('Write buffer size:', `${fileSwapModel}.writeBufferSize`, '"writeBufferSize"', 'true', '64 * 1024', '0',
+                                'Write buffer size in bytes<br/>\
+                                Write to disk occurs only when this buffer is full')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterSwap')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/thread.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/thread.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/thread.jade
deleted file mode 100644
index d2bea86..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/thread.jade
+++ /dev/null
@@ -1,48 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'pools'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Thread pools size
-        ignite-form-field-tooltip.tipLabel
-            | Settings for node thread pools
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +number('Public:', model + '.publicThreadPoolSize', '"publicThreadPoolSize"', 'true', 'max(8, availableProcessors) * 2', '1',
-                        'Thread pool that is in charge of processing ComputeJob, GridJobs and user messages sent to node')
-                .settings-row
-                    +number('System:', model + '.systemThreadPoolSize', '"systemThreadPoolSize"', 'true', 'max(8, availableProcessors) * 2', '1',
-                        'Thread pool that is in charge of processing internal system messages')
-                .settings-row
-                    +number('Management:', model + '.managementThreadPoolSize', '"managementThreadPoolSize"', 'true', '4', '1',
-                        'Thread pool that is in charge of processing internal and Visor ComputeJob, GridJobs')
-                .settings-row
-                    +number('IGFS:', model + '.igfsThreadPoolSize', '"igfsThreadPoolSize"', 'true', 'availableProcessors', '1',
-                        'Thread pool that is in charge of processing outgoing IGFS messages')
-                .settings-row
-                    +number('Rebalance:', model + '.rebalanceThreadPoolSize', '"rebalanceThreadPoolSize"', 'true', '1', '1',
-                        'Max count of threads can be used at rebalancing')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterPools')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/thread.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/thread.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/thread.pug
new file mode 100644
index 0000000..31dd333
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/thread.pug
@@ -0,0 +1,48 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'pools'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Thread pools size
+        ignite-form-field-tooltip.tipLabel
+            | Settings for node thread pools
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +number('Public:', `${model}.publicThreadPoolSize`, '"publicThreadPoolSize"', 'true', 'max(8, availableProcessors) * 2', '1',
+                        'Thread pool that is in charge of processing ComputeJob, GridJobs and user messages sent to node')
+                .settings-row
+                    +number('System:', `${model}.systemThreadPoolSize`, '"systemThreadPoolSize"', 'true', 'max(8, availableProcessors) * 2', '1',
+                        'Thread pool that is in charge of processing internal system messages')
+                .settings-row
+                    +number('Management:', `${model}.managementThreadPoolSize`, '"managementThreadPoolSize"', 'true', '4', '1',
+                        'Thread pool that is in charge of processing internal and Visor ComputeJob, GridJobs')
+                .settings-row
+                    +number('IGFS:', `${model}.igfsThreadPoolSize`, '"igfsThreadPoolSize"', 'true', 'availableProcessors', '1',
+                        'Thread pool that is in charge of processing outgoing IGFS messages')
+                .settings-row
+                    +number('Rebalance:', `${model}.rebalanceThreadPoolSize`, '"rebalanceThreadPoolSize"', 'true', '1', '1',
+                        'Max count of threads can be used at rebalancing')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterPools')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/time.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/time.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/time.jade
deleted file mode 100644
index bcb1cb7..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/time.jade
+++ /dev/null
@@ -1,47 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'time'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Time configuration
-        ignite-form-field-tooltip.tipLabel
-            | Time settings for CLOCK write ordering mode
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +number('Samples size:', model + '.clockSyncSamples', '"clockSyncSamples"', 'true', '8', '0',
-                        'Number of samples used to synchronize clocks between different nodes<br/>\
-                        Clock synchronization is used for cache version assignment in CLOCK order mode')
-                .settings-row
-                    +number('Frequency:', model + '.clockSyncFrequency', '"clockSyncFrequency"', 'true', '120000', '0',
-                        'Frequency at which clock is synchronized between nodes, in milliseconds<br/>\
-                        Clock synchronization is used for cache version assignment in CLOCK order mode')
-                .settings-row
-                    +number-min-max('Port base:', model + '.timeServerPortBase', '"timeServerPortBase"', 'true', '31100', '0', '65535',
-                        'Time server provides clock synchronization between nodes<br/>\
-                        Base UPD port number for grid time server. Time server will be started on one of free ports in range')
-                .settings-row
-                    +number('Port range:', model + '.timeServerPortRange', '"timeServerPortRange"', 'true', '100', '1', 'Time server port range')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterTime')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/time.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/time.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/time.pug
new file mode 100644
index 0000000..da781ba
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/time.pug
@@ -0,0 +1,47 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'time'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Time configuration
+        ignite-form-field-tooltip.tipLabel
+            | Time settings for CLOCK write ordering mode
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +number('Samples size:', `${model}.clockSyncSamples`, '"clockSyncSamples"', 'true', '8', '0',
+                        'Number of samples used to synchronize clocks between different nodes<br/>\
+                        Clock synchronization is used for cache version assignment in CLOCK order mode')
+                .settings-row
+                    +number('Frequency:', `${model}.clockSyncFrequency`, '"clockSyncFrequency"', 'true', '120000', '0',
+                        'Frequency at which clock is synchronized between nodes, in milliseconds<br/>\
+                        Clock synchronization is used for cache version assignment in CLOCK order mode')
+                .settings-row
+                    +number-min-max('Port base:', `${model}.timeServerPortBase`, '"timeServerPortBase"', 'true', '31100', '0', '65535',
+                        'Time server provides clock synchronization between nodes<br/>\
+                        Base UPD port number for grid time server. Time server will be started on one of free ports in range')
+                .settings-row
+                    +number('Port range:', `${model}.timeServerPortRange`, '"timeServerPortRange"', 'true', '100', '1', 'Time server port range')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterTime')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/transactions.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/transactions.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/transactions.jade
deleted file mode 100644
index 6a18bb0..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/transactions.jade
+++ /dev/null
@@ -1,69 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'transactions'
--var model = 'backupItem.transactionConfiguration'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Transactions
-        ignite-form-field-tooltip.tipLabel
-            | Settings for transactions#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/transactions" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown('Concurrency:', model + '.defaultTxConcurrency', '"defaultTxConcurrency"', 'true', 'PESSIMISTIC',
-                        '[\
-                            {value: "OPTIMISTIC", label: "OPTIMISTIC"},\
-                            {value: "PESSIMISTIC", label: "PESSIMISTIC"}\
-                        ]',
-                        'Cache transaction concurrency to use when one is not explicitly specified\
-                        <ul>\
-                            <li>OPTIMISTIC - All cache operations are not distributed to other nodes until commit is called</li>\
-                            <li>PESSIMISTIC - A lock is acquired on all cache operations with exception of read operations in READ_COMMITTED mode</li>\
-                        </ul>')
-                .settings-row
-                    +dropdown('Isolation:', model + '.defaultTxIsolation', '"defaultTxIsolation"', 'true', 'REPEATABLE_READ',
-                        '[\
-                            {value: "READ_COMMITTED", label: "READ_COMMITTED"},\
-                            {value: "REPEATABLE_READ", label: "REPEATABLE_READ"},\
-                            {value: "SERIALIZABLE", label: "SERIALIZABLE"}\
-                        ]',
-                        'Default transaction isolation\
-                        <ul>\
-                            <li>READ_COMMITTED - Always a committed value will be provided for read operations</li>\
-                            <li>REPEATABLE_READ - If a value was read once within transaction, then all consecutive reads will provide the same in-transaction value</li>\
-                            <li>SERIALIZABLE - All transactions occur in a completely isolated fashion, as if all transactions in the system had executed serially, one after the other.</li>\
-                        </ul>')
-                .settings-row
-                    +number('Default timeout:', model + '.defaultTxTimeout', '"defaultTxTimeout"', 'true', '0', '0', 'Default transaction timeout')
-                .settings-row
-                    +number('Pessimistic log cleanup delay:', model + '.pessimisticTxLogLinger', '"pessimisticTxLogLinger"', 'true', '10000', '0',
-                        'Delay, in milliseconds, after which pessimistic recovery entries will be cleaned up for failed node')
-                .settings-row
-                    +number('Pessimistic log size:', model + '.pessimisticTxLogSize', '"pessimisticTxLogSize"', 'true', '0', '0',
-                        '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')
-                .settings-row
-                    +java-class('Manager factory:', model + '.txManagerFactory', '"txManagerFactory"', 'true', 'false',
-                        'Class name of transaction manager factory for integration with JEE app servers')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterTransactions')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/transactions.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/transactions.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/transactions.pug
new file mode 100644
index 0000000..f60589f
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/transactions.pug
@@ -0,0 +1,69 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'transactions'
+-var model = 'backupItem.transactionConfiguration'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Transactions
+        ignite-form-field-tooltip.tipLabel
+            | Settings for transactions#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/transactions" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown('Concurrency:', `${model}.defaultTxConcurrency`, '"defaultTxConcurrency"', 'true', 'PESSIMISTIC',
+                        '[\
+                            {value: "OPTIMISTIC", label: "OPTIMISTIC"},\
+                            {value: "PESSIMISTIC", label: "PESSIMISTIC"}\
+                        ]',
+                        'Cache transaction concurrency to use when one is not explicitly specified\
+                        <ul>\
+                            <li>OPTIMISTIC - All cache operations are not distributed to other nodes until commit is called</li>\
+                            <li>PESSIMISTIC - A lock is acquired on all cache operations with exception of read operations in READ_COMMITTED mode</li>\
+                        </ul>')
+                .settings-row
+                    +dropdown('Isolation:', `${model}.defaultTxIsolation`, '"defaultTxIsolation"', 'true', 'REPEATABLE_READ',
+                        '[\
+                            {value: "READ_COMMITTED", label: "READ_COMMITTED"},\
+                            {value: "REPEATABLE_READ", label: "REPEATABLE_READ"},\
+                            {value: "SERIALIZABLE", label: "SERIALIZABLE"}\
+                        ]',
+                        'Default transaction isolation\
+                        <ul>\
+                            <li>READ_COMMITTED - Always a committed value will be provided for read operations</li>\
+                            <li>REPEATABLE_READ - If a value was read once within transaction, then all consecutive reads will provide the same in-transaction value</li>\
+                            <li>SERIALIZABLE - All transactions occur in a completely isolated fashion, as if all transactions in the system had executed serially, one after the other.</li>\
+                        </ul>')
+                .settings-row
+                    +number('Default timeout:', `${model}.defaultTxTimeout`, '"defaultTxTimeout"', 'true', '0', '0', 'Default transaction timeout')
+                .settings-row
+                    +number('Pessimistic log cleanup delay:', `${model}.pessimisticTxLogLinger`, '"pessimisticTxLogLinger"', 'true', '10000', '0',
+                        'Delay, in milliseconds, after which pessimistic recovery entries will be cleaned up for failed node')
+                .settings-row
+                    +number('Pessimistic log size:', `${model}.pessimisticTxLogSize`, '"pessimisticTxLogSize"', 'true', '0', '0',
+                        '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')
+                .settings-row
+                    +java-class('Manager factory:', `${model}.txManagerFactory`, '"txManagerFactory"', 'true', 'false',
+                        'Class name of transaction manager factory for integration with JEE app servers')
+            .col-sm-6
+                +preview-xml-java(model, 'clusterTransactions')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/domains/general.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/domains/general.jade b/modules/web-console/frontend/app/modules/states/configuration/domains/general.jade
deleted file mode 100644
index 40759e3..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/domains/general.jade
+++ /dev/null
@@ -1,52 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'general'
--var model = 'backupItem'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle)
-        ignite-form-panel-chevron
-        label General
-        ignite-form-field-tooltip.tipLabel
-            | Domain model properties common for Query and Store#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/cache-queries" target="_blank") More info about query configuration]#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/persistent-store" target="_blank") More info about store]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body
-            .col-sm-6
-                .settings-row
-                    +checkbox('Generate POJO classes', model + '.generatePojo', '"generatePojo"', 'If selected then POJO classes will be generated from database tables')
-                .settings-row
-                    +caches(model, 'Select caches to associate domain model with cache')
-                .settings-row
-                    +dropdown-required('Query metadata:', model + '.queryMetadata', '"queryMetadata"', 'true', 'true', '', 'queryMetadataVariants',
-                        'Query metadata configured with:\
-                        <ul>\
-                            <li>Java annotations like @QuerySqlField</li>\
-                            <li>Configuration via QueryEntity class</li>\
-                        </ul>')
-                -var generatePojo = model + '.generatePojo'
-                .settings-row
-                    +java-class-typeahead('Key type:', model + '.keyType', '"keyType"', 'javaBuiltInClasses', 'true', 'true', '{{ ' + generatePojo + ' ? "Full class name for Key" : "Key type name" }}', 'Key class used to store key in cache', generatePojo)
-                .settings-row
-                    +java-class-autofocus-placholder('Value type:', model + '.valueType', '"valueType"', 'true', 'true', 'false', '{{ ' + generatePojo +' ? "Enter fully qualified class name" : "Value type name" }}', 'Value class used to store value in cache', generatePojo)
-
-            .col-sm-6
-                +preview-xml-java(model, 'domainModelGeneral')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/domains/general.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/domains/general.pug b/modules/web-console/frontend/app/modules/states/configuration/domains/general.pug
new file mode 100644
index 0000000..6432adf
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/domains/general.pug
@@ -0,0 +1,52 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'general'
+-var model = 'backupItem'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle)
+        ignite-form-panel-chevron
+        label General
+        ignite-form-field-tooltip.tipLabel
+            | Domain model properties common for Query and Store#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/cache-queries" target="_blank") More info about query configuration]#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/persistent-store" target="_blank") More info about store]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body
+            .col-sm-6
+                .settings-row
+                    +checkbox('Generate POJO classes', `${model}.generatePojo`, '"generatePojo"', 'If selected then POJO classes will be generated from database tables')
+                .settings-row
+                    +caches(model, 'Select caches to associate domain model with cache')
+                .settings-row
+                    +dropdown-required('Query metadata:', `${model}.queryMetadata`, '"queryMetadata"', 'true', 'true', '', 'queryMetadataVariants',
+                        'Query metadata configured with:\
+                        <ul>\
+                            <li>Java annotations like @QuerySqlField</li>\
+                            <li>Configuration via QueryEntity class</li>\
+                        </ul>')
+                -var generatePojo = `${model}.generatePojo`
+                .settings-row
+                    +java-class-typeahead('Key type:', `${model}.keyType`, '"keyType"', 'javaBuiltInClasses', 'true', 'true', '{{ ' + generatePojo + ' ? "Full class name for Key" : "Key type name" }}', 'Key class used to store key in cache', generatePojo)
+                .settings-row
+                    +java-class-autofocus-placholder('Value type:', `${model}.valueType`, '"valueType"', 'true', 'true', 'false', '{{ ' + generatePojo +' ? "Enter fully qualified class name" : "Value type name" }}', 'Value class used to store value in cache', generatePojo)
+
+            .col-sm-6
+                +preview-xml-java(model, 'domainModelGeneral')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/domains/query.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/domains/query.jade b/modules/web-console/frontend/app/modules/states/configuration/domains/query.jade
deleted file mode 100644
index 8ed7b68..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/domains/query.jade
+++ /dev/null
@@ -1,172 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'query'
--var model = 'backupItem'
--var queryFields = model + '.fields'
--var queryAliases = model + '.aliases'
--var queryIndexes = model + '.indexes'
--var queryFieldsForm = 'queryFields'
--var queryAliasesForm = 'queryAliases'
--var queryIndexesForm = 'queryIndexes'
-
-// LEGACY mixin for LEGACY index fields table.
-mixin table-index-item-edit(prefix, index, sortAvailable, idAddition)
-    -var fieldName = prefix + 'FieldName'
-    -var direction = prefix + 'Direction'
-
-    -var fieldNameModel = 'indexesTbl.' + fieldName
-    -var directionModel = 'indexesTbl.' + direction
-
-    -var btnVisible = 'tableIndexItemSaveVisible(indexesTbl, ' + index + ')'
-    -var btnSave = 'tableIndexItemSave(indexesTbl, itemIndex, ' + index + ')'
-    -var btnVisibleAndSave = btnVisible + ' && ' + btnSave
-
-    div(ng-if=sortAvailable)
-        .col-xs-8.col-sm-8.col-md-8
-            label.fieldSep /
-            .input-tip
-                button.select-toggle.form-control(id='{{::"#{fieldName}" + #{idAddition}}}' ignite-on-enter-focus-move='{{::"#{direction}S" + #{idAddition}}}' ng-model=fieldNameModel placeholder='{{fields("#{prefix}", #{fieldNameModel}).length > 0 ? "Choose field" : "No fields configured"}}' bs-select bs-options='item.value as item.label for item in fields("#{prefix}", #{fieldNameModel})' ng-disabled='fields("#{prefix}", #{fieldNameModel}).length === 0' ignite-on-escape='tableReset(false)' tabindex='0')
-        .col-xs-4.col-sm-4.col-md-4
-            +btn-save(btnVisible, btnSave)
-            .input-tip
-                button.select-toggle.form-control(id='{{::"#{direction}" + #{idAddition}}}' ng-model=directionModel bs-select bs-options='item.value as item.label for item in {{sortDirections}}' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)' tabindex='0')
-    .col-xs-12(ng-if='!(#{sortAvailable})')
-        +btn-save(btnVisible, btnSave)
-        .input-tip
-            button.select-toggle.form-control(id='{{::"#{fieldName}" + #{idAddition}}}' ng-model=fieldNameModel placeholder='{{fields("#{prefix}", #{fieldNameModel}).length > 0 ? "Choose index field" : "No fields configured"}}' bs-select bs-options='item.value as item.label for item in fields("#{prefix}", #{fieldNameModel})' ng-disabled='fields("#{prefix}", #{fieldNameModel}).length === 0' ignite-on-escape='tableReset(false)' tabindex='0')
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle)
-        ignite-form-panel-chevron
-        label(id='query-title') Domain model for SQL query
-        ignite-form-field-tooltip.tipLabel
-            | Domain model properties for fields queries#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/cache-queries" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id='query')
-        .panel-body
-            .col-sm-6
-                .content-not-available(ng-if='#{model}.queryMetadata === "Annotations"')
-                    label Not available for annotated types
-                div(ng-if='#{model}.queryMetadata === "Configuration"')
-                    .settings-row
-                        +ignite-form-group(ng-model='#{queryFields}' ng-form='#{queryFieldsForm}')
-                            ignite-form-field-label(id='queryFields')
-                                | Fields
-                            ignite-form-group-tooltip
-                                | Collection of name-to-type mappings to be queried, in addition to indexed fields
-                            ignite-form-group-add(ng-click='tableNewItem(queryFieldsTbl)')
-                                | Add field to query
-                            .group-content-empty(ng-if='!((#{queryFields} && #{queryFields}.length > 0) || tableNewItemActive(queryFieldsTbl))')
-                                | Not defined
-                            .group-content(ng-show='(#{queryFields} && #{queryFields}.length > 0) || tableNewItemActive(queryFieldsTbl)')
-                                table.links-edit(id='fields' st-table=queryFields)
-                                    tbody
-                                        tr(ng-repeat='item in #{queryFields} track by $index')
-                                            td.col-sm-12(ng-hide='tableEditing(queryFieldsTbl, $index)')
-                                                a.labelFormField(ng-click='tableStartEdit(backupItem, queryFieldsTbl, $index)') {{item.name}}  / {{item.className}}
-                                                +btn-remove('tableRemove(backupItem, queryFieldsTbl, $index)', '"Remove path"')
-                                            td.col-sm-12(ng-show='tableEditing(queryFieldsTbl, $index)')
-                                                +table-pair-edit('queryFieldsTbl', 'cur', 'Field name', 'Field full class name', false, true, '{{::queryFieldsTbl.focusId + $index}}', '$index', '/')
-                                    tfoot(ng-show='tableNewItemActive(queryFieldsTbl)')
-                                        tr
-                                            td.col-sm-12
-                                                +table-pair-edit('queryFieldsTbl', 'new', 'Field name', 'Field full class name', false, true, '{{::queryFieldsTbl.focusId + $index}}', '-1', '/')
-                    .settings-row
-                        +ignite-form-group(ng-model='#{queryAliases}' ng-form='#{queryAliasesForm}')
-                            ignite-form-field-label
-                                | Aliases
-                            ignite-form-group-tooltip
-                                | Mapping from full property name in dot notation to an alias that will be used as SQL column name
-                                | For example: "parent.name" as "parentName"
-                            ignite-form-group-add(ng-click='tableNewItem(aliasesTbl)')
-                                | Add alias to query
-                            .group-content-empty(ng-if='!((#{queryAliases} && #{queryAliases}.length > 0) || tableNewItemActive(aliasesTbl))')
-                                | Not defined
-                            .group-content(ng-show='(#{queryAliases} && #{queryAliases}.length > 0) || tableNewItemActive(aliasesTbl)')
-                                table.links-edit(id='aliases' st-table=queryAliases)
-                                    tbody
-                                        tr(ng-repeat='item in #{queryAliases} track by $index')
-                                            td.col-sm-12(ng-hide='tableEditing(aliasesTbl, $index)')
-                                                a.labelFormField(ng-click='tableStartEdit(backupItem, aliasesTbl, $index)') {{item.field}} &rarr; {{item.alias}}
-                                                +btn-remove('tableRemove(backupItem, aliasesTbl, $index)', '"Remove alias"')
-                                            td.col-sm-12(ng-show='tableEditing(aliasesTbl, $index)')
-                                                +table-pair-edit('aliasesTbl', 'cur', 'Field name', 'Field Alias', false, false, '{{::aliasesTbl.focusId + $index}}', '$index', '&rarr;')
-                                    tfoot(ng-show='tableNewItemActive(aliasesTbl)')
-                                        tr
-                                            td.col-sm-12
-                                                +table-pair-edit('aliasesTbl', 'new', 'Field name', 'Field Alias', false, false, '{{::aliasesTbl.focusId + $index}}', '-1', '&rarr;')
-                    .settings-row(ng-init='indexesTbl={type: "table-indexes", model: "indexes", focusId: "IndexName", ui: "table-indexes"}')
-                        +ignite-form-group(ng-model='#{queryIndexes}' ng-form='#{queryIndexesForm}')
-                            ignite-form-field-label
-                                | Indexes
-                            ignite-form-group-tooltip
-                                | Collection of indexes
-                            ignite-form-group-add(ng-click='tableNewItem(indexesTbl)')
-                                | Add new index
-                            .group-content-empty(id='indexes-add' ng-show='!((#{queryIndexes} && #{queryIndexes}.length > 0) || tableNewItemActive(indexesTbl))')
-                                | Not defined
-                            .group-content(ng-show='(#{queryIndexes} && #{queryIndexes}.length > 0) || tableNewItemActive(indexesTbl)')
-                                -var btnVisibleAndSave = 'tableIndexSaveVisible(indexesTbl, $index) && tableIndexSave(indexesTbl, $index)'
-
-                                table.links-edit(st-table=queryIndexes ng-init='newDirection = false')
-                                    tbody
-                                        tr(ng-repeat='item in #{queryIndexes} track by $index')
-                                            td
-                                                .col-sm-12(ng-hide='tableEditing(indexesTbl, $index)')
-                                                    a.labelFormField(id='indexes{{$index}}' ng-click='tableStartEdit(backupItem, indexesTbl, $index)') {{$index + 1}}) {{item.name}} [{{item.indexType}}]
-                                                    +btn-remove('tableRemove(backupItem, indexesTbl, $index)', '"Remove index"')
-                                                    +btn-add('tableIndexNewItem(indexesTbl, $index)', '"Add new field to index"')
-                                                div(ng-show='tableEditing(indexesTbl, $index)')
-                                                    .col-sm-7
-                                                        label.fieldSep /
-                                                        .input-tip
-                                                            input.form-control(id='curIndexName{{$index}}' type='text' ignite-on-enter-focus-move='curIndexType{{$index}}' ng-model='indexesTbl.curIndexName' placeholder='Index name' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
-                                                    .col-sm-5
-                                                        +btn-save('tableIndexSaveVisible(indexesTbl, $index)', 'tableIndexSave(indexesTbl, $index)')
-                                                        .input-tip
-                                                            button.select-toggle.form-control(id='curIndexType{{$index}}' bs-select ng-model='indexesTbl.curIndexType' data-placeholder='Select index type' bs-options='item.value as item.label for item in indexType' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
-                                                .margin-left-dflt
-                                                    table.links-edit-sub(st-table='item.fields' ng-init='itemIndex = $index')
-                                                        tbody
-                                                            tr(ng-repeat='itemItem in item.fields track by $index')
-                                                                td
-                                                                    div(ng-hide='tableIndexItemEditing(indexesTbl, itemIndex, $index)')
-                                                                        a.labelFormField(ng-if='item.indexType == "SORTED"' ng-click='tableIndexItemStartEdit(indexesTbl, itemIndex, $index)') {{$index + 1}}) {{itemItem.name}} / {{itemItem.direction ? "ASC" : "DESC"}}
-                                                                        a.labelFormField(ng-if='item.indexType != "SORTED"' ng-click='tableIndexItemStartEdit(indexesTbl, itemIndex, $index)') {{$index + 1}}) {{itemItem.name}}
-                                                                        +btn-remove('tableRemoveIndexItem(item, $index)', '"Remove field from index"')
-                                                                    div(ng-show='tableIndexItemEditing(indexesTbl, itemIndex, $index)')
-                                                                        +table-index-item-edit('cur', '$index', 'item.indexType == "SORTED"', 'itemIndex + "-" + $index')
-                                                        tfoot(ng-show='tableIndexNewItemActive(indexesTbl, itemIndex)')
-                                                            tr(style='padding-left: 18px')
-                                                                td
-                                                                    +table-index-item-edit('new', '-1', 'item.indexType == "SORTED"', 'itemIndex')
-                                    tfoot(ng-show='tableNewItemActive(indexesTbl)')
-                                        tr
-                                            td
-                                                .col-sm-7
-                                                    .fieldSep /
-                                                    .input-tip
-                                                        input#newIndexName.form-control(type='text' ignite-on-enter-focus-move='newIndexType' ng-model='indexesTbl.newIndexName' placeholder='Index name' ignite-on-enter='tableIndexSaveVisible(indexesTbl, -1) && tableIndexSave(indexesTbl, -1)' ignite-on-escape='tableReset(false)')
-                                                .col-sm-5
-                                                    +btn-save('tableIndexSaveVisible(indexesTbl, -1)', 'tableIndexSave(indexesTbl, -1)')
-                                                    .input-tip
-                                                        button#newIndexType.select-toggle.form-control(bs-select ng-model='indexesTbl.newIndexType' data-placeholder='Select index type' bs-options='item.value as item.label for item in indexType' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
-            .col-sm-6
-                +preview-xml-java(model, 'domainModelQuery')


[27/50] [abbrv] ignite git commit: Merge branch 'ignite-1.9' into ignite-1.9.1

Posted by sb...@apache.org.
Merge branch 'ignite-1.9' into ignite-1.9.1


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

Branch: refs/heads/ignite-4705-2
Commit: 8362fe720779de5d3e5c7d99ec1bdb6191a38a06
Parents: bc9fcf7 0be9273
Author: devozerov <vo...@gridgain.com>
Authored: Thu Mar 2 17:24:59 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Thu Mar 2 17:24:59 2017 +0300

----------------------------------------------------------------------
 doap_Ignite.rdf                                 |   1 -
 .../managers/communication/GridIoManager.java   | 107 +++++++------------
 .../communication/GridIoManagerSelfTest.java    |   2 +-
 .../ant/beautifier/GridJavadocAntTask.java      |   1 +
 parent/pom.xml                                  |   3 +-
 5 files changed, 40 insertions(+), 74 deletions(-)
----------------------------------------------------------------------



[39/50] [abbrv] ignite git commit: ignite-4803 Added test.

Posted by sb...@apache.org.
ignite-4803 Added test.


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

Branch: refs/heads/ignite-4705-2
Commit: 37a5f92a40ed878ab61a0f92733cbe031784848a
Parents: 32506d6
Author: Igor Seliverstov <gv...@gmail.com>
Authored: Fri Mar 10 10:45:25 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Mar 10 10:45:25 2017 +0300

----------------------------------------------------------------------
 ...sExchangeOnDiscoveryHistoryOverflowTest.java | 190 +++++++++++++++++++
 .../testsuites/IgniteCacheTestSuite5.java       |   3 +
 2 files changed, 193 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/37a5f92a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java
new file mode 100644
index 0000000..962e6b5
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java
@@ -0,0 +1,190 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.events.Event;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.util.typedef.P1;
+import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.jetbrains.annotations.NotNull;
+
+import static org.apache.ignite.IgniteSystemProperties.IGNITE_DISCOVERY_HISTORY_SIZE;
+import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
+import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+import static org.apache.ignite.events.EventType.EVT_NODE_FAILED;
+import static org.apache.ignite.events.EventType.EVT_NODE_JOINED;
+import static org.apache.ignite.events.EventType.EVT_NODE_LEFT;
+import static org.apache.ignite.internal.events.DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT;
+
+/**
+ * Test discovery history overflow.
+ */
+public class PartitionsExchangeOnDiscoveryHistoryOverflowTest extends IgniteCacheAbstractTest {
+    /** */
+    private static final int CACHES_COUNT = 50;
+
+    /** */
+    private static final int DISCOVERY_HISTORY_SIZE = 10;
+
+    /** */
+    private static String histSize;
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        histSize = System.getProperty(IGNITE_DISCOVERY_HISTORY_SIZE);
+
+        System.setProperty(IGNITE_DISCOVERY_HISTORY_SIZE, String.valueOf(DISCOVERY_HISTORY_SIZE));
+
+        super.beforeTestsStarted();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        if (histSize != null)
+            System.setProperty(IGNITE_DISCOVERY_HISTORY_SIZE, histSize);
+        else
+            System.getProperties().remove(IGNITE_DISCOVERY_HISTORY_SIZE);
+
+        super.afterTestsStopped();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 4;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheMode cacheMode() {
+        return PARTITIONED;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return ATOMIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
+        return PRIMARY;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected NearCacheConfiguration nearConfiguration() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        Map<IgnitePredicate<? extends Event>, int[]> map = new HashMap<>();
+
+        // To make partitions exchanges longer.
+        map.put(new P1<Event>() {
+            @Override public boolean apply(Event evt) {
+                try {
+                    Thread.sleep(10);
+                }
+                catch (InterruptedException e) {
+                    // No op.
+                }
+
+                return false;
+            }
+        }, new int[]{EVT_NODE_JOINED, EVT_NODE_FAILED, EVT_NODE_LEFT, EVT_DISCOVERY_CUSTOM_EVT});
+
+        cfg.setLocalEventListeners(map);
+
+        return cfg;
+    }
+
+    /**
+     * @throws Exception In case of error.
+     */
+    public void testDynamicCacheCreation() throws Exception {
+        for (int iter = 0; iter < 5; iter++) {
+            log.info("Iteration: " + iter);
+
+            IgniteInternalFuture[] futs = new IgniteInternalFuture[CACHES_COUNT];
+
+            for (int i = 0; i < CACHES_COUNT; i ++) {
+                final int cacheIdx = i;
+
+                final int gridIdx = cacheIdx % gridCount();
+
+                futs[i] = GridTestUtils.runAsync(new Callable<IgniteCache>() {
+                    @Override public IgniteCache call() throws Exception {
+                        return grid(gridIdx).createCache(cacheConfiguration(gridIdx, cacheIdx));
+                    }
+                });
+            }
+
+            for (IgniteInternalFuture fut : futs) {
+                assertNotNull(fut);
+
+                fut.get();
+            }
+
+            for (int i = 0; i < CACHES_COUNT; i ++) {
+                final int cacheIdx = i;
+
+                final int gridIdx = cacheIdx % gridCount();
+
+                futs[i] = GridTestUtils.runAsync(new Callable<Void>() {
+                    @Override public Void call() throws Exception {
+                        grid(gridIdx).destroyCache(cacheConfiguration(gridIdx, cacheIdx).getName());
+
+                        return null;
+                    }
+                });
+            }
+
+            for (IgniteInternalFuture fut : futs) {
+                assertNotNull(fut);
+
+                fut.get();
+            }
+        }
+    }
+
+    /**
+     * @param gridIdx Grid index.
+     * @param cacheIdx Cache index.
+     * @return Newly created cache configuration.
+     * @throws Exception In case of error.
+     */
+    @NotNull private CacheConfiguration cacheConfiguration(int gridIdx, int cacheIdx) throws Exception {
+        CacheConfiguration cfg = cacheConfiguration(getTestGridName(gridIdx));
+
+        cfg.setName("dynamic-cache-" + cacheIdx);
+
+        return cfg;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/37a5f92a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
index 144aac6..03204e2 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
@@ -27,6 +27,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheSwapSpaceSpiConsiste
 import org.apache.ignite.internal.processors.cache.IgniteCachePutStackOverflowSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheReadThroughEvictionsVariationsSuite;
 import org.apache.ignite.internal.processors.cache.IgniteCacheStoreCollectionTest;
+import org.apache.ignite.internal.processors.cache.PartitionsExchangeOnDiscoveryHistoryOverflowTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheLateAffinityAssignmentFairAffinityTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheLateAffinityAssignmentNodeJoinValidationTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheLateAffinityAssignmentTest;
@@ -65,6 +66,8 @@ public class IgniteCacheTestSuite5 extends TestSuite {
 
         suite.addTestSuite(CacheRebalancingSelfTest.class);
 
+        suite.addTestSuite(PartitionsExchangeOnDiscoveryHistoryOverflowTest.class);
+
         return suite;
     }
 }


[31/50] [abbrv] ignite git commit: waitForRebalancing minor fix and relocation.

Posted by sb...@apache.org.
waitForRebalancing minor fix and relocation.


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

Branch: refs/heads/ignite-4705-2
Commit: e960eb70c0d6a4980883328150e2acf0233de6aa
Parents: f794715
Author: Anton Vinogradov <av...@apache.org>
Authored: Tue Mar 7 15:46:24 2017 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Tue Mar 7 15:46:24 2017 +0300

----------------------------------------------------------------------
 .../GridCacheRebalancingSyncSelfTest.java       | 69 +-----------------
 .../junits/common/GridCommonAbstractTest.java   | 77 ++++++++++++++++++++
 2 files changed, 81 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e960eb70/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
index 3dfcd85..7e3ff5c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java
@@ -237,8 +237,8 @@ public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest {
 
         int waitMinorVer = ignite.configuration().isLateAffinityAssignment() ? 1 : 0;
 
-        waitForRebalancing(0, new AffinityTopologyVersion(2, waitMinorVer));
-        waitForRebalancing(1, new AffinityTopologyVersion(2, waitMinorVer));
+        waitForRebalancing(0, 2, waitMinorVer);
+        waitForRebalancing(1, 2, waitMinorVer);
 
         awaitPartitionMapExchange(true, true, null);
 
@@ -258,8 +258,8 @@ public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest {
 
         startGrid(2);
 
-        waitForRebalancing(1, new AffinityTopologyVersion(4, waitMinorVer));
-        waitForRebalancing(2, new AffinityTopologyVersion(4, waitMinorVer));
+        waitForRebalancing(1, 4, waitMinorVer);
+        waitForRebalancing(2, 4, waitMinorVer);
 
         awaitPartitionMapExchange(true, true, null);
 
@@ -352,67 +352,6 @@ public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest {
     }
 
     /**
-     * @param id Node id.
-     * @param major Major ver.
-     * @param minor Minor ver.
-     * @throws IgniteCheckedException If failed.
-     */
-    protected void waitForRebalancing(int id, int major, int minor) throws IgniteCheckedException {
-        waitForRebalancing(id, new AffinityTopologyVersion(major, minor));
-    }
-
-    /**
-     * @param id Node id.
-     * @param major Major ver.
-     * @throws IgniteCheckedException If failed.
-     */
-    protected void waitForRebalancing(int id, int major) throws IgniteCheckedException {
-        waitForRebalancing(id, new AffinityTopologyVersion(major));
-    }
-
-    /**
-     * @param id Node id.
-     * @param top Topology version.
-     * @throws IgniteCheckedException If failed.
-     */
-    protected void waitForRebalancing(int id, AffinityTopologyVersion top) throws IgniteCheckedException {
-        boolean finished = false;
-
-        long stopTime = System.currentTimeMillis() + 60_000;
-
-        while (!finished && (System.currentTimeMillis() < stopTime)) {
-            finished = true;
-
-            for (GridCacheAdapter c : grid(id).context().cache().internalCaches()) {
-                GridDhtPartitionDemander.RebalanceFuture fut = (GridDhtPartitionDemander.RebalanceFuture)c.preloader().rebalanceFuture();
-                if (fut.topologyVersion() == null || fut.topologyVersion().compareTo(top) < 0) {
-                    finished = false;
-
-                    log.info("Unexpected future version, will retry [futVer=" + fut.topologyVersion() +
-                        ", expVer=" + top + ']');
-
-                    U.sleep(1000);
-
-                    break;
-                }
-                else {
-                    finished = fut.get();
-
-                    if (!finished) {
-                        log.warning("Rebalancing finished with missed partitions: " + fut.topologyVersion());
-
-                        U.sleep(100);
-                    }
-                    else
-                        break;
-                }
-            }
-        }
-
-        assertTrue(finished);
-    }
-
-    /**
      * @throws Exception If failed.
      */
     @SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")

http://git-wip-us.apache.org/repos/asf/ignite/blob/e960eb70/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index 549c486..3bdf0bd 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -58,6 +58,7 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.events.Event;
 import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteKernal;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
@@ -71,6 +72,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartit
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopology;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTopologyFuture;
 import org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemander;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap2;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter;
 import org.apache.ignite.internal.processors.cache.local.GridLocalCache;
@@ -610,6 +612,81 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
     }
 
     /**
+     * @param id Node id.
+     * @param major Major ver.
+     * @param minor Minor ver.
+     * @throws IgniteCheckedException If failed.
+     */
+    protected void waitForRebalancing(int id, int major, int minor) throws IgniteCheckedException {
+        waitForRebalancing(grid(id), new AffinityTopologyVersion(major, minor));
+    }
+
+    /**
+     * @param id Node id.
+     * @param major Major ver.
+     * @throws IgniteCheckedException If failed.
+     */
+    protected void waitForRebalancing(int id, int major) throws IgniteCheckedException {
+        waitForRebalancing(grid(id), new AffinityTopologyVersion(major));
+    }
+
+    /**
+     * @throws IgniteCheckedException If failed.
+     */
+    protected void waitForRebalancing() throws IgniteCheckedException {
+        for (Ignite ignite : G.allGrids())
+            waitForRebalancing((IgniteEx)ignite, null);
+    }
+
+    /**
+     * @param ignite Node.
+     * @param top Topology version.
+     * @throws IgniteCheckedException If failed.
+     */
+    protected void waitForRebalancing(IgniteEx ignite, AffinityTopologyVersion top) throws IgniteCheckedException {
+        if (ignite.configuration().isClientMode())
+            return;
+
+        boolean finished = false;
+
+        long stopTime = System.currentTimeMillis() + 60_000;
+
+        while (!finished && (System.currentTimeMillis() < stopTime)) {
+            finished = true;
+
+            if (top == null)
+                top = ignite.context().discovery().topologyVersionEx();
+
+            for (GridCacheAdapter c : ignite.context().cache().internalCaches()) {
+                GridDhtPartitionDemander.RebalanceFuture fut =
+                    (GridDhtPartitionDemander.RebalanceFuture)c.preloader().rebalanceFuture();
+
+                if (fut.topologyVersion() == null || fut.topologyVersion().compareTo(top) < 0) {
+                    finished = false;
+
+                    log.info("Unexpected future version, will retry [futVer=" + fut.topologyVersion() +
+                        ", expVer=" + top + ']');
+
+                    U.sleep(100);
+
+                    break;
+                }
+                else if (!fut.get()) {
+                    finished = false;
+
+                    log.warning("Rebalancing finished with missed partitions.");
+
+                    U.sleep(100);
+
+                    break;
+                }
+            }
+        }
+
+        assertTrue(finished);
+    }
+
+    /**
      * @param ignite Node.
      */
     public void dumpCacheDebugInfo(Ignite ignite) {


[41/50] [abbrv] ignite git commit: IGNITE-4717 VisorClearTask minor fix.

Posted by sb...@apache.org.
IGNITE-4717 VisorClearTask minor fix.


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

Branch: refs/heads/ignite-4705-2
Commit: d4b87f449c2465bc37532fb7763def294f272645
Parents: b84d4b1
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Fri Mar 10 15:51:38 2017 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Mar 10 15:51:38 2017 +0700

----------------------------------------------------------------------
 .../visor/cache/VisorCacheClearTask.java        | 57 +++++++++++++++++++-
 1 file changed, 56 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d4b87f44/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
index 0c8476f..ce74f17 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
@@ -25,6 +25,7 @@ import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.visor.VisorJob;
 import org.apache.ignite.internal.visor.VisorOneNodeTask;
 import org.apache.ignite.lang.IgniteBiTuple;
+import org.apache.ignite.lang.IgniteCallable;
 import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.resources.JobContextResource;
@@ -145,4 +146,58 @@ public class VisorCacheClearTask extends VisorOneNodeTask<String, IgniteBiTuple<
             return S.toString(VisorCacheClearJob.class, this);
         }
     }
-}
\ No newline at end of file
+
+    /**
+     * Callable to get cache size.
+     *
+     * @deprecated This class needed only for compatibility.
+     */
+    @GridInternal @Deprecated
+    private static class VisorCacheSizeCallable implements IgniteCallable<Integer> {
+        /** */
+        private static final long serialVersionUID = 0L;
+
+        /** */
+        private final IgniteCache cache;
+
+        /**
+         * @param cache Cache to take size from.
+         */
+        private VisorCacheSizeCallable(IgniteCache cache) {
+            this.cache = cache;
+        }
+
+        /** {@inheritDoc} */
+        @Override public Integer call() throws Exception {
+            return cache.size(CachePeekMode.PRIMARY);
+        }
+    }
+
+    /**
+     * Callable to clear cache.
+     *
+     * @deprecated This class needed only for compatibility.
+     */
+    @GridInternal @Deprecated
+    private static class VisorCacheClearCallable implements IgniteCallable<Integer> {
+        /** */
+        private static final long serialVersionUID = 0L;
+
+        /** */
+        private final IgniteCache cache;
+
+        /**
+         * @param cache Cache to clear.
+         */
+        private VisorCacheClearCallable(IgniteCache cache) {
+            this.cache = cache;
+        }
+
+        /** {@inheritDoc} */
+        @Override public Integer call() throws Exception {
+            cache.clear();
+
+            return 0;
+        }
+    }
+}


[07/50] [abbrv] ignite git commit: IGNITE-3386 - Reentrant lock is lost when owner leaves topology

Posted by sb...@apache.org.
IGNITE-3386 - Reentrant lock is lost when owner leaves topology


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

Branch: refs/heads/ignite-4705-2
Commit: f71e4b47a65a085bfaeccfe8a60b36e28e32b0f7
Parents: 7618b58
Author: Evgenii Zhuravlev <ez...@gridgain.com>
Authored: Thu Mar 2 10:27:13 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Mar 2 10:27:13 2017 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/Ignite.java |  1 +
 .../datastructures/DataStructuresProcessor.java |  3 +-
 .../datastructures/GridCacheLockImpl.java       | 17 +++++-
 .../internal/GridCacheRecreateLockTest.java     | 62 ++++++++++++++++++++
 .../testsuites/IgniteComputeGridTestSuite.java  |  2 +
 5 files changed, 82 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f71e4b47/modules/core/src/main/java/org/apache/ignite/Ignite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/Ignite.java b/modules/core/src/main/java/org/apache/ignite/Ignite.java
index 0de08d5..7f8974c 100644
--- a/modules/core/src/main/java/org/apache/ignite/Ignite.java
+++ b/modules/core/src/main/java/org/apache/ignite/Ignite.java
@@ -527,6 +527,7 @@ public interface Ignite extends AutoCloseable {
      *      all threads on other nodes waiting to acquire lock are interrupted.
      * @param fair If {@code True}, fair lock will be created.
      * @param create Boolean flag indicating whether data structure should be created if does not exist.
+     *      Will re-create lock if the node that stored the lock left topology and there are no backups left.
      * @return ReentrantLock for the given name.
      * @throws IgniteException If reentrant lock could not be fetched or created.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f71e4b47/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
index 1cad22f..698efd9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
@@ -1396,7 +1396,8 @@ public final class DataStructuresProcessor extends GridProcessorAdapter {
                         name,
                         key,
                         reentrantLockView,
-                        dsCacheCtx);
+                        dsCacheCtx,
+                        create);
 
                     dsMap.put(key, reentrantLock0);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f71e4b47/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheLockImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheLockImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheLockImpl.java
index 3ab7289..1cf78fa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheLockImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheLockImpl.java
@@ -105,6 +105,9 @@ public final class GridCacheLockImpl implements GridCacheLockEx, Externalizable
     /** Flag indicating that every operation on this lock should be interrupted. */
     private volatile boolean interruptAll;
 
+    /** Re-create flag. */
+    private volatile boolean reCreate;
+
     /**
      * Empty constructor required by {@link Externalizable}.
      */
@@ -522,7 +525,14 @@ public final class GridCacheLockImpl implements GridCacheLockEx, Externalizable
                                 GridCacheLockState val = lockView.get(key);
 
                                 if (val == null)
-                                    throw new IgniteCheckedException("Failed to find reentrant lock with given name: " + name);
+                                    if (reCreate) {
+                                        val = new GridCacheLockState(0, ctx.nodeId(), 0, failoverSafe, fair);
+
+                                        lockView.put(key, val);
+                                    }
+                                    else
+                                        throw new IgniteCheckedException("Failed to find reentrant lock with " +
+                                            "the given name: " + name);
 
                                 final long newThreadID = newThread.getId();
 
@@ -1048,12 +1058,14 @@ public final class GridCacheLockImpl implements GridCacheLockEx, Externalizable
      * @param key Reentrant lock key.
      * @param lockView Reentrant lock projection.
      * @param ctx Cache context.
+     * @param reCreate If {@code true} reentrant lock will be re-created in case it is not in cache.
      */
     @SuppressWarnings("unchecked")
     public GridCacheLockImpl(String name,
         GridCacheInternalKey key,
         IgniteInternalCache<GridCacheInternalKey, GridCacheLockState> lockView,
-        GridCacheContext ctx) {
+        GridCacheContext ctx,
+        boolean reCreate) {
         assert name != null;
         assert key != null;
         assert ctx != null;
@@ -1063,6 +1075,7 @@ public final class GridCacheLockImpl implements GridCacheLockEx, Externalizable
         this.key = key;
         this.lockView = lockView;
         this.ctx = ctx;
+        this.reCreate = reCreate;
 
         log = ctx.logger(getClass());
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f71e4b47/modules/core/src/test/java/org/apache/ignite/internal/GridCacheRecreateLockTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCacheRecreateLockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCacheRecreateLockTest.java
new file mode 100644
index 0000000..ae4ef87
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCacheRecreateLockTest.java
@@ -0,0 +1,62 @@
+package org.apache.ignite.internal;
+
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLock;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.testframework.junits.common.GridCommonTest;
+
+/**
+ * Create lock after owner node left topology test
+ */
+@GridCommonTest(group = "Kernal Self")
+public class GridCacheRecreateLockTest extends GridCommonAbstractTest {
+
+    /**
+     * @throws IgniteCheckedException If failed.
+     */
+    public void test() throws Exception {
+        final Ignite ignite = startNodeAndLock("node1");
+
+        new Thread(new Runnable() {
+            @Override public void run() {
+                try {
+                    Thread.sleep(2000);
+                }
+                catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+
+                ignite.close();
+            }
+        }).start();
+
+        startNodeAndLock("node2");
+    }
+
+    private Ignite startNodeAndLock(String name) {
+        try {
+            IgniteConfiguration cfg = new IgniteConfiguration();
+            cfg.setGridName(name);
+
+            Ignite ignite = Ignition.start(cfg);
+
+            IgniteLock lock = ignite.reentrantLock("lock", true, true, true);
+
+            System.out.println("acquiring lock");
+
+            lock.lock();
+
+            System.out.println("acquired lock");
+
+            return ignite;
+        }
+        catch (Exception e) {
+            assertTrue(false);
+        }
+
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f71e4b47/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
index 9a80b10..66238d9 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
@@ -22,6 +22,7 @@ import org.apache.ignite.internal.ClusterNodeMetricsSelfTest;
 import org.apache.ignite.internal.GridAffinityNoCacheSelfTest;
 import org.apache.ignite.internal.GridAffinitySelfTest;
 import org.apache.ignite.internal.GridAlwaysFailoverSpiFailSelfTest;
+import org.apache.ignite.internal.GridCacheRecreateLockTest;
 import org.apache.ignite.internal.GridCancelOnGridStopSelfTest;
 import org.apache.ignite.internal.GridCancelUnusedJobSelfTest;
 import org.apache.ignite.internal.GridCancelledJobsMetricsSelfTest;
@@ -154,6 +155,7 @@ public class IgniteComputeGridTestSuite {
         suite.addTestSuite(IgniteRoundRobinErrorAfterClientReconnectTest.class);
         suite.addTestSuite(PublicThreadpoolStarvationTest.class);
         suite.addTestSuite(StripedExecutorTest.class);
+        suite.addTestSuite(GridCacheRecreateLockTest.class);
 
         return suite;
     }


[48/50] [abbrv] ignite git commit: Fixes after merge.

Posted by sb...@apache.org.
Fixes after merge.


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

Branch: refs/heads/ignite-4705-2
Commit: e004f9a59921fd7cd228943d0c58fea52b6c6a8b
Parents: a6b077a
Author: devozerov <vo...@gridgain.com>
Authored: Fri Mar 10 17:35:10 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Mar 10 17:35:10 2017 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/query/GridQueryProcessor.java   | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e004f9a5/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index cc91f43..f6cac1a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -20,11 +20,8 @@ package org.apache.ignite.internal.processors.query;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.concurrent.TimeUnit;
-import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.math.BigDecimal;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.ArrayList;
@@ -38,8 +35,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.TimeUnit;
 import javax.cache.Cache;
 import javax.cache.CacheException;
 import org.apache.ignite.IgniteCheckedException;
@@ -60,7 +55,6 @@ import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.processors.GridProcessorAdapter;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.CacheEntryImpl;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.CacheObjectContext;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;


[38/50] [abbrv] ignite git commit: master Fixed compilation.

Posted by sb...@apache.org.
master Fixed compilation.


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

Branch: refs/heads/ignite-4705-2
Commit: d6be1e0b978577dccc7e6077739c37ad1f6fe7dc
Parents: 32506d6
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Fri Mar 10 14:06:41 2017 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Mar 10 14:06:41 2017 +0700

----------------------------------------------------------------------
 .../ignite/internal/processors/query/h2/IgniteH2Indexing.java       | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d6be1e0b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 8093bf7..46fbb9e 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -85,6 +85,7 @@ import org.apache.ignite.internal.processors.cache.query.GridCacheQueryMarshalla
 import org.apache.ignite.internal.processors.cache.query.GridCacheTwoStepQuery;
 import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode;
 import org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator;
+import org.apache.ignite.internal.processors.query.GridRunningQueryInfo;
 import org.apache.ignite.internal.processors.query.GridQueryCancel;
 import org.apache.ignite.internal.processors.query.GridQueryFieldMetadata;
 import org.apache.ignite.internal.processors.query.GridQueryFieldsResult;


[17/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack 2. Upgrade template engine from jade to pug.

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint.pug
new file mode 100644
index 0000000..716e082
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint.pug
@@ -0,0 +1,86 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'checkpoint'
+-var model = 'backupItem.checkpointSpi'
+-var CustomCheckpoint = 'model.kind === "Custom"'
+-var CacheCheckpoint = 'model.kind === "Cache"'
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Checkpointing
+        ignite-form-field-tooltip.tipLabel
+            | Checkpointing provides an ability to save an intermediate job state#[br]
+            | #[a(href="http://apacheignite.readme.io/docs/checkpointing" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row(ng-init='checkpointSpiTbl={type: "checkpointSpi", model: "checkpointSpi", focusId: "kind", ui: "checkpoint-table"}')
+                    +ignite-form-group()
+                        ignite-form-field-label
+                            | Checkpoint SPI configurations
+                        ignite-form-group-tooltip
+                            | Checkpoint SPI configurations
+                        ignite-form-group-add(ng-click='tableNewItem(checkpointSpiTbl)')
+                            | Add checkpoint SPI
+                        .group-content-empty(ng-if=`!(${model} && ${model}.length > 0)`)
+                            | Not defined
+                        .group-content(ng-show=`${model} && ${model}.length > 0` ng-repeat=`model in ${model} track by $index`)
+                            hr(ng-if='$index != 0')
+                            .settings-row
+                                +dropdown-required-autofocus('Checkpoint SPI:', 'model.kind', '"checkpointKind" + $index', 'true', 'true', 'Choose checkpoint configuration variant', '[\
+                                        {value: "FS", label: "File System"},\
+                                        {value: "Cache", label: "Cache"},\
+                                        {value: "S3", label: "Amazon S3"},\
+                                        {value: "JDBC", label: "Database"},\
+                                        {value: "Custom", label: "Custom"}\
+                                    ]',
+                                    'Provides an ability to save an intermediate job state\
+                                    <ul>\
+                                        <li>File System - Uses a shared file system to store checkpoints</li>\
+                                        <li>Cache - Uses a cache to store checkpoints</li>\
+                                        <li>Amazon S3 - Uses Amazon S3 to store checkpoints</li>\
+                                        <li>Database - Uses a database to store checkpoints</li>\
+                                        <li>Custom - Custom checkpoint SPI implementation</li>\
+                                    </ul>')
+                                    +table-remove-button(model, 'Remove Checkpoint SPI')
+
+                            div(ng-show='model.kind === "FS"')
+                                include ./checkpoint/fs
+
+                            div(ng-show=CacheCheckpoint)
+                                .settings-row
+                                    +dropdown-required-empty('Cache:', 'model.Cache.cache', '"checkpointCacheCache" + $index', 'true', CacheCheckpoint,
+                                        'Choose cache', 'No caches configured for current cluster', 'clusterCaches', 'Cache to use for storing checkpoints')
+                                .settings-row
+                                    +java-class('Listener:', 'model.Cache.checkpointListener', '"checkpointCacheListener" + $index', 'true', 'false',
+                                        'Checkpoint listener implementation class name', CacheCheckpoint)
+
+                            div(ng-show='model.kind === "S3"')
+                                include ./checkpoint/s3
+
+                            div(ng-show='model.kind === "JDBC"')
+                                include ./checkpoint/jdbc
+
+                            .settings-row(ng-show=CustomCheckpoint)
+                                +java-class('Class name:', 'model.Custom.className', '"checkpointCustomClassName" + $index', 'true', CustomCheckpoint,
+                                'Custom CheckpointSpi implementation class', CustomCheckpoint)
+            .col-sm-6
+                +preview-xml-java('backupItem', 'clusterCheckpoint', 'caches')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/fs.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/fs.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/fs.jade
deleted file mode 100644
index 6ec4535..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/fs.jade
+++ /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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'checkpointFsPaths'
--var dirPaths = 'model.FS.directoryPaths'
-
-.details-row
-    +ignite-form-group(ng-form=form ng-model=dirPaths)
-        -var uniqueTip = 'Such path already exists!'
-
-        ignite-form-field-label
-            | Paths
-        ignite-form-group-tooltip
-            | Paths to a shared directory where checkpoints will be stored
-        ignite-form-group-add(ng-click='(group.add = [{}])')
-            | Add new path
-
-        .group-content(ng-if='#{dirPaths}.length')
-            -var model = 'obj.model';
-            -var name = '"edit" + $index'
-            -var valid = form + '[' + name + '].$valid'
-            -var save = dirPaths + '[$index] = ' + model
-
-            div(ng-repeat='item in #{dirPaths} track by $index' ng-init='obj = {}')
-                label.col-xs-12.col-sm-12.col-md-12
-                    .indexField
-                        | {{ $index+1 }})
-                    +table-remove-conditional-button(dirPaths, 'true', 'Remove path', 'item')
-                    span(ng-hide='field.edit')
-                        a.labelFormField(ng-click='(field.edit = true) && (#{model} = item)') {{ item }}
-                    span(ng-if='field.edit')
-                        +table-text-field(name, model, dirPaths, valid, save, 'Input directory path', false)
-                            +table-save-button(valid, save, false)
-                            +unique-feedback(name, uniqueTip)
-        .group-content(ng-repeat='field in group.add')
-            -var model = 'new';
-            -var name = '"new"'
-            -var valid = form + '[' + name + '].$valid'
-            -var save = dirPaths + '.push(' + model + ')'
-
-            div
-                label.col-xs-12.col-sm-12.col-md-12
-                    +table-text-field(name, model, dirPaths, valid, save, 'Input directory path', true)
-                        +table-save-button(valid, save, true)
-                        +unique-feedback(name, uniqueTip)
-        .group-content-empty(ng-if='!(#{dirPaths}.length) && !group.add.length')
-            | Not defined
-
-.settings-row
-    +java-class('Listener:', 'model.FS.checkpointListener', '"checkpointFsListener" + $index', 'true', 'false',
-        'Checkpoint listener implementation class name', 'model.kind === "FS"')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/fs.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/fs.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/fs.pug
new file mode 100644
index 0000000..04cc7fb
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/fs.pug
@@ -0,0 +1,66 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'checkpointFsPaths'
+-var dirPaths = 'model.FS.directoryPaths'
+
+.details-row
+    +ignite-form-group(ng-form=form ng-model=dirPaths)
+        -var uniqueTip = 'Such path already exists!'
+
+        ignite-form-field-label
+            | Paths
+        ignite-form-group-tooltip
+            | Paths to a shared directory where checkpoints will be stored
+        ignite-form-group-add(ng-click='(group.add = [{}])')
+            | Add new path
+
+        .group-content(ng-if=`${dirPaths}.length`)
+            -var model = 'obj.model';
+            -var name = '"edit" + $index'
+            -var valid = `${form}[${name}].$valid`
+            -var save = dirPaths + '[$index] = ' + model
+
+            div(ng-repeat=`item in ${dirPaths} track by $index` ng-init='obj = {}')
+                label.col-xs-12.col-sm-12.col-md-12
+                    .indexField
+                        | {{ $index+1 }})
+                    +table-remove-conditional-button(dirPaths, 'true', 'Remove path', 'item')
+                    span(ng-hide='field.edit')
+                        a.labelFormField(ng-click=`(field.edit = true) && (${model} = item)`) {{ item }}
+                    span(ng-if='field.edit')
+                        +table-text-field(name, model, dirPaths, valid, save, 'Input directory path', false)
+                            +table-save-button(valid, save, false)
+                            +unique-feedback(name, uniqueTip)
+        .group-content(ng-repeat='field in group.add')
+            -var model = 'new';
+            -var name = '"new"'
+            -var valid = `${form}[${name}].$valid`
+            -var save = dirPaths + '.push(' + model + ')'
+
+            div
+                label.col-xs-12.col-sm-12.col-md-12
+                    +table-text-field(name, model, dirPaths, valid, save, 'Input directory path', true)
+                        +table-save-button(valid, save, true)
+                        +unique-feedback(name, uniqueTip)
+        .group-content-empty(ng-if=`!(${dirPaths}.length) && !group.add.length`)
+            | Not defined
+
+.settings-row
+    +java-class('Listener:', 'model.FS.checkpointListener', '"checkpointFsListener" + $index', 'true', 'false',
+        'Checkpoint listener implementation class name', 'model.kind === "FS"')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/jdbc.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/jdbc.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/jdbc.jade
deleted file mode 100644
index 5a13337..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/jdbc.jade
+++ /dev/null
@@ -1,48 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var jdbcCheckpoint = 'model.kind === "JDBC"'
-
-.settings-row
-    +text('Data source bean name:', 'model.JDBC.dataSourceBean', '"checkpointJdbcDataSourceBean" + $index', jdbcCheckpoint, 'Input bean name',
-    'Name of the data source bean in Spring context')
-.settings-row
-    +dialect('Dialect:', 'model.JDBC.dialect', '"checkpointJdbcDialect" + $index', jdbcCheckpoint,
-    'Dialect of SQL implemented by a particular RDBMS:', 'Generic JDBC dialect', 'Choose JDBC dialect')
-.settings-row
-    +java-class('Listener:', 'model.JDBC.checkpointListener', '"checkpointJdbcListener" + $index', 'true', 'false',
-        'Checkpoint listener implementation class name', jdbcCheckpoint)
-+showHideLink('jdbcExpanded', 'settings')
-    .details-row
-        +text('User:', 'model.JDBC.user', '"checkpointJdbcUser" + $index', 'false', 'Input user name', 'Checkpoint jdbc user name')
-    .details-row
-        +text('Table name:', 'model.JDBC.checkpointTableName', '"checkpointJdbcCheckpointTableName" + $index', 'false', 'CHECKPOINTS', 'Checkpoint table name')
-    .details-row
-        +text('Key field name:', 'model.JDBC.keyFieldName', '"checkpointJdbcKeyFieldName" + $index', 'false', 'NAME', 'Checkpoint key field name')
-    .details-row
-        +dropdown('Key field type:', 'model.JDBC.keyFieldType', '"checkpointJdbcKeyFieldType" + $index', 'true', 'VARCHAR', 'supportedJdbcTypes', 'Checkpoint key field type')
-    .details-row
-        +text('Value field name:', 'model.JDBC.valueFieldName', '"checkpointJdbcValueFieldName" + $index', 'false', 'VALUE', 'Checkpoint value field name')
-    .details-row
-        +dropdown('Value field type:', 'model.JDBC.valueFieldType', '"checkpointJdbcValueFieldType" + $index', 'true', 'BLOB', 'supportedJdbcTypes', 'Checkpoint value field type')
-    .details-row
-        +text('Expire date field name:', 'model.JDBC.expireDateFieldName', '"checkpointJdbcExpireDateFieldName" + $index', 'false', 'EXPIRE_DATE', 'Checkpoint expire date field name')
-    .details-row
-        +dropdown('Expire date field type:', 'model.JDBC.expireDateFieldType', '"checkpointJdbcExpireDateFieldType"', 'true', 'DATETIME', 'supportedJdbcTypes', 'Checkpoint expire date field type')
-    .details-row
-        +number('Number of retries:', 'model.JDBC.numberOfRetries', '"checkpointJdbcNumberOfRetries"', 'true', '2', '0', 'Number of retries in case of DB failure')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/jdbc.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/jdbc.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/jdbc.pug
new file mode 100644
index 0000000..ea67977
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/jdbc.pug
@@ -0,0 +1,48 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var jdbcCheckpoint = 'model.kind === "JDBC"'
+
+.settings-row
+    +text('Data source bean name:', 'model.JDBC.dataSourceBean', '"checkpointJdbcDataSourceBean" + $index', jdbcCheckpoint, 'Input bean name',
+    'Name of the data source bean in Spring context')
+.settings-row
+    +dialect('Dialect:', 'model.JDBC.dialect', '"checkpointJdbcDialect" + $index', jdbcCheckpoint,
+    'Dialect of SQL implemented by a particular RDBMS:', 'Generic JDBC dialect', 'Choose JDBC dialect')
+.settings-row
+    +java-class('Listener:', 'model.JDBC.checkpointListener', '"checkpointJdbcListener" + $index', 'true', 'false',
+        'Checkpoint listener implementation class name', jdbcCheckpoint)
++showHideLink('jdbcExpanded', 'settings')
+    .details-row
+        +text('User:', 'model.JDBC.user', '"checkpointJdbcUser" + $index', 'false', 'Input user name', 'Checkpoint jdbc user name')
+    .details-row
+        +text('Table name:', 'model.JDBC.checkpointTableName', '"checkpointJdbcCheckpointTableName" + $index', 'false', 'CHECKPOINTS', 'Checkpoint table name')
+    .details-row
+        +text('Key field name:', 'model.JDBC.keyFieldName', '"checkpointJdbcKeyFieldName" + $index', 'false', 'NAME', 'Checkpoint key field name')
+    .details-row
+        +dropdown('Key field type:', 'model.JDBC.keyFieldType', '"checkpointJdbcKeyFieldType" + $index', 'true', 'VARCHAR', 'supportedJdbcTypes', 'Checkpoint key field type')
+    .details-row
+        +text('Value field name:', 'model.JDBC.valueFieldName', '"checkpointJdbcValueFieldName" + $index', 'false', 'VALUE', 'Checkpoint value field name')
+    .details-row
+        +dropdown('Value field type:', 'model.JDBC.valueFieldType', '"checkpointJdbcValueFieldType" + $index', 'true', 'BLOB', 'supportedJdbcTypes', 'Checkpoint value field type')
+    .details-row
+        +text('Expire date field name:', 'model.JDBC.expireDateFieldName', '"checkpointJdbcExpireDateFieldName" + $index', 'false', 'EXPIRE_DATE', 'Checkpoint expire date field name')
+    .details-row
+        +dropdown('Expire date field type:', 'model.JDBC.expireDateFieldType', '"checkpointJdbcExpireDateFieldType"', 'true', 'DATETIME', 'supportedJdbcTypes', 'Checkpoint expire date field type')
+    .details-row
+        +number('Number of retries:', 'model.JDBC.numberOfRetries', '"checkpointJdbcNumberOfRetries"', 'true', '2', '0', 'Number of retries in case of DB failure')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/s3.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/s3.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/s3.jade
deleted file mode 100644
index 6531897..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/s3.jade
+++ /dev/null
@@ -1,178 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var credentialsModel = 'model.S3.awsCredentials'
--var clientCfgModel = 'model.S3.clientConfiguration'
--var checkpointS3 = 'model.kind === "S3"'
--var checkpointS3Path = checkpointS3 + ' && model.S3.awsCredentials.kind === "Properties"'
--var checkpointS3Custom = checkpointS3 + ' && model.S3.awsCredentials.kind === "Custom"'
-
--var clientRetryModel = clientCfgModel + '.retryPolicy'
--var checkpointS3DefaultMaxRetry = checkpointS3 + ' && ' + clientRetryModel + '.kind === "DefaultMaxRetries"'
--var checkpointS3DynamoDbMaxRetry = checkpointS3 + ' && ' + clientRetryModel + '.kind === "DynamoDBMaxRetries"'
--var checkpointS3CustomRetry = checkpointS3 + ' && ' + clientRetryModel + '.kind === "Custom"'
-
-.settings-row
-    +dropdown-required('AWS credentials:', 'model.S3.awsCredentials.kind', '"checkpointS3AwsCredentials"', 'true', checkpointS3, 'Custom', '[\
-        {value: "Basic", label: "Basic"},\
-        {value: "Properties", label: "Properties"},\
-        {value: "Anonymous", label: "Anonymous"},\
-        {value: "BasicSession", label: "Basic with session"},\
-        {value: "Custom", label: "Custom"}\
-    ]',
-    'AWS credentials\
-    <ul>\
-        <li>Basic - Allows callers to pass in the AWS access key and secret access in the constructor</li>\
-        <li>Properties - Reads in AWS access keys from a properties file</li>\
-        <li>Anonymous - Allows use of "anonymous" credentials</li>\
-        <li>Database - Session credentials with keys and session token</li>\
-        <li>Custom - Custom AWS credentials provider</li>\
-    </ul>')
-.settings-row
-    label Note, AWS credentials will be generated as stub
-.panel-details(ng-show=checkpointS3Path)
-    .details-row
-        +text('Path:', credentialsModel + '.Properties.path', '"checkpointS3PropertiesPath"', checkpointS3Path, 'Input properties file path',
-        'The file from which to read the AWS credentials properties')
-.panel-details(ng-show=checkpointS3Custom)
-    .details-row
-        +java-class('Class name:', credentialsModel + '.Custom.className', '"checkpointS3CustomClassName" + $index', 'true', checkpointS3Custom,
-        'Custom AWS credentials provider implementation class', checkpointS3Custom)
-.settings-row
-    +text('Bucket name suffix:', 'model.S3.bucketNameSuffix', '"checkpointS3BucketNameSuffix"', 'false', 'default-bucket', 'Bucket name suffix')
-.settings-row
-    +java-class('Listener:', 'model.S3.checkpointListener', '"checkpointS3Listener" + $index', 'true', 'false',
-        'Checkpoint listener implementation class name', checkpointS3)
-+showHideLink('s3Expanded', 'client configuration')
-    .details-row
-        +dropdown('Protocol:', clientCfgModel + '.protocol', '"checkpointS3Protocol"', 'true', 'HTTPS', '[\
-                {value: "HTTP", label: "HTTP"},\
-                {value: "HTTPS", label: "HTTPS"}\
-            ]',
-        'Provides an ability to save an intermediate job state\
-        <ul>\
-            <li>HTTP - Using the HTTP protocol is less secure than HTTPS, but can slightly reduce\
-                the system resources used when communicating with AWS</li>\
-            <li>HTTPS - Using the HTTPS protocol is more secure than using the HTTP protocol, but\
-                may use slightly more system resources. AWS recommends using HTTPS for maximize security</li>\
-        </ul>')
-    .details-row
-        +number('Maximum connections:', clientCfgModel + '.maxConnections', '"checkpointS3MaxConnections"',
-        'true', '50', '1', 'Maximum number of allowed open HTTP connections')
-    .details-row
-        +text('User agent:', clientCfgModel + '.userAgent', '"checkpointS3UserAgent"', 'false', 'System specific header',
-        'HTTP user agent header to send with all requests')
-    .details-row
-        +text-ip-address('Local address:', clientCfgModel + '.localAddress', '"checkpointS3LocalAddress"', 'true', 'Not specified',
-        'Optionally specifies the local address to bind to')
-    .details-row
-        +text('Proxy host:', clientCfgModel + '.proxyHost', '"checkpointS3ProxyHost"', 'false', 'Not specified',
-        'Optional proxy host the client will connect through')
-    .details-row
-        +number('Proxy port:', clientCfgModel + '.proxyPort', '"checkpointS3ProxyPort"', 'true', 'Not specified', '0',
-        'Optional proxy port the client will connect through')
-    .details-row
-        +text('Proxy user:', clientCfgModel + '.proxyUsername', '"checkpointS3ProxyUsername"', 'false', 'Not specified',
-        'Optional proxy user name to use if connecting through a proxy')
-    .details-row
-        +text('Proxy domain:', clientCfgModel + '.proxyDomain', '"checkpointS3ProxyDomain"', 'false', 'Not specified',
-        'Optional Windows domain name for configuring an NTLM proxy')
-    .details-row
-        +text('Proxy workstation:', clientCfgModel + '.proxyWorkstation', '"checkpointS3ProxyWorkstation"', 'false', 'Not specified',
-        'Optional Windows workstation name for configuring NTLM proxy support')
-    .details-row
-        +dropdown('Retry policy:', clientRetryModel + '.kind', '"checkpointS3RetryPolicy"', 'true', 'Default', '[\
-                                            {value: "Default", label: "Default SDK retry policy"},\
-                                            {value: "DefaultMaxRetries", label: "Default with the specified max retry count"},\
-                                            {value: "DynamoDB", label: "Default for DynamoDB client"},\
-                                            {value: "DynamoDBMaxRetries", label: "DynamoDB with the specified max retry count"},\
-                                            {value: "Custom", label: "Custom configured"}\
-                                        ]',
-        'Provides an ability to save an intermediate job state\
-        <ul>\
-            <li>SDK default retry policy - This policy will honor the maxErrorRetry set in ClientConfiguration</li>\
-            <li>Default with the specified max retry count - Default SDK retry policy with the specified max retry count</li>\
-            <li>Default for DynamoDB client - This policy will honor the maxErrorRetry set in ClientConfiguration</li>\
-            <li>DynamoDB with the specified max retry count - This policy will honor the maxErrorRetry set in ClientConfiguration with the specified max retry count</li>\
-            <li>Custom configured - Custom configured SDK retry policy</li>\
-        </ul>')
-    .panel-details(ng-show=checkpointS3DefaultMaxRetry)
-        .details-row
-            +number-required('Maximum retry attempts:', clientRetryModel + '.DefaultMaxRetries.maxErrorRetry', '"checkpointS3DefaultMaxErrorRetry"', 'true', checkpointS3DefaultMaxRetry, '-1', '1',
-            'Maximum number of retry attempts for failed requests')
-    .panel-details(ng-show=checkpointS3DynamoDbMaxRetry)
-        .details-row
-            +number-required('Maximum retry attempts:', clientRetryModel + '.DynamoDBMaxRetries.maxErrorRetry', '"checkpointS3DynamoDBMaxErrorRetry"', 'true', checkpointS3DynamoDbMaxRetry, '-1', '1',
-            'Maximum number of retry attempts for failed requests')
-    .panel-details(ng-show=checkpointS3CustomRetry)
-        .details-row
-            +java-class('Retry condition:', clientRetryModel + '.Custom.retryCondition', '"checkpointS3CustomRetryPolicy" + $index', 'true', checkpointS3CustomRetry,
-            'Retry condition on whether a specific request and exception should be retried', checkpointS3CustomRetry)
-        .details-row
-            +java-class('Backoff strategy:', clientRetryModel + '.Custom.backoffStrategy', '"checkpointS3CustomBackoffStrategy" + $index', 'true', checkpointS3CustomRetry,
-            'Back-off strategy for controlling how long the next retry should wait', checkpointS3CustomRetry)
-        .details-row
-            +number-required('Maximum retry attempts:', clientRetryModel + '.Custom.maxErrorRetry', '"checkpointS3CustomMaxErrorRetry"', 'true', checkpointS3CustomRetry, '-1', '1',
-            'Maximum number of retry attempts for failed requests')
-        .details-row
-            +checkbox('Honor the max error retry set', clientRetryModel + '.Custom.honorMaxErrorRetryInClientConfig', '"checkpointS3CustomHonorMaxErrorRetryInClientConfig"',
-            'Whether this retry policy should honor the max error retry set by ClientConfiguration#setMaxErrorRetry(int)')
-    .details-row
-        +number('Maximum retry attempts:', clientCfgModel + '.maxErrorRetry', '"checkpointS3MaxErrorRetry"', 'true', '-1', '0',
-        'Maximum number of retry attempts for failed retryable requests<br/>\
-        If -1 the configured RetryPolicy will be used to control the retry count')
-    .details-row
-        +number('Socket timeout:', clientCfgModel + '.socketTimeout', '"checkpointS3SocketTimeout"', 'true', '50000', '0',
-        'Amount of time in milliseconds to wait for data to be transfered over an established, open connection before the connection times out and is closed<br/>\
-        A value of <b>0</b> means infinity')
-    .details-row
-        +number('Connection timeout:', clientCfgModel + '.connectionTimeout', '"checkpointS3ConnectionTimeout"', 'true', '50000', '0',
-        'Amount of time in milliseconds to wait when initially establishing a connection before giving up and timing out<br/>\
-        A value of <b>0</b> means infinity')
-    .details-row
-        +number('Request timeout:', clientCfgModel + '.requestTimeout', '"checkpointS3RequestTimeout"', 'true', '0', '-1',
-        'Amount of time in milliseconds to wait for the request to complete before giving up and timing out<br/>\
-        A non - positive value means infinity')
-    .details-row
-        +text('Signature algorithm:', clientCfgModel + '.signerOverride', '"checkpointS3SignerOverride"', 'false', 'Not specified',
-        'Name of the signature algorithm to use for signing requests made by this client')
-    .details-row
-        +number('Connection TTL:', clientCfgModel + '.connectionTTL', '"checkpointS3ConnectionTTL"', 'true', '-1', '-1',
-        'Expiration time in milliseconds for a connection in the connection pool<br/>\
-        By default, it is set to <b>-1</b>, i.e. connections do not expire')
-    .details-row
-        +number('Idle timeout:', clientCfgModel + '.connectionMaxIdleMillis', '"checkpointS3ConnectionMaxIdleMillis"', 'true', '60000', '0',
-        'Maximum amount of time that an idle connection may sit in the connection pool and still be eligible for reuse')
-    .details-row
-        +java-class('DNS resolver:', clientCfgModel + '.dnsResolver', '"checkpointS3DnsResolver" + $index', 'true', 'false',
-        'DNS Resolver that should be used to for resolving AWS IP addresses', checkpointS3)
-    .details-row
-        +number('Response metadata cache size:', clientCfgModel + '.responseMetadataCacheSize', '"checkpointS3ResponseMetadataCacheSize"', 'true', '50', '0',
-        'Response metadata cache size')
-    .details-row
-        +java-class('SecureRandom class name:', clientCfgModel + '.secureRandom', '"checkpointS3SecureRandom" + $index', 'true', 'false',
-        'SecureRandom to be used by the SDK class name', checkpointS3)
-    .details-row
-        +checkbox('Use reaper', clientCfgModel + '.useReaper', '"checkpointS3UseReaper"', 'Checks if the IdleConnectionReaper is to be started')
-    .details-row
-        +checkbox('Use GZIP', clientCfgModel + '.useGzip', '"checkpointS3UseGzip"', 'Checks if gzip compression is used')
-    .details-row
-        +checkbox('Preemptively basic authentication', clientCfgModel + '.preemptiveBasicProxyAuth', '"checkpointS3PreemptiveBasicProxyAuth"',
-        'Attempt to authenticate preemptively against proxy servers using basic authentication')
-    .details-row
-        +checkbox('TCP KeepAlive', clientCfgModel + '.useTcpKeepAlive', '"checkpointS3UseTcpKeepAlive"', 'TCP KeepAlive support is enabled')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/s3.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/s3.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/s3.pug
new file mode 100644
index 0000000..16be6c0
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint/s3.pug
@@ -0,0 +1,178 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var credentialsModel = 'model.S3.awsCredentials'
+-var clientCfgModel = 'model.S3.clientConfiguration'
+-var checkpointS3 = 'model.kind === "S3"'
+-var checkpointS3Path = checkpointS3 + ' && model.S3.awsCredentials.kind === "Properties"'
+-var checkpointS3Custom = checkpointS3 + ' && model.S3.awsCredentials.kind === "Custom"'
+
+-var clientRetryModel = clientCfgModel + '.retryPolicy'
+-var checkpointS3DefaultMaxRetry = checkpointS3 + ' && ' + clientRetryModel + '.kind === "DefaultMaxRetries"'
+-var checkpointS3DynamoDbMaxRetry = checkpointS3 + ' && ' + clientRetryModel + '.kind === "DynamoDBMaxRetries"'
+-var checkpointS3CustomRetry = checkpointS3 + ' && ' + clientRetryModel + '.kind === "Custom"'
+
+.settings-row
+    +dropdown-required('AWS credentials:', 'model.S3.awsCredentials.kind', '"checkpointS3AwsCredentials"', 'true', checkpointS3, 'Custom', '[\
+        {value: "Basic", label: "Basic"},\
+        {value: "Properties", label: "Properties"},\
+        {value: "Anonymous", label: "Anonymous"},\
+        {value: "BasicSession", label: "Basic with session"},\
+        {value: "Custom", label: "Custom"}\
+    ]',
+    'AWS credentials\
+    <ul>\
+        <li>Basic - Allows callers to pass in the AWS access key and secret access in the constructor</li>\
+        <li>Properties - Reads in AWS access keys from a properties file</li>\
+        <li>Anonymous - Allows use of "anonymous" credentials</li>\
+        <li>Database - Session credentials with keys and session token</li>\
+        <li>Custom - Custom AWS credentials provider</li>\
+    </ul>')
+.settings-row
+    label Note, AWS credentials will be generated as stub
+.panel-details(ng-show=checkpointS3Path)
+    .details-row
+        +text('Path:', credentialsModel + '.Properties.path', '"checkpointS3PropertiesPath"', checkpointS3Path, 'Input properties file path',
+        'The file from which to read the AWS credentials properties')
+.panel-details(ng-show=checkpointS3Custom)
+    .details-row
+        +java-class('Class name:', credentialsModel + '.Custom.className', '"checkpointS3CustomClassName" + $index', 'true', checkpointS3Custom,
+        'Custom AWS credentials provider implementation class', checkpointS3Custom)
+.settings-row
+    +text('Bucket name suffix:', 'model.S3.bucketNameSuffix', '"checkpointS3BucketNameSuffix"', 'false', 'default-bucket', 'Bucket name suffix')
+.settings-row
+    +java-class('Listener:', 'model.S3.checkpointListener', '"checkpointS3Listener" + $index', 'true', 'false',
+        'Checkpoint listener implementation class name', checkpointS3)
++showHideLink('s3Expanded', 'client configuration')
+    .details-row
+        +dropdown('Protocol:', clientCfgModel + '.protocol', '"checkpointS3Protocol"', 'true', 'HTTPS', '[\
+                {value: "HTTP", label: "HTTP"},\
+                {value: "HTTPS", label: "HTTPS"}\
+            ]',
+        'Provides an ability to save an intermediate job state\
+        <ul>\
+            <li>HTTP - Using the HTTP protocol is less secure than HTTPS, but can slightly reduce\
+                the system resources used when communicating with AWS</li>\
+            <li>HTTPS - Using the HTTPS protocol is more secure than using the HTTP protocol, but\
+                may use slightly more system resources. AWS recommends using HTTPS for maximize security</li>\
+        </ul>')
+    .details-row
+        +number('Maximum connections:', clientCfgModel + '.maxConnections', '"checkpointS3MaxConnections"',
+        'true', '50', '1', 'Maximum number of allowed open HTTP connections')
+    .details-row
+        +text('User agent:', clientCfgModel + '.userAgent', '"checkpointS3UserAgent"', 'false', 'System specific header',
+        'HTTP user agent header to send with all requests')
+    .details-row
+        +text-ip-address('Local address:', clientCfgModel + '.localAddress', '"checkpointS3LocalAddress"', 'true', 'Not specified',
+        'Optionally specifies the local address to bind to')
+    .details-row
+        +text('Proxy host:', clientCfgModel + '.proxyHost', '"checkpointS3ProxyHost"', 'false', 'Not specified',
+        'Optional proxy host the client will connect through')
+    .details-row
+        +number('Proxy port:', clientCfgModel + '.proxyPort', '"checkpointS3ProxyPort"', 'true', 'Not specified', '0',
+        'Optional proxy port the client will connect through')
+    .details-row
+        +text('Proxy user:', clientCfgModel + '.proxyUsername', '"checkpointS3ProxyUsername"', 'false', 'Not specified',
+        'Optional proxy user name to use if connecting through a proxy')
+    .details-row
+        +text('Proxy domain:', clientCfgModel + '.proxyDomain', '"checkpointS3ProxyDomain"', 'false', 'Not specified',
+        'Optional Windows domain name for configuring an NTLM proxy')
+    .details-row
+        +text('Proxy workstation:', clientCfgModel + '.proxyWorkstation', '"checkpointS3ProxyWorkstation"', 'false', 'Not specified',
+        'Optional Windows workstation name for configuring NTLM proxy support')
+    .details-row
+        +dropdown('Retry policy:', clientRetryModel + '.kind', '"checkpointS3RetryPolicy"', 'true', 'Default', '[\
+                                            {value: "Default", label: "Default SDK retry policy"},\
+                                            {value: "DefaultMaxRetries", label: "Default with the specified max retry count"},\
+                                            {value: "DynamoDB", label: "Default for DynamoDB client"},\
+                                            {value: "DynamoDBMaxRetries", label: "DynamoDB with the specified max retry count"},\
+                                            {value: "Custom", label: "Custom configured"}\
+                                        ]',
+        'Provides an ability to save an intermediate job state\
+        <ul>\
+            <li>SDK default retry policy - This policy will honor the maxErrorRetry set in ClientConfiguration</li>\
+            <li>Default with the specified max retry count - Default SDK retry policy with the specified max retry count</li>\
+            <li>Default for DynamoDB client - This policy will honor the maxErrorRetry set in ClientConfiguration</li>\
+            <li>DynamoDB with the specified max retry count - This policy will honor the maxErrorRetry set in ClientConfiguration with the specified max retry count</li>\
+            <li>Custom configured - Custom configured SDK retry policy</li>\
+        </ul>')
+    .panel-details(ng-show=checkpointS3DefaultMaxRetry)
+        .details-row
+            +number-required('Maximum retry attempts:', clientRetryModel + '.DefaultMaxRetries.maxErrorRetry', '"checkpointS3DefaultMaxErrorRetry"', 'true', checkpointS3DefaultMaxRetry, '-1', '1',
+            'Maximum number of retry attempts for failed requests')
+    .panel-details(ng-show=checkpointS3DynamoDbMaxRetry)
+        .details-row
+            +number-required('Maximum retry attempts:', clientRetryModel + '.DynamoDBMaxRetries.maxErrorRetry', '"checkpointS3DynamoDBMaxErrorRetry"', 'true', checkpointS3DynamoDbMaxRetry, '-1', '1',
+            'Maximum number of retry attempts for failed requests')
+    .panel-details(ng-show=checkpointS3CustomRetry)
+        .details-row
+            +java-class('Retry condition:', clientRetryModel + '.Custom.retryCondition', '"checkpointS3CustomRetryPolicy" + $index', 'true', checkpointS3CustomRetry,
+            'Retry condition on whether a specific request and exception should be retried', checkpointS3CustomRetry)
+        .details-row
+            +java-class('Backoff strategy:', clientRetryModel + '.Custom.backoffStrategy', '"checkpointS3CustomBackoffStrategy" + $index', 'true', checkpointS3CustomRetry,
+            'Back-off strategy for controlling how long the next retry should wait', checkpointS3CustomRetry)
+        .details-row
+            +number-required('Maximum retry attempts:', clientRetryModel + '.Custom.maxErrorRetry', '"checkpointS3CustomMaxErrorRetry"', 'true', checkpointS3CustomRetry, '-1', '1',
+            'Maximum number of retry attempts for failed requests')
+        .details-row
+            +checkbox('Honor the max error retry set', clientRetryModel + '.Custom.honorMaxErrorRetryInClientConfig', '"checkpointS3CustomHonorMaxErrorRetryInClientConfig"',
+            'Whether this retry policy should honor the max error retry set by ClientConfiguration#setMaxErrorRetry(int)')
+    .details-row
+        +number('Maximum retry attempts:', clientCfgModel + '.maxErrorRetry', '"checkpointS3MaxErrorRetry"', 'true', '-1', '0',
+        'Maximum number of retry attempts for failed retryable requests<br/>\
+        If -1 the configured RetryPolicy will be used to control the retry count')
+    .details-row
+        +number('Socket timeout:', clientCfgModel + '.socketTimeout', '"checkpointS3SocketTimeout"', 'true', '50000', '0',
+        'Amount of time in milliseconds to wait for data to be transfered over an established, open connection before the connection times out and is closed<br/>\
+        A value of <b>0</b> means infinity')
+    .details-row
+        +number('Connection timeout:', clientCfgModel + '.connectionTimeout', '"checkpointS3ConnectionTimeout"', 'true', '50000', '0',
+        'Amount of time in milliseconds to wait when initially establishing a connection before giving up and timing out<br/>\
+        A value of <b>0</b> means infinity')
+    .details-row
+        +number('Request timeout:', clientCfgModel + '.requestTimeout', '"checkpointS3RequestTimeout"', 'true', '0', '-1',
+        'Amount of time in milliseconds to wait for the request to complete before giving up and timing out<br/>\
+        A non - positive value means infinity')
+    .details-row
+        +text('Signature algorithm:', clientCfgModel + '.signerOverride', '"checkpointS3SignerOverride"', 'false', 'Not specified',
+        'Name of the signature algorithm to use for signing requests made by this client')
+    .details-row
+        +number('Connection TTL:', clientCfgModel + '.connectionTTL', '"checkpointS3ConnectionTTL"', 'true', '-1', '-1',
+        'Expiration time in milliseconds for a connection in the connection pool<br/>\
+        By default, it is set to <b>-1</b>, i.e. connections do not expire')
+    .details-row
+        +number('Idle timeout:', clientCfgModel + '.connectionMaxIdleMillis', '"checkpointS3ConnectionMaxIdleMillis"', 'true', '60000', '0',
+        'Maximum amount of time that an idle connection may sit in the connection pool and still be eligible for reuse')
+    .details-row
+        +java-class('DNS resolver:', clientCfgModel + '.dnsResolver', '"checkpointS3DnsResolver" + $index', 'true', 'false',
+        'DNS Resolver that should be used to for resolving AWS IP addresses', checkpointS3)
+    .details-row
+        +number('Response metadata cache size:', clientCfgModel + '.responseMetadataCacheSize', '"checkpointS3ResponseMetadataCacheSize"', 'true', '50', '0',
+        'Response metadata cache size')
+    .details-row
+        +java-class('SecureRandom class name:', clientCfgModel + '.secureRandom', '"checkpointS3SecureRandom" + $index', 'true', 'false',
+        'SecureRandom to be used by the SDK class name', checkpointS3)
+    .details-row
+        +checkbox('Use reaper', clientCfgModel + '.useReaper', '"checkpointS3UseReaper"', 'Checks if the IdleConnectionReaper is to be started')
+    .details-row
+        +checkbox('Use GZIP', clientCfgModel + '.useGzip', '"checkpointS3UseGzip"', 'Checks if gzip compression is used')
+    .details-row
+        +checkbox('Preemptively basic authentication', clientCfgModel + '.preemptiveBasicProxyAuth', '"checkpointS3PreemptiveBasicProxyAuth"',
+        'Attempt to authenticate preemptively against proxy servers using basic authentication')
+    .details-row
+        +checkbox('TCP KeepAlive', clientCfgModel + '.useTcpKeepAlive', '"checkpointS3UseTcpKeepAlive"', 'TCP KeepAlive support is enabled')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/collision.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision.jade
deleted file mode 100644
index 91676df..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision.jade
+++ /dev/null
@@ -1,63 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'collision'
--var model = 'backupItem.collision'
--var modelCollisionKind = model + '.kind';
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Collision configuration
-        ignite-form-field-tooltip.tipLabel
-            | Configuration Collision SPI allows to regulate how grid jobs get executed when they arrive on a destination node for execution#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/job-scheduling" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +dropdown('CollisionSpi:', modelCollisionKind, '"collisionKind"', 'true', '',
-                        '[\
-                            {value: "JobStealing", label: "Job stealing"},\
-                            {value: "FifoQueue", label: "FIFO queue"},\
-                            {value: "PriorityQueue", label: "Priority queue"},\
-                            {value: "Custom", label: "Custom"},\
-                            {value: "Noop", label: "Default"}\
-                        ]',
-                        'Regulate how grid jobs get executed when they arrive on a destination node for execution\
-                        <ul>\
-                            <li>Job stealing - supports job stealing from over-utilized nodes to under-utilized nodes</li>\
-                            <li>FIFO queue - jobs are ordered as they arrived</li>\
-                            <li>Priority queue - jobs are first ordered by their priority</li>\
-                            <li>Custom - custom CollisionSpi implementation</li>\
-                            <li>Default - jobs are activated immediately on arrival to mapped node</li>\
-                        </ul>')
-                .settings-row(ng-show='#{modelCollisionKind} !== "Noop"')
-                    .panel-details
-                        div(ng-show='#{modelCollisionKind} === "JobStealing"')
-                            include ./collision/job-stealing.jade
-                        div(ng-show='#{modelCollisionKind} === "FifoQueue"')
-                            include ./collision/fifo-queue.jade
-                        div(ng-show='#{modelCollisionKind} === "PriorityQueue"')
-                            include ./collision/priority-queue.jade
-                        div(ng-show='#{modelCollisionKind} === "Custom"')
-                            include ./collision/custom.jade
-            .col-sm-6
-                -var model = 'backupItem.collision'
-                +preview-xml-java(model, 'clusterCollision')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/collision.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision.pug
new file mode 100644
index 0000000..2f58e0a
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision.pug
@@ -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.
+
+include /app/helpers/jade/mixins
+
+-var form = 'collision'
+-var model = 'backupItem.collision'
+-var modelCollisionKind = model + '.kind';
+
+.panel.panel-default(ng-form=form novalidate)
+    .panel-heading(bs-collapse-toggle ng-click=`ui.loadPanel('${form}')`)
+        ignite-form-panel-chevron
+        label Collision configuration
+        ignite-form-field-tooltip.tipLabel
+            | Configuration Collision SPI allows to regulate how grid jobs get executed when they arrive on a destination node for execution#[br]
+            | #[a(href="https://apacheignite.readme.io/docs/job-scheduling" target="_blank") More info]
+        ignite-form-revert
+    .panel-collapse(role='tabpanel' bs-collapse-target id=`${form}`)
+        .panel-body(ng-if=`ui.isPanelLoaded('${form}')`)
+            .col-sm-6
+                .settings-row
+                    +dropdown('CollisionSpi:', modelCollisionKind, '"collisionKind"', 'true', '',
+                        '[\
+                            {value: "JobStealing", label: "Job stealing"},\
+                            {value: "FifoQueue", label: "FIFO queue"},\
+                            {value: "PriorityQueue", label: "Priority queue"},\
+                            {value: "Custom", label: "Custom"},\
+                            {value: "Noop", label: "Default"}\
+                        ]',
+                        'Regulate how grid jobs get executed when they arrive on a destination node for execution\
+                        <ul>\
+                            <li>Job stealing - supports job stealing from over-utilized nodes to under-utilized nodes</li>\
+                            <li>FIFO queue - jobs are ordered as they arrived</li>\
+                            <li>Priority queue - jobs are first ordered by their priority</li>\
+                            <li>Custom - custom CollisionSpi implementation</li>\
+                            <li>Default - jobs are activated immediately on arrival to mapped node</li>\
+                        </ul>')
+                .settings-row(ng-show=`${modelCollisionKind} !== 'Noop'`)
+                    .panel-details
+                        div(ng-show=`${modelCollisionKind} === 'JobStealing'`)
+                            include ./collision/job-stealing
+                        div(ng-show=`${modelCollisionKind} === 'FifoQueue'`)
+                            include ./collision/fifo-queue
+                        div(ng-show=`${modelCollisionKind} === 'PriorityQueue'`)
+                            include ./collision/priority-queue
+                        div(ng-show=`${modelCollisionKind} === 'Custom'`)
+                            include ./collision/custom
+            .col-sm-6
+                -var model = 'backupItem.collision'
+                +preview-xml-java(model, 'clusterCollision')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/custom.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/custom.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/custom.jade
deleted file mode 100644
index 8e77ac4..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/custom.jade
+++ /dev/null
@@ -1,24 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.collision.Custom'
--var required = 'backupItem.collision.kind === "Custom"'
-
-div
-    .details-row
-        +java-class('Class:', model + '.class', '"collisionCustom"', 'true', required, 'CollisionSpi implementation class', required)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/custom.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/custom.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/custom.pug
new file mode 100644
index 0000000..dc5dee0
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/custom.pug
@@ -0,0 +1,24 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.collision.Custom'
+-var required = 'backupItem.collision.kind === "Custom"'
+
+div
+    .details-row
+        +java-class('Class:', `${model}.class`, '"collisionCustom"', 'true', required, 'CollisionSpi implementation class', required)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/fifo-queue.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/fifo-queue.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/fifo-queue.jade
deleted file mode 100644
index cd8b6a3..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/fifo-queue.jade
+++ /dev/null
@@ -1,27 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.collision.FifoQueue'
-
-div
-    .details-row
-        +number('Parallel jobs number:', model + '.parallelJobsNumber', '"fifoParallelJobsNumber"', 'true', 'availableProcessors * 2', '1',
-            'Number of jobs that can be executed in parallel')
-    .details-row
-        +number('Wait jobs number:', model + '.waitingJobsNumber', '"fifoWaitingJobsNumber"', 'true', 'Integer.MAX_VALUE', '0',
-            'Maximum number of jobs that are allowed to wait in waiting queue')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/fifo-queue.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/fifo-queue.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/fifo-queue.pug
new file mode 100644
index 0000000..159b463
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/fifo-queue.pug
@@ -0,0 +1,27 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.collision.FifoQueue'
+
+div
+    .details-row
+        +number('Parallel jobs number:', `${model}.parallelJobsNumber`, '"fifoParallelJobsNumber"', 'true', 'availableProcessors * 2', '1',
+            'Number of jobs that can be executed in parallel')
+    .details-row
+        +number('Wait jobs number:', `${model}.waitingJobsNumber`, '"fifoWaitingJobsNumber"', 'true', 'Integer.MAX_VALUE', '0',
+            'Maximum number of jobs that are allowed to wait in waiting queue')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/job-stealing.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/job-stealing.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/job-stealing.jade
deleted file mode 100644
index dbe0478..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/job-stealing.jade
+++ /dev/null
@@ -1,63 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.collision.JobStealing'
--var stealingAttributes = model + '.stealingAttributes'
-
-div
-    .details-row
-        +number('Active jobs threshold:', model + '.activeJobsThreshold', '"jsActiveJobsThreshold"', 'true', '95', '0',
-            'Number of jobs that can be executed in parallel')
-    .details-row
-        +number('Wait jobs threshold:', model + '.waitJobsThreshold', '"jsWaitJobsThreshold"', 'true', '0', '0',
-            'Job count threshold at which this node will start stealing jobs from other nodes')
-    .details-row
-        +number('Message expire time:', model + '.messageExpireTime', '"jsMessageExpireTime"', 'true', '1000', '1',
-            'Message expire time in ms')
-    .details-row
-        +number('Maximum stealing attempts:', model + '.maximumStealingAttempts', '"jsMaximumStealingAttempts"', 'true', '5', '1',
-            'Maximum number of attempts to steal job by another node')
-    .details-row
-        +checkbox('Stealing enabled', model + '.stealingEnabled', '"jsStealingEnabled"',
-            'Node should attempt to steal jobs from other nodes')
-    .details-row
-        +java-class('External listener:', model + '.externalCollisionListener', '"jsExternalCollisionListener"', 'true', 'false',
-            'Listener to be set for notification of external collision events', 'backupItem.collision.kind === "JobStealing"')
-    .details-row
-        +ignite-form-group
-            ignite-form-field-label
-                | Stealing attributes
-            ignite-form-group-tooltip
-                | Configuration parameter to enable stealing to/from only nodes that have these attributes set
-            ignite-form-group-add(ng-click='tableNewItem(stealingAttributesTbl)')
-                | Add stealing attribute
-            .group-content-empty(ng-if='!((#{stealingAttributes} && #{stealingAttributes}.length > 0) || tableNewItemActive(stealingAttributesTbl))')
-                | Not defined
-            .group-content(ng-show='(#{stealingAttributes} && #{stealingAttributes}.length > 0) || tableNewItemActive(stealingAttributesTbl)')
-                table.links-edit(id='attributes' st-table=stealingAttributes)
-                    tbody
-                        tr(ng-repeat='item in #{stealingAttributes} track by $index')
-                            td.col-sm-12(ng-show='!tableEditing(stealingAttributesTbl, $index)')
-                                a.labelFormField(ng-click='tableStartEdit(backupItem, stealingAttributesTbl, $index)') {{item.name}} = {{item.value}}
-                                +btn-remove('tableRemove(backupItem, stealingAttributesTbl, $index)', '"Remove attribute"')
-                            td.col-sm-12(ng-show='tableEditing(stealingAttributesTbl, $index)')
-                                +table-pair-edit('stealingAttributesTbl', 'cur', 'Attribute name', 'Attribute value', false, false, '{{::stealingAttributesTbl.focusId + $index}}', '$index', '=')
-                    tfoot(ng-show='tableNewItemActive(stealingAttributesTbl)')
-                        tr
-                            td.col-sm-12
-                                +table-pair-edit('stealingAttributesTbl', 'new', 'Attribute name', 'Attribute value', false, false, '{{::stealingAttributesTbl.focusId + $index}}', '-1', '=')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/job-stealing.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/job-stealing.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/job-stealing.pug
new file mode 100644
index 0000000..d10a02e
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/job-stealing.pug
@@ -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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.collision.JobStealing'
+-var stealingAttributes = `${model}.stealingAttributes`
+
+div
+    .details-row
+        +number('Active jobs threshold:', `${model}.activeJobsThreshold`, '"jsActiveJobsThreshold"', 'true', '95', '0',
+            'Number of jobs that can be executed in parallel')
+    .details-row
+        +number('Wait jobs threshold:', `${model}.waitJobsThreshold`, '"jsWaitJobsThreshold"', 'true', '0', '0',
+            'Job count threshold at which this node will start stealing jobs from other nodes')
+    .details-row
+        +number('Message expire time:', `${model}.messageExpireTime`, '"jsMessageExpireTime"', 'true', '1000', '1',
+            'Message expire time in ms')
+    .details-row
+        +number('Maximum stealing attempts:', `${model}.maximumStealingAttempts`, '"jsMaximumStealingAttempts"', 'true', '5', '1',
+            'Maximum number of attempts to steal job by another node')
+    .details-row
+        +checkbox('Stealing enabled', `${model}.stealingEnabled`, '"jsStealingEnabled"',
+            'Node should attempt to steal jobs from other nodes')
+    .details-row
+        +java-class('External listener:', `${model}.externalCollisionListener`, '"jsExternalCollisionListener"', 'true', 'false',
+            'Listener to be set for notification of external collision events', 'backupItem.collision.kind === "JobStealing"')
+    .details-row
+        +ignite-form-group
+            ignite-form-field-label
+                | Stealing attributes
+            ignite-form-group-tooltip
+                | Configuration parameter to enable stealing to/from only nodes that have these attributes set
+            ignite-form-group-add(ng-click='tableNewItem(stealingAttributesTbl)')
+                | Add stealing attribute
+            .group-content-empty(ng-if=`!((${stealingAttributes} && ${stealingAttributes}.length > 0) || tableNewItemActive(stealingAttributesTbl))`)
+                | Not defined
+            .group-content(ng-show=`(${stealingAttributes} && ${stealingAttributes}.length > 0) || tableNewItemActive(stealingAttributesTbl)`)
+                table.links-edit(id='attributes' st-table=stealingAttributes)
+                    tbody
+                        tr(ng-repeat=`item in ${stealingAttributes} track by $index`)
+                            td.col-sm-12(ng-show='!tableEditing(stealingAttributesTbl, $index)')
+                                a.labelFormField(ng-click='tableStartEdit(backupItem, stealingAttributesTbl, $index)') {{item.name}} = {{item.value}}
+                                +btn-remove('tableRemove(backupItem, stealingAttributesTbl, $index)', '"Remove attribute"')
+                            td.col-sm-12(ng-show='tableEditing(stealingAttributesTbl, $index)')
+                                +table-pair-edit('stealingAttributesTbl', 'cur', 'Attribute name', 'Attribute value', false, false, '{{::stealingAttributesTbl.focusId + $index}}', '$index', '=')
+                    tfoot(ng-show='tableNewItemActive(stealingAttributesTbl)')
+                        tr
+                            td.col-sm-12
+                                +table-pair-edit('stealingAttributesTbl', 'new', 'Attribute name', 'Attribute value', false, false, '{{::stealingAttributesTbl.focusId + $index}}', '-1', '=')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/priority-queue.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/priority-queue.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/priority-queue.jade
deleted file mode 100644
index 6f52ee0..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/priority-queue.jade
+++ /dev/null
@@ -1,42 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var model = 'backupItem.collision.PriorityQueue'
-
-div
-    .details-row
-        +number('Parallel jobs number:', model + '.parallelJobsNumber', '"priorityParallelJobsNumber"', 'true', 'availableProcessors * 2', '1',
-            'Number of jobs that can be executed in parallel')
-    .details-row
-        +number('Waiting jobs number:', model + '.waitingJobsNumber', '"priorityWaitingJobsNumber"', 'true', 'Integer.MAX_VALUE', '0',
-            'Maximum number of jobs that are allowed to wait in waiting queue')
-    .details-row
-        +text('Priority attribute key:', model + '.priorityAttributeKey', '"priorityPriorityAttributeKey"', 'false', 'grid.task.priority',
-            'Task priority attribute key')
-    .details-row
-        +text('Job priority attribute key:', model + '.jobPriorityAttributeKey', '"priorityJobPriorityAttributeKey"', 'false', 'grid.job.priority',
-            'Job priority attribute key')
-    .details-row
-        +number('Default priority:', model + '.defaultPriority', '"priorityDefaultPriority"', 'true', '0', '0',
-            'Default priority to use if a job does not have priority attribute set')
-    .details-row
-        +number('Starvation increment:', model + '.starvationIncrement', '"priorityStarvationIncrement"', 'true', '1', '0',
-            'Value to increment job priority by every time a lower priority job gets behind a higher priority job')
-    .details-row
-        +checkbox('Starvation prevention enabled', model + '.starvationPreventionEnabled', '"priorityStarvationPreventionEnabled"',
-            'Job starvation prevention is enabled')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/priority-queue.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/priority-queue.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/priority-queue.pug
new file mode 100644
index 0000000..04056df
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/collision/priority-queue.pug
@@ -0,0 +1,42 @@
+//-
+    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.
+
+include /app/helpers/jade/mixins
+
+-var model = 'backupItem.collision.PriorityQueue'
+
+div
+    .details-row
+        +number('Parallel jobs number:', `${model}.parallelJobsNumber`, '"priorityParallelJobsNumber"', 'true', 'availableProcessors * 2', '1',
+            'Number of jobs that can be executed in parallel')
+    .details-row
+        +number('Waiting jobs number:', `${model}.waitingJobsNumber`, '"priorityWaitingJobsNumber"', 'true', 'Integer.MAX_VALUE', '0',
+            'Maximum number of jobs that are allowed to wait in waiting queue')
+    .details-row
+        +text('Priority attribute key:', `${model}.priorityAttributeKey`, '"priorityPriorityAttributeKey"', 'false', 'grid.task.priority',
+            'Task priority attribute key')
+    .details-row
+        +text('Job priority attribute key:', `${model}.jobPriorityAttributeKey`, '"priorityJobPriorityAttributeKey"', 'false', 'grid.job.priority',
+            'Job priority attribute key')
+    .details-row
+        +number('Default priority:', `${model}.defaultPriority`, '"priorityDefaultPriority"', 'true', '0', '0',
+            'Default priority to use if a job does not have priority attribute set')
+    .details-row
+        +number('Starvation increment:', `${model}.starvationIncrement`, '"priorityStarvationIncrement"', 'true', '1', '0',
+            'Value to increment job priority by every time a lower priority job gets behind a higher priority job')
+    .details-row
+        +checkbox('Starvation prevention enabled', `${model}.starvationPreventionEnabled`, '"priorityStarvationPreventionEnabled"',
+            'Job starvation prevention is enabled')

http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.jade b/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.jade
deleted file mode 100644
index 047c9a2..0000000
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.jade
+++ /dev/null
@@ -1,100 +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.
-
-include /app/helpers/jade/mixins.jade
-
--var form = 'communication'
--var model = 'backupItem'
--var communication = model + '.communication'
-
-.panel.panel-default(ng-form=form novalidate)
-    .panel-heading(bs-collapse-toggle ng-click='ui.loadPanel("#{form}")')
-        ignite-form-panel-chevron
-        label Communication
-        ignite-form-field-tooltip.tipLabel
-            | Configuration of communication with other nodes by TCP/IP
-            | Provide basic plumbing to send and receive grid messages and is utilized for all distributed grid operations#[br]
-            | #[a(href="https://apacheignite.readme.io/docs/network-config" target="_blank") More info]
-        ignite-form-revert
-    .panel-collapse(role='tabpanel' bs-collapse-target id=form)
-        .panel-body(ng-if='ui.isPanelLoaded("#{form}")')
-            .col-sm-6
-                .settings-row
-                    +number('Timeout:', model + '.networkTimeout', '"commNetworkTimeout"', 'true', '5000', '1', 'Maximum timeout in milliseconds for network requests')
-                .settings-row
-                    +number('Send retry delay:', model + '.networkSendRetryDelay', '"networkSendRetryDelay"', 'true', '1000', '1', 'Interval in milliseconds between message send retries')
-                .settings-row
-                    +number('Send retry count:', model + '.networkSendRetryCount', '"networkSendRetryCount"', 'true', '3', '1', 'Message send retries count')
-                .settings-row
-                    +number('Discovery startup delay:', model + '.discoveryStartupDelay', '"discoveryStartupDelay"', 'true', '60000', '1', 'This value is used to expire messages from waiting list whenever node discovery discrepancies happen')
-                .settings-row
-                    +java-class('Communication listener:', communication + '.listener', '"comListener"', 'true', 'false', 'Listener of communication events')
-                .settings-row
-                    +text-ip-address('Local IP address:', communication + '.localAddress', '"comLocalAddress"', 'true', '0.0.0.0',
-                        'Local host address for socket binding<br/>\
-                        If not specified use all available addres on local host')
-                .settings-row
-                    +number-min-max('Local port:', communication + '.localPort', '"comLocalPort"', 'true', '47100', '1024', '65535', 'Local port for socket binding')
-                .settings-row
-                    +number('Local port range:', communication + '.localPortRange', '"comLocalPortRange"', 'true', '100', '1', 'Local port range for local host ports')
-                .settings-row
-                    +number-min-max('Shared memory port:', communication + '.sharedMemoryPort', '"sharedMemoryPort"', 'true', '48100', '-1', '65535',
-                        'Local port to accept shared memory connections<br/>\
-                        If set to #[b -1] shared memory communication will be disabled')
-                .settings-row
-                    +number('Idle connection timeout:', communication + '.idleConnectionTimeout', '"idleConnectionTimeout"', 'true', '30000', '1',
-                        'Maximum idle connection timeout upon which a connection to client will be closed')
-                .settings-row
-                    +number('Connect timeout:', communication + '.connectTimeout', '"connectTimeout"', 'true', '5000', '0', 'Connect timeout used when establishing connection with remote nodes')
-                .settings-row
-                    +number('Maximum connect timeout:', communication + '.maxConnectTimeout', '"maxConnectTimeout"', 'true', '600000', '0', 'Maximum connect timeout')
-                .settings-row
-                    +number('Reconnect count:', communication + '.reconnectCount', '"comReconnectCount"', 'true', '10', '1',
-                        'Maximum number of reconnect attempts used when establishing connection with remote nodes')
-                .settings-row
-                    +number('Socket send buffer:', communication + '.socketSendBuffer', '"socketSendBuffer"', 'true', '32768', '0', 'Send buffer size for sockets created or accepted by this SPI')
-                .settings-row
-                    +number('Socket receive buffer:', communication + '.socketReceiveBuffer', '"socketReceiveBuffer"', 'true', '32768', '0', 'Receive buffer size for sockets created or accepted by this SPI')
-                .settings-row
-                    +number('Slow client queue limit:', communication + '.slowClientQueueLimit', '"slowClientQueueLimit"', 'true', '0', '0', 'Slow client queue limit')
-                .settings-row
-                    +number('Ack send threshold:', communication + '.ackSendThreshold', '"ackSendThreshold"', 'true', '16', '1', 'Number of received messages per connection to node after which acknowledgment message is sent')
-                .settings-row
-                    +number('Message queue limit:', communication + '.messageQueueLimit', '"messageQueueLimit"', 'true', '1024', '0', 'Message queue limit for incoming and outgoing messages')
-                .settings-row
-                    +number('Unacknowledged messages:', communication + '.unacknowledgedMessagesBufferSize', '"unacknowledgedMessagesBufferSize"', 'true', '0', '0',
-                        'Maximum number of stored unacknowledged messages per connection to node<br/>\
-                        If specified non zero value it should be\
-                        <ul>\
-                            <li>At least ack send threshold * 5</li>\
-                            <li>At least message queue limit * 5</li>\
-                        </ul>')
-                .settings-row
-                    +number('Socket write timeout:', communication + '.socketWriteTimeout', '"socketWriteTimeout"', 'true', '2000', '0', 'Socket write timeout')
-                .settings-row
-                    +number('Selectors count:', communication + '.selectorsCount', '"selectorsCount"', 'true', 'min(4, availableProcessors)', '1', 'Count of selectors te be used in TCP server')
-                .settings-row
-                    +java-class('Address resolver:', communication + '.addressResolver', '"comAddressResolver"', 'true', 'false', 'Provides resolution between external and internal addresses')
-                .settings-row
-                    +checkbox('Direct buffer', communication + '.directBuffer', '"directBuffer"',
-                    'If value is true, then SPI will use ByteBuffer.allocateDirect(int) call<br/>\
-                    Otherwise, SPI will use ByteBuffer.allocate(int) call')
-                .settings-row
-                    +checkbox('Direct send buffer', communication + '.directSendBuffer', '"directSendBuffer"', 'Flag defining whether direct send buffer should be used')
-                .settings-row
-                    +checkbox('TCP_NODELAY option', communication + '.tcpNoDelay', '"tcpNoDelay"', 'Value for TCP_NODELAY socket option')
-            .col-sm-6
-                +preview-xml-java(model, 'clusterCommunication')


[37/50] [abbrv] ignite git commit: Merge branch 'ignite-1.9.2' of https://github.com/gridgain/apache-ignite

Posted by sb...@apache.org.
Merge branch 'ignite-1.9.2' of https://github.com/gridgain/apache-ignite


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

Branch: refs/heads/ignite-4705-2
Commit: 32506d69c6b2654a3547a6797254c7527c6ef239
Parents: a61a98a 8817190
Author: Sergi Vladykin <se...@gmail.com>
Authored: Thu Mar 9 23:39:48 2017 +0300
Committer: Sergi Vladykin <se...@gmail.com>
Committed: Thu Mar 9 23:39:48 2017 +0300

----------------------------------------------------------------------
 .../cache/query/GridCacheSqlQuery.java          |  82 ++++-
 .../processors/query/h2/IgniteH2Indexing.java   |   4 +-
 .../query/h2/opt/GridH2CollocationModel.java    |   6 +-
 .../query/h2/opt/GridH2ScanIndex.java           | 273 +++++++++++++++++
 .../processors/query/h2/opt/GridH2Table.java    | 244 +--------------
 .../processors/query/h2/sql/GridSqlQuery.java   |  17 --
 .../query/h2/sql/GridSqlQueryParser.java        |   4 +-
 .../query/h2/sql/GridSqlQuerySplitter.java      |  38 ++-
 .../query/h2/sql/GridSqlSortColumn.java         |  41 +++
 .../query/h2/twostep/GridMapQueryExecutor.java  |  83 +++--
 .../query/h2/twostep/GridMergeIndex.java        | 300 +++++++++++--------
 .../query/h2/twostep/GridMergeIndexSorted.java  | 172 ++++++++---
 .../h2/twostep/GridMergeIndexUnsorted.java      |  67 ++++-
 .../query/h2/twostep/GridMergeTable.java        |  70 ++++-
 .../h2/twostep/GridReduceQueryExecutor.java     | 101 +++++--
 .../query/h2/twostep/GridResultPage.java        |  34 ++-
 .../h2/twostep/msg/GridH2QueryRequest.java      |  11 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |  10 +-
 .../query/IgniteSqlSplitterSelfTest.java        | 100 ++++++-
 .../query/h2/sql/H2CompareBigQueryTest.java     |   4 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   2 +
 .../processors/query/h2/sql/bigQuery.sql        |  34 ++-
 22 files changed, 1138 insertions(+), 559 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/32506d69/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/32506d69/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------


[35/50] [abbrv] ignite git commit: ignite-1.9 - SQL related fixes and improvements: - Sorted MERGE index - EXPLAIN fixes - Replicated subqueries fixes

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index 4cae6ac..8d3ece9 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -67,6 +67,7 @@ import org.apache.ignite.internal.processors.query.GridQueryCancel;
 import org.apache.ignite.internal.processors.query.GridRunningQueryInfo;
 import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing;
 import org.apache.ignite.internal.processors.query.h2.opt.GridH2QueryContext;
+import org.apache.ignite.internal.processors.query.h2.sql.GridSqlSortColumn;
 import org.apache.ignite.internal.processors.query.h2.sql.GridSqlType;
 import org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryCancelRequest;
 import org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryFailResponse;
@@ -86,6 +87,7 @@ import org.apache.ignite.plugin.extensions.communication.Message;
 import org.h2.command.ddl.CreateTableData;
 import org.h2.engine.Session;
 import org.h2.index.Cursor;
+import org.h2.index.Index;
 import org.h2.jdbc.JdbcConnection;
 import org.h2.jdbc.JdbcResultSet;
 import org.h2.jdbc.JdbcStatement;
@@ -97,6 +99,7 @@ import org.h2.value.Value;
 import org.jetbrains.annotations.Nullable;
 import org.jsr166.ConcurrentHashMap8;
 
+import static java.util.Collections.singletonList;
 import static org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion.NONE;
 import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.SQL_FIELDS;
 import static org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.setupConnection;
@@ -115,6 +118,12 @@ public class GridReduceQueryExecutor {
     private static final IgniteProductVersion DISTRIBUTED_JOIN_SINCE = IgniteProductVersion.fromString("1.7.0");
 
     /** */
+    private static final String MERGE_INDEX_UNSORTED = "merge_scan";
+
+    /** */
+    private static final String MERGE_INDEX_SORTED = "merge_sorted";
+
+    /** */
     private GridKernalContext ctx;
 
     /** */
@@ -354,7 +363,7 @@ public class GridReduceQueryExecutor {
 
         if (msg.retry() != null)
             retry(r, msg.retry(), node.id());
-        else if (msg.allRows() != -1) // Only the first page contains row count.
+        else if (msg.page() == 0) // Do count down on each first page received.
             r.latch.countDown();
     }
 
@@ -518,7 +527,7 @@ public class GridReduceQueryExecutor {
             Map<ClusterNode, IntArray> partsMap = null;
 
             if (qry.isLocal())
-                nodes = Collections.singleton(ctx.discovery().localNode());
+                nodes = singletonList(ctx.discovery().localNode());
             else {
                 if (isPreloadingActive(cctx, extraSpaces)) {
                     if (cctx.isReplicated())
@@ -542,17 +551,17 @@ public class GridReduceQueryExecutor {
                         "We must be on a client node.";
 
                     // Select random data node to run query on a replicated data or get EXPLAIN PLAN from a single node.
-                    nodes = Collections.singleton(F.rand(nodes));
+                    nodes = singletonList(F.rand(nodes));
                 }
             }
 
-            final Collection<ClusterNode> finalNodes = nodes;
-
             int tblIdx = 0;
 
             final boolean skipMergeTbl = !qry.explain() && qry.skipMergeTable();
 
-            final int segmentsPerIndex = cctx.config().getQueryParallelism();
+            final int segmentsPerIndex = qry.explain() ? 1 : cctx.config().getQueryParallelism();
+
+            int replicatedQrysCnt = 0;
 
             for (GridCacheSqlQuery mapQry : qry.mapQueries()) {
                 GridMergeIndex idx;
@@ -567,19 +576,33 @@ public class GridReduceQueryExecutor {
                         throw new IgniteException(e);
                     }
 
-                    idx = tbl.getScanIndex(null);
+                    idx = tbl.getMergeIndex();
 
                     fakeTable(r.conn, tblIdx++).innerTable(tbl);
                 }
                 else
                     idx = GridMergeIndexUnsorted.createDummy(ctx);
 
-                idx.setSources(nodes, segmentsPerIndex);
+                // If the query has only replicated tables, we have to run it on a single node only.
+                if (!mapQry.isPartitioned()) {
+                    ClusterNode node = F.rand(nodes);
+
+                    mapQry.node(node.id());
+
+                    replicatedQrysCnt++;
+
+                    idx.setSources(singletonList(node), 1); // Replicated tables can have only 1 segment.
+                }
+                else
+                    idx.setSources(nodes, segmentsPerIndex);
+
+                idx.setPageSize(r.pageSize);
 
                 r.idxs.add(idx);
             }
 
-            r.latch = new CountDownLatch(r.idxs.size() * nodes.size() * segmentsPerIndex);
+            r.latch = new CountDownLatch(
+                (r.idxs.size() - replicatedQrysCnt) * nodes.size() * segmentsPerIndex + replicatedQrysCnt);
 
             runs.put(qryReqId, r);
 
@@ -607,6 +630,8 @@ public class GridReduceQueryExecutor {
                 final boolean oldStyle = minNodeVer.compareToIgnoreTimestamp(DISTRIBUTED_JOIN_SINCE) < 0;
                 final boolean distributedJoins = qry.distributedJoins();
 
+                final Collection<ClusterNode> finalNodes = nodes;
+
                 cancel.set(new Runnable() {
                     @Override public void run() {
                         send(finalNodes, new GridQueryCancelRequest(qryReqId), null, false);
@@ -627,6 +652,9 @@ public class GridReduceQueryExecutor {
                 if (qry.isLocal())
                     flags |= GridH2QueryRequest.FLAG_IS_LOCAL;
 
+                if (qry.explain())
+                    flags |= GridH2QueryRequest.FLAG_EXPLAIN;
+
                 if (send(nodes,
                     oldStyle ?
                         new GridQueryRequest(qryReqId,
@@ -724,7 +752,7 @@ public class GridReduceQueryExecutor {
                                 r.conn,
                                 rdc.query(),
                                 F.asList(rdc.parameters()),
-                                false,
+                                false, // The statement will cache some extra thread local objects.
                                 timeoutMillis,
                                 cancel);
 
@@ -783,19 +811,6 @@ public class GridReduceQueryExecutor {
     }
 
     /**
-     * @param idxs Merge indexes.
-     * @return {@code true} If all remote data was fetched.
-     */
-    private static boolean allIndexesFetched(List<GridMergeIndex> idxs) {
-        for (int i = 0; i <  idxs.size(); i++) {
-            if (!idxs.get(i).fetchedAll())
-                return false;
-        }
-
-        return true;
-    }
-
-    /**
      * Returns true if the exception is triggered by query cancel.
      *
      * @param e Exception.
@@ -1256,6 +1271,7 @@ public class GridReduceQueryExecutor {
      * @return Table.
      * @throws IgniteCheckedException If failed.
      */
+    @SuppressWarnings("unchecked")
     private GridMergeTable createMergeTable(JdbcConnection conn, GridCacheSqlQuery qry, boolean explain)
         throws IgniteCheckedException {
         try {
@@ -1290,7 +1306,31 @@ public class GridReduceQueryExecutor {
             else
                 data.columns = planColumns();
 
-            return new GridMergeTable(data, ctx);
+            boolean sortedIndex = !F.isEmpty(qry.sortColumns());
+
+            GridMergeTable tbl = new GridMergeTable(data);
+
+            ArrayList<Index> idxs = new ArrayList<>(2);
+
+            if (explain) {
+                idxs.add(new GridMergeIndexUnsorted(ctx, tbl,
+                    sortedIndex ? MERGE_INDEX_SORTED : MERGE_INDEX_UNSORTED));
+            }
+            else if (sortedIndex) {
+                List<GridSqlSortColumn> sortCols = (List<GridSqlSortColumn>)qry.sortColumns();
+
+                GridMergeIndexSorted sortedMergeIdx = new GridMergeIndexSorted(ctx, tbl, MERGE_INDEX_SORTED,
+                    GridSqlSortColumn.toIndexColumns(tbl, sortCols));
+
+                idxs.add(GridMergeTable.createScanIndex(sortedMergeIdx));
+                idxs.add(sortedMergeIdx);
+            }
+            else
+                idxs.add(new GridMergeIndexUnsorted(ctx, tbl, MERGE_INDEX_UNSORTED));
+
+            tbl.indexes(idxs);
+
+            return tbl;
         }
         catch (Exception e) {
             U.closeQuiet(conn);
@@ -1407,22 +1447,17 @@ public class GridReduceQueryExecutor {
             while (latch.getCount() != 0) // We don't need to wait for all nodes to reply.
                 latch.countDown();
 
+            CacheException e = o instanceof CacheException ? (CacheException) o : null;
+
             for (GridMergeIndex idx : idxs) // Fail all merge indexes.
-                idx.fail(nodeId, o instanceof CacheException ? (CacheException) o : null);
+                idx.fail(nodeId, e);
         }
 
         /**
          * @param e Error.
          */
         void disconnected(CacheException e) {
-            if (!state.compareAndSet(null, e))
-                return;
-
-            while (latch.getCount() != 0) // We don't need to wait for all nodes to reply.
-                latch.countDown();
-
-            for (GridMergeIndex idx : idxs) // Fail all merge indexes.
-                idx.fail(e);
+            state(e, null);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
index 2057330..103084e 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
@@ -40,7 +40,7 @@ public class GridResultPage {
     private final UUID src;
 
     /** */
-    protected final GridQueryNextPageResponse res;
+    private final GridQueryNextPageResponse res;
 
     /** */
     private final int rowsInPage;
@@ -48,6 +48,9 @@ public class GridResultPage {
     /** */
     private Iterator<Value[]> rows;
 
+    /** */
+    private boolean last;
+
     /**
      * @param ctx Kernal context.
      * @param src Source.
@@ -119,10 +122,28 @@ public class GridResultPage {
     }
 
     /**
-     * @return {@code true} If this is a dummy last page for all the sources.
+     * @return {@code true} If this is either a real last page for a source or
+     *      a dummy terminating page with no rows.
      */
     public boolean isLast() {
-        return false;
+        return last;
+    }
+
+    /**
+     * @return {@code true} If it is a dummy last page.
+     */
+    public boolean isDummyLast() {
+        return last && res == null;
+    }
+
+    /**
+     * @param last Last page for a source.
+     * @return {@code this}.
+     */
+    public GridResultPage setLast(boolean last) {
+        this.last = last;
+
+        return this;
     }
 
     /**
@@ -153,6 +174,13 @@ public class GridResultPage {
     }
 
     /**
+     * @return Segment ID.
+     */
+    public int segmentId() {
+        return res.segmentId();
+    }
+
+    /**
      * @return Response.
      */
     public GridQueryNextPageResponse response() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
index 0ad534c..0aa788b 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
@@ -48,17 +48,22 @@ public class GridH2QueryRequest implements Message, GridCacheQueryMarshallable {
      * Map query will not destroy context until explicit query cancel request will be received because distributed join
      * requests can be received.
      */
-    public static int FLAG_DISTRIBUTED_JOINS = 1;
+    public static final int FLAG_DISTRIBUTED_JOINS = 1;
 
     /**
      * Remote map query executor will enforce join order for the received map queries.
      */
-    public static int FLAG_ENFORCE_JOIN_ORDER = 1 << 1;
+    public static final int FLAG_ENFORCE_JOIN_ORDER = 1 << 1;
 
     /**
      * Restrict distributed joins range-requests to local index segments. Range requests to other nodes will not be sent.
      */
-    public static int FLAG_IS_LOCAL = 1 << 2;
+    public static final int FLAG_IS_LOCAL = 1 << 2;
+
+    /**
+     * If it is an EXPLAIN command.
+     */
+    public static final int FLAG_EXPLAIN = 1 << 3;
 
     /** */
     private long reqId;

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
index 81c28a3..842b947 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
@@ -395,10 +395,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
 
         Collection<List<?>> res = qry.getAll();
 
-        if (cacheMode() == REPLICATED)
-            assertEquals(1, res.size());
-        else
-            assertEquals(gridCount(), res.size());
+        assertEquals(1, res.size());
 
         List<?> row = res.iterator().next();
 
@@ -410,10 +407,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
 
         res = qry.getAll();
 
-        if (cacheMode() == REPLICATED)
-            assertEquals(1, res.size());
-        else
-            assertEquals(gridCount(), res.size());
+        assertEquals(1, res.size());
 
         row = res.iterator().next();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
index 69f66a5..8eae549 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
@@ -36,13 +36,12 @@ import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cache.affinity.AffinityKeyMapped;
 import org.apache.ignite.cache.query.QueryCursor;
-import org.apache.ignite.cache.affinity.AffinityKeyMapped;
-import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.cache.query.annotations.QuerySqlField;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.processors.query.h2.twostep.GridMergeIndex;
 import org.apache.ignite.internal.util.GridRandom;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.X;
@@ -156,6 +155,70 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testSortedMergeIndex() throws Exception {
+        IgniteCache<Integer,Value> c = ignite(0).getOrCreateCache(cacheConfig("v", true,
+            Integer.class, Value.class));
+
+        try {
+            GridTestUtils.setFieldValue(null, GridMergeIndex.class, "PREFETCH_SIZE", 8);
+
+            Random rnd = new GridRandom();
+
+            int cnt = 1000;
+
+            for (int i = 0; i < cnt; i++) {
+                c.put(i, new Value(
+                    rnd.nextInt(5) == 0 ? null: rnd.nextInt(100),
+                    rnd.nextInt(8) == 0 ? null: rnd.nextInt(2000)));
+            }
+
+            List<List<?>> plan = c.query(new SqlFieldsQuery(
+                "explain select snd from Value order by fst desc")).getAll();
+            String rdcPlan = (String)plan.get(1).get(0);
+
+            assertTrue(rdcPlan.contains("merge_sorted"));
+            assertTrue(rdcPlan.contains("/* index sorted */"));
+
+            plan = c.query(new SqlFieldsQuery(
+                "explain select snd from Value")).getAll();
+            rdcPlan = (String)plan.get(1).get(0);
+
+            assertTrue(rdcPlan.contains("merge_scan"));
+            assertFalse(rdcPlan.contains("/* index sorted */"));
+
+            for (int i = 0; i < 10; i++) {
+                X.println(" --> " + i);
+
+                List<List<?>> res = c.query(new SqlFieldsQuery(
+                    "select fst from Value order by fst").setPageSize(5)
+                ).getAll();
+
+                assertEquals(cnt, res.size());
+
+                Integer p = null;
+
+                for (List<?> row : res) {
+                    Integer x = (Integer)row.get(0);
+
+                    if (x != null) {
+                        if (p != null)
+                            assertTrue(x + " >= " + p,  x >= p);
+
+                        p = x;
+                    }
+                }
+            }
+        }
+        finally {
+            GridTestUtils.setFieldValue(null, GridMergeIndex.class, "PREFETCH_SIZE", 1024);
+
+            c.destroy();
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testGroupIndexOperations() throws Exception {
         IgniteCache<Integer, GroupIndexTestValue> c = ignite(0).getOrCreateCache(cacheConfig("grp", false,
             Integer.class, GroupIndexTestValue.class));
@@ -848,13 +911,44 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
 
             String select0 = "select o.name n1, p.name n2 from \"pers\".Person2 p, \"org\".Organization o where p.orgId = o._key";
 
-            final SqlFieldsQuery qry = new SqlFieldsQuery(select0);
+            SqlFieldsQuery qry = new SqlFieldsQuery(select0);
 
             qry.setDistributedJoins(true);
 
             List<List<?>> results = c1.query(qry).getAll();
 
             assertEquals(2, results.size());
+
+            select0 += " order by n2 desc";
+
+            qry = new SqlFieldsQuery(select0);
+
+            qry.setDistributedJoins(true);
+
+            results = c1.query(qry).getAll();
+
+            assertEquals(2, results.size());
+
+            assertEquals("p2", results.get(0).get(1));
+            assertEquals("p1", results.get(1).get(1));
+
+            // Test for replicated subquery with aggregate.
+            select0 = "select p.name " +
+                "from \"pers\".Person2 p, " +
+                "(select max(_key) orgId from \"org\".Organization) o " +
+                "where p.orgId = o.orgId";
+
+            X.println("Plan: \n" +
+                c1.query(new SqlFieldsQuery("explain " + select0).setDistributedJoins(true)).getAll());
+
+            qry = new SqlFieldsQuery(select0);
+
+            qry.setDistributedJoins(true);
+
+            results = c1.query(qry).getAll();
+
+            assertEquals(1, results.size());
+            assertEquals("p2", results.get(0).get(0));
         }
         finally {
             c1.destroy();

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
index f8526a8..30dd80d 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
@@ -249,11 +249,13 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest {
         X.println(bigQry);
         X.println();
 
-        X.println("Plan: " + pCache.query(new SqlFieldsQuery("EXPLAIN " + bigQry)
+        X.println("   Plan: \n" + pCache.query(new SqlFieldsQuery("EXPLAIN " + bigQry)
             .setDistributedJoins(distributedJoins())).getAll());
 
         List<List<?>> res = compareQueryRes0(pCache, bigQry, distributedJoins(), new Object[0], Ordering.RANDOM);
 
+        X.println("   Result size: " + res.size());
+
         assertTrue(!res.isEmpty()); // Ensure we set good testing data at database.
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index b417b0a..0c74f12 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -106,6 +106,7 @@ import org.apache.ignite.internal.processors.query.h2.GridH2IndexingOffheapSelfT
 import org.apache.ignite.internal.processors.query.h2.opt.GridH2TableSelfTest;
 import org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest;
 import org.apache.ignite.internal.processors.query.h2.sql.GridQueryParsingTest;
+import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryDistributedJoinsTest;
 import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryTest;
 import org.apache.ignite.spi.communication.tcp.GridOrderedMessageCancelSelfTest;
 import org.apache.ignite.testframework.IgniteTestSuite;
@@ -214,6 +215,7 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
         // Ignite cache and H2 comparison.
         suite.addTestSuite(BaseH2CompareQueryTest.class);
         suite.addTestSuite(H2CompareBigQueryTest.class);
+        suite.addTestSuite(H2CompareBigQueryDistributedJoinsTest.class);
 
         // Cache query metrics.
         suite.addTestSuite(CacheLocalQueryMetricsSelfTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/test/resources/org/apache/ignite/internal/processors/query/h2/sql/bigQuery.sql
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/resources/org/apache/ignite/internal/processors/query/h2/sql/bigQuery.sql b/modules/indexing/src/test/resources/org/apache/ignite/internal/processors/query/h2/sql/bigQuery.sql
index 8d42d44..64b7e2a 100644
--- a/modules/indexing/src/test/resources/org/apache/ignite/internal/processors/query/h2/sql/bigQuery.sql
+++ b/modules/indexing/src/test/resources/org/apache/ignite/internal/processors/query/h2/sql/bigQuery.sql
@@ -26,21 +26,25 @@ from (
 	
 	select  date, orderId, rootOrderId, refOrderId as origOrderId, archSeq, alias
 	from "part".ReplaceOrder where alias='CUSTOM'
-  ) co, "part".OrderParams op
-  where co.date = op.date and co.orderId = op.orderId and co.archSeq = -- TODO: replace with 'dateToLong(co.date)+archSeq'.
-	(
-	  select max(archSeq) -- TODO: replace with 'dateToLong(co.date)+archSeq'.
-	  from (
-		  select  date, orderId, rootOrderId, origOrderId, archSeq, alias 
-		  from "part".CustOrder where alias='CUSTOM'
-		  
-		  union all
-		  
-		  select  date, orderId, rootOrderId, refOrderId as origOrderId, archSeq, alias
-		  from "part".ReplaceOrder where alias='CUSTOM'
-	  ) 
-	  where origOrderId = co.origOrderId and date = co.date
-	) and co.alias='CUSTOM'
+  ) co,
+  "part".OrderParams op,
+    (
+      select origOrderId, date, max(archSeq) maxArchSeq
+      from (
+          select  date, orderId, rootOrderId, origOrderId, archSeq, alias
+          from "part".CustOrder where alias='CUSTOM'
+
+          union all
+
+          select  date, orderId, rootOrderId, refOrderId as origOrderId, archSeq, alias
+          from "part".ReplaceOrder where alias='CUSTOM'
+      )
+      group by origOrderId, date
+   ) h
+  where co.date = op.date and co.orderId = op.orderId
+    and h.origOrderId = co.origOrderId and h.date = co.date
+    and co.archSeq = h.maxArchSeq
+	and co.alias='CUSTOM'
 ) cop 
 inner join (
   select e.date, e.rootOrderId as eRootOrderId, e.rootOrderId, sum(e.execShares) as execShares, 


[32/50] [abbrv] ignite git commit: IGNITE_4659 Minor templates fixes.

Posted by sb...@apache.org.
IGNITE_4659 Minor templates fixes.


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

Branch: refs/heads/ignite-4705-2
Commit: 2d385c51d7394a4aafcf96dbd3f8a88e530596a8
Parents: e960eb7
Author: vsisko <vs...@gridgain.com>
Authored: Thu Mar 9 10:00:34 2017 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Mar 9 10:00:34 2017 +0700

----------------------------------------------------------------------
 .../frontend/app/modules/states/configuration/clusters/binary.pug  | 2 +-
 .../app/modules/states/configuration/clusters/communication.pug    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2d385c51/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.pug
index ee9f37b..2e14e7f 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/binary.pug
@@ -72,6 +72,6 @@ include /app/helpers/jade/mixins
                                 +checkbox('Enum', 'model.enum', 'enum', 'Flag indicating that this type is the enum')
 
                 .settings-row
-                    +checkbox('Compact footer', model + '.compactFooter', '"compactFooter"', 'When enabled, Ignite will not write fields metadata when serializing objects(this will increase serialization performance), because internally #[b BinaryMarshaller] already distribute metadata inside cluster')
+                    +checkbox('Compact footer', model + '.compactFooter', '"compactFooter"', 'When enabled, Ignite will not write fields metadata when serializing objects (this will increase serialization performance), because internally <b>BinaryMarshaller</b> already distribute metadata inside cluster')
             .col-sm-6
                 +preview-xml-java(model, 'clusterBinary')

http://git-wip-us.apache.org/repos/asf/ignite/blob/2d385c51/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.pug
index cd93565..93bb5ce 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/communication.pug
@@ -53,7 +53,7 @@ include /app/helpers/jade/mixins
                 .settings-row
                     +number-min-max('Shared memory port:', `${communication}.sharedMemoryPort`, '"sharedMemoryPort"', 'true', '48100', '-1', '65535',
                         'Local port to accept shared memory connections<br/>\
-                        If set to #[b -1] shared memory communication will be disabled')
+                        If set to <b>-1</b> shared memory communication will be disabled')
                 .settings-row
                     +number('Idle connection timeout:', `${communication}.idleConnectionTimeout`, '"idleConnectionTimeout"', 'true', '30000', '1',
                         'Maximum idle connection timeout upon which a connection to client will be closed')


[36/50] [abbrv] ignite git commit: ignite-1.9 - SQL related fixes and improvements: - Sorted MERGE index - EXPLAIN fixes - Replicated subqueries fixes

Posted by sb...@apache.org.
ignite-1.9 - SQL related fixes and improvements:
 - Sorted MERGE index
 - EXPLAIN fixes
 - Replicated subqueries fixes

Squashed commit of the following:

commit 423c2155c85ed9be8dffb3517b7331b753e1ce5c
Author: Sergi Vladykin <se...@gmail.com>
Date:   Thu Mar 9 23:21:38 2017 +0300

    ignite-1.9.1 - test fix

commit ff3c1f2967905b0bcac7661014656d1c080fa803
Author: Sergi Vladykin <se...@gmail.com>
Date:   Thu Mar 9 11:08:34 2017 +0300

    ignite-1.9.0 - replicated subqueries fix

commit bc0801a3c976f5d87cab2c414f76f69dc28b43d7
Author: Sergi Vladykin <se...@gmail.com>
Date:   Wed Mar 8 16:03:40 2017 +0300

    ignite-1.9.0 - fix for distributed join test

commit f1f1d96c6babaadab9e3ed1fbb3c9740c94d8209
Author: Sergi Vladykin <se...@gmail.com>
Date:   Wed Mar 8 15:28:44 2017 +0300

    ignite-1.9.0 - fix for distributed join test

commit a8751d535b3e025a804c441204465e94035a5247
Author: Sergi Vladykin <se...@gmail.com>
Date:   Tue Feb 28 18:46:07 2017 +0300

    ignite-1.9 - splitter fixes

commit 0601ce6e291eb4689d526e922b02fd9e21df5b08
Author: Sergi Vladykin <se...@gmail.com>
Date:   Sun Feb 26 23:24:14 2017 +0300

    ignite-1.9 - merge index test

commit 4ad048e248157d799a325b3ce9975d4ad8a9fb49
Author: Sergi Vladykin <se...@gmail.com>
Date:   Sun Feb 26 23:19:49 2017 +0300

    ignite-1.9 - merge index

commit 4ea63d7335000b8f30bfbd1bb907e411cd62a5e8
Author: Sergi Vladykin <se...@gmail.com>
Date:   Sun Feb 26 22:44:51 2017 +0300

    ignite-1.9 - unsorted index fixed

commit a639bff6f25a8397e49a892f830c9de23c847127
Author: Sergi Vladykin <se...@gmail.com>
Date:   Sun Feb 26 20:08:26 2017 +0300

    ignite-1.9 - sorted index fixes2

commit ee9d524f5a0d6f1c416345822e8201c327f1e562
Author: Sergi Vladykin <se...@gmail.com>
Date:   Fri Feb 24 16:00:26 2017 +0300

    ignite-1.9 - sorted index fixes

commit fc42406a9e55851d53d9dfed8e6cf3c8b12af345
Author: Sergi Vladykin <se...@gmail.com>
Date:   Thu Feb 23 16:46:39 2017 +0300

    ignite-1.9 - sorted index


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

Branch: refs/heads/ignite-4705-2
Commit: 8817190e1dd31d869682df0167bb3e82fb597aad
Parents: 8362fe7
Author: Sergi Vladykin <se...@gmail.com>
Authored: Thu Mar 9 23:30:09 2017 +0300
Committer: Sergi Vladykin <se...@gmail.com>
Committed: Thu Mar 9 23:30:09 2017 +0300

----------------------------------------------------------------------
 .../cache/query/GridCacheSqlQuery.java          |  82 ++++-
 .../processors/query/h2/IgniteH2Indexing.java   |   4 +-
 .../query/h2/opt/GridH2CollocationModel.java    |   6 +-
 .../query/h2/opt/GridH2ScanIndex.java           | 273 +++++++++++++++++
 .../processors/query/h2/opt/GridH2Table.java    | 244 +--------------
 .../processors/query/h2/sql/GridSqlQuery.java   |  17 --
 .../query/h2/sql/GridSqlQueryParser.java        |   4 +-
 .../query/h2/sql/GridSqlQuerySplitter.java      |  38 ++-
 .../query/h2/sql/GridSqlSortColumn.java         |  41 +++
 .../query/h2/twostep/GridMapQueryExecutor.java  |  83 +++--
 .../query/h2/twostep/GridMergeIndex.java        | 300 +++++++++++--------
 .../query/h2/twostep/GridMergeIndexSorted.java  | 172 ++++++++---
 .../h2/twostep/GridMergeIndexUnsorted.java      |  67 ++++-
 .../query/h2/twostep/GridMergeTable.java        |  70 ++++-
 .../h2/twostep/GridReduceQueryExecutor.java     | 101 +++++--
 .../query/h2/twostep/GridResultPage.java        |  34 ++-
 .../h2/twostep/msg/GridH2QueryRequest.java      |  11 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |  10 +-
 .../query/IgniteSqlSplitterSelfTest.java        | 100 ++++++-
 .../query/h2/sql/H2CompareBigQueryTest.java     |   4 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   2 +
 .../processors/query/h2/sql/bigQuery.sql        |  34 ++-
 22 files changed, 1138 insertions(+), 559 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
index 18688b7..c4bb205 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
@@ -19,6 +19,8 @@ package org.apache.ignite.internal.processors.cache.query;
 
 import java.nio.ByteBuffer;
 import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.UUID;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.internal.GridDirectTransient;
@@ -74,6 +76,19 @@ public class GridCacheSqlQuery implements Message, GridCacheQueryMarshallable {
     /** Field kept for backward compatibility. */
     private String alias;
 
+    /** Sort columns. */
+    @GridToStringInclude
+    @GridDirectTransient
+    private transient List<?> sort;
+
+    /** If we have partitioned tables in this query. */
+    @GridToStringInclude
+    @GridDirectTransient
+    private transient boolean partitioned;
+
+    /** Single node to execute the query on. */
+    private UUID node;
+
     /**
      * For {@link Message}.
      */
@@ -218,12 +233,18 @@ public class GridCacheSqlQuery implements Message, GridCacheQueryMarshallable {
                 writer.incrementState();
 
             case 1:
-                if (!writer.writeByteArray("paramsBytes", paramsBytes))
+                if (!writer.writeUuid("node", node))
                     return false;
 
                 writer.incrementState();
 
             case 2:
+                if (!writer.writeByteArray("paramsBytes", paramsBytes))
+                    return false;
+
+                writer.incrementState();
+
+            case 3:
                 if (!writer.writeString("qry", qry))
                     return false;
 
@@ -251,7 +272,7 @@ public class GridCacheSqlQuery implements Message, GridCacheQueryMarshallable {
                 reader.incrementState();
 
             case 1:
-                paramsBytes = reader.readByteArray("paramsBytes");
+                node = reader.readUuid("node");
 
                 if (!reader.isLastRead())
                     return false;
@@ -259,6 +280,14 @@ public class GridCacheSqlQuery implements Message, GridCacheQueryMarshallable {
                 reader.incrementState();
 
             case 2:
+                paramsBytes = reader.readByteArray("paramsBytes");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 3:
                 qry = reader.readString("qry");
 
                 if (!reader.isLastRead())
@@ -278,7 +307,7 @@ public class GridCacheSqlQuery implements Message, GridCacheQueryMarshallable {
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 3;
+        return 4;
     }
 
     /**
@@ -292,6 +321,8 @@ public class GridCacheSqlQuery implements Message, GridCacheQueryMarshallable {
         cp.cols = cols;
         cp.paramIdxs = paramIdxs;
         cp.paramsSize = paramsSize;
+        cp.sort = sort;
+        cp.partitioned = partitioned;
 
         if (F.isEmpty(args))
             cp.params = EMPTY_PARAMS;
@@ -304,4 +335,49 @@ public class GridCacheSqlQuery implements Message, GridCacheQueryMarshallable {
 
         return cp;
     }
+
+    /**
+     * @param sort Sort columns.
+     */
+    public void sortColumns(List<?> sort) {
+        this.sort = sort;
+    }
+
+    /**
+     * @return Sort columns.
+     */
+    public List<?> sortColumns() {
+        return sort;
+    }
+
+    /**
+     * @param partitioned If the query contains partitioned tables.
+     */
+    public void partitioned(boolean partitioned) {
+        this.partitioned = partitioned;
+    }
+
+    /**
+     * @return {@code true} If the query contains partitioned tables.
+     */
+    public boolean isPartitioned() {
+        return partitioned;
+    }
+
+    /**
+     * @return Single node to execute the query on or {@code null} if need to execute on all the nodes.
+     */
+    public UUID node() {
+        return node;
+    }
+
+    /**
+     * @param node Single node to execute the query on or {@code null} if need to execute on all the nodes.
+     * @return {@code this}.
+     */
+    public GridCacheSqlQuery node(UUID node) {
+        this.node = node;
+
+        return this;
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index b4bf608..8de8dc4 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -85,7 +85,6 @@ import org.apache.ignite.internal.processors.cache.query.GridCacheQueryMarshalla
 import org.apache.ignite.internal.processors.cache.query.GridCacheTwoStepQuery;
 import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode;
 import org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator;
-import org.apache.ignite.internal.processors.query.GridRunningQueryInfo;
 import org.apache.ignite.internal.processors.query.GridQueryCancel;
 import org.apache.ignite.internal.processors.query.GridQueryFieldMetadata;
 import org.apache.ignite.internal.processors.query.GridQueryFieldsResult;
@@ -155,7 +154,6 @@ import org.h2.result.SortOrder;
 import org.h2.server.web.WebServer;
 import org.h2.table.Column;
 import org.h2.table.IndexColumn;
-import org.h2.table.Table;
 import org.h2.tools.Server;
 import org.h2.util.JdbcUtils;
 import org.h2.value.DataType;
@@ -1453,7 +1451,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
                     }
 
 
-                    Prepared prepared = GridSqlQueryParser.prepared((JdbcPreparedStatement) stmt);
+                    Prepared prepared = GridSqlQueryParser.prepared(stmt);
 
                     if (qry instanceof JdbcSqlFieldsQuery && ((JdbcSqlFieldsQuery) qry).isQuery() != prepared.isQuery())
                         throw new IgniteSQLException("Given statement type does not match that declared by JDBC driver",

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2CollocationModel.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2CollocationModel.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2CollocationModel.java
index ce11fd5..4df355e 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2CollocationModel.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2CollocationModel.java
@@ -300,10 +300,10 @@ public final class GridH2CollocationModel {
             assert childFilters == null;
 
             // We are at table instance.
-            GridH2Table tbl = (GridH2Table)filter().getTable();
+            Table tbl = filter().getTable();
 
             // Only partitioned tables will do distributed joins.
-            if (!tbl.isPartitioned()) {
+            if (!(tbl instanceof GridH2Table) || !((GridH2Table)tbl).isPartitioned()) {
                 type = Type.REPLICATED;
                 multiplier = MULTIPLIER_COLLOCATED;
 
@@ -593,7 +593,7 @@ public final class GridH2CollocationModel {
     private GridH2CollocationModel child(int i, boolean create) {
         GridH2CollocationModel child = children[i];
 
-        if (child == null && create && isChildTableOrView(i, null)) {
+        if (child == null && create) {
             TableFilter f = childFilters[i];
 
             if (f.getTable().isView()) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2ScanIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2ScanIndex.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2ScanIndex.java
new file mode 100644
index 0000000..3ddd490
--- /dev/null
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2ScanIndex.java
@@ -0,0 +1,273 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.processors.query.h2.opt;
+
+import java.util.ArrayList;
+import org.h2.engine.Database;
+import org.h2.engine.DbObject;
+import org.h2.engine.Session;
+import org.h2.index.BaseIndex;
+import org.h2.index.Cursor;
+import org.h2.index.IndexLookupBatch;
+import org.h2.index.IndexType;
+import org.h2.message.DbException;
+import org.h2.result.Row;
+import org.h2.result.SearchRow;
+import org.h2.schema.Schema;
+import org.h2.table.Column;
+import org.h2.table.IndexColumn;
+import org.h2.table.Table;
+import org.h2.table.TableFilter;
+
+/**
+ * Scan index base class.
+ */
+public abstract class GridH2ScanIndex<D extends BaseIndex> extends BaseIndex {
+    /** */
+    private static final IndexType TYPE = IndexType.createScan(false);
+
+    /** */
+    protected final D delegate;
+
+    /**
+     * @param delegate Delegate.
+     */
+    public GridH2ScanIndex(D delegate) {
+        this.delegate = delegate;
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getDiskSpaceUsed() {
+        return 0;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void add(Session ses, Row row) {
+        delegate.add(ses, row);
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean canFindNext() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean canGetFirstOrLast() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean canScan() {
+        return delegate.canScan();
+    }
+
+    /** {@inheritDoc} */
+    @Override public final void close(Session ses) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void commit(int operation, Row row) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public int compareRows(SearchRow rowData, SearchRow compare) {
+        return delegate.compareRows(rowData, compare);
+    }
+
+    /** {@inheritDoc} */
+    @Override public Cursor find(TableFilter filter, SearchRow first, SearchRow last) {
+        return find(filter.getSession(), first, last);
+    }
+
+    /** {@inheritDoc} */
+    @Override public Cursor find(Session ses, SearchRow first, SearchRow last) {
+        return delegate.find(ses, null, null);
+    }
+
+    /** {@inheritDoc} */
+    @Override public Cursor findFirstOrLast(Session ses, boolean first) {
+        throw DbException.getUnsupportedException("SCAN");
+    }
+
+    /** {@inheritDoc} */
+    @Override public Cursor findNext(Session ses, SearchRow higherThan, SearchRow last) {
+        throw DbException.throwInternalError();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getColumnIndex(Column col) {
+        return -1;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Column[] getColumns() {
+        return delegate.getColumns();
+    }
+
+    /** {@inheritDoc} */
+    @Override public IndexColumn[] getIndexColumns() {
+        return delegate.getIndexColumns();
+    }
+
+    /** {@inheritDoc} */
+    @Override public IndexType getIndexType() {
+        return TYPE;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Row getRow(Session ses, long key) {
+        return delegate.getRow(ses, key);
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getRowCount(Session ses) {
+        return delegate.getRowCount(ses);
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getRowCountApproximation() {
+        return delegate.getRowCountApproximation();
+    }
+
+    /** {@inheritDoc} */
+    @Override public Table getTable() {
+        return delegate.getTable();
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean isRowIdIndex() {
+        return delegate.isRowIdIndex();
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean needRebuild() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void remove(Session ses) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void remove(Session ses, Row row) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void setSortedInsertMode(boolean sortedInsertMode) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public IndexLookupBatch createLookupBatch(TableFilter filter) {
+        return delegate.createLookupBatch(filter);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void truncate(Session ses) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public Schema getSchema() {
+        return delegate.getSchema();
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean isHidden() {
+        return delegate.isHidden();
+    }
+
+    /** {@inheritDoc} */
+    @Override public void checkRename() {
+        throw DbException.getUnsupportedException("rename");
+    }
+
+    /** {@inheritDoc} */
+    @Override public ArrayList<DbObject> getChildren() {
+        return delegate.getChildren();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String getComment() {
+        return delegate.getComment();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String getCreateSQL() {
+        return null; // Scan should return null.
+    }
+
+    /** {@inheritDoc} */
+    @Override public String getCreateSQLForCopy(Table tbl, String quotedName) {
+        return delegate.getCreateSQLForCopy(tbl, quotedName);
+    }
+
+    /** {@inheritDoc} */
+    @Override public Database getDatabase() {
+        return delegate.getDatabase();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String getDropSQL() {
+        return delegate.getDropSQL();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getId() {
+        return delegate.getId();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String getSQL() {
+        return delegate.getSQL();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getType() {
+        return delegate.getType();
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean isTemporary() {
+        return delegate.isTemporary();
+    }
+
+    /** {@inheritDoc} */
+    @Override public void removeChildrenAndResources(Session ses) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void rename(String newName) {
+        throw DbException.getUnsupportedException("rename");
+    }
+
+    /** {@inheritDoc} */
+    @Override public void setComment(String comment) {
+        throw DbException.getUnsupportedException("comment");
+    }
+
+    /** {@inheritDoc} */
+    @Override public void setTemporary(boolean temporary) {
+        throw DbException.getUnsupportedException("temporary");
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
index 8d080ae..4d5ea4b 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
@@ -34,22 +34,14 @@ import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory;
 import org.h2.api.TableEngine;
 import org.h2.command.ddl.CreateTableData;
-import org.h2.engine.Database;
-import org.h2.engine.DbObject;
 import org.h2.engine.Session;
-import org.h2.index.BaseIndex;
-import org.h2.index.Cursor;
 import org.h2.index.Index;
-import org.h2.index.IndexLookupBatch;
 import org.h2.index.IndexType;
 import org.h2.message.DbException;
 import org.h2.result.Row;
 import org.h2.result.SearchRow;
 import org.h2.result.SortOrder;
-import org.h2.schema.Schema;
-import org.h2.table.Column;
 import org.h2.table.IndexColumn;
-import org.h2.table.Table;
 import org.h2.table.TableBase;
 import org.h2.table.TableFilter;
 import org.h2.value.Value;
@@ -857,93 +849,15 @@ public class GridH2Table extends TableBase {
      * Wrapper type for primary key.
      */
     @SuppressWarnings("PackageVisibleInnerClass")
-    static class ScanIndex extends BaseIndex {
+    static class ScanIndex extends GridH2ScanIndex<GridH2IndexBase> {
         /** */
         static final String SCAN_INDEX_NAME_SUFFIX = "__SCAN_";
 
-        /** */
-        private static final IndexType TYPE = IndexType.createScan(false);
-
-        /** */
-        private final GridH2IndexBase delegate;
-
         /**
-         * Constructor.
-         *
-         * @param delegate Index delegate to.
+         * @param delegate Delegate.
          */
-        private ScanIndex(GridH2IndexBase delegate) {
-            this.delegate = delegate;
-        }
-
-        /** {@inheritDoc} */
-        @Override public long getDiskSpaceUsed() {
-            return 0;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void add(Session ses, Row row) {
-            delegate.add(ses, row);
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean canFindNext() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean canGetFirstOrLast() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean canScan() {
-            return delegate.canScan();
-        }
-
-        /** {@inheritDoc} */
-        @Override public final void close(Session ses) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public void commit(int operation, Row row) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public int compareRows(SearchRow rowData, SearchRow compare) {
-            return delegate.compareRows(rowData, compare);
-        }
-
-        /** {@inheritDoc} */
-        @Override public Cursor find(TableFilter filter, SearchRow first, SearchRow last) {
-            return find(filter.getSession(), first, last);
-        }
-
-        /** {@inheritDoc} */
-        @Override public Cursor find(Session ses, SearchRow first, SearchRow last) {
-            return delegate.find(ses, null, null);
-        }
-
-        /** {@inheritDoc} */
-        @Override public Cursor findFirstOrLast(Session ses, boolean first) {
-            throw DbException.getUnsupportedException("SCAN");
-        }
-
-        /** {@inheritDoc} */
-        @Override public Cursor findNext(Session ses, SearchRow higherThan, SearchRow last) {
-            throw DbException.throwInternalError();
-        }
-
-        /** {@inheritDoc} */
-        @Override public int getColumnIndex(Column col) {
-            return -1;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Column[] getColumns() {
-            return delegate.getColumns();
+        public ScanIndex(GridH2IndexBase delegate) {
+            super(delegate);
         }
 
         /** {@inheritDoc} */
@@ -957,163 +871,13 @@ public class GridH2Table extends TableBase {
         }
 
         /** {@inheritDoc} */
-        @Override public IndexColumn[] getIndexColumns() {
-            return delegate.getIndexColumns();
-        }
-
-        /** {@inheritDoc} */
-        @Override public IndexType getIndexType() {
-            return TYPE;
-        }
-
-        /** {@inheritDoc} */
         @Override public String getPlanSQL() {
             return delegate.getTable().getSQL() + "." + SCAN_INDEX_NAME_SUFFIX;
         }
 
         /** {@inheritDoc} */
-        @Override public Row getRow(Session ses, long key) {
-            return delegate.getRow(ses, key);
-        }
-
-        /** {@inheritDoc} */
-        @Override public long getRowCount(Session ses) {
-            return delegate.getRowCount(ses);
-        }
-
-        /** {@inheritDoc} */
-        @Override public long getRowCountApproximation() {
-            return delegate.getRowCountApproximation();
-        }
-
-        /** {@inheritDoc} */
-        @Override public Table getTable() {
-            return delegate.getTable();
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean isRowIdIndex() {
-            return delegate.isRowIdIndex();
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean needRebuild() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void remove(Session ses) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public void remove(Session ses, Row row) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public void setSortedInsertMode(boolean sortedInsertMode) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public IndexLookupBatch createLookupBatch(TableFilter filter) {
-            return delegate.createLookupBatch(filter);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void truncate(Session ses) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public Schema getSchema() {
-            return delegate.getSchema();
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean isHidden() {
-            return delegate.isHidden();
-        }
-
-        /** {@inheritDoc} */
-        @Override public void checkRename() {
-            throw DbException.getUnsupportedException("rename");
-        }
-
-        /** {@inheritDoc} */
-        @Override public ArrayList<DbObject> getChildren() {
-            return delegate.getChildren();
-        }
-
-        /** {@inheritDoc} */
-        @Override public String getComment() {
-            return delegate.getComment();
-        }
-
-        /** {@inheritDoc} */
-        @Override public String getCreateSQL() {
-            return null; // Scan should return null.
-        }
-
-        /** {@inheritDoc} */
-        @Override public String getCreateSQLForCopy(Table tbl, String quotedName) {
-            return delegate.getCreateSQLForCopy(tbl, quotedName);
-        }
-
-        /** {@inheritDoc} */
-        @Override public Database getDatabase() {
-            return delegate.getDatabase();
-        }
-
-        /** {@inheritDoc} */
-        @Override public String getDropSQL() {
-            return delegate.getDropSQL();
-        }
-
-        /** {@inheritDoc} */
-        @Override public int getId() {
-            return delegate.getId();
-        }
-
-        /** {@inheritDoc} */
         @Override public String getName() {
             return delegate.getName() + SCAN_INDEX_NAME_SUFFIX;
         }
-
-        /** {@inheritDoc} */
-        @Override public String getSQL() {
-            return delegate.getSQL();
-        }
-
-        /** {@inheritDoc} */
-        @Override public int getType() {
-            return delegate.getType();
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean isTemporary() {
-            return delegate.isTemporary();
-        }
-
-        /** {@inheritDoc} */
-        @Override public void removeChildrenAndResources(Session ses) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public void rename(String newName) {
-            throw DbException.getUnsupportedException("rename");
-        }
-
-        /** {@inheritDoc} */
-        @Override public void setComment(String comment) {
-            throw DbException.getUnsupportedException("comment");
-        }
-
-        /** {@inheritDoc} */
-        @Override public void setTemporary(boolean temporary) {
-            throw DbException.getUnsupportedException("temporary");
-        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuery.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuery.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuery.java
index 7d4b7f0..9511866 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuery.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuery.java
@@ -38,9 +38,6 @@ public abstract class GridSqlQuery extends GridSqlStatement implements GridSqlAs
     /** */
     private GridSqlAst offset;
 
-    /** */
-    private boolean distinct;
-
     /**
      * @return Offset.
      */
@@ -56,20 +53,6 @@ public abstract class GridSqlQuery extends GridSqlStatement implements GridSqlAs
     }
 
     /**
-     * @return Distinct.
-     */
-    public boolean distinct() {
-        return distinct;
-    }
-
-    /**
-     * @param distinct New distinct.
-     */
-    public void distinct(boolean distinct) {
-        this.distinct = distinct;
-    }
-
-    /**
      * @return Sort.
      */
     public List<GridSqlSortColumn> sort() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
index 024529c..16d7105 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
@@ -415,7 +415,7 @@ public class GridSqlQueryParser {
         res.distinct(select.isDistinct());
 
         Expression where = CONDITION.get(select);
-        res.where(parseExpression(where, false));
+        res.where(parseExpression(where, true));
 
         ArrayList<TableFilter> tableFilters = new ArrayList<>();
 
@@ -447,7 +447,7 @@ public class GridSqlQueryParser {
             GridSqlElement gridFilter = parseTableFilter(f);
 
             from = from == null ? gridFilter : new GridSqlJoin(from, gridFilter, f.isJoinOuter(),
-                parseExpression(f.getJoinCondition(), false));
+                parseExpression(f.getJoinCondition(), true));
         }
 
         res.from(from);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
index 277cabc..aec0b36 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
@@ -207,7 +207,6 @@ public class GridSqlQuerySplitter {
         // If we have distributed joins, then we have to optimize all MAP side queries
         // to have a correct join order with respect to batched joins and check if we need
         // distributed joins at all.
-        // TODO Also we need to have a list of table aliases to filter by primary or explicit partitions.
         if (distributedJoins) {
             boolean allCollocated = true;
 
@@ -220,7 +219,7 @@ public class GridSqlQuerySplitter {
                 mapSqlQry.query(parse(prepared, true).getSQL());
             }
 
-            // We do not need distributed joins if all MAP queries are colocated.
+            // We do not need distributed joins if all MAP queries are collocated.
             if (allCollocated)
                 distributedJoins = false;
         }
@@ -861,6 +860,7 @@ public class GridSqlQuerySplitter {
         if (!tblAliases.contains(tblAlias))
             return;
 
+        GridSqlType resType = col.resultType();
         String uniqueColAlias = uniqueColumnAlias(col);
         GridSqlAlias colAlias = cols.get(uniqueColAlias);
 
@@ -874,6 +874,7 @@ public class GridSqlQuerySplitter {
         col = column(uniqueColAlias);
         // col.tableAlias(wrapAlias.alias());
         col.expressionInFrom(wrapAlias);
+        col.resultType(resType);
 
         prnt.child(childIdx, col);
     }
@@ -1066,7 +1067,7 @@ public class GridSqlQuerySplitter {
         else if (qrym.type == Type.UNION) {
             // If it is not a UNION ALL, then we have to split because otherwise we can produce duplicates or
             // wrong results for UNION DISTINCT, EXCEPT, INTERSECT queries.
-            if (!qrym.needSplitChild && !qrym.unionAll)
+            if (!qrym.needSplitChild && (!qrym.unionAll || hasOffsetLimit(qrym.<GridSqlUnion>ast())))
                 qrym.needSplitChild = true;
 
             // If we have to split some child SELECT in this UNION, then we have to enforce split
@@ -1151,6 +1152,14 @@ public class GridSqlQuerySplitter {
     }
 
     /**
+     * @param qry Query.
+     * @return {@code true} If we have OFFSET LIMIT.
+     */
+    private static boolean hasOffsetLimit(GridSqlQuery qry) {
+        return qry.limit() != null || qry.offset() != null;
+    }
+
+    /**
      * @param select Select to check.
      * @return {@code true} If we need to split this select.
      */
@@ -1158,6 +1167,9 @@ public class GridSqlQuerySplitter {
         if (select.distinct())
             return true;
 
+        if (hasOffsetLimit(select))
+            return true;
+
         if (collocatedGrpBy)
             return false;
 
@@ -1304,11 +1316,29 @@ public class GridSqlQuerySplitter {
 
         setupParameters(map, mapQry, params);
         map.columns(collectColumns(mapExps));
+        map.sortColumns(mapQry.sort());
+        map.partitioned(hasPartitionedTables(mapQry));
 
         mapSqlQrys.add(map);
     }
 
     /**
+     * @param ast Map query AST.
+     * @return {@code true} If the given AST has partitioned tables.
+     */
+    private static boolean hasPartitionedTables(GridSqlAst ast) {
+        if (ast instanceof GridSqlTable)
+            return ((GridSqlTable)ast).dataTable().isPartitioned();
+
+        for (int i = 0; i < ast.size(); i++) {
+            if (hasPartitionedTables(ast.child(i)))
+                return true;
+        }
+
+        return false;
+    }
+
+    /**
      * @param sqlQry Query.
      * @param qryAst Select AST.
      * @param params All parameters.
@@ -1333,7 +1363,7 @@ public class GridSqlQuerySplitter {
             GridSqlType t = col.resultType();
 
             if (t == null)
-                throw new NullPointerException("Column type.");
+                throw new NullPointerException("Column type: " + col);
 
             if (t == GridSqlType.UNKNOWN)
                 throw new IllegalStateException("Unknown type: " + col);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSortColumn.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSortColumn.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSortColumn.java
index 8e8947f..d870ac5 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSortColumn.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSortColumn.java
@@ -17,6 +17,13 @@
 
 package org.apache.ignite.internal.processors.query.h2.sql;
 
+import java.util.List;
+import org.apache.ignite.internal.util.typedef.F;
+import org.h2.result.SortOrder;
+import org.h2.table.Column;
+import org.h2.table.IndexColumn;
+import org.h2.table.Table;
+
 /**
  * Sort order for ORDER BY clause.
  */
@@ -47,6 +54,40 @@ public class GridSqlSortColumn {
     }
 
     /**
+     * @param tbl Table.
+     * @param sortCols Sort columns.
+     * @return Index columns.
+     */
+    public static IndexColumn[] toIndexColumns(Table tbl, List<GridSqlSortColumn> sortCols) {
+        assert !F.isEmpty(sortCols);
+
+        IndexColumn[] res = new IndexColumn[sortCols.size()];
+
+        for (int i = 0; i < res.length; i++) {
+            GridSqlSortColumn sc = sortCols.get(i);
+
+            Column col = tbl.getColumn(sc.column());
+
+            IndexColumn c = new IndexColumn();
+
+            c.column = col;
+            c.columnName = col.getName();
+
+            c.sortType = sc.asc ? SortOrder.ASCENDING : SortOrder.DESCENDING;
+
+            if (sc.nullsFirst)
+                c.sortType |= SortOrder.NULLS_FIRST;
+
+            if (sc.nullsLast)
+                c.sortType |= SortOrder.NULLS_LAST;
+
+            res[i] = c;
+        }
+
+        return res;
+    }
+
+    /**
      * @return Column index.
      */
     public int column() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index f002a5e..6416b21 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@ -459,8 +459,11 @@ public class GridMapQueryExecutor {
             req.isFlagSet(GridH2QueryRequest.FLAG_DISTRIBUTED_JOINS));
 
         final boolean enforceJoinOrder = req.isFlagSet(GridH2QueryRequest.FLAG_ENFORCE_JOIN_ORDER);
+        final boolean explain = req.isFlagSet(GridH2QueryRequest.FLAG_EXPLAIN);
 
-        for (int i = 1; i < mainCctx.config().getQueryParallelism(); i++) {
+        int segments = explain ? 1 : mainCctx.config().getQueryParallelism();
+
+        for (int i = 1; i < segments; i++) {
             final int segment = i;
 
             ctx.closure().callLocal(
@@ -587,7 +590,6 @@ public class GridMapQueryExecutor {
 
             Connection conn = h2.connectionForSpace(mainCctx.name());
 
-            // Here we enforce join order to have the same behavior on all the nodes.
             setupConnection(conn, distributedJoinMode != OFF, enforceJoinOrder);
 
             GridH2QueryContext.set(qctx);
@@ -610,28 +612,34 @@ public class GridMapQueryExecutor {
                 boolean evt = ctx.event().isRecordable(EVT_CACHE_QUERY_EXECUTED);
 
                 for (GridCacheSqlQuery qry : qrys) {
-                    ResultSet rs = h2.executeSqlQueryWithTimer(mainCctx.name(), conn, qry.query(),
-                        F.asList(qry.parameters()), true,
-                        timeout,
-                        qr.cancels[qryIdx]);
-
-                    if (evt) {
-                        ctx.event().record(new CacheQueryExecutedEvent<>(
-                            node,
-                            "SQL query executed.",
-                            EVT_CACHE_QUERY_EXECUTED,
-                            CacheQueryType.SQL.name(),
-                            mainCctx.namex(),
-                            null,
-                            qry.query(),
-                            null,
-                            null,
-                            qry.parameters(),
-                            node.id(),
-                            null));
-                    }
+                    ResultSet rs = null;
+
+                    // If we are not the target node for this replicated query, just ignore it.
+                    if (qry.node() == null ||
+                        (segmentId == 0 && qry.node().equals(ctx.localNodeId()))) {
+                        rs = h2.executeSqlQueryWithTimer(mainCctx.name(), conn, qry.query(),
+                            F.asList(qry.parameters()), true,
+                            timeout,
+                            qr.cancels[qryIdx]);
+
+                        if (evt) {
+                            ctx.event().record(new CacheQueryExecutedEvent<>(
+                                node,
+                                "SQL query executed.",
+                                EVT_CACHE_QUERY_EXECUTED,
+                                CacheQueryType.SQL.name(),
+                                mainCctx.namex(),
+                                null,
+                                qry.query(),
+                                null,
+                                null,
+                                qry.parameters(),
+                                node.id(),
+                                null));
+                        }
 
-                    assert rs instanceof JdbcResultSet : rs.getClass();
+                        assert rs instanceof JdbcResultSet : rs.getClass();
+                    }
 
                     qr.addResult(qryIdx, qry, node.id(), rs);
 
@@ -751,6 +759,9 @@ public class GridMapQueryExecutor {
 
         assert res != null;
 
+        if (res.closed)
+            return;
+
         int page = res.page;
 
         List<Value[]> rows = new ArrayList<>(Math.min(64, pageSize));
@@ -1081,21 +1092,31 @@ public class GridMapQueryExecutor {
          * @param qry Query.
          */
         private QueryResult(ResultSet rs, GridCacheContext<?, ?> cctx, UUID qrySrcNodeId, GridCacheSqlQuery qry) {
-            this.rs = rs;
             this.cctx = cctx;
             this.qry = qry;
             this.qrySrcNodeId = qrySrcNodeId;
             this.cpNeeded = cctx.isLocalNode(qrySrcNodeId);
 
-            try {
-                res = (ResultInterface)RESULT_FIELD.get(rs);
-            }
-            catch (IllegalAccessException e) {
-                throw new IllegalStateException(e); // Must not happen.
+            if (rs != null) {
+                this.rs = rs;
+                try {
+                    res = (ResultInterface)RESULT_FIELD.get(rs);
+                }
+                catch (IllegalAccessException e) {
+                    throw new IllegalStateException(e); // Must not happen.
+                }
+
+                rowCnt = res.getRowCount();
+                cols = res.getVisibleColumnCount();
             }
+            else {
+                this.rs = null;
+                this.res = null;
+                this.cols = -1;
+                this.rowCnt = -1;
 
-            rowCnt = res.getRowCount();
-            cols = res.getVisibleColumnCount();
+                closed = true;
+            }
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
index 6a6e045..27622bb 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
@@ -22,20 +22,22 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.RandomAccess;
 import java.util.Set;
 import java.util.UUID;
-import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
 import javax.cache.CacheException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryNextPageResponse;
+import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.h2.engine.Session;
 import org.h2.index.BaseIndex;
@@ -44,13 +46,10 @@ import org.h2.index.IndexType;
 import org.h2.message.DbException;
 import org.h2.result.Row;
 import org.h2.result.SearchRow;
-import org.h2.result.SortOrder;
 import org.h2.table.IndexColumn;
-import org.h2.table.TableFilter;
 import org.h2.value.Value;
 import org.jetbrains.annotations.Nullable;
 
-import static java.util.Collections.emptyIterator;
 import static java.util.Objects.requireNonNull;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_MERGE_TABLE_MAX_SIZE;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_MERGE_TABLE_PREFETCH_SIZE;
@@ -67,6 +66,22 @@ public abstract class GridMergeIndex extends BaseIndex {
     private static final int PREFETCH_SIZE = getInteger(IGNITE_SQL_MERGE_TABLE_PREFETCH_SIZE, 1024);
 
     /** */
+    private static final AtomicReferenceFieldUpdater<GridMergeIndex, ConcurrentMap> lastPagesUpdater =
+        AtomicReferenceFieldUpdater.newUpdater(GridMergeIndex.class, ConcurrentMap.class, "lastPages");
+
+    static {
+        if (!U.isPow2(PREFETCH_SIZE)) {
+            throw new IllegalArgumentException(IGNITE_SQL_MERGE_TABLE_PREFETCH_SIZE + " (" + PREFETCH_SIZE +
+                ") must be positive and a power of 2.");
+        }
+
+        if (PREFETCH_SIZE >= MAX_FETCH_SIZE) {
+            throw new IllegalArgumentException(IGNITE_SQL_MERGE_TABLE_PREFETCH_SIZE + " (" + PREFETCH_SIZE +
+                ") must be less than " + IGNITE_SQL_MERGE_TABLE_MAX_SIZE + " (" + MAX_FETCH_SIZE + ").");
+        }
+    }
+
+    /** */
     protected final Comparator<SearchRow> firstRowCmp = new Comparator<SearchRow>() {
         @Override public int compare(SearchRow rowInList, SearchRow searchRow) {
             int res = compareRows(rowInList, searchRow);
@@ -84,14 +99,11 @@ public abstract class GridMergeIndex extends BaseIndex {
         }
     };
 
-    /** All rows number. */
-    private final AtomicInteger expRowsCnt = new AtomicInteger(0);
-
-    /** Remaining rows per source node ID. */
-    private Map<UUID, Counter[]> remainingRows;
+    /** Row source nodes. */
+    private Set<UUID> sources;
 
     /** */
-    private final AtomicBoolean lastSubmitted = new AtomicBoolean();
+    private int pageSize;
 
     /**
      * Will be r/w from query execution thread only, does not need to be threadsafe.
@@ -107,6 +119,9 @@ public abstract class GridMergeIndex extends BaseIndex {
     /** */
     private final GridKernalContext ctx;
 
+    /** */
+    private volatile ConcurrentMap<SourceKey, Integer> lastPages;
+
     /**
      * @param ctx Context.
      * @param tbl Table.
@@ -129,16 +144,6 @@ public abstract class GridMergeIndex extends BaseIndex {
      * @param ctx Context.
      */
     protected GridMergeIndex(GridKernalContext ctx) {
-        if (!U.isPow2(PREFETCH_SIZE)) {
-            throw new IllegalArgumentException(IGNITE_SQL_MERGE_TABLE_PREFETCH_SIZE + " (" + PREFETCH_SIZE +
-                ") must be positive and a power of 2.");
-        }
-
-        if (PREFETCH_SIZE >= MAX_FETCH_SIZE) {
-            throw new IllegalArgumentException(IGNITE_SQL_MERGE_TABLE_PREFETCH_SIZE + " (" + PREFETCH_SIZE +
-                ") must be less than " + IGNITE_SQL_MERGE_TABLE_MAX_SIZE + " (" + MAX_FETCH_SIZE + ").");
-        }
-
         this.ctx = ctx;
 
         fetched = new BlockList<>(PREFETCH_SIZE);
@@ -148,7 +153,7 @@ public abstract class GridMergeIndex extends BaseIndex {
      * @return Return source nodes for this merge index.
      */
     public Set<UUID> sources() {
-        return remainingRows.keySet();
+        return sources;
     }
 
     /**
@@ -169,17 +174,24 @@ public abstract class GridMergeIndex extends BaseIndex {
      * @return {@code true} If this index needs data from the given source node.
      */
     public boolean hasSource(UUID nodeId) {
-        return remainingRows.containsKey(nodeId);
+        return sources.contains(nodeId);
     }
 
     /** {@inheritDoc} */
     @Override public long getRowCount(Session ses) {
-        return expRowsCnt.get();
+        Cursor c = find(ses, null, null);
+
+        long cnt = 0;
+
+        while (c.next())
+            cnt++;
+
+        return cnt;
     }
 
     /** {@inheritDoc} */
     @Override public long getRowCountApproximation() {
-        return getRowCount(null);
+        return 10_000;
     }
 
     /**
@@ -189,27 +201,28 @@ public abstract class GridMergeIndex extends BaseIndex {
      * @param segmentsCnt Index segments per table.
      */
     public void setSources(Collection<ClusterNode> nodes, int segmentsCnt) {
-        assert remainingRows == null;
+        assert sources == null;
 
-        remainingRows = U.newHashMap(nodes.size());
+        sources = new HashSet<>();
 
         for (ClusterNode node : nodes) {
-            Counter[] counters = new Counter[segmentsCnt];
-
-            for (int i = 0; i < segmentsCnt; i++)
-                counters[i] = new Counter();
-
-            if (remainingRows.put(node.id(), counters) != null)
-                throw new IllegalStateException("Duplicate node id: " + node.id());
-
+            if (!sources.add(node.id()))
+                throw new IllegalStateException();
         }
     }
 
     /**
+     * @param pageSize Page size.
+     */
+    public void setPageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    /**
      * @param queue Queue to poll.
      * @return Next page.
      */
-    private GridResultPage takeNextPage(BlockingQueue<GridResultPage> queue) {
+    private GridResultPage takeNextPage(Pollable<GridResultPage> queue) {
         GridResultPage page;
 
         for (;;) {
@@ -234,16 +247,17 @@ public abstract class GridMergeIndex extends BaseIndex {
      * @param iter Current iterator.
      * @return The same or new iterator.
      */
-    protected final Iterator<Value[]> pollNextIterator(BlockingQueue<GridResultPage> queue, Iterator<Value[]> iter) {
-        while (!iter.hasNext()) {
+    protected final Iterator<Value[]> pollNextIterator(Pollable<GridResultPage> queue, Iterator<Value[]> iter) {
+        if (!iter.hasNext()) {
             GridResultPage page = takeNextPage(queue);
 
-            if (page.isLast())
-                return emptyIterator(); // We are done.
-
-            fetchNextPage(page);
+            if (!page.isLast())
+                page.fetchNextPage(); // Failed will throw an exception here.
 
             iter = page.rows();
+
+            // The received iterator must be empty in the dummy last page or on failure.
+            assert iter.hasNext() || page.isDummyLast() || page.isFail();
         }
 
         return iter;
@@ -253,23 +267,18 @@ public abstract class GridMergeIndex extends BaseIndex {
      * @param e Error.
      */
     public void fail(final CacheException e) {
-        for (UUID nodeId0 : remainingRows.keySet()) {
-            addPage0(new GridResultPage(null, nodeId0, null) {
-                @Override public boolean isFail() {
-                    return true;
-                }
-
-                @Override public void fetchNextPage() {
-                    throw e;
-                }
-            });
-        }
+        for (UUID nodeId : sources)
+            fail(nodeId, e);
     }
 
     /**
      * @param nodeId Node ID.
+     * @param e Exception.
      */
     public void fail(UUID nodeId, final CacheException e) {
+        if (nodeId == null)
+            nodeId = F.first(sources);
+
         addPage0(new GridResultPage(null, nodeId, null) {
             @Override public boolean isFail() {
                 return true;
@@ -285,91 +294,88 @@ public abstract class GridMergeIndex extends BaseIndex {
     }
 
     /**
-     * @param page Page.
+     * @param nodeId Node ID.
+     * @param res Response.
      */
-    public final void addPage(GridResultPage page) {
-        int pageRowsCnt = page.rowsInPage();
+    private void initLastPages(UUID nodeId, GridQueryNextPageResponse res) {
+        int allRows = res.allRows();
 
-        Counter cnt = remainingRows.get(page.source())[page.res.segmentId()];
+        // If the old protocol we send all rows number in the page 0, other pages have -1.
+        // In the new protocol we do not know it and always have -1, except terminating page,
+        // which has -2. Thus we have to init page counters only when we receive positive value
+        // in the first page.
+        if (allRows < 0 || res.page() != 0)
+            return;
 
-        // RemainingRowsCount should be updated before page adding to avoid race
-        // in GridMergeIndexUnsorted cursor iterator
-        int remainingRowsCount;
+        ConcurrentMap<SourceKey,Integer> lp = lastPages;
 
-        int allRows = page.response().allRows();
+        if (lp == null && !lastPagesUpdater.compareAndSet(this, null, lp = new ConcurrentHashMap<>()))
+            lp = lastPages;
 
-        if (allRows != -1) { // Only the first page contains allRows count and is allowed to init counter.
-            assert cnt.state == State.UNINITIALIZED : "Counter is already initialized.";
+        assert pageSize > 0: pageSize;
 
-            remainingRowsCount = cnt.addAndGet(allRows - pageRowsCnt);
+        int lastPage = allRows == 0 ? 0 : (allRows - 1) / pageSize;
 
-            expRowsCnt.addAndGet(allRows);
+        assert lastPage >= 0: lastPage;
 
-            // Add page before setting initialized flag to avoid race condition with adding last page
-            if (pageRowsCnt > 0)
-                addPage0(page);
+        if (lp.put(new SourceKey(nodeId, res.segmentId()), lastPage) != null)
+            throw new IllegalStateException();
+    }
 
-            // We need this separate flag to handle case when the first source contains only one page
-            // and it will signal that all remaining counters are zero and fetch is finished.
-            cnt.state = State.INITIALIZED;
-        }
-        else {
-            remainingRowsCount = cnt.addAndGet(-pageRowsCnt);
+    /**
+     * @param page Page.
+     */
+    private void markLastPage(GridResultPage page) {
+        GridQueryNextPageResponse res = page.response();
 
-            if (pageRowsCnt > 0)
-                addPage0(page);
-        }
+        if (res.allRows() != -2) { // -2 means the last page.
+            UUID nodeId = page.source();
 
-        if (remainingRowsCount == 0) { // Result can be negative in case of race between messages, it is ok.
-            if (cnt.state == State.UNINITIALIZED)
-                return;
+            initLastPages(nodeId, res);
 
-            // Guarantee that finished state possible only if counter is zero and all pages was added
-            cnt.state = State.FINISHED;
+            ConcurrentMap<SourceKey,Integer> lp = lastPages;
 
-            for (Counter[] cntrs : remainingRows.values()) { // Check all the sources.
-                for(int i = 0; i < cntrs.length; i++) {
-                    if (cntrs[i].state != State.FINISHED)
-                        return;
-                }
-            }
+            if (lp == null)
+                return; // It was not initialized --> wait for -2.
 
-            if (lastSubmitted.compareAndSet(false, true)) {
-                addPage0(new GridResultPage(null, page.source(), null) {
-                    @Override public boolean isLast() {
-                        return true;
-                    }
-                });
+            Integer lastPage = lp.get(new SourceKey(nodeId, res.segmentId()));
+
+            if (lastPage == null)
+                return; // This node may use the new protocol --> wait for -2.
+
+            if (lastPage != res.page()) {
+                assert lastPage > res.page();
+
+                return; // This is not the last page.
             }
         }
+
+        page.setLast(true);
     }
 
     /**
      * @param page Page.
      */
-    protected abstract void addPage0(GridResultPage page);
+    public final void addPage(GridResultPage page) {
+        markLastPage(page);
+        addPage0(page);
+    }
 
     /**
-     * @param page Page.
+     * @param lastPage Real last page.
+     * @return Created dummy page.
      */
-    protected void fetchNextPage(GridResultPage page) {
-        assert !page.isLast();
-
-        if(page.isFail())
-            page.fetchNextPage(); //rethrow exceptions
-
-        assert page.res != null;
-
-        Counter[] counters = remainingRows.get(page.source());
+    protected final GridResultPage createDummyLastPage(GridResultPage lastPage) {
+        assert !lastPage.isDummyLast(); // It must be a real last page.
 
-        int segId = page.res.segmentId();
-
-        Counter counter = counters[segId];
-
-        if (counter.get() != 0)
-            page.fetchNextPage();
+        return new GridResultPage(ctx, lastPage.source(), null).setLast(true);
     }
 
+    /**
+     * @param page Page.
+     */
+    protected abstract void addPage0(GridResultPage page);
+
     /** {@inheritDoc} */
     @Override public final Cursor find(Session ses, SearchRow first, SearchRow last) {
         checkBounds(lastEvictedRow, first, last);
@@ -381,11 +387,9 @@ public abstract class GridMergeIndex extends BaseIndex {
     }
 
     /**
-     * @return {@code true} If we have fetched all the remote rows.
+     * @return {@code true} If we have fetched all the remote rows into a fetched list.
      */
-    public boolean fetchedAll() {
-        return fetchedCnt == expRowsCnt.get();
-    }
+    public abstract boolean fetchedAll();
 
     /**
      * @param lastEvictedRow Last evicted fetched row.
@@ -433,11 +437,6 @@ public abstract class GridMergeIndex extends BaseIndex {
     }
 
     /** {@inheritDoc} */
-    @Override public double getCost(Session ses, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder) {
-        return getCostRangeIndex(masks, getRowCountApproximation(), filters, filter, sortOrder, true);
-    }
-
-    /** {@inheritDoc} */
     @Override public void remove(Session ses) {
         throw DbException.getUnsupportedException("remove index");
     }
@@ -683,14 +682,6 @@ public abstract class GridMergeIndex extends BaseIndex {
     }
 
     /**
-     * Counter with initialization flag.
-     */
-    private static class Counter extends AtomicInteger {
-        /** */
-        volatile State state = State.UNINITIALIZED;
-    }
-
-    /**
      */
     private static final class BlockList<Z> extends AbstractList<Z> implements RandomAccess {
         /** */
@@ -766,4 +757,53 @@ public abstract class GridMergeIndex extends BaseIndex {
             return res;
         }
     }
+
+    /**
+     * Pollable.
+     */
+    protected static interface Pollable<E> {
+        /**
+         * @param timeout Timeout.
+         * @param unit Time unit.
+         * @return Polled value or {@code null} if none.
+         * @throws InterruptedException If interrupted.
+         */
+        E poll(long timeout, TimeUnit unit) throws InterruptedException;
+    }
+
+    /**
+     */
+    private static class SourceKey {
+        final UUID nodeId;
+
+        /** */
+        final int segment;
+
+        /**
+         * @param nodeId Node ID.
+         * @param segment Segment.
+         */
+        SourceKey(UUID nodeId, int segment) {
+            this.nodeId = nodeId;
+            this.segment = segment;
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            if (this == o) return true;
+            if (o == null || getClass() != o.getClass()) return false;
+
+            SourceKey sourceKey = (SourceKey)o;
+
+            if (segment != sourceKey.segment) return false;
+            return nodeId.equals(sourceKey.nodeId);
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            int result = nodeId.hashCode();
+            result = 31 * result + segment;
+            return result;
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexSorted.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexSorted.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexSorted.java
index 32c676d..361bb2d 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexSorted.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexSorted.java
@@ -25,18 +25,24 @@ import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.UUID;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.processors.query.h2.opt.GridH2Cursor;
 import org.apache.ignite.internal.processors.query.h2.opt.GridH2RowFactory;
+import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.h2.engine.Session;
 import org.h2.index.Cursor;
 import org.h2.index.IndexType;
 import org.h2.result.Row;
 import org.h2.result.SearchRow;
+import org.h2.result.SortOrder;
 import org.h2.table.IndexColumn;
+import org.h2.table.TableFilter;
 import org.h2.value.Value;
 import org.jetbrains.annotations.Nullable;
 
@@ -48,6 +54,9 @@ import static org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase
  */
 public final class GridMergeIndexSorted extends GridMergeIndex {
     /** */
+    private static final IndexType TYPE = IndexType.createNonUnique(false);
+
+    /** */
     private final Comparator<RowStream> streamCmp = new Comparator<RowStream>() {
         @Override public int compare(RowStream o1, RowStream o2) {
             // Nulls at the beginning.
@@ -62,26 +71,33 @@ public final class GridMergeIndexSorted extends GridMergeIndex {
     };
 
     /** */
-    private Map<UUID,RowStream> streamsMap;
+    private Map<UUID,RowStream[]> streamsMap;
 
     /** */
-    private RowStream[] streams;
+    private final Lock lock = new ReentrantLock();
+
+    /** */
+    private final Condition notEmpty = lock.newCondition();
+
+    /** */
+    private GridResultPage failPage;
+
+    /** */
+    private MergeStreamIterator it;
 
     /**
      * @param ctx Kernal context.
      * @param tbl Table.
      * @param name Index name,
-     * @param type Index type.
      * @param cols Columns.
      */
     public GridMergeIndexSorted(
         GridKernalContext ctx,
         GridMergeTable tbl,
         String name,
-        IndexType type,
         IndexColumn[] cols
     ) {
-        super(ctx, tbl, name, type, cols);
+        super(ctx, tbl, name, TYPE, cols);
     }
 
     /** {@inheritDoc} */
@@ -89,33 +105,48 @@ public final class GridMergeIndexSorted extends GridMergeIndex {
         super.setSources(nodes, segmentsCnt);
 
         streamsMap = U.newHashMap(nodes.size());
-        streams = new RowStream[nodes.size()];
+        RowStream[] streams = new RowStream[nodes.size() * segmentsCnt];
 
         int i = 0;
 
         for (ClusterNode node : nodes) {
-            RowStream stream = new RowStream(node.id());
+            RowStream[] segments = new RowStream[segmentsCnt];
 
-            streams[i] = stream;
+            for (int s = 0; s < segmentsCnt; s++)
+                streams[i++] = segments[s] = new RowStream();
 
-            if (streamsMap.put(stream.src, stream) != null)
+            if (streamsMap.put(node.id(), segments) != null)
                 throw new IllegalStateException();
         }
+
+        it = new MergeStreamIterator(streams);
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean fetchedAll() {
+        return it.fetchedAll();
     }
 
     /** {@inheritDoc} */
     @Override protected void addPage0(GridResultPage page) {
-        if (page.isLast() || page.isFail()) {
-            // Finish all the streams.
-            for (RowStream stream : streams)
-                stream.addPage(page);
+        if (page.isFail()) {
+            lock.lock();
+
+            try {
+                if (failPage == null) {
+                    failPage = page;
+
+                    notEmpty.signalAll();
+                }
+            }
+            finally {
+                lock.unlock();
+            }
         }
         else {
-            assert page.rowsInPage() > 0;
-
             UUID src = page.source();
 
-            streamsMap.get(src).addPage(page);
+            streamsMap.get(src)[page.segmentId()].addPage(page);
         }
     }
 
@@ -153,8 +184,13 @@ public final class GridMergeIndexSorted extends GridMergeIndex {
     }
 
     /** {@inheritDoc} */
+    @Override public double getCost(Session ses, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder) {
+        return getCostRangeIndex(masks, getRowCountApproximation(), filters, filter, sortOrder, false);
+    }
+
+    /** {@inheritDoc} */
     @Override protected Cursor findInStream(@Nullable SearchRow first, @Nullable SearchRow last) {
-        return new FetchingCursor(first, last, new MergeStreamIterator());
+        return new FetchingCursor(first, last, it);
     }
 
     /**
@@ -165,17 +201,42 @@ public final class GridMergeIndexSorted extends GridMergeIndex {
         private boolean first = true;
 
         /** */
-        private int off;
+        private volatile int off;
 
         /** */
         private boolean hasNext;
 
+        /** */
+        private final RowStream[] streams;
+
+        /**
+         * @param streams Streams.
+         */
+        MergeStreamIterator(RowStream[] streams) {
+            assert !F.isEmpty(streams);
+
+            this.streams = streams;
+        }
+
+        /**
+         * @return {@code true} If fetched all.
+         */
+        private boolean fetchedAll() {
+            return off == streams.length;
+        }
+
         /**
          *
          */
         private void goFirst() {
+            assert first;
+
+            first = false;
+
             for (int i = 0; i < streams.length; i++) {
-                if (!streams[i].next()) {
+                RowStream s = streams[i];
+
+                if (!s.next()) {
                     streams[i] = null;
                     off++; // Move left bound.
                 }
@@ -183,8 +244,6 @@ public final class GridMergeIndexSorted extends GridMergeIndex {
 
             if (off < streams.length)
                 Arrays.sort(streams, streamCmp);
-
-            first = false;
         }
 
         /**
@@ -229,31 +288,68 @@ public final class GridMergeIndexSorted extends GridMergeIndex {
     /**
      * Row stream.
      */
-    private final class RowStream {
-        /** */
-        final UUID src;
-
-        /** */
-        final BlockingQueue<GridResultPage> queue = new ArrayBlockingQueue<>(8);
-
+    private final class RowStream implements Pollable<GridResultPage> {
         /** */
         Iterator<Value[]> iter = emptyIterator();
 
         /** */
         Row cur;
 
-        /**
-         * @param src Source.
-         */
-        private RowStream(UUID src) {
-            this.src = src;
-        }
+        /** */
+        GridResultPage nextPage;
 
         /**
          * @param page Page.
          */
         private void addPage(GridResultPage page) {
-            queue.offer(page);
+            assert !page.isFail();
+
+            if (page.isLast() && page.rowsInPage() == 0)
+                page = createDummyLastPage(page); // Terminate.
+
+            lock.lock();
+
+            try {
+                // We can fetch the next page only when we have polled the previous one.
+                assert nextPage == null;
+
+                nextPage = page;
+
+                notEmpty.signalAll();
+            }
+            finally {
+                lock.unlock();
+            }
+        }
+
+        /** {@inheritDoc} */
+        @Override public GridResultPage poll(long timeout, TimeUnit unit) throws InterruptedException {
+            long nanos = unit.toNanos(timeout);
+
+            lock.lock();
+
+            try {
+                for (;;) {
+                    if (failPage != null)
+                        return failPage;
+
+                    GridResultPage page = nextPage;
+
+                    if (page != null) {
+                        // isLast && !isDummyLast
+                        nextPage = page.isLast() && page.response() != null
+                            ? createDummyLastPage(page) : null; // Terminate with empty iterator.
+
+                        return page;
+                    }
+
+                    if ((nanos = notEmpty.awaitNanos(nanos)) <= 0)
+                        return null;
+                }
+            }
+            finally {
+                lock.unlock();
+            }
         }
 
         /**
@@ -262,7 +358,7 @@ public final class GridMergeIndexSorted extends GridMergeIndex {
         private boolean next() {
             cur = null;
 
-            iter = pollNextIterator(queue, iter);
+            iter = pollNextIterator(this, iter);
 
             if (!iter.hasNext())
                 return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
index b69c898..430a687 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
@@ -17,19 +17,24 @@
 
 package org.apache.ignite.internal.processors.query.h2.twostep;
 
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.processors.query.h2.opt.GridH2Cursor;
 import org.apache.ignite.internal.processors.query.h2.opt.GridH2RowFactory;
+import org.h2.engine.Session;
 import org.h2.index.Cursor;
 import org.h2.index.IndexType;
 import org.h2.result.Row;
 import org.h2.result.SearchRow;
+import org.h2.result.SortOrder;
 import org.h2.table.IndexColumn;
+import org.h2.table.TableFilter;
 import org.h2.value.Value;
 
 /**
@@ -37,7 +42,16 @@ import org.h2.value.Value;
  */
 public final class GridMergeIndexUnsorted extends GridMergeIndex {
     /** */
-    private final BlockingQueue<GridResultPage> queue = new LinkedBlockingQueue<>();
+    private static final IndexType TYPE = IndexType.createScan(false);
+
+    /** */
+    private final PollableQueue<GridResultPage> queue = new PollableQueue<>();
+
+    /** */
+    private final AtomicInteger activeSources = new AtomicInteger(-1);
+
+    /** */
+    private Iterator<Value[]> iter = Collections.emptyIterator();
 
     /**
      * @param ctx Context.
@@ -45,7 +59,7 @@ public final class GridMergeIndexUnsorted extends GridMergeIndex {
      * @param name Index name.
      */
     public GridMergeIndexUnsorted(GridKernalContext ctx, GridMergeTable tbl, String name) {
-        super(ctx, tbl, name, IndexType.createScan(false), IndexColumn.wrap(tbl.getColumns()));
+        super(ctx, tbl, name, TYPE, IndexColumn.wrap(tbl.getColumns()));
     }
 
     /**
@@ -64,10 +78,46 @@ public final class GridMergeIndexUnsorted extends GridMergeIndex {
     }
 
     /** {@inheritDoc} */
+    @Override public void setSources(Collection<ClusterNode> nodes, int segmentsCnt) {
+        super.setSources(nodes, segmentsCnt);
+
+        int x = nodes.size() * segmentsCnt;
+
+        assert x > 0: x;
+
+        activeSources.set(x);
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean fetchedAll() {
+        int x = activeSources.get();
+
+        assert x >= 0: x; // This method must not be called if the sources were not set.
+
+        return x == 0 && queue.isEmpty();
+    }
+
+    /** {@inheritDoc} */
     @Override protected void addPage0(GridResultPage page) {
         assert page.rowsInPage() > 0 || page.isLast() || page.isFail();
 
-        queue.add(page);
+        // Do not add empty page to avoid premature stream termination.
+        if (page.rowsInPage() != 0 || page.isFail())
+            queue.add(page);
+
+        if (page.isLast()) {
+            int x = activeSources.decrementAndGet();
+
+            assert x >= 0: x;
+
+            if (x == 0) // Always terminate with empty iterator.
+                queue.add(createDummyLastPage(page));
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public double getCost(Session ses, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder) {
+        return getCostRangeIndex(masks, getRowCountApproximation(), filters, filter, sortOrder, true);
     }
 
     /** {@inheritDoc} */
@@ -80,9 +130,6 @@ public final class GridMergeIndexUnsorted extends GridMergeIndex {
     @Override protected Cursor findInStream(SearchRow first, SearchRow last) {
         // This index is unsorted: have to ignore bounds.
         return new FetchingCursor(null, null, new Iterator<Row>() {
-            /** */
-            Iterator<Value[]> iter = Collections.emptyIterator();
-
             @Override public boolean hasNext() {
                 iter = pollNextIterator(queue, iter);
 
@@ -98,4 +145,10 @@ public final class GridMergeIndexUnsorted extends GridMergeIndex {
             }
         });
     }
+
+    /**
+     */
+    private static class PollableQueue<X> extends LinkedBlockingQueue<X> implements Pollable<X> {
+        // No-op.
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/8817190e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
index 1489021..f7495c0 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
@@ -18,35 +18,55 @@
 package org.apache.ignite.internal.processors.query.h2.twostep;
 
 import java.util.ArrayList;
-import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.processors.query.h2.opt.GridH2ScanIndex;
+import org.apache.ignite.internal.util.typedef.F;
 import org.h2.command.ddl.CreateTableData;
 import org.h2.engine.Session;
 import org.h2.index.Index;
 import org.h2.index.IndexType;
 import org.h2.message.DbException;
 import org.h2.result.Row;
+import org.h2.result.SortOrder;
 import org.h2.table.IndexColumn;
 import org.h2.table.TableBase;
+import org.h2.table.TableFilter;
 
 /**
  * Merge table for distributed queries.
  */
 public class GridMergeTable extends TableBase {
     /** */
-    private final GridKernalContext ctx;
-
-    /** */
-    private final GridMergeIndex idx;
+    private ArrayList<Index> idxs;
 
     /**
      * @param data Data.
-     * @param ctx Kernal context.
      */
-    public GridMergeTable(CreateTableData data, GridKernalContext ctx) {
+    public GridMergeTable(CreateTableData data) {
         super(data);
+    }
+
+    /**
+     * @param idxs Indexes.
+     */
+    public void indexes(ArrayList<Index> idxs) {
+        assert !F.isEmpty(idxs);
+
+        this.idxs = idxs;
+    }
 
-        this.ctx = ctx;
-        idx = new GridMergeIndexUnsorted(ctx, this, "merge_scan");
+    /**
+     * @return Merge index.
+     */
+    public GridMergeIndex getMergeIndex() {
+        return (GridMergeIndex)idxs.get(idxs.size() - 1); // Sorted index must be the last.
+    }
+
+    /**
+     * @param idx Index.
+     * @return Scan index.
+     */
+    public static GridH2ScanIndex<GridMergeIndex> createScanIndex(GridMergeIndex idx) {
+        return new ScanIndex(idx);
     }
 
     /** {@inheritDoc} */
@@ -56,7 +76,7 @@ public class GridMergeTable extends TableBase {
 
     /** {@inheritDoc} */
     @Override public void close(Session ses) {
-        idx.close(ses);
+        // No-op.
     }
 
     /** {@inheritDoc} */
@@ -96,8 +116,8 @@ public class GridMergeTable extends TableBase {
     }
 
     /** {@inheritDoc} */
-    @Override public GridMergeIndex getScanIndex(Session session) {
-        return idx;
+    @Override public Index getScanIndex(Session session) {
+        return idxs.get(0); // Must be always at 0.
     }
 
     /** {@inheritDoc} */
@@ -107,7 +127,7 @@ public class GridMergeTable extends TableBase {
 
     /** {@inheritDoc} */
     @Override public ArrayList<Index> getIndexes() {
-        return null;
+        return idxs;
     }
 
     /** {@inheritDoc} */
@@ -137,12 +157,12 @@ public class GridMergeTable extends TableBase {
 
     /** {@inheritDoc} */
     @Override public long getRowCount(Session ses) {
-        return idx.getRowCount(ses);
+        return getScanIndex(ses).getRowCount(ses);
     }
 
     /** {@inheritDoc} */
     @Override public long getRowCountApproximation() {
-        return idx.getRowCountApproximation();
+        return getScanIndex(null).getRowCountApproximation();
     }
 
     /** {@inheritDoc} */
@@ -154,4 +174,24 @@ public class GridMergeTable extends TableBase {
     @Override public void checkRename() {
         throw DbException.getUnsupportedException("rename");
     }
+
+    /**
+     * Scan index wrapper.
+     */
+    private static class ScanIndex extends GridH2ScanIndex<GridMergeIndex> {
+        /**
+         * @param delegate Delegate.
+         */
+        public ScanIndex(GridMergeIndex delegate) {
+            super(delegate);
+        }
+
+        /** {@inheritDoc} */
+        @Override public double getCost(Session session, int[] masks, TableFilter[] filters, int filter,
+            SortOrder sortOrder) {
+            long rows = getRowCountApproximation();
+
+            return getCostRangeIndex(masks, rows, filters, filter, sortOrder, true);
+        }
+    }
 }
\ No newline at end of file