From fdef994ead2c4ef86ff52d73af85c90cbf2ec28b Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Fri, 8 Jan 2016 14:30:06 -0500 Subject: [PATCH] NIFI-1346: - Always showing input and output content for a provenance event. Signed-off-by: joewitt --- .../js/nf/provenance/nf-provenance-table.js | 114 ++++++------------ 1 file changed, 39 insertions(+), 75 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js index 818a059630..06aed9911d 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/provenance/nf-provenance-table.js @@ -1269,95 +1269,59 @@ nf.ProvenanceTable = (function () { }; // content - if (event.contentEqual === true) { - $('#output-content-details').hide(); + $('#input-content-header').text('Input Claim'); + formatContentValue($('#input-content-container'), event.inputContentClaimContainer); + formatContentValue($('#input-content-section'), event.inputContentClaimSection); + formatContentValue($('#input-content-identifier'), event.inputContentClaimIdentifier); + formatContentValue($('#input-content-offset'), event.inputContentClaimOffset); + formatContentValue($('#input-content-bytes'), event.inputContentClaimFileSizeBytes); - $('#input-content-header').text('Claim'); - formatContentValue($('#input-content-container'), event.inputContentClaimContainer); - formatContentValue($('#input-content-section'), event.inputContentClaimSection); - formatContentValue($('#input-content-identifier'), event.inputContentClaimIdentifier); - formatContentValue($('#input-content-offset'), event.inputContentClaimOffset); - formatContentValue($('#input-content-bytes'), event.inputContentClaimFileSizeBytes); + // input content file size + var inputContentSize = $('#input-content-size'); + formatContentValue(inputContentSize, event.inputContentClaimFileSize); + if (nf.Common.isDefinedAndNotNull(event.inputContentClaimFileSize)) { + // over the default tooltip with the actual byte count + inputContentSize.attr('title', nf.Common.formatInteger(event.inputContentClaimFileSizeBytes) + ' bytes'); + } - // input content file size - var inputContentSize = $('#input-content-size'); - formatContentValue(inputContentSize, event.inputContentClaimFileSize); - if (nf.Common.isDefinedAndNotNull(event.inputContentClaimFileSize)) { - // over the default tooltip with the actual byte count - inputContentSize.attr('title', nf.Common.formatInteger(event.inputContentClaimFileSizeBytes) + ' bytes'); - } + formatContentValue($('#output-content-container'), event.outputContentClaimContainer); + formatContentValue($('#output-content-section'), event.outputContentClaimSection); + formatContentValue($('#output-content-identifier'), event.outputContentClaimIdentifier); + formatContentValue($('#output-content-offset'), event.outputContentClaimOffset); + formatContentValue($('#output-content-bytes'), event.outputContentClaimFileSizeBytes); - $('#output-content-download').hide(); + // output content file size + var outputContentSize = $('#output-content-size'); + formatContentValue(outputContentSize, event.outputContentClaimFileSize); + if (nf.Common.isDefinedAndNotNull(event.outputContentClaimFileSize)) { + // over the default tooltip with the actual byte count + outputContentSize.attr('title', nf.Common.formatInteger(event.outputContentClaimFileSizeBytes) + ' bytes'); + } - if (event.inputContentAvailable === true) { - $('#input-content-download').show(); + if (event.inputContentAvailable === true) { + $('#input-content-download').show(); - if (nf.Common.isContentViewConfigured()) { - $('#input-content-view').show(); - } else { - $('#input-content-view').hide(); - } + if (nf.Common.isContentViewConfigured()) { + $('#input-content-view').show(); } else { - $('#input-content-download').hide(); $('#input-content-view').hide(); } } else { - $('#output-content-details').show(); + $('#input-content-download').hide(); + $('#input-content-view').hide(); + } - $('#input-content-header').text('Input Claim'); - formatContentValue($('#input-content-container'), event.inputContentClaimContainer); - formatContentValue($('#input-content-section'), event.inputContentClaimSection); - formatContentValue($('#input-content-identifier'), event.inputContentClaimIdentifier); - formatContentValue($('#input-content-offset'), event.inputContentClaimOffset); - formatContentValue($('#input-content-bytes'), event.inputContentClaimFileSizeBytes); + if (event.outputContentAvailable === true) { + $('#output-content-download').show(); - // input content file size - var inputContentSize = $('#input-content-size'); - formatContentValue(inputContentSize, event.inputContentClaimFileSize); - if (nf.Common.isDefinedAndNotNull(event.inputContentClaimFileSize)) { - // over the default tooltip with the actual byte count - inputContentSize.attr('title', nf.Common.formatInteger(event.inputContentClaimFileSizeBytes) + ' bytes'); - } - - formatContentValue($('#output-content-container'), event.outputContentClaimContainer); - formatContentValue($('#output-content-section'), event.outputContentClaimSection); - formatContentValue($('#output-content-identifier'), event.outputContentClaimIdentifier); - formatContentValue($('#output-content-offset'), event.outputContentClaimOffset); - formatContentValue($('#output-content-bytes'), event.outputContentClaimFileSizeBytes); - - // output content file size - var outputContentSize = $('#output-content-size'); - formatContentValue(outputContentSize, event.outputContentClaimFileSize); - if (nf.Common.isDefinedAndNotNull(event.outputContentClaimFileSize)) { - // over the default tooltip with the actual byte count - outputContentSize.attr('title', nf.Common.formatInteger(event.outputContentClaimFileSizeBytes) + ' bytes'); - } - - if (event.inputContentAvailable === true) { - $('#input-content-download').show(); - - if (nf.Common.isContentViewConfigured()) { - $('#input-content-view').show(); - } else { - $('#input-content-view').hide(); - } + if (nf.Common.isContentViewConfigured()) { + $('#output-content-view').show(); } else { - $('#input-content-download').hide(); - $('#input-content-view').hide(); - } - - if (event.outputContentAvailable === true) { - $('#output-content-download').show(); - - if (nf.Common.isContentViewConfigured()) { - $('#output-content-view').show(); - } else { - $('#output-content-view').hide(); - } - } else { - $('#output-content-download').hide(); $('#output-content-view').hide(); } + } else { + $('#output-content-download').hide(); + $('#output-content-view').hide(); } if (nf.Common.isDFM()) {