You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2016/12/23 09:34:42 UTC
[03/12] ignite git commit: Web console beta-7.
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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 4e6e372..0d0b171 100644
--- a/modules/web-console/frontend/app/modules/sql/sql.controller.js
+++ b/modules/web-console/frontend/app/modules/sql/sql.controller.js
@@ -50,6 +50,9 @@ class Paragraph {
const self = this;
self.id = 'paragraph-' + paragraphId++;
+ self.qryType = paragraph.qryType || 'query';
+ self.maxPages = 0;
+ self.filter = '';
_.assign(this, paragraph);
@@ -77,27 +80,28 @@ class Paragraph {
enableColumnMenus: false,
flatEntityAccess: true,
fastWatch: true,
+ categories: [],
rebuildColumns() {
if (_.isNil(this.api))
return;
- this.categories = [];
+ this.categories.length = 0;
+
this.columnDefs = _.reduce(self.meta, (cols, col, idx) => {
- if (self.columnFilter(col)) {
- cols.push({
- displayName: col.fieldName,
- headerTooltip: _fullColName(col),
- field: idx.toString(),
- minWidth: 50,
- cellClass: 'cell-left'
- });
+ cols.push({
+ displayName: col.fieldName,
+ headerTooltip: _fullColName(col),
+ field: idx.toString(),
+ minWidth: 50,
+ cellClass: 'cell-left',
+ visible: self.columnFilter(col)
+ });
- this.categories.push({
- name: col.fieldName,
- visible: true,
- selectable: true
- });
- }
+ this.categories.push({
+ name: col.fieldName,
+ visible: self.columnFilter(col),
+ selectable: true
+ });
return cols;
}, []);
@@ -182,8 +186,8 @@ 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', 'IgniteScanFilterInput', 'IgniteNodes', 'uiGridExporterConstants', 'IgniteVersion',
- function($root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $filter, $modal, $popover, Loading, LegacyUtils, Messages, Confirm, agentMonitor, IgniteChartColors, Notebook, ScanFilterInput, Nodes, uiGridExporterConstants, Version) {
+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',
+ function($root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $filter, $modal, $popover, Loading, LegacyUtils, Messages, Confirm, agentMonitor, IgniteChartColors, Notebook, Nodes, uiGridExporterConstants, Version) {
let stopTopology = null;
const _tryStopRefresh = function(paragraph) {
@@ -206,6 +210,15 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
$scope.caches = [];
$scope.pageSizes = [50, 100, 200, 400, 800, 1000];
+ $scope.maxPages = [
+ {label: 'Unlimited', value: 0},
+ {label: '1', value: 1},
+ {label: '5', value: 5},
+ {label: '10', value: 10},
+ {label: '20', value: 20},
+ {label: '50', value: 50},
+ {label: '100', value: 100}
+ ];
$scope.timeLineSpans = ['1', '5', '10', '15', '30'];
@@ -213,7 +226,7 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
$scope.modes = LegacyUtils.mkOptions(['PARTITIONED', 'REPLICATED', 'LOCAL']);
- $scope.loadingText = $root.IgniteDemoMode ? 'Demo grid is starting. Please wait...' : 'Loading notebook screen...';
+ $scope.loadingText = $root.IgniteDemoMode ? 'Demo grid is starting. Please wait...' : 'Loading query notebook screen...';
$scope.timeUnit = [
{value: 1000, label: 'seconds', short: 's'},
@@ -768,11 +781,10 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
if (idx >= 0) {
if (!_.includes($scope.notebook.expandedParagraphs, idx))
- $scope.notebook.expandedParagraphs.push(idx);
+ $scope.notebook.expandedParagraphs = $scope.notebook.expandedParagraphs.concat([idx]);
- setTimeout(function() {
- $scope.notebook.paragraphs[idx].ace.focus();
- });
+ if ($scope.notebook.paragraphs[idx].ace)
+ setTimeout(() => $scope.notebook.paragraphs[idx].ace.focus());
}
$location.hash(id);
@@ -816,7 +828,8 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
let item = _.find(cachesAcc, {name: cache.name});
if (_.isNil(item)) {
- cache.label = maskCacheName(cache.name);
+ cache.label = maskCacheName(cache.name, true);
+ cache.value = cache.name;
cache.nodes = [];
@@ -839,7 +852,7 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
return;
// Reset to first cache in case of stopped selected.
- const cacheNames = _.map($scope.caches, (cache) => cache.name);
+ const cacheNames = _.map($scope.caches, (cache) => cache.value);
_.forEach($scope.notebook.paragraphs, (paragraph) => {
if (!_.includes(cacheNames, paragraph.cacheName))
@@ -885,7 +898,7 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
(paragraph) => new Paragraph($animate, $timeout, paragraph));
if (_.isEmpty($scope.notebook.paragraphs))
- $scope.addParagraph();
+ $scope.addQuery();
else
$scope.rebuildScrollParagraphs();
})
@@ -936,32 +949,37 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
paragraph.edit = false;
};
- $scope.addParagraph = function() {
+ $scope.addParagraph = (paragraph, sz) => {
+ if ($scope.caches && $scope.caches.length > 0)
+ paragraph.cacheName = _.head($scope.caches).value;
+
+ $scope.notebook.paragraphs.push(paragraph);
+
+ $scope.notebook.expandedParagraphs.push(sz);
+
+ $scope.rebuildScrollParagraphs();
+
+ $location.hash(paragraph.id);
+ };
+
+ $scope.addQuery = function() {
const sz = $scope.notebook.paragraphs.length;
const paragraph = new Paragraph($animate, $timeout, {
name: 'Query' + (sz === 0 ? '' : sz),
query: '',
- pageSize: $scope.pageSizes[0],
+ pageSize: $scope.pageSizes[1],
timeLineSpan: $scope.timeLineSpans[0],
result: 'none',
rate: {
value: 1,
unit: 60000,
installed: false
- }
+ },
+ qryType: 'query'
});
- if ($scope.caches && $scope.caches.length > 0)
- paragraph.cacheName = $scope.caches[0].name;
-
- $scope.notebook.paragraphs.push(paragraph);
-
- $scope.notebook.expandedParagraphs.push(sz);
-
- $scope.rebuildScrollParagraphs();
-
- $location.hash(paragraph.id);
+ $scope.addParagraph(paragraph, sz);
$timeout(() => {
$anchorScroll();
@@ -970,6 +988,26 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
});
};
+ $scope.addScan = function() {
+ const sz = $scope.notebook.paragraphs.length;
+
+ const paragraph = new Paragraph($animate, $timeout, {
+ name: 'Scan' + (sz === 0 ? '' : sz),
+ query: '',
+ pageSize: $scope.pageSizes[1],
+ timeLineSpan: $scope.timeLineSpans[0],
+ result: 'none',
+ rate: {
+ value: 1,
+ unit: 60000,
+ installed: false
+ },
+ qryType: 'scan'
+ });
+
+ $scope.addParagraph(paragraph, sz);
+ };
+
function _saveChartSettings(paragraph) {
if (!_.isEmpty(paragraph.charts)) {
const chart = paragraph.charts[0].api.getScope().chart;
@@ -1010,7 +1048,7 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
};
$scope.removeParagraph = function(paragraph) {
- Confirm.confirm('Are you sure you want to remove: "' + paragraph.name + '"?')
+ Confirm.confirm('Are you sure you want to remove query: "' + paragraph.name + '"?')
.then(function() {
$scope.stopRefresh(paragraph);
@@ -1315,8 +1353,8 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
return false;
};
- $scope.execute = (paragraph, nonCollocatedJoins = false) => {
- const local = !!paragraph.localQry;
+ $scope.execute = (paragraph, local = false) => {
+ const nonCollocatedJoins = !!paragraph.nonCollocatedJoins;
$scope.actionAvailable(paragraph, true) && _chooseNode(paragraph.cacheName, local)
.then((nid) => {
@@ -1330,16 +1368,16 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
return _closeOldQuery(paragraph)
.then(() => {
const args = paragraph.queryArgs = {
+ type: 'QUERY',
cacheName: paragraph.cacheName,
- pageSize: paragraph.pageSize,
query: paragraph.query,
- firstPageOnly: paragraph.firstPageOnly,
+ pageSize: paragraph.pageSize,
+ maxPages: paragraph.maxPages,
nonCollocatedJoins,
- type: 'QUERY',
localNid: local ? nid : null
};
- const qry = args.firstPageOnly ? addLimit(args.query, args.pageSize) : paragraph.query;
+ const qry = args.maxPages ? addLimit(args.query, args.pageSize * args.maxPages) : paragraph.query;
return agentMonitor.query(nid, args.cacheName, qry, nonCollocatedJoins, local, args.pageSize);
})
@@ -1386,10 +1424,10 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
.then(() => _chooseNode(paragraph.cacheName, false))
.then((nid) => {
const args = paragraph.queryArgs = {
+ type: 'EXPLAIN',
cacheName: paragraph.cacheName,
- pageSize: paragraph.pageSize,
query: 'EXPLAIN ' + paragraph.query,
- type: 'EXPLAIN'
+ pageSize: paragraph.pageSize
};
return agentMonitor.query(nid, args.cacheName, args.query, false, false, args.pageSize);
@@ -1403,8 +1441,10 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
.then(() => paragraph.ace.focus());
};
- $scope.scan = (paragraph, query = null) => {
- const local = !!paragraph.localQry;
+ $scope.scan = (paragraph, local = false) => {
+ const {filter, caseSensitive} = paragraph;
+ const prefix = caseSensitive ? SCAN_CACHE_WITH_FILTER_CASE_SENSITIVE : SCAN_CACHE_WITH_FILTER;
+ const query = `${prefix}${filter}`;
$scope.actionAvailable(paragraph, false) && _chooseNode(paragraph.cacheName, local)
.then((nid) => {
@@ -1418,45 +1458,22 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
_closeOldQuery(paragraph)
.then(() => {
const args = paragraph.queryArgs = {
+ type: 'SCAN',
cacheName: paragraph.cacheName,
- pageSize: paragraph.pageSize,
- firstPageOnly: paragraph.firstPageOnly,
query,
- type: 'SCAN',
+ filter,
+ pageSize: paragraph.pageSize,
localNid: local ? nid : null
};
return agentMonitor.query(nid, args.cacheName, query, false, local, args.pageSize);
})
- .then((res) => {
- if (paragraph.firstPageOnly) {
- res.hasMore = false;
-
- _processQueryResult(paragraph, true, res);
-
- _closeOldQuery(paragraph);
- }
- else
- _processQueryResult(paragraph, true, res);
- })
+ .then((res) => _processQueryResult(paragraph, true, res))
.catch((err) => {
paragraph.errMsg = err.message;
_showLoading(paragraph, false);
- })
- .then(() => paragraph.ace.focus());
- });
- };
-
- $scope.scanWithFilter = (paragraph) => {
- if (!$scope.actionAvailable(paragraph, false))
- return;
-
- ScanFilterInput.open()
- .then(({filter, caseSensitive}) => {
- const prefix = caseSensitive ? SCAN_CACHE_WITH_FILTER_CASE_SENSITIVE : SCAN_CACHE_WITH_FILTER;
-
- $scope.scan(paragraph, `${prefix}${filter}`);
+ });
});
};
@@ -1511,25 +1528,23 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
_showLoading(paragraph, false);
})
- .then(() => paragraph.ace.focus());
+ .then(() => paragraph.ace && paragraph.ace.focus());
};
- const _export = (fileName, columnFilter, meta, rows) => {
+ const _export = (fileName, columnDefs, meta, rows) => {
let csvContent = '';
const cols = [];
const excludedCols = [];
- if (meta) {
- _.forEach(meta, (col, idx) => {
- if (columnFilter(col))
- cols.push(_fullColName(col));
- else
- excludedCols.push(idx);
- });
+ _.forEach(meta, (col, idx) => {
+ if (columnDefs[idx].visible)
+ cols.push(_fullColName(col));
+ else
+ excludedCols.push(idx);
+ });
- csvContent += cols.join(';') + '\n';
- }
+ csvContent += cols.join(';') + '\n';
_.forEach(rows, (row) => {
cols.length = 0;
@@ -1543,8 +1558,8 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
});
}
else {
- _.forEach(meta, (col) => {
- if (columnFilter(col)) {
+ _.forEach(columnDefs, (col) => {
+ if (col.visible) {
const elem = row[col.fieldName];
cols.push(_.isUndefined(elem) ? '' : JSON.stringify(elem));
@@ -1559,7 +1574,7 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
};
$scope.exportCsv = function(paragraph) {
- _export(paragraph.name + '.csv', paragraph.columnFilter, paragraph.meta, paragraph.rows);
+ _export(paragraph.name + '.csv', paragraph.gridOptions.columnDefs, paragraph.meta, paragraph.rows);
// paragraph.gridOptions.api.exporter.csvExport(uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE);
};
@@ -1573,17 +1588,17 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
return Promise.resolve(args.localNid || _chooseNode(args.cacheName, false))
.then((nid) => agentMonitor.queryGetAll(nid, args.cacheName, args.query, !!args.nonCollocatedJoins, !!args.localNid))
- .then((res) => _export(paragraph.name + '-all.csv', paragraph.columnFilter, res.columns, res.rows))
+ .then((res) => _export(paragraph.name + '-all.csv', paragraph.gridOptions.columnDefs, res.columns, res.rows))
.catch(Messages.showError)
- .then(() => paragraph.ace.focus());
+ .then(() => paragraph.ace && paragraph.ace.focus());
};
// $scope.exportPdfAll = function(paragraph) {
// $http.post('/api/v1/agent/query/getAll', {query: paragraph.query, cacheName: paragraph.cacheName})
- // .success(function(item) {
- // _export(paragraph.name + '-all.csv', item.meta, item.rows);
+ // .then(({data}) {
+ // _export(paragraph.name + '-all.csv', data.meta, data.rows);
// })
- // .error(Messages.showError);
+ // .catch(Messages.showError);
// };
$scope.rateAsString = function(paragraph) {
@@ -1652,9 +1667,7 @@ export default ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval',
$scope.dblclickMetadata = function(paragraph, node) {
paragraph.ace.insert(node.name);
- setTimeout(function() {
- paragraph.ace.focus();
- }, 1);
+ setTimeout(() => paragraph.ace.focus(), 1);
};
$scope.importMetadata = function() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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 d615d28..a1ffde9 100644
--- a/modules/web-console/frontend/app/modules/sql/sql.module.js
+++ b/modules/web-console/frontend/app/modules/sql/sql.module.js
@@ -19,7 +19,6 @@ import angular from 'angular';
import NotebookData from './Notebook.data';
import Notebook from './Notebook.service';
-import ScanFilterInput from './scan-filter-input.service';
import notebook from './notebook.controller';
import sql from './sql.controller';
@@ -55,6 +54,5 @@ angular.module('ignite-console.sql', [
)
.service('IgniteNotebookData', NotebookData)
.service('IgniteNotebook', Notebook)
- .service('IgniteScanFilterInput', ScanFilterInput)
.controller('notebookController', notebook)
.controller('sqlController', sql);
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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 888c804..61dca13 100644
--- a/modules/web-console/frontend/app/modules/states/configuration.state.js
+++ b/modules/web-console/frontend/app/modules/states/configuration.state.js
@@ -24,12 +24,14 @@ import previewPanel from './configuration/preview-panel.directive.js';
import ConfigurationSummaryCtrl from './configuration/summary/summary.controller';
import ConfigurationResource from './configuration/Configuration.resource';
import summaryTabs from './configuration/summary/summary-tabs.directive';
+import IgniteSummaryZipper from './configuration/summary/summary-zipper.service';
angular.module('ignite-console.states.configuration', ['ui.router'])
.directive(...previewPanel)
// Summary screen
.directive(...summaryTabs)
// Services.
+ .service('IgniteSummaryZipper', IgniteSummaryZipper)
.service('IgniteConfigurationResource', ConfigurationResource)
// Configure state provider.
.config(['$stateProvider', 'AclRouteProvider', ($stateProvider, AclRoute) => {
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index b34aba0..bcac5ad 100644
--- 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
@@ -54,6 +54,6 @@ include /app/helpers/jade/mixins.jade
-var required = nodeFilterKind + ' === "Custom"'
+java-class('Class name:', customNodeFilter + '.className', '"customNodeFilter"',
- 'true', required, 'Class name of custom node filter implementation')
+ '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/8e7c852b/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
index 5062ce1..cfbaf12 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/query.jade
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/query.jade
@@ -53,6 +53,9 @@ include /app/helpers/jade/mixins.jade
+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';
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index 1cf80b8..ea350f2 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/store.jade
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/store.jade
@@ -102,9 +102,9 @@ mixin hibernateField(name, model, items, valid, save, newItem)
'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')
+ +java-class('Hasher', pojoStoreFactory + '.hasher', '"pojoHasher"', 'true', 'false', 'Hash calculator', required)
.details-row
- +java-class('Transformer', pojoStoreFactory + '.transformer', '"pojoTransformer"', 'true', 'false', 'Types transformer')
+ +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/>\
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index 5cc996d..259909e 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint.jade
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/checkpoint.jade
@@ -19,6 +19,7 @@ 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}")')
@@ -44,7 +45,7 @@ include /app/helpers/jade/mixins.jade
.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('Checkpoint SPI:', 'model.kind', '"checkpointKind" + $index', 'true', 'true', 'Choose checkpoint configuration variant', '[\
+ +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"},\
@@ -64,13 +65,13 @@ include /app/helpers/jade/mixins.jade
div(ng-show='model.kind === "FS"')
include ./checkpoint/fs.jade
- div(ng-show='model.kind === "Cache"')
+ div(ng-show=CacheCheckpoint)
.settings-row
- +dropdown-required-empty('Cache:', 'model.Cache.cache', '"checkpointCacheCache"+ $index', 'true', 'true',
+ +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')
+ 'Checkpoint listener implementation class name', CacheCheckpoint)
div(ng-show='model.kind === "S3"')
include ./checkpoint/s3.jade
@@ -80,6 +81,6 @@ include /app/helpers/jade/mixins.jade
.settings-row(ng-show=CustomCheckpoint)
+java-class('Class name:', 'model.Custom.className', '"checkpointCustomClassName" + $index', 'true', CustomCheckpoint,
- 'Custom CheckpointSpi implementation class')
+ 'Custom CheckpointSpi implementation class', CustomCheckpoint)
.col-sm-6
+preview-xml-java('backupItem', 'clusterCheckpoint', 'caches')
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index efb6ad0..6ec4535 100644
--- 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
@@ -36,13 +36,13 @@ include /app/helpers/jade/mixins.jade
-var valid = form + '[' + name + '].$valid'
-var save = dirPaths + '[$index] = ' + model
- div(ng-repeat='model in #{dirPaths} track by $index' ng-init='obj = {}')
+ 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')
+ +table-remove-conditional-button(dirPaths, 'true', 'Remove path', 'item')
span(ng-hide='field.edit')
- a.labelFormField(ng-click='(field.edit = true) && (#{model} = model)') {{ model }}
+ 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)
@@ -63,4 +63,4 @@ include /app/helpers/jade/mixins.jade
.settings-row
+java-class('Listener:', 'model.FS.checkpointListener', '"checkpointFsListener" + $index', 'true', 'false',
- 'Checkpoint listener implementation class name')
+ 'Checkpoint listener implementation class name', 'model.kind === "FS"')
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index 874799c..5a13337 100644
--- 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
@@ -16,15 +16,17 @@
include /app/helpers/jade/mixins.jade
+-var jdbcCheckpoint = 'model.kind === "JDBC"'
+
.settings-row
- +text('Data source bean name:', 'model.JDBC.dataSourceBean', '"checkpointJdbcDataSourceBean" + $index', 'model.kind === "JDBC"', 'Input bean name',
+ +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', 'model.kind === "JDBC"',
+ +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')
+ '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')
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index da28da7..6531897 100644
--- 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
@@ -18,16 +18,17 @@ include /app/helpers/jade/mixins.jade
-var credentialsModel = 'model.S3.awsCredentials'
-var clientCfgModel = 'model.S3.clientConfiguration'
--var checkpointS3Path = 'model.S3.awsCredentials.kind === "Properties"'
--var checkpointS3Custom = 'model.S3.awsCredentials.kind === "Custom"'
+-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 = clientRetryModel + '.kind === "DefaultMaxRetries"'
--var checkpointS3DynamoDbMaxRetry = clientRetryModel + '.kind === "DynamoDBMaxRetries"'
--var checkpointS3CustomRetry = clientRetryModel + '.kind === "Custom"'
+-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', 'model.kind === "S3"', 'Custom', '[\
+ +dropdown-required('AWS credentials:', 'model.S3.awsCredentials.kind', '"checkpointS3AwsCredentials"', 'true', checkpointS3, 'Custom', '[\
{value: "Basic", label: "Basic"},\
{value: "Properties", label: "Properties"},\
{value: "Anonymous", label: "Anonymous"},\
@@ -51,12 +52,12 @@ include /app/helpers/jade/mixins.jade
.panel-details(ng-show=checkpointS3Custom)
.details-row
+java-class('Class name:', credentialsModel + '.Custom.className', '"checkpointS3CustomClassName" + $index', 'true', checkpointS3Custom,
- 'Custom AWS credentials provider implementation class')
+ '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')
+ 'Checkpoint listener implementation class name', checkpointS3)
+showHideLink('s3Expanded', 'client configuration')
.details-row
+dropdown('Protocol:', clientCfgModel + '.protocol', '"checkpointS3Protocol"', 'true', 'HTTPS', '[\
@@ -121,10 +122,10 @@ include /app/helpers/jade/mixins.jade
.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')
+ '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')
+ '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')
@@ -159,13 +160,13 @@ include /app/helpers/jade/mixins.jade
'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')
+ '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')
+ '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
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index 31a6be7..8e77ac4 100644
--- 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
@@ -21,4 +21,4 @@ include /app/helpers/jade/mixins.jade
div
.details-row
- +java-class('Class:', model + '.class', '"collisionCustom"', 'true', required, 'CollisionSpi implementation class')
+ +java-class('Class:', model + '.class', '"collisionCustom"', 'true', required, 'CollisionSpi implementation class', required)
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index d4e537a..dbe0478 100644
--- 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
@@ -37,7 +37,7 @@ div
'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')
+ 'Listener to be set for notification of external collision events', 'backupItem.collision.kind === "JobStealing"')
.details-row
+ignite-form-group
ignite-form-field-label
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index 4cfd9f5..aa99b49 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/deployment.jade
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/deployment.jade
@@ -18,8 +18,14 @@ 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}")')
@@ -57,7 +63,7 @@ include /app/helpers/jade/mixins.jade
.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(ng-model=exclude ng-form=form)
+ +ignite-form-group
-var uniqueTip = 'Such package already exists'
ignite-form-field-label
@@ -81,7 +87,7 @@ include /app/helpers/jade/mixins.jade
| {{ $index+1 }})
+table-remove-button(exclude, 'Remove package name')
span(ng-hide='field.edit')
- a.labelFormField(ng-click='#{enabled} && (field.edit = true) && (#{model} = model)') {{ model }}
+ 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)
@@ -107,8 +113,125 @@ include /app/helpers/jade/mixins.jade
+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/8e7c852b/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
index 3f2d6cb..643ea97 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/events.jade
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/events.jade
@@ -59,10 +59,10 @@ include /app/helpers/jade/mixins.jade
.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<o.a.i.events.Event>')
+ Should be implementation of o.a.i.lang.IgnitePredicate<o.a.i.events.Event>', eventStorageMemory)
.settings-row(ng-show=eventStorageCustom)
- +java-class('Class:', modelEventStorage + '.Custom.className', '"EventStorageCustom"', 'true', eventStorageCustom, 'Event storage implementation class name')
+ +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/8e7c852b/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
index aaed8e9..1665659 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/failover.jade
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/failover.jade
@@ -45,7 +45,7 @@ include /app/helpers/jade/mixins.jade
.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('Failover SPI:', 'model.kind', '"failoverKind" + $index', 'true', 'true', 'Choose Failover SPI', '[\
+ +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"},\
@@ -68,6 +68,6 @@ include /app/helpers/jade/mixins.jade
'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.')
+ 'Custom FailoverSpi implementation class name.', failoverCustom)
.col-sm-6
+preview-xml-java(model, 'clusterFailover')
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index 2e567ed..48b1776 100644
--- 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
@@ -27,7 +27,7 @@ div
+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')
+ 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')
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index 5a03de8..5db89f5 100644
--- 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
@@ -21,4 +21,4 @@ include /app/helpers/jade/mixins.jade
-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')
+ +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/8e7c852b/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
index 7fd78bf..9fa9fc9 100644
--- 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
@@ -46,7 +46,7 @@ include /app/helpers/jade/mixins.jade
.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('Load balancing:', 'model.kind', '"loadBalancingKind" + $index', 'true', 'true', 'Choose load balancing SPI', '[\
+ +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"},\
@@ -78,27 +78,30 @@ include /app/helpers/jade/mixins.jade
<li>Default - Default load probing implementation</li>\
</ul>')
.settings-row(ng-show='model.kind === "Adaptive" && model.Adaptive.loadProbe.kind')
- .panel-details
- .details-row(ng-show='model.Adaptive.loadProbe.kind === "Job"')
+ .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')
- .details-row(ng-show='model.Adaptive.loadProbe.kind === "CPU"')
+ .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(ng-show='model.Adaptive.loadProbe.kind === "CPU"')
+ .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(ng-show='model.Adaptive.loadProbe.kind === "CPU"')
+ .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')
- .details-row(ng-show='model.Adaptive.loadProbe.kind === "ProcessingTime"')
+ .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')
- .details-row(ng-show=loadProbeCustom)
+ .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.')
+ '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.')
+ '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/8e7c852b/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
index 385d647..87d2b7d 100644
--- 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
@@ -22,4 +22,4 @@ include /app/helpers/jade/mixins.jade
div
.details-row
- +java-class('Class:', model + '.class', '"customLogger"', 'true', required, 'Logger implementation class name')
+ +java-class('Class:', model + '.class', '"customLogger"', 'true', required, 'Logger implementation class name', required)
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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
index 85ec073..fbd979c 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.jade
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.jade
@@ -72,7 +72,7 @@ include /app/helpers/jade/mixins.jade
label.col-xs-12.col-sm-12.col-md-12
.indexField
| {{ $index+1 }})
- +table-remove-conditional-button(trust, enabled, 'Remove trust manager')
+ +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')
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/modules/web-console/frontend/app/modules/states/configuration/summary/summary-zipper.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/summary/summary-zipper.service.js b/modules/web-console/frontend/app/modules/states/configuration/summary/summary-zipper.service.js
new file mode 100644
index 0000000..08cfa71
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/summary/summary-zipper.service.js
@@ -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.
+ */
+
+import Worker from 'worker?inline=true!./summary.worker';
+
+export default ['$q', function($q) {
+ return function({ cluster, data }) {
+ const defer = $q.defer();
+ const worker = new Worker();
+
+ worker.postMessage({ cluster, data });
+
+ worker.onmessage = (e) => {
+ defer.resolve(e.data);
+ };
+
+ worker.onerror = (err) => {
+ defer.reject(err);
+ };
+
+ return defer.promise;
+ };
+}];
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/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 d739c43..cfc6df9 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
@@ -16,15 +16,19 @@
*/
import _ from 'lodash';
-import JSZip from 'jszip';
import saver from 'file-saver';
+const escapeFileName = (name) => name.replace(/[\\\/*\"\[\],\.:;|=<>?]/g, '-').replace(/ /g, '_');
+
export default [
- '$rootScope', '$scope', '$http', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteLoading', '$filter', 'IgniteConfigurationResource', 'JavaTypes', 'IgniteVersion', 'IgniteConfigurationGenerator', 'SpringTransformer', 'JavaTransformer', 'GeneratorDocker', 'GeneratorPom', 'IgnitePropertiesGenerator', 'IgniteReadmeGenerator', 'IgniteFormUtils',
- function($root, $scope, $http, LegacyUtils, Messages, Loading, $filter, Resource, JavaTypes, Version, generator, spring, java, docker, pom, propsGenerator, readme, FormUtils) {
+ '$rootScope', '$scope', '$http', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteLoading', '$filter', 'IgniteConfigurationResource', 'JavaTypes', 'IgniteVersion', 'IgniteConfigurationGenerator', 'SpringTransformer', 'JavaTransformer', 'IgniteDockerGenerator', 'IgniteMavenGenerator', 'IgnitePropertiesGenerator', 'IgniteReadmeGenerator', 'IgniteFormUtils', 'IgniteSummaryZipper',
+ function($root, $scope, $http, LegacyUtils, Messages, Loading, $filter, Resource, JavaTypes, Version, generator, spring, java, docker, pom, propsGenerator, readme, FormUtils, SummaryZipper) {
const ctrl = this;
- $scope.ui = { ready: false };
+ $scope.ui = {
+ isSafari: !!(/constructor/i.test(window.HTMLElement) || window.safari),
+ ready: false
+ };
Loading.start('summaryPage');
@@ -223,10 +227,6 @@ export default [
return false;
}
- function escapeFileName(name) {
- return name.replace(/[\\\/*\"\[\],\.:;|=<>?]/g, '-').replace(/ /g, '_');
- }
-
$scope.selectItem = (cluster) => {
delete ctrl.cluster;
@@ -297,84 +297,19 @@ export default [
// TODO IGNITE-2114: implemented as independent logic for download.
$scope.downloadConfiguration = function() {
- const cluster = $scope.cluster;
-
- const zip = new JSZip();
-
- if (!ctrl.data)
- ctrl.data = {};
-
- if (!ctrl.data.docker)
- ctrl.data.docker = docker.generate(cluster, 'latest');
-
- zip.file('Dockerfile', ctrl.data.docker);
- zip.file('.dockerignore', docker.ignoreFile());
-
- const cfg = generator.igniteConfiguration(cluster, false);
- const clientCfg = generator.igniteConfiguration(cluster, true);
- const clientNearCaches = _.filter(cluster.caches, (cache) => _.get(cache, 'clientNearConfiguration.enabled'));
-
- const secProps = propsGenerator.generate(cfg);
-
- if (secProps)
- zip.file('src/main/resources/secret.properties', secProps);
-
- const srcPath = 'src/main/java';
- const resourcesPath = 'src/main/resources';
-
- const serverXml = `${escapeFileName(cluster.name)}-server.xml`;
- const clientXml = `${escapeFileName(cluster.name)}-client.xml`;
-
- const metaPath = `${resourcesPath}/META-INF`;
-
- zip.file(`${metaPath}/${serverXml}`, spring.igniteConfiguration(cfg).asString());
- zip.file(`${metaPath}/${clientXml}`, spring.igniteConfiguration(clientCfg, clientNearCaches).asString());
-
- const cfgPath = `${srcPath}/config`;
-
- zip.file(`${cfgPath}/ServerConfigurationFactory.java`, java.igniteConfiguration(cfg, 'config', 'ServerConfigurationFactory').asString());
- zip.file(`${cfgPath}/ClientConfigurationFactory.java`, java.igniteConfiguration(clientCfg, 'config', 'ClientConfigurationFactory', clientNearCaches).asString());
-
- if (java.isDemoConfigured(cluster, $root.IgniteDemoMode)) {
- zip.file(`${srcPath}/demo/DemoStartup.java`, java.nodeStartup(cluster, 'demo.DemoStartup',
- 'ServerConfigurationFactory.createConfiguration()', 'config.ServerConfigurationFactory'));
- }
-
- // Generate loader for caches with configured store.
- const cachesToLoad = _.filter(cluster.caches, (cache) => _.nonNil(cache.cacheStoreFactory));
-
- if (_.nonEmpty(cachesToLoad))
- zip.file(`${srcPath}/load/LoadCaches.java`, java.loadCaches(cachesToLoad, 'load', 'LoadCaches', `"${clientXml}"`));
-
- const startupPath = `${srcPath}/startup`;
-
- zip.file(`${startupPath}/ServerNodeSpringStartup.java`, java.nodeStartup(cluster, 'startup.ServerNodeSpringStartup', `"${serverXml}"`));
- zip.file(`${startupPath}/ClientNodeSpringStartup.java`, java.nodeStartup(cluster, 'startup.ClientNodeSpringStartup', `"${clientXml}"`));
-
- zip.file(`${startupPath}/ServerNodeCodeStartup.java`, java.nodeStartup(cluster, 'startup.ServerNodeCodeStartup',
- 'ServerConfigurationFactory.createConfiguration()', 'config.ServerConfigurationFactory'));
- zip.file(`${startupPath}/ClientNodeCodeStartup.java`, java.nodeStartup(cluster, 'startup.ClientNodeCodeStartup',
- 'ClientConfigurationFactory.createConfiguration()', 'config.ClientConfigurationFactory', clientNearCaches));
-
- zip.file('pom.xml', pom.generate(cluster, Version.productVersion().ignite).asString());
-
- zip.file('README.txt', readme.generate());
- zip.file('jdbc-drivers/README.txt', readme.generateJDBC());
-
- if (_.isEmpty(ctrl.data.pojos))
- ctrl.data.pojos = java.pojos(cluster.caches);
-
- for (const pojo of ctrl.data.pojos) {
- if (pojo.keyClass && JavaTypes.nonBuiltInClass(pojo.keyType))
- zip.file(`${srcPath}/${pojo.keyType.replace(/\./g, '/')}.java`, pojo.keyClass);
+ if ($scope.isPrepareDownloading)
+ return;
- zip.file(`${srcPath}/${pojo.valueType.replace(/\./g, '/')}.java`, pojo.valueClass);
- }
+ const cluster = $scope.cluster;
- $generatorOptional.optionalContent(zip, cluster);
+ $scope.isPrepareDownloading = true;
- zip.generateAsync({type: 'blob', compression: 'DEFLATE', mimeType: 'application/octet-stream'})
- .then((blob) => saver.saveAs(blob, escapeFileName(cluster.name) + '-project.zip'));
+ return new SummaryZipper({ cluster, data: ctrl.data || {}, IgniteDemoMode: $root.IgniteDemoMode })
+ .then((data) => {
+ saver.saveAs(data, escapeFileName(cluster.name) + '-project.zip');
+ })
+ .catch((err) => Messages.showError('Failed to generate project files. ' + err.message))
+ .then(() => $scope.isPrepareDownloading = false);
};
/**
@@ -393,7 +328,7 @@ export default [
const dialects = $scope.dialects;
if (dialects.Oracle)
- window.open('http://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html');
+ window.open('http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html');
if (dialects.DB2)
window.open('http://www-01.ibm.com/support/docview.wss?uid=swg21363866');
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js b/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
new file mode 100644
index 0000000..6b24001
--- /dev/null
+++ b/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 JSZip from 'jszip';
+
+import IgniteVersion from 'app/modules/configuration/Version.service';
+
+import MavenGenerator from 'app/modules/configuration/generator/Maven.service';
+import DockerGenerator from 'app/modules/configuration/generator/Docker.service';
+import ReadmeGenerator from 'app/modules/configuration/generator/Readme.service';
+import PropertiesGenerator from 'app/modules/configuration/generator/Properties.service';
+import ConfigurationGenerator from 'app/modules/configuration/generator/ConfigurationGenerator';
+
+import JavaTransformer from 'app/modules/configuration/generator/JavaTransformer.service';
+import SpringTransformer from 'app/modules/configuration/generator/SpringTransformer.service';
+
+const Version = new IgniteVersion();
+
+const maven = new MavenGenerator();
+const docker = new DockerGenerator();
+const readme = new ReadmeGenerator();
+const properties = new PropertiesGenerator();
+
+const java = new JavaTransformer[0]();
+const spring = new SpringTransformer[0]();
+
+const generator = new ConfigurationGenerator[0]();
+
+const escapeFileName = (name) => name.replace(/[\\\/*\"\[\],\.:;|=<>?]/g, '-').replace(/ /g, '_');
+
+// eslint-disable-next-line no-undef
+onmessage = function(e) {
+ const {cluster, data, demo} = e.data;
+
+ const zip = new JSZip();
+
+ if (!data.docker)
+ data.docker = docker.generate(cluster, 'latest');
+
+ zip.file('Dockerfile', data.docker);
+ zip.file('.dockerignore', docker.ignoreFile());
+
+ const cfg = generator.igniteConfiguration(cluster, false);
+ const clientCfg = generator.igniteConfiguration(cluster, true);
+ const clientNearCaches = _.filter(cluster.caches, (cache) => _.get(cache, 'clientNearConfiguration.enabled'));
+
+ const secProps = properties.generate(cfg);
+
+ if (secProps)
+ zip.file('src/main/resources/secret.properties', secProps);
+
+ const srcPath = 'src/main/java';
+ const resourcesPath = 'src/main/resources';
+
+ const serverXml = `${escapeFileName(cluster.name)}-server.xml`;
+ const clientXml = `${escapeFileName(cluster.name)}-client.xml`;
+
+ const metaPath = `${resourcesPath}/META-INF`;
+
+ zip.file(`${metaPath}/${serverXml}`, spring.igniteConfiguration(cfg).asString());
+ zip.file(`${metaPath}/${clientXml}`, spring.igniteConfiguration(clientCfg, clientNearCaches).asString());
+
+ const cfgPath = `${srcPath}/config`;
+
+ zip.file(`${cfgPath}/ServerConfigurationFactory.java`, java.igniteConfiguration(cfg, 'config', 'ServerConfigurationFactory').asString());
+ zip.file(`${cfgPath}/ClientConfigurationFactory.java`, java.igniteConfiguration(clientCfg, 'config', 'ClientConfigurationFactory', clientNearCaches).asString());
+
+ if (java.isDemoConfigured(cluster, demo)) {
+ zip.file(`${srcPath}/demo/DemoStartup.java`, java.nodeStartup(cluster, 'demo.DemoStartup',
+ 'ServerConfigurationFactory.createConfiguration()', 'config.ServerConfigurationFactory'));
+ }
+
+ // Generate loader for caches with configured store.
+ const cachesToLoad = _.filter(cluster.caches, (cache) => _.nonNil(cache.cacheStoreFactory));
+
+ if (_.nonEmpty(cachesToLoad))
+ zip.file(`${srcPath}/load/LoadCaches.java`, java.loadCaches(cachesToLoad, 'load', 'LoadCaches', `"${clientXml}"`));
+
+ const startupPath = `${srcPath}/startup`;
+
+ zip.file(`${startupPath}/ServerNodeSpringStartup.java`, java.nodeStartup(cluster, 'startup.ServerNodeSpringStartup', `"${serverXml}"`));
+ zip.file(`${startupPath}/ClientNodeSpringStartup.java`, java.nodeStartup(cluster, 'startup.ClientNodeSpringStartup', `"${clientXml}"`));
+
+ zip.file(`${startupPath}/ServerNodeCodeStartup.java`, java.nodeStartup(cluster, 'startup.ServerNodeCodeStartup',
+ 'ServerConfigurationFactory.createConfiguration()', 'config.ServerConfigurationFactory'));
+ zip.file(`${startupPath}/ClientNodeCodeStartup.java`, java.nodeStartup(cluster, 'startup.ClientNodeCodeStartup',
+ 'ClientConfigurationFactory.createConfiguration()', 'config.ClientConfigurationFactory', clientNearCaches));
+
+ zip.file('pom.xml', maven.generate(cluster, Version.productVersion().ignite).asString());
+
+ zip.file('README.txt', readme.generate());
+ zip.file('jdbc-drivers/README.txt', readme.generateJDBC());
+
+ if (_.isEmpty(data.pojos))
+ data.pojos = java.pojos(cluster.caches);
+
+ for (const pojo of data.pojos) {
+ if (pojo.keyClass)
+ zip.file(`${srcPath}/${pojo.keyType.replace(/\./g, '/')}.java`, pojo.keyClass);
+
+ zip.file(`${srcPath}/${pojo.valueType.replace(/\./g, '/')}.java`, pojo.valueClass);
+ }
+
+ zip.generateAsync({
+ type: 'blob',
+ compression: 'DEFLATE',
+ mimeType: 'application/octet-stream'
+ }).then((blob) => postMessage(blob));
+};
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/modules/web-console/frontend/app/modules/user/Auth.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/user/Auth.service.js b/modules/web-console/frontend/app/modules/user/Auth.service.js
index 43e2f92..e0f905d 100644
--- a/modules/web-console/frontend/app/modules/user/Auth.service.js
+++ b/modules/web-console/frontend/app/modules/user/Auth.service.js
@@ -20,12 +20,11 @@ export default ['Auth', ['$http', '$rootScope', '$state', '$window', 'IgniteErro
return {
forgotPassword(userInfo) {
$http.post('/api/v1/password/forgot', userInfo)
- .success(() => $state.go('password.send'))
- .error((err) => ErrorPopover.show('forgot_email', Messages.errorMessage(null, err)));
+ .then(() => $state.go('password.send'))
+ .cacth(({data}) => ErrorPopover.show('forgot_email', Messages.errorMessage(null, data)));
},
auth(action, userInfo) {
$http.post('/api/v1/' + action, userInfo)
- .catch(({data}) => Promise.reject(data))
.then(() => {
if (action === 'password/forgot')
return;
@@ -41,16 +40,16 @@ export default ['Auth', ['$http', '$rootScope', '$state', '$window', 'IgniteErro
$root.gettingStarted.tryShow();
});
})
- .catch((err) => ErrorPopover.show(action + '_email', Messages.errorMessage(null, err)));
+ .catch((res) => ErrorPopover.show(action + '_email', Messages.errorMessage(null, res)));
},
logout() {
$http.post('/api/v1/logout')
- .success(() => {
+ .then(() => {
User.clean();
$window.open($state.href('signin'), '_self');
})
- .error(Messages.showError);
+ .catch(Messages.showError);
}
};
}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/modules/web-console/frontend/app/services/JavaTypes.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/JavaTypes.service.js b/modules/web-console/frontend/app/services/JavaTypes.service.js
index 679914f..944fea5 100644
--- a/modules/web-console/frontend/app/services/JavaTypes.service.js
+++ b/modules/web-console/frontend/app/services/JavaTypes.service.js
@@ -40,7 +40,7 @@ const VALID_UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-
* Utility service for various check on java types.
*/
export default class JavaTypes {
- static $inject = ['igniteClusterDefaults', 'igniteCacheDefaults', 'igniteIgfsDefaults'];
+ static $inject = ['IgniteClusterDefaults', 'IgniteCacheDefaults', 'IgniteIGFSDefaults'];
constructor(clusterDflts, cacheDflts, igfsDflts) {
this.enumClasses = _.uniq(this._enumClassesAcc(_.merge(clusterDflts, cacheDflts, igfsDflts), []));
@@ -101,14 +101,9 @@ export default class JavaTypes {
* @return {String} Class name.
*/
shortClassName(clsName) {
- if (this.isJavaPrimitive(clsName))
- return clsName;
+ const dotIdx = clsName.lastIndexOf('.');
- const fullClsName = this.fullClassName(clsName);
-
- const dotIdx = fullClsName.lastIndexOf('.');
-
- return dotIdx > 0 ? fullClsName.substr(dotIdx + 1) : fullClsName;
+ return dotIdx > 0 ? clsName.substr(dotIdx + 1) : clsName;
}
/**
@@ -163,7 +158,7 @@ export default class JavaTypes {
* @param {String} clsName Class name to check.
* @returns {boolean} 'true' if given class name is java primitive.
*/
- isJavaPrimitive(clsName) {
+ isPrimitive(clsName) {
return _.includes(JAVA_PRIMITIVES, clsName);
}