From 24a77755de8d99467a883c964737eeceb886219e Mon Sep 17 00:00:00 2001 From: James Wing Date: Mon, 22 Feb 2016 15:49:03 -0800 Subject: [PATCH] NIFI-1548 Fixing Controller Service Usage Button. This closes #245 Signed-off-by: Matt Gilman --- .../main/webapp/js/nf/canvas/nf-settings.js | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) 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 67bf3856ef..64b1c50b8d 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 @@ -767,7 +767,17 @@ nf.Settings = (function () { } else if (controllerServicesGrid.getColumns()[args.cell].id === 'moreDetails') { if (target.hasClass('view-controller-service')) { nf.ControllerService.showDetails(controllerService); - } + } else if (target.hasClass('controller-service-usage')) { + // close the settings dialog + $('#shell-close-button').click(); + + // open the documentation for this controller service + nf.Shell.showPage('../nifi-docs/documentation?' + $.param({ + select: nf.Common.substringAfterLast(controllerService.type, '.') + })).done(function() { + nf.Settings.showSettings(); + }); + } } }); @@ -1413,7 +1423,17 @@ nf.Settings = (function () { } else if (reportingTasksGrid.getColumns()[args.cell].id === 'moreDetails') { if (target.hasClass('view-reporting-task')) { nf.ReportingTask.showDetails(reportingTask); - } + } else if (target.hasClass('reporting-task-usage')) { + // close the settings dialog + $('#shell-close-button').click(); + + // open the documentation for this reporting task + nf.Shell.showPage('../nifi-docs/documentation?' + $.param({ + select: nf.Common.substringAfterLast(reportingTask.type, '.') + })).done(function() { + nf.Settings.showSettings(); + }); + } } });