mirror of https://github.com/apache/nifi.git
NIFI-258:
- Ensuring connection stays up to date when processor configuration changes.
This commit is contained in:
parent
b142d7a9bd
commit
80793ccbb8
|
@ -364,6 +364,20 @@ nf.ProcessorConfiguration = (function () {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Reloads the outgoing connections for the specified processor.
|
||||
*
|
||||
* @param {object} processor
|
||||
*/
|
||||
var reloadProcessorConnections = function (processor) {
|
||||
var connections = nf.Connection.getComponentConnections(processor.id);
|
||||
$.each(connections, function (_, connection) {
|
||||
if (connection.source.id === processor.id) {
|
||||
nf.Connection.reload(connection);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
/**
|
||||
* Initializes the processor properties tab.
|
||||
|
@ -601,9 +615,12 @@ nf.ProcessorConfiguration = (function () {
|
|||
// update the revision
|
||||
nf.Client.setRevision(response.revision);
|
||||
|
||||
// set the new processor state
|
||||
// set the new processor state based on the response
|
||||
nf.Processor.set(response.processor);
|
||||
|
||||
// reload the processor's outgoing connections
|
||||
reloadProcessorConnections(processor);
|
||||
|
||||
// close the details panel
|
||||
$('#processor-configuration').modal('hide');
|
||||
}
|
||||
|
@ -632,7 +649,11 @@ nf.ProcessorConfiguration = (function () {
|
|||
|
||||
// show the custom ui
|
||||
nf.CustomProcessorUi.showCustomUi($('#processor-id').text(), processor.config.customUiUrl, true).done(function () {
|
||||
// once the custom ui is closed, reload the processor
|
||||
nf.Processor.reload(processor);
|
||||
|
||||
// and reload the processor's outgoing connections
|
||||
reloadProcessorConnections(processor);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue