setLicenseInfoWithObligations(PortletR
request.setAttribute(APPROVED_OBLIGATIONS_COUNT, getFulfilledObligationsCount(obligationStatusMap));
request.setAttribute(OBLIGATION_FROM_README_OSS, getObligationsFromReadmeOSSCount(obligationStatusMap));
-
+
request.setAttribute(EXCLUDED_RELEASES, excludedReleases);
request.setAttribute(PROJECT_OBLIGATIONS_INFO_BY_RELEASE, filterAndSortLicenseInfo(licenseObligation.getLicenseInfoResults()));
} catch (TException e) {
diff --git a/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/changelogs/elementView.jsp b/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/changelogs/elementView.jsp
index 284cdf4fbd..313eec77ea 100644
--- a/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/changelogs/elementView.jsp
+++ b/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/changelogs/elementView.jsp
@@ -251,6 +251,8 @@
if(fieldValueOld === null || fieldValueOld === undefined ||
fieldValueNew === null || fieldValueNew === undefined )
{
+ removeIndexFields(fieldValueOld);
+ removeIndexFields(fieldValueNew);
jsonStrOld = JSON.stringify(fieldValueOld, undefined, 5).replace(/\\n/g, '\n').replace(/\\r/g, '\r');
jsonStrNew = JSON.stringify(fieldValueNew, undefined, 5).replace(/\\n/g, '\n').replace(/\\r/g, '\r');
}
@@ -310,10 +312,13 @@
for (let primaryValue of primaryField) {
if(typeof primaryValue === 'object') {
let matched = false;
+ let indexKey = "index";
for(let secondaryValue of secondaryField) {
- if(secondaryValue[selector] === primaryValue[selector]) {
+ if (isEqualObject(secondaryValue, primaryValue, selector, indexKey)) {
matched = true;
if(differentiateObject) {
+ delete primaryValue[indexKey];
+ delete secondaryValue[indexKey];
diffObject(primaryValue, secondaryValue, primarySpanHightlighter, secondarySpanHighlighter, indentlevel);
primaryFieldTmp.push(primaryValue);
secondaryFieldTmp.push(secondaryValue);
@@ -322,7 +327,8 @@
}
}
if(!matched) {
- let jsonString = JSON.stringify(primaryValue, undefined, 5*indentlevel);
+ removeIndexFields(primaryValue);
+ let jsonString = JSON.stringify(primaryValue, undefined, 10*indentlevel);
jsonString = jsonString.substring(0, jsonString.length-1) + spaceForClosingBraces + jsonString.substring(jsonString.length-1);
primaryFieldTmp.push($($.parseHTML(primarySpanHightlighter)).text(jsonString)[0].outerHTML);
}
@@ -336,6 +342,33 @@
}
}
+ function isEqualObject(secondaryValue, primaryValue, selector, indexKey) {
+ if (primaryValue[selector] === secondaryValue[selector] && typeof primaryValue[indexKey] === 'undefined') {
+ return true;
+ }
+ if (primaryValue[indexKey] === secondaryValue[indexKey] && typeof primaryValue[selector] === 'undefined') {
+ return true;
+ }
+ return false;
+ }
+
+ function removeIndexFields(object) {
+ if (Array.isArray(object)) {
+ for (let objectValue of object) {
+ removeIndexFields(objectValue);
+ }
+ } else if (typeof object === 'object') {
+ for (key in object) {
+ if (key === 'index') {
+ delete object[key];
+ }
+ if (typeof object[key] === 'object') {
+ removeIndexFields(object[key]);
+ }
+ }
+ }
+ }
+
function copyFromSourceToDestinationArray(srcArr, destArr) {
destArr.length = 0;
for (obj of srcArr) {
@@ -354,6 +387,11 @@
function highlightObject(fieldValuePrimary, fieldValueSecondary, primarySpanHightlighter, secondarySpanHighlighter, differentiateCommonObject, spaceForClosingBraces, indentlevel) {
for(key in fieldValuePrimary) {
+ if (key === 'index') {
+ delete fieldValuePrimary[key];
+ delete fieldValueSecondary[key];
+ continue;
+ }
if(fieldValueSecondary[key] === null || fieldValueSecondary[key] === undefined) {
let highlighted = fieldValuePrimary[key];
if(typeof fieldValuePrimary[key] === 'object') {
diff --git a/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/includes/releases/clearingDetails.jspf b/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/includes/releases/clearingDetails.jspf
index e4550db107..cf7b5018a6 100644
--- a/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/includes/releases/clearingDetails.jspf
+++ b/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/includes/releases/clearingDetails.jspf
@@ -503,6 +503,7 @@
dataObj = {};
url.setParameter(tableData.releaseIdParameterName, releaseId);
+ url.setParameter(tableData.attachmentIdParameterName, attachmentId);
dataObj[ '' + tableData.spdxLicenseInfoParameterName ] = JSON.stringify(data);
button.wait($btnCell.find('button'));
diff --git a/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/includes/releases/detailOverview.jspf b/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/includes/releases/detailOverview.jspf
index 400254872e..bd6b8e0a89 100644
--- a/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/includes/releases/detailOverview.jspf
+++ b/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/includes/releases/detailOverview.jspf
@@ -141,9 +141,10 @@
<%@include file="/html/components/includes/vendors/vendorDetail.jspf" %>
+
<%@include file="/html/utils/includes/usingProjectsTable.jspf" %>
<%@include file="/html/utils/includes/usingComponentsTable.jspf"%>
-
+
active show">
<%@include file="/html/utils/includes/linkedReleaseDetails.jspf" %>
diff --git a/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/view.jsp b/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/view.jsp
index 5719a478a5..9369b16b7a 100644
--- a/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/view.jsp
+++ b/frontend/sw360-portlet/src/main/resources/META-INF/resources/html/components/view.jsp
@@ -175,7 +175,7 @@