[NIFI-2488] update UI to relect changes to ActionDTO and BulletinDTO. This closes #882

This commit is contained in:
Scott Aslan 2016-08-17 17:02:10 -04:00 committed by Matt Gilman
parent 08735a4f57
commit 0e90a0f76a
5 changed files with 20 additions and 13 deletions

View File

@ -18,9 +18,9 @@
<div id="login-container" class="hidden"> <div id="login-container" class="hidden">
<div class="login-title">Log In</div> <div class="login-title">Log In</div>
<div class="setting"> <div class="setting">
<div class="setting-name">Username</div> <div class="setting-name">User</div>
<div class="setting-field"> <div class="setting-field">
<input type="text" placeholder="username" id="username"/> <input type="text" placeholder="user" id="username"/>
</div> </div>
</div> </div>
<div class="setting"> <div class="setting">

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

View File

@ -333,12 +333,14 @@ nf.ng.BulletinBoardCtrl = function (serviceProvider) {
$('#bulletin-board-last-refreshed').text(bulletinBoard.generated); $('#bulletin-board-last-refreshed').text(bulletinBoard.generated);
// process the bulletins // process the bulletins
var bulletins = response.bulletinBoard.bulletins; var bulletinEntities = response.bulletinBoard.bulletins;
var content = []; var content = [];
// append each bulletin // append each bulletin
$.each(bulletins, function (i, bulletin) { $.each(bulletinEntities, function (i, bulletinEntity) {
if (!nf.Common.isBlank(bulletin.level)) { if (bulletinEntity.canRead === true) {
var bulletin = bulletinEntity.bulletin;
// format the severity // format the severity
var severityStyle = 'bulletin-normal'; var severityStyle = 'bulletin-normal';
if (bulletin.level === 'ERROR') { if (bulletin.level === 'ERROR') {
@ -385,7 +387,7 @@ nf.ng.BulletinBoardCtrl = function (serviceProvider) {
} }
// record the id of the last bulletin in this request // record the id of the last bulletin in this request
if (i + 1 === bulletins.length) { if (i + 1 === bulletinEntities.length) {
lastBulletin = bulletin.id; lastBulletin = bulletin.id;
} }
}); });

View File

@ -277,7 +277,10 @@ nf.HistoryTable = (function () {
// define how general values are formatted // define how general values are formatted
var valueFormatter = function (row, cell, value, columnDef, dataContext) { 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 // initialize the templates table

View File

@ -1214,10 +1214,12 @@ nf.Common = (function () {
* @argument {array} bulletins The bulletins * @argument {array} bulletins The bulletins
* @return {array} The jQuery objects * @return {array} The jQuery objects
*/ */
getFormattedBulletins: function (bulletins) { getFormattedBulletins: function (bulletinEntities) {
var formattedBulletins = []; var formattedBulletinEntities = [];
$.each(bulletins, function (j, bulletin) { $.each(bulletinEntities, function (j, bulletinEntity) {
if (!nf.Common.isBlank(bulletin.level)) { if (bulletinEntity.canRead === true) {
var bulletin = bulletinEntity.bulletin;
// format the node address // format the node address
var nodeAddress = ''; var nodeAddress = '';
if (nf.Common.isDefinedAndNotNull(bulletin.nodeAddress)) { if (nf.Common.isDefinedAndNotNull(bulletin.nodeAddress)) {
@ -1236,10 +1238,10 @@ nf.Common = (function () {
'<b>' + nf.Common.escapeHtml(bulletin.level) + '</b>&nbsp;' + '<b>' + nf.Common.escapeHtml(bulletin.level) + '</b>&nbsp;' +
'</div>').append(bulletinMessage); '</div>').append(bulletinMessage);
formattedBulletins.push(formattedBulletin); formattedBulletinEntities.push(formattedBulletin);
} }
}); });
return formattedBulletins; return formattedBulletinEntities;
} }
}; };
}()); }());