[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 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">

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);
// 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;
}
});

View File

@ -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

View File

@ -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>&nbsp;' +
'</div>').append(bulletinMessage);
formattedBulletins.push(formattedBulletin);
formattedBulletinEntities.push(formattedBulletin);
}
});
return formattedBulletins;
return formattedBulletinEntities;
}
};
}());