Skip to content

Commit 9fe31df

Browse files
committed
Move common parts from each per-artifact report to the page header.
1 parent a8eb392 commit 9fe31df

File tree

2 files changed

+13
-30
lines changed

2 files changed

+13
-30
lines changed

js/oss-licenses.js

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ $(
6868
});
6969

7070
/**
71-
* Makes all markdown links external.
71+
* Makes all Markdown links external.
7272
*/
7373
linkElements.addClass('external');
7474
linkElements.attr('target', '_blank');
@@ -81,6 +81,7 @@ $(
8181
const titleID = clickedElRepoName + '-' + this.id + '-md';
8282
const collapsibleContent = $(element).next('ol');
8383
const reportInfoContent = collapsibleContent.next('p');
84+
const whenGeneratedContent = reportInfoContent.next('p');
8485

8586
$(element).addClass('collapse-link collapsed');
8687
$(element).attr('href', '#' + titleID);
@@ -89,35 +90,8 @@ $(
8990
collapsibleContent.addClass('dependencies-container collapse');
9091
collapsibleContent.attr('id', titleID);
9192

92-
reportInfoContent.addClass('report-info collapse');
93-
reportInfoContent.attr('id', titleID + '-p');
94-
});
95-
96-
makeReportInfoCollapsible(mdDestinationEl);
97-
}
98-
99-
/**
100-
* Makes report information content collapsible.
101-
*
102-
* <p>Report information contains a generation date and the name of the plugin.
103-
*
104-
* @param mdDestinationEl it is a `div` with a markdown content
105-
*/
106-
function makeReportInfoCollapsible(mdDestinationEl) {
107-
const reportInfoContent = mdDestinationEl.find('.report-info');
108-
109-
/**
110-
* Inserts a new collapsible title for the paragraph with a report information.
111-
*/
112-
const reportInfoTitleEl = "<h2 class='report-info-title collapse-link collapsed'>Report info</h2>";
113-
$(reportInfoTitleEl).insertBefore(reportInfoContent);
114-
115-
reportInfoContent.each(function (index, element) {
116-
const reportInfoID = this.id;
117-
const reportInfoTitle = $(element).prev('.report-info-title');
118-
119-
reportInfoTitle.attr('href', '#' + reportInfoID);
120-
reportInfoTitle.attr('data-toggle', 'collapse');
93+
reportInfoContent.remove();
94+
whenGeneratedContent.remove();
12195
});
12296
}
12397
}

oss-licenses/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
<p class="page-description">The framework has a number of third-party dependencies. We respect the licensing
1111
term of each library we rely on. Below is a full list of all dependencies along with their licenses,
1212
grouped by Spine artifact.</p>
13+
14+
<p class="page-description">The dependencies distributed under several licenses,
15+
are used according their commercial-use-friendly license.</p>
16+
17+
<p class="page-description">The reports are generated using
18+
<a href="https://github.com/jk1/Gradle-License-Report" class="external"
19+
target="_blank">Gradle-License-Report plugin</a> by Evgeny Naumenko, licensed under
20+
<a href="https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE"
21+
class="external" target="_blank">Apache 2.0 License</a>.</p>
1322
</div>
1423
</div>
1524

0 commit comments

Comments
 (0)