Repository: nifi Updated Branches: refs/heads/master 8cb501443 -> 05700a200
NIFI-3781 - Controller Service Config Dialog... ..'View Details' button feels confusing and inconsistent with Processors * Merged 'View Details' and 'Edit' buttons to a single 'Configure'/'View Details' one. * Fixed confusing 'View Details' modal's title. Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/a3401c3b Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/a3401c3b Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/a3401c3b Branch: refs/heads/master Commit: a3401c3b95361cc895da8e3a1cf47e60d354c311 Parents: 8cb5014 Author: yuri1969 <[email protected]> Authored: Sat Aug 19 20:49:33 2017 +0200 Committer: Scott Aslan <[email protected]> Committed: Mon Aug 21 12:56:12 2017 -0400 ---------------------------------------------------------------------- .../webapp/js/nf/canvas/nf-controller-service.js | 4 ++++ .../js/nf/canvas/nf-controller-services.js | 19 +++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/a3401c3b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js index 52ba4f1..90324bf 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js @@ -1813,6 +1813,8 @@ currentTable = serviceTable; } var controllerServiceDialog = $('#controller-service-configuration'); + + controllerServiceDialog.find('.dialog-header .dialog-header-text').text('Configure Controller Service'); if (controllerServiceDialog.data('mode') !== config.edit || currentTable !== serviceTable) { // update the visibility $('#controller-service-configuration .controller-service-read-only').hide(); @@ -2014,6 +2016,8 @@ */ showDetails: function (serviceTable, controllerServiceEntity) { var controllerServiceDialog = $('#controller-service-configuration'); + + controllerServiceDialog.find('.dialog-header .dialog-header-text').text('Controller Service Details'); if (controllerServiceDialog.data('mode') !== config.readOnly) { // update the visibility $('#controller-service-configuration .controller-service-read-only').show(); http://git-wip-us.apache.org/repos/asf/nifi/blob/a3401c3b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js index a4fb774..6fff5b5 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js @@ -783,11 +783,9 @@ if (!dataContext.permissions.canRead) { return ''; } - - var markup = '<div class="pointer view-controller-service fa fa-info-circle" title="View Details" style="margin-top: 5px; margin-right: 3px;" ></div>'; // always include a button to view the usage - markup += '<div title="Usage" class="pointer controller-service-usage fa fa-book" style="margin-top: 5px; margin-right: 3px;" ></div>'; + var markup = '<div title="Usage" class="pointer controller-service-usage fa fa-book" style="margin-top: 5px; margin-right: 3px;" ></div>'; var hasErrors = !nfCommon.isEmpty(dataContext.component.validationErrors); var hasBulletins = !nfCommon.isEmpty(dataContext.bulletins); @@ -855,9 +853,10 @@ if (definedByCurrentGroup === true) { if (dataContext.component.state === 'ENABLED' || dataContext.component.state === 'ENABLING') { + markup += '<div class="pointer view-controller-service fa fa-gear" title="View Details" style="margin-top: 2px; margin-right: 3px;" ></div>'; markup += '<div class="pointer disable-controller-service icon icon-enable-false" title="Disable" style="margin-top: 2px; margin-right: 3px;" ></div>'; } else if (dataContext.component.state === 'DISABLED') { - markup += '<div class="pointer edit-controller-service fa fa-pencil" title="Edit" style="margin-top: 2px; margin-right: 3px;" ></div>'; + markup += '<div class="pointer edit-controller-service fa fa-gear" title="Configure" style="margin-top: 2px; margin-right: 3px;" ></div>'; // if there are no validation errors allow enabling if (nfCommon.isEmpty(dataContext.component.validationErrors)) { @@ -985,6 +984,8 @@ if (controllerServicesGrid.getColumns()[args.cell].id === 'actions') { if (target.hasClass('edit-controller-service')) { nfControllerService.showConfiguration(serviceTable, controllerServiceEntity); + } else if (target.hasClass('view-controller-service')) { + nfControllerService.showDetails(serviceTable, controllerServiceEntity); } else if (target.hasClass('enable-controller-service')) { nfControllerService.enable(serviceTable, controllerServiceEntity); } else if (target.hasClass('disable-controller-service')) { @@ -1021,9 +1022,7 @@ }); } } else if (controllerServicesGrid.getColumns()[args.cell].id === 'moreDetails') { - if (target.hasClass('view-controller-service')) { - nfControllerService.showDetails(serviceTable, controllerServiceEntity); - } else if (target.hasClass('controller-service-usage')) { + if (target.hasClass('controller-service-usage')) { // close the settings dialog $('#shell-close-button').click(); @@ -1033,7 +1032,7 @@ group: controllerServiceEntity.component.bundle.group, artifact: controllerServiceEntity.component.bundle.artifact, version: controllerServiceEntity.component.bundle.version - })).done(function() { + })).done(function() { if (nfCommon.isDefinedAndNotNull(controllerServiceEntity.component.parentGroupId)) { var groupId; var processGroup = nfProcessGroup.get(controllerServiceEntity.component.parentGroupId); @@ -1048,8 +1047,8 @@ } else { showSettings(); } - }); - } + }); + } } });
