NIFI-2715 - When performing a Queue Listing, if...

...FlowFile has no content, UI does not indicate this fact

For FlowFiles with no content:
* Added a simple title replacing the Content Claim's one.
* Defaulted File Size to 0 bytes using common formatting.
This commit is contained in:
yuri1969 2017-08-16 22:42:08 +02:00 committed by Scott Aslan
parent acee2627ca
commit a7ea178cdc
2 changed files with 9 additions and 1 deletions

View File

@ -65,6 +65,9 @@
</div>
<div class="spacer">&nbsp;</div>
<div class="settings-right">
<div id="flowfile-with-no-content" class="content-details">
<div class="flowfile-header">No Content Available</div>
</div>
<div id="flowfile-content-details" class="content-details">
<div class="flowfile-header">Content Claim</div>
<div class="flowfile-detail">

View File

@ -415,6 +415,9 @@
}).done(function (response) {
var flowFile = response.flowFile;
// set a default for flowfiles with no content claim
var fileSize = nfCommon.isDefinedAndNotNull(flowFile.contentClaimFileSize) ? flowFile.contentClaimFileSize : nfCommon.formatDataSize(0);
// show the URI to this flowfile
$('#flowfile-uri').text(flowFile.uri);
@ -422,7 +425,7 @@
$('#flowfile-uuid').html(nfCommon.formatValue(flowFile.uuid));
$('#flowfile-filename').html(nfCommon.formatValue(flowFile.filename));
$('#flowfile-queue-position').html(nfCommon.formatValue(flowFile.position));
$('#flowfile-file-size').html(nfCommon.formatValue(flowFile.contentClaimFileSize));
$('#flowfile-file-size').html(nfCommon.formatValue(fileSize));
$('#flowfile-queued-duration').text(nfCommon.formatDuration(flowFile.queuedDuration));
$('#flowfile-lineage-duration').text(nfCommon.formatDuration(flowFile.lineageDuration));
$('#flowfile-penalized').text(flowFile.penalized === true ? 'Yes' : 'No');
@ -454,8 +457,10 @@
// show the content details
$('#flowfile-content-details').show();
$('#flowfile-with-no-content').hide();
} else {
$('#flowfile-content-details').hide();
$('#flowfile-with-no-content').show();
}
// attributes