Skip to content

Commit

Permalink
NIFI-5661:
Browse files Browse the repository at this point in the history
- Allowing load balance settings to be applied during creation.
- Clearing the load balance settings when the dialog is closed.
  • Loading branch information
mcgilman committed Oct 11, 2018
1 parent 79c03ca commit 8da403c
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -945,7 +949,10 @@
'backPressureDataSizeThreshold': backPressureDataSizeThreshold,
'backPressureObjectThreshold': backPressureObjectThreshold,
'bends': bends,
'prioritizers': prioritizers
'prioritizers': prioritizers,
'loadBalanceStrategy': loadBalanceStrategy,
'loadBalancePartitionAttribute': loadBalancePartitionAttribute,
'loadBalanceCompression': loadBalanceCompression
}
};

Expand Down Expand Up @@ -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();
};
Expand Down

0 comments on commit 8da403c

Please sign in to comment.