NIFI-11389 Fixed controller services's link to referencing controller (#8099)

services of lesser scope

This closes #8099
This commit is contained in:
NissimShiman 2024-01-16 11:42:08 -05:00 committed by GitHub
parent 9a91933909
commit 3b5d729a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 5 deletions

View File

@ -30,9 +30,11 @@
'nf.CustomUi',
'nf.Verify',
'nf.CanvasUtils',
'nf.ProcessGroup',
'nf.ProcessGroupConfiguration',
'nf.Processor'],
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfUniversalCapture, nfCustomUi, nfVerify, nfCanvasUtils, nfProcessor) {
return (nf.ControllerService = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfUniversalCapture, nfVerify, nfCustomUi, nfCanvasUtils, nfProcessor));
function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfUniversalCapture, nfCustomUi, nfVerify, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfProcessor) {
return (nf.ControllerService = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfUniversalCapture, nfVerify, nfCustomUi, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfProcessor));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ControllerService =
@ -47,6 +49,8 @@
require('nf.CustomUi'),
require('nf.Verify'),
require('nf.CanvasUtils'),
require('nf.ProcessGroup'),
require('nf.ProcessGroupConfiguration'),
require('nf.Processor')));
} else {
nf.ControllerService = factory(root.$,
@ -60,9 +64,11 @@
root.nf.CustomUi,
root.nf.Verify,
root.nf.CanvasUtils,
root.nf.ProcessGroup,
root.nf.ProcessGroupConfiguration,
root.nf.Processor);
}
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfUniversalCapture, nfCustomUi, nfVerify, nfCanvasUtils, nfProcessor) {
}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfUniversalCapture, nfCustomUi, nfVerify, nfCanvasUtils, nfProcessGroup, nfProcessGroupConfiguration, nfProcessor) {
'use strict';
var nfControllerServices,
@ -554,8 +560,18 @@
// select the selected row
var row = controllerServiceData.getRowById(referencingComponent.id);
controllerServiceGrid.setSelectedRows([row]);
controllerServiceGrid.scrollRowIntoView(row);
if (nfCommon.isUndefined(row)) {
getControllerService(referencingComponent.id, controllerServiceData).done(function(controllerServiceEntity) {
nfProcessGroup.enterGroup(controllerServiceEntity.parentGroupId).done(function () {
nfProcessGroupConfiguration.loadConfiguration(controllerServiceEntity.parentGroupId).done(function () {
nfProcessGroupConfiguration.selectControllerService(referencingComponent.id);
});
});
});
} else {
controllerServiceGrid.setSelectedRows([row]);
controllerServiceGrid.scrollRowIntoView(row);
}
// close the dialog and shell
referenceContainer.closest('.dialog').modal('hide');