From 02784b5fcae02dabfdf6902e9c712ddb6205c0a8 Mon Sep 17 00:00:00 2001 From: Scott Aslan Date: Thu, 14 Jul 2016 11:57:22 -0400 Subject: [PATCH] [NIFI-2227] fix race condition for showing the view button on the flow file details dialog [NIFI-2109] update check boxes [NIFI-2226] reset controller services properties table size on dialog open This closes #653 --- .../src/main/webapp/images/inputCheckbox.png | Bin 389 -> 322 bytes .../nf-ng-canvas-global-menu-controller.js | 1 + .../js/nf/canvas/nf-controller-service.js | 4 + .../webapp/js/nf/canvas/nf-queue-listing.js | 111 +++++++++--------- 4 files changed, 60 insertions(+), 56 deletions(-) mode change 100755 => 100644 nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/inputCheckbox.png diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/inputCheckbox.png b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/inputCheckbox.png old mode 100755 new mode 100644 index 1f6a7e5365ebc5f9fa07c798364bbce23413adbf..d3175cf8ae2d1688970bdb04ba52c61871e98d82 GIT binary patch delta 295 zcmV+?0oeY91HuB3B!2;OQb$4nuFf3k0002|NklOyku(82CV5OxAHk_A}6D(FfZyv*|4<8udL4O2SNr1t}#l>)-tCK-S zM1;XyU7aDIshPn@MVVnoOA7>PL>5AO>codK(+)V1`2anuz>h5K(Y^D8ex{~ ty>Nk{c=l|ph9HB~G7ia{4D%(31_02;PI+F$qHq8J002ovPDHLkV1kb1flL4Z delta 362 zcmV-w0hRv30)+#RB!2{RLP=Bz2nYy#2xN!=000SaNLh0L01EH`01EH{Laa2H0000S zbVXQnQ*UN;cVTj606}DLVr3vkX>w(EZ*psMAVX6$2C~zj0000MbVXQnLvm$dbZKvH zAXI5>WdJZWFEKGMF)+{~w^INB0NqJMK~y-6wUjZggfI+5Cx5YB(sCvcAWQOqz5FZ@sp0Da&82_DB0|K-^&uImbl)>;q|m>EQb zJkNvrH@;~aoagyD!Bh8O=fCOB*L5A#f}O^gDA@Uwo_tkR5o7ONhzOV&A`bD zd-$>}@ej0M=VMc9+ZG~%vMl|#bzKAAk4Qw4vnL{0YoVzq3h%dVi+Jy}?zQk~nu7Jd z?@3-A5i`RWqjt{BnCBS)a2$uq`w?YXriP{Dcz545nO{E@Z*5sIAMBpcV*mgE07*qo IM6N<$f<6wFwEzGB diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js index ed4a4b1ccb..e7d96c59bf 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js @@ -284,6 +284,7 @@ nf.ng.Canvas.GlobalMenuCtrl = function (serviceProvider) { // store the content viewer url if available if (!nf.Common.isBlank(aboutDetails.contentViewerUrl)) { $('#nifi-content-viewer-url').text(aboutDetails.contentViewerUrl); + nf.QueueListing.initFlowFileDetailsDialog(); } }).fail(nf.Common.handleAjaxError); 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 adec624f22..b6c375b9d7 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 @@ -1837,6 +1837,8 @@ nf.ControllerService = (function () { // show the border if necessary updateReferencingComponentsBorder(referenceContainer); + + $('#controller-service-properties').propertytable('resetTableSize'); }).fail(nf.Common.handleAjaxError); }, @@ -1952,6 +1954,8 @@ nf.ControllerService = (function () { // show the border if necessary updateReferencingComponentsBorder(referenceContainer); + + $('#controller-service-properties').propertytable('resetTableSize'); }); }, diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js index 24d7495519..49d20d10e6 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js @@ -166,61 +166,6 @@ nf.QueueListing = (function () { }); }; - /** - * Initializes the flowfile details dialog. - */ - var initFlowFileDetailsDialog = function () { - $('#content-download').on('click', downloadContent); - - // only show if content viewer is configured - if (nf.Common.isContentViewConfigured()) { - $('#content-view').show(); - $('#content-view').on('click', viewContent); - } - - $('#flowfile-details-tabs').tabbs({ - tabStyle: 'tab', - selectedTabStyle: 'selected-tab', - scrollableTabContentStyle: 'scrollable', - tabs: [{ - name: 'Details', - tabContentId: 'flowfile-details-tab-content' - }, { - name: 'Attributes', - tabContentId: 'flowfile-attributes-tab-content' - }] - }); - - $('#flowfile-details-dialog').modal({ - scrollableContentStyle: 'scrollable', - headerText: 'FlowFile', - buttons: [{ - buttonText: 'Ok', - color: { - base: '#728E9B', - hover: '#004849', - text: '#ffffff' - }, - handler: { - click: function () { - $('#flowfile-details-dialog').modal('hide'); - } - } - }], - handler: { - close: function () { - // clear the details - $('#flowfile-attributes-container').empty(); - $('#flowfile-cluster-node-id').text(''); - $('#additional-flowfile-details').empty(); - }, - open: function () { - nf.Common.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0)); - } - } - }); - }; - /** * Performs a listing on the specified connection. * @@ -497,7 +442,6 @@ nf.QueueListing = (function () { return { init: function () { initializeListingRequestStatusDialog(); - initFlowFileDetailsDialog(); // define mouse over event for the refresh button $('#queue-listing-refresh-button').click(function () { @@ -685,6 +629,61 @@ nf.QueueListing = (function () { $('#displayed-flowfiles').text('0'); }, + /** + * Initializes the flowfile details dialog. + */ + initFlowFileDetailsDialog: function () { + $('#content-download').on('click', downloadContent); + + // only show if content viewer is configured + if (nf.Common.isContentViewConfigured()) { + $('#content-view').show(); + $('#content-view').on('click', viewContent); + } + + $('#flowfile-details-tabs').tabbs({ + tabStyle: 'tab', + selectedTabStyle: 'selected-tab', + scrollableTabContentStyle: 'scrollable', + tabs: [{ + name: 'Details', + tabContentId: 'flowfile-details-tab-content' + }, { + name: 'Attributes', + tabContentId: 'flowfile-attributes-tab-content' + }] + }); + + $('#flowfile-details-dialog').modal({ + scrollableContentStyle: 'scrollable', + headerText: 'FlowFile', + buttons: [{ + buttonText: 'Ok', + color: { + base: '#728E9B', + hover: '#004849', + text: '#ffffff' + }, + handler: { + click: function () { + $('#flowfile-details-dialog').modal('hide'); + } + } + }], + handler: { + close: function () { + // clear the details + $('#flowfile-attributes-container').empty(); + $('#flowfile-cluster-node-id').text(''); + $('#additional-flowfile-details').empty(); + }, + open: function () { + nf.Common.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0)); + } + } + }); + }, + /** * Update the size of the grid based on its container's current size. */