mirror of
https://github.com/nasa/openmct.git
synced 2024-12-29 17:38:53 +00:00
[Licenses] Add license page template
Add template to populate open source licenses page from extensions exposed by bundles; WTD-669.
This commit is contained in:
parent
53d6b60bda
commit
3135580f3a
@ -31,6 +31,11 @@
|
||||
"key": "AboutController",
|
||||
"depends": [ "versions[]", "$window" ],
|
||||
"implementation": "AboutController.js"
|
||||
},
|
||||
{
|
||||
"key": "LicenseController",
|
||||
"depends": [ "licenses[]" ],
|
||||
"implementation": "LicenseController.js"
|
||||
}
|
||||
],
|
||||
"routes": [
|
||||
|
@ -1 +1,27 @@
|
||||
Placeholder for open source licenses.
|
||||
<div ng-controller="LicenseController as lc" style="padding: 1em;">
|
||||
|
||||
<p>
|
||||
This software includes components released under the following licenses.
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Version</th>
|
||||
<th>Author</th>
|
||||
<th>Description</th>
|
||||
<th>License</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="license in lc.licenses()">
|
||||
<td><a ng-href="{{license.website}}">{{license.name}}</a></td>
|
||||
<td>{{license.version}}</td>
|
||||
<td>{{license.author}}</td>
|
||||
<td>{{license.description}}</td>
|
||||
<td><a ng-href="{{license.link}}">{{license.license}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
27
platform/commonUI/about/src/LicenseController.js
Normal file
27
platform/commonUI/about/src/LicenseController.js
Normal file
@ -0,0 +1,27 @@
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Provides extension-introduced licenses information to the
|
||||
* licenses route.
|
||||
* @constructor
|
||||
*/
|
||||
function LicenseController(licenses) {
|
||||
return {
|
||||
/**
|
||||
* Get license information.
|
||||
* @returns {Array} license extensions
|
||||
*/
|
||||
licenses: function () {
|
||||
return licenses;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return LicenseController;
|
||||
}
|
||||
);
|
Loading…
Reference in New Issue
Block a user