Repository: nifi Updated Branches: refs/heads/master 46623c2bf -> ee7eeb049
NIFI-1268: - In some environments it appears as though the row selection event is triggering when there is no items in the table. Verifying the item was found prior to continuing. Signed-off-by: Aldrin Piri <ald...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/ee7eeb04 Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/ee7eeb04 Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/ee7eeb04 Branch: refs/heads/master Commit: ee7eeb0493a850c932b5e5e72eb24cdbb359b4ed Parents: 46623c2 Author: Matt Gilman <matt.c.gil...@gmail.com> Authored: Mon Dec 7 17:40:20 2015 -0500 Committer: Aldrin Piri <ald...@apache.org> Committed: Mon Dec 7 19:50:37 2015 -0500 ---------------------------------------------------------------------- .../webapp/js/nf/canvas/nf-canvas-toolbox.js | 20 ++++---- .../src/main/webapp/js/nf/canvas/nf-settings.js | 48 +++++++++++--------- 2 files changed, 37 insertions(+), 31 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/ee7eeb04/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js index 3ed1f1f..101406f 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-toolbox.js @@ -931,16 +931,18 @@ nf.CanvasToolbox = (function () { var processorType = processorTypesGrid.getDataItem(processorTypeIndex); // set the processor type description - if (nf.Common.isBlank(processorType.description)) { - $('#processor-type-description').attr('title', '').html('<span class="unset">No description specified</span>'); - } else { - $('#processor-type-description').html(processorType.description).ellipsis(); - } + if (nf.Common.isDefinedAndNotNull(processorType)) { + if (nf.Common.isBlank(processorType.description)) { + $('#processor-type-description').attr('title', '').html('<span class="unset">No description specified</span>'); + } else { + $('#processor-type-description').html(processorType.description).ellipsis(); + } - // populate the dom - $('#processor-type-name').text(processorType.label).ellipsis(); - $('#selected-processor-name').text(processorType.label); - $('#selected-processor-type').text(processorType.type); + // populate the dom + $('#processor-type-name').text(processorType.label).ellipsis(); + $('#selected-processor-name').text(processorType.label); + $('#selected-processor-type').text(processorType.type); + } } }); http://git-wip-us.apache.org/repos/asf/nifi/blob/ee7eeb04/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js index f7e9472..42a4bbc 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js @@ -414,19 +414,21 @@ nf.Settings = (function () { var controllerServiceType = controllerServiceTypesGrid.getDataItem(controllerServiceTypeIndex); // set the controller service type description - if (nf.Common.isBlank(controllerServiceType.description)) { - $('#controller-service-type-description').attr('title', '').html('<span class="unset">No description specified</span>'); - } else { - $('#controller-service-type-description').html(controllerServiceType.description).ellipsis(); - } + if (nf.Common.isDefinedAndNotNull(controllerServiceType)) { + if (nf.Common.isBlank(controllerServiceType.description)) { + $('#controller-service-type-description').attr('title', '').html('<span class="unset">No description specified</span>'); + } else { + $('#controller-service-type-description').html(controllerServiceType.description).ellipsis(); + } - // populate the dom - $('#controller-service-type-name').text(controllerServiceType.label).ellipsis(); - $('#selected-controller-service-name').text(controllerServiceType.label); - $('#selected-controller-service-type').text(controllerServiceType.type); + // populate the dom + $('#controller-service-type-name').text(controllerServiceType.label).ellipsis(); + $('#selected-controller-service-name').text(controllerServiceType.label); + $('#selected-controller-service-type').text(controllerServiceType.type); - // show the selected controller service - $('#controller-service-description-container').show(); + // show the selected controller service + $('#controller-service-description-container').show(); + } } }); controllerServiceTypesGrid.onDblClick.subscribe(function (e, args) { @@ -1110,19 +1112,21 @@ nf.Settings = (function () { var reportingTaskType = reportingTaskTypesGrid.getDataItem(reportingTaskTypeIndex); // set the reporting task type description - if (nf.Common.isBlank(reportingTaskType.description)) { - $('#reporting-task-type-description').attr('title', '').html('<span class="unset">No description specified</span>'); - } else { - $('#reporting-task-type-description').html(reportingTaskType.description).ellipsis(); - } + if (nf.Common.isDefinedAndNotNull(reportingTaskType)) { + if (nf.Common.isBlank(reportingTaskType.description)) { + $('#reporting-task-type-description').attr('title', '').html('<span class="unset">No description specified</span>'); + } else { + $('#reporting-task-type-description').html(reportingTaskType.description).ellipsis(); + } - // populate the dom - $('#reporting-task-type-name').text(reportingTaskType.label).ellipsis(); - $('#selected-reporting-task-name').text(reportingTaskType.label); - $('#selected-reporting-task-type').text(reportingTaskType.type); + // populate the dom + $('#reporting-task-type-name').text(reportingTaskType.label).ellipsis(); + $('#selected-reporting-task-name').text(reportingTaskType.label); + $('#selected-reporting-task-type').text(reportingTaskType.type); - // show the selected reporting task - $('#reporting-task-description-container').show(); + // show the selected reporting task + $('#reporting-task-description-container').show(); + } } }); reportingTaskTypesGrid.onDblClick.subscribe(function (e, args) {