From 31409bb9d984e17bee314429d629404da2d1eafe Mon Sep 17 00:00:00 2001 From: Scott Aslan Date: Thu, 28 Jul 2016 10:55:04 -0400 Subject: [PATCH 1/4] [NIFI-2371] fix cluster page padding --- .../src/main/webapp/css/cluster.css | 2 +- .../main/webapp/js/nf/cluster/nf-cluster.js | 36 ++++++++++--------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/cluster.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/cluster.css index f515ecfc65f8..a4224be56dd3 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/cluster.css +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/cluster.css @@ -41,9 +41,9 @@ #cluster-refresh-container { position: absolute; - width: 100%; bottom: 0px; left: 20px; + right: 20px; } #cluster-loading-container { diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js index 5577f14bad25..8d4da554bbb0 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js @@ -116,6 +116,26 @@ nf.Cluster = (function () { // load the current user loadCurrentUser().done(function () { + var setBodySize = function () { + //alter styles if we're not in the shell + if (top === window) { + $('body').css({ + 'height': $(window).height() + 'px', + 'width': $(window).width() + 'px' + }); + + $('#cluster').css('margin', 40); + $('#cluster-table').css('bottom', 127); + $('#cluster-refresh-container').css('margin', 40); + } + + // configure the initial grid height + nf.ClusterTable.resetTableSize(); + }; + + // set the initial size + setBodySize(); + // create the counters table nf.ClusterTable.init(); @@ -123,22 +143,6 @@ nf.Cluster = (function () { nf.ClusterTable.loadClusterTable().done(function () { // once the table is initialized, finish initializing the page initializeClusterPage().done(function () { - var setBodySize = function () { - //alter styles if we're not in the shell - if (top === window) { - $('body').css({ - 'height': $(window).height() + 'px', - 'width': $(window).width() + 'px' - }); - - $('#cluster').css('margin', 40); - $('#cluster-table').css('bottom', 127); - $('#cluster-refresh-container').css('margin', 40); - } - - // configure the initial grid height - nf.ClusterTable.resetTableSize(); - }; // get the about details $.ajax({ From 075727d6cd093f8241c4af2e14baabca32aa2c3a Mon Sep 17 00:00:00 2001 From: Scott Aslan Date: Thu, 28 Jul 2016 11:50:30 -0400 Subject: [PATCH 2/4] [NIFI-2348] When processor is selected, can now copy id from palette --- .../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js index 6f54962c7c4d..1e30328e73ca 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js @@ -552,9 +552,6 @@ nf.Canvas = (function () { // ctrl-c if (nf.Canvas.canWrite() && nf.CanvasUtils.isCopyable(selection)) { nf.Actions.copy(selection); - - // only want to prevent default if the action was performed, otherwise default copy would be overridden - evt.preventDefault(); } } else if (evt.keyCode === 86) { // ctrl-v From cf40c78e69d941b47b01df6c4721f3f5949c2159 Mon Sep 17 00:00:00 2001 From: Scott Aslan Date: Fri, 29 Jul 2016 11:25:46 -0400 Subject: [PATCH 3/4] [NIFI-2428] update modal glasspane to always close, even if the dialog we closed by user in close handler --- .../src/main/webapp/js/jquery/modal/jquery.modal.js | 6 +++--- .../nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js index 0993c8825405..7fede6350183 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js @@ -520,10 +520,10 @@ handler.call(dialog); } - if (dialog.is(':visible')) { - // remove the modal glass pane overlay - $('body').find("[data-nf-dialog-parent='" + dialog.attr('id') + "']").remove(); + // remove the modal glass pane overlay + $('body').find("[data-nf-dialog-parent='" + dialog.attr('id') + "']").remove(); + if (dialog.is(':visible')) { // hide the dialog dialog.hide(); } diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js index 88aa631c0acc..9a6768827d73 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js @@ -1111,7 +1111,7 @@ nf.StatusHistory = (function () { handler: { close: function () { // remove the current status history - $('#status-history-dialog').removeData('status-history').hide(); + $('#status-history-dialog').removeData('status-history'); // reset the dom $('#status-history-chart-container').empty(); From 65c2eaeb901c5d2cde68590f8b9b1fefb3d68f35 Mon Sep 17 00:00:00 2001 From: Scott Aslan Date: Fri, 29 Jul 2016 12:38:02 -0400 Subject: [PATCH 4/4] [NIFI-2430] Update some tooltip text and context menu text/icon --- .../webapp/js/nf/canvas/nf-context-menu.js | 2 +- .../webapp/js/nf/summary/nf-summary-table.js | 36 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js index 326f1a149640..df2870a7cb2e 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js @@ -421,7 +421,7 @@ nf.ContextMenu = (function () { {condition: isRemoteProcessGroup, menuItem: {clazz: 'fa fa-cloud', text: 'Remote ports', action: 'remotePorts'}}, {condition: canStartTransmission, menuItem: {clazz: 'fa fa-bullseye', text: 'Enable transmission', action: 'enableTransmission'}}, {condition: canStopTransmission, menuItem: {clazz: 'icon icon-transmit-false', text: 'Disable transmission', action: 'disableTransmission'}}, - {condition: supportsStats, menuItem: {clazz: 'fa fa-bar-chart', text: 'Stats', action: 'showStats'}}, + {condition: supportsStats, menuItem: {clazz: 'fa fa-area-chart', text: 'Status History', action: 'showStats'}}, {condition: canAccessProvenance, menuItem: {clazz: 'icon icon-provenance', imgStyle: 'context-menu-provenance', text: 'Data provenance', action: 'openProvenance'}}, {condition: isStatefulProcessor, menuItem: {clazz: 'fa fa-tasks', text: 'View state', action: 'viewState'}}, {condition: canMoveToFront, menuItem: {clazz: 'fa fa-clone', text: 'Bring to front', action: 'toFront'}}, diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js index 3788e42708b0..145ae1f0516e 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js @@ -243,7 +243,7 @@ nf.SummaryTable = (function () { // define a custom formatter for showing more processor details var moreProcessorDetails = function (row, cell, value, columnDef, dataContext) { - var markup = '
'; + var markup = '
'; // if there are bulletins, render them on the graph if (!nf.Common.isEmpty(dataContext.bulletins)) { @@ -382,15 +382,15 @@ nf.SummaryTable = (function () { var markup = ''; if (isInShell) { - markup += '
 '; + markup += '
 '; } if (nf.Common.SUPPORTS_SVG) { - markup += '
 '; + markup += '
 '; } if (isClustered) { - markup += '
 '; + markup += '
 '; } return markup; @@ -622,7 +622,7 @@ nf.SummaryTable = (function () { // define a custom formatter for showing more processor details var moreConnectionDetails = function (row, cell, value, columnDef, dataContext) { - return '
'; + return '
'; }; // define the input, read, written, and output columns (reused between both tables) @@ -667,15 +667,15 @@ nf.SummaryTable = (function () { var markup = ''; if (isInShell) { - markup += '
 '; + markup += '
 '; } if (nf.Common.SUPPORTS_SVG) { - markup += '
 '; + markup += '
 '; } if (isClustered) { - markup += '
 '; + markup += '
 '; } return markup; @@ -945,15 +945,15 @@ nf.SummaryTable = (function () { var markup = ''; if (isInShell && dataContext.groupId !== null) { - markup += '
 '; + markup += '
 '; } if (nf.Common.SUPPORTS_SVG) { - markup += '
 '; + markup += '
 '; } if (isClustered) { - markup += '
 '; + markup += '
 '; } return markup; @@ -1198,11 +1198,11 @@ nf.SummaryTable = (function () { var markup = ''; if (isInShell) { - markup += '
 '; + markup += '
 '; } if (isClustered) { - markup += '
 '; + markup += '
 '; } return markup; @@ -1438,11 +1438,11 @@ nf.SummaryTable = (function () { var markup = ''; if (isInShell) { - markup += '
 '; + markup += '
 '; } if (isClustered) { - markup += '
 '; + markup += '
 '; } return markup; @@ -1729,15 +1729,15 @@ nf.SummaryTable = (function () { var markup = ''; if (isInShell) { - markup += '
 '; + markup += '
 '; } if (nf.Common.SUPPORTS_SVG) { - markup += '
 '; + markup += '
 '; } if (isClustered) { - markup += '
 '; + markup += '
 '; } return markup;