You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2018/10/11 18:42:23 UTC
[1/2] nifi git commit: NIFI-5661: - Allowing the load balance
configuration to be shown/edited in both clustered and standalone mode.
Repository: nifi
Updated Branches:
refs/heads/master 64de5c70e -> 8da403ce9
NIFI-5661:
- Allowing the load balance configuration to be shown/edited in both clustered and standalone mode.
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/79c03caf
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/79c03caf
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/79c03caf
Branch: refs/heads/master
Commit: 79c03caf4f57a1273cbe5856ec7b6fc007f00a3e
Parents: 64de5c7
Author: Matt Gilman <ma...@gmail.com>
Authored: Thu Oct 11 12:23:53 2018 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Thu Oct 11 12:23:53 2018 -0400
----------------------------------------------------------------------
.../canvas/connection-configuration.jsp | 2 +-
.../WEB-INF/partials/connection-details.jsp | 2 +-
.../js/nf/canvas/nf-connection-configuration.js | 28 +++++++-----------
.../main/webapp/js/nf/nf-connection-details.js | 30 +++++++-------------
4 files changed, 23 insertions(+), 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/79c03caf/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/connection-configuration.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/connection-configuration.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/connection-configuration.jsp
index fee7da7..1575e88 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/connection-configuration.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/connection-configuration.jsp
@@ -63,7 +63,7 @@
</div>
</div>
</div>
- <div id="load-balance-settings">
+ <div>
<div class="multi-column-settings">
<div class="setting">
<div class="setting-name">
http://git-wip-us.apache.org/repos/asf/nifi/blob/79c03caf/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp
index 8ce9684..2887ee9 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp
@@ -106,7 +106,7 @@
<div class="clear"></div>
</div>
</div>
- <div id="read-only-load-balance-settings">
+ <div>
<div class="multi-column-settings">
<div class="setting">
<div class="setting-name">
http://git-wip-us.apache.org/repos/asf/nifi/blob/79c03caf/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
index eb58df3..97af35d 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
@@ -23,14 +23,13 @@
'd3',
'nf.ErrorHandler',
'nf.Common',
- 'nf.ClusterSummary',
'nf.Dialog',
'nf.Storage',
'nf.Client',
'nf.CanvasUtils',
'nf.Connection'],
- function ($, d3, nfErrorHandler, nfCommon, nfClusterSummary, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection) {
- return (nf.ConnectionConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfClusterSummary, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection));
+ function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection) {
+ return (nf.ConnectionConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ConnectionConfiguration =
@@ -38,7 +37,6 @@
require('d3'),
require('nf.ErrorHandler'),
require('nf.Common'),
- require('nf.ClusterSummary'),
require('nf.Dialog'),
require('nf.Storage'),
require('nf.Client'),
@@ -49,14 +47,13 @@
root.d3,
root.nf.ErrorHandler,
root.nf.Common,
- root.nf.ClusterSummary,
root.nf.Dialog,
root.nf.Storage,
root.nf.Client,
root.nf.CanvasUtils,
root.nf.Connection);
}
-}(this, function ($, d3, nfErrorHandler, nfCommon, nfClusterSummary, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection) {
+}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection) {
'use strict';
var nfBirdseye;
@@ -1434,18 +1431,13 @@
$('#back-pressure-data-size-threshold').val(connection.backPressureDataSizeThreshold);
// select the load balance combos
- if (nfClusterSummary.isConnectedToCluster()) {
- $('#load-balance-strategy-combo').combo('setSelectedOption', {
- value: connection.loadBalanceStrategy
- });
- $('#load-balance-compression-combo').combo('setSelectedOption', {
- value: connection.loadBalanceCompression
- });
- $('#load-balance-partition-attribute').val(connection.loadBalancePartitionAttribute);
- $('#load-balance-settings').show();
- } else {
- $('#load-balance-settings').hide();
- }
+ $('#load-balance-strategy-combo').combo('setSelectedOption', {
+ value: connection.loadBalanceStrategy
+ });
+ $('#load-balance-compression-combo').combo('setSelectedOption', {
+ value: connection.loadBalanceCompression
+ });
+ $('#load-balance-partition-attribute').val(connection.loadBalancePartitionAttribute);
// format the connection id
nfCommon.populateField('connection-id', connection.id);
http://git-wip-us.apache.org/repos/asf/nifi/blob/79c03caf/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
index b1632b3..f121b01 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
@@ -21,23 +21,20 @@
if (typeof define === 'function' && define.amd) {
define(['jquery',
'nf.Common',
- 'nf.ClusterSummary',
'nf.ErrorHandler'],
- function ($, nfCommon, nfClusterSummary, nfErrorHandler) {
- return (nf.ConnectionDetails = factory($, nfCommon, nfClusterSummary, nfErrorHandler));
+ function ($, nfCommon, nfErrorHandler) {
+ return (nf.ConnectionDetails = factory($, nfCommon, nfErrorHandler));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ConnectionDetails = factory(require('jquery'),
require('nf.Common'),
- require('nf.ClusterSummary'),
require('nf.ErrorHandler')));
} else {
nf.ConnectionDetails = factory(root.$,
root.nf.Common,
- root.nf.ClusterSummary,
root.nf.ErrorHandler);
}
-}(this, function ($, nfCommon, nfClusterSummary, nfErrorHandler) {
+}(this, function ($, nfCommon, nfErrorHandler) {
'use strict';
/**
@@ -533,20 +530,15 @@
nfCommon.populateField('read-only-load-balance-compression', nfCommon.getComboOptionText(nfCommon.loadBalanceCompressionOptions, connection.loadBalanceCompression));
// Show the appropriate load-balance configurations
- if (nfClusterSummary.isConnectedToCluster()) {
- if (connection.loadBalanceStrategy === 'PARTITION_BY_ATTRIBUTE') {
- $('#read-only-load-balance-partition-attribute-setting').show();
- } else {
- $('#read-only-load-balance-partition-attribute-setting').hide();
- }
- if (connection.loadBalanceStrategy === 'DO_NOT_LOAD_BALANCE') {
- $('#read-only-load-balance-compression-setting').hide();
- } else {
- $('#read-only-load-balance-compression-setting').show();
- }
- $('#read-only-load-balance-settings').show();
+ if (connection.loadBalanceStrategy === 'PARTITION_BY_ATTRIBUTE') {
+ $('#read-only-load-balance-partition-attribute-setting').show();
} else {
- $('#read-only-load-balance-settings').hide();
+ $('#read-only-load-balance-partition-attribute-setting').hide();
+ }
+ if (connection.loadBalanceStrategy === 'DO_NOT_LOAD_BALANCE') {
+ $('#read-only-load-balance-compression-setting').hide();
+ } else {
+ $('#read-only-load-balance-compression-setting').show();
}
[2/2] nifi git commit: NIFI-5661: - Allowing load balance settings to
be applied during creation. - Clearing the load balance settings when the
dialog is closed.
Posted by ma...@apache.org.
NIFI-5661:
- Allowing load balance settings to be applied during creation.
- Clearing the load balance settings when the dialog is closed.
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/8da403ce
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/8da403ce
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/8da403ce
Branch: refs/heads/master
Commit: 8da403ce9e8135ea7fc86fa7eb308ad5dda9dabd
Parents: 79c03ca
Author: Matt Gilman <ma...@gmail.com>
Authored: Thu Oct 11 13:21:20 2018 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Thu Oct 11 13:21:20 2018 -0400
----------------------------------------------------------------------
.../js/nf/canvas/nf-connection-configuration.js | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/8da403ce/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
index 97af35d..1704fe5 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
@@ -919,6 +919,10 @@
var backPressureObjectThreshold = $('#back-pressure-object-threshold').val();
var backPressureDataSizeThreshold = $('#back-pressure-data-size-threshold').val();
var prioritizers = $('#prioritizer-selected').sortable('toArray');
+ var loadBalanceStrategy = $('#load-balance-strategy-combo').combo('getSelectedOption').value;
+ var shouldLoadBalance = 'DO_NOT_LOAD_BALANCE' !== loadBalanceStrategy;
+ var loadBalancePartitionAttribute = shouldLoadBalance && 'PARTITION_BY_ATTRIBUTE' === loadBalanceStrategy ? $('#load-balance-partition-attribute').val() : '';
+ var loadBalanceCompression = shouldLoadBalance ? $('#load-balance-compression-combo').combo('getSelectedOption').value : 'DO_NOT_COMPRESS';
if (validateSettings()) {
var connectionEntity = {
@@ -945,7 +949,10 @@
'backPressureDataSizeThreshold': backPressureDataSizeThreshold,
'backPressureObjectThreshold': backPressureObjectThreshold,
'bends': bends,
- 'prioritizers': prioritizers
+ 'prioritizers': prioritizers,
+ 'loadBalanceStrategy': loadBalanceStrategy,
+ 'loadBalancePartitionAttribute': loadBalancePartitionAttribute,
+ 'loadBalanceCompression': loadBalanceCompression
}
};
@@ -1182,6 +1189,11 @@
$('#output-port-options').empty();
$('#input-port-options').empty();
+ // clear load balance settings
+ $('#load-balance-strategy-combo').combo('setSelectedOption', nfCommon.loadBalanceStrategyOptions[0]);
+ $('#load-balance-partition-attribute').val('');
+ $('#load-balance-compression-combo').combo('setSelectedOption', nfCommon.loadBalanceCompressionOptions[0]);
+
// see if the temp edge needs to be removed
removeTempEdge();
};