[NIFI-2488] update UI to relect changes to ActionDTO and BulletinDTO. This closes #882
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/0e90a0f7 Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/0e90a0f7 Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/0e90a0f7 Branch: refs/heads/master Commit: 0e90a0f76ad72c7694f22a4e94a3d4f9ad8e1a4a Parents: 08735a4 Author: Scott Aslan <[email protected]> Authored: Wed Aug 17 17:02:10 2016 -0400 Committer: Matt Gilman <[email protected]> Committed: Thu Aug 18 09:38:16 2016 -0400 ---------------------------------------------------------------------- .../webapp/WEB-INF/partials/login/login-form.jsp | 4 ++-- .../nifi-web-ui/src/main/webapp/images/iconInfo.png | Bin 0 -> 550 bytes .../webapp/js/nf/bulletin-board/nf-bulletin-board.js | 10 ++++++---- .../main/webapp/js/nf/history/nf-history-table.js | 5 ++++- .../nifi-web-ui/src/main/webapp/js/nf/nf-common.js | 14 ++++++++------ 5 files changed, 20 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/0e90a0f7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-form.jsp ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-form.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-form.jsp index eddf76d..9f9a660 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-form.jsp +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/login/login-form.jsp @@ -18,9 +18,9 @@ <div id="login-container" class="hidden"> <div class="login-title">Log In</div> <div class="setting"> - <div class="setting-name">Username</div> + <div class="setting-name">User</div> <div class="setting-field"> - <input type="text" placeholder="username" id="username"/> + <input type="text" placeholder="user" id="username"/> </div> </div> <div class="setting"> http://git-wip-us.apache.org/repos/asf/nifi/blob/0e90a0f7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/iconInfo.png ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/iconInfo.png b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/iconInfo.png new file mode 100644 index 0000000..f192ff5 Binary files /dev/null and b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/iconInfo.png differ http://git-wip-us.apache.org/repos/asf/nifi/blob/0e90a0f7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js index 1f0c206..d58f8b8 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js @@ -333,12 +333,14 @@ nf.ng.BulletinBoardCtrl = function (serviceProvider) { $('#bulletin-board-last-refreshed').text(bulletinBoard.generated); // process the bulletins - var bulletins = response.bulletinBoard.bulletins; + var bulletinEntities = response.bulletinBoard.bulletins; var content = []; // append each bulletin - $.each(bulletins, function (i, bulletin) { - if (!nf.Common.isBlank(bulletin.level)) { + $.each(bulletinEntities, function (i, bulletinEntity) { + if (bulletinEntity.canRead === true) { + var bulletin = bulletinEntity.bulletin; + // format the severity var severityStyle = 'bulletin-normal'; if (bulletin.level === 'ERROR') { @@ -385,7 +387,7 @@ nf.ng.BulletinBoardCtrl = function (serviceProvider) { } // record the id of the last bulletin in this request - if (i + 1 === bulletins.length) { + if (i + 1 === bulletinEntities.length) { lastBulletin = bulletin.id; } }); http://git-wip-us.apache.org/repos/asf/nifi/blob/0e90a0f7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js index ab1e9e6..3d62389 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js @@ -277,7 +277,10 @@ nf.HistoryTable = (function () { // define how general values are formatted var valueFormatter = function (row, cell, value, columnDef, dataContext) { - return nf.Common.formatValue(value); + if(dataContext.canRead !== true) { + return '<span class="unset" style="font-size: 13px; padding-top: 2px;">Not authorized</span>'; + } + return nf.Common.formatValue(dataContext.action[columnDef.field]); }; // initialize the templates table http://git-wip-us.apache.org/repos/asf/nifi/blob/0e90a0f7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js index 80e4d62..a2083eb 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js @@ -1214,10 +1214,12 @@ nf.Common = (function () { * @argument {array} bulletins The bulletins * @return {array} The jQuery objects */ - getFormattedBulletins: function (bulletins) { - var formattedBulletins = []; - $.each(bulletins, function (j, bulletin) { - if (!nf.Common.isBlank(bulletin.level)) { + getFormattedBulletins: function (bulletinEntities) { + var formattedBulletinEntities = []; + $.each(bulletinEntities, function (j, bulletinEntity) { + if (bulletinEntity.canRead === true) { + var bulletin = bulletinEntity.bulletin; + // format the node address var nodeAddress = ''; if (nf.Common.isDefinedAndNotNull(bulletin.nodeAddress)) { @@ -1236,10 +1238,10 @@ nf.Common = (function () { '<b>' + nf.Common.escapeHtml(bulletin.level) + '</b> ' + '</div>').append(bulletinMessage); - formattedBulletins.push(formattedBulletin); + formattedBulletinEntities.push(formattedBulletin); } }); - return formattedBulletins; + return formattedBulletinEntities; } }; }());
