diff options
author | 2018-12-06 00:43:12 +0200 | |
---|---|---|
committer | 2019-03-20 15:28:23 +0200 | |
commit | d0bbf3b8952379883550c6eb2062476a6d15043e (patch) | |
tree | 106f65b223054077279bda7ff988a73bea314a34 /3rd_party/static/onap-ui/components/directory | |
parent | 5f20495d6e3ec984c4e86fd76399ddf0d042b336 (diff) |
Enable Web Portal for ONAP results
The web portal needs to be able to read test results of the ONAP
compliance program and display them.
In order for the above goal to be achieved, the following two parts
should be impacted:
1- A new front-end should be prepared in order to handle and display
the results
2- The REST API should be extended in order to support the aforementioned
operation.
JIRA: DOVETAIL-669
Change-Id: I36bbb6e602a67020d7e27aedbfc776f5cf4f3dc3
Signed-off-by: pkaralis <pkaralis@intracom-telecom.com>
Co-Authored-By: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to '3rd_party/static/onap-ui/components/directory')
-rw-r--r-- | 3rd_party/static/onap-ui/components/directory/directory.html | 34 | ||||
-rw-r--r-- | 3rd_party/static/onap-ui/components/directory/directoryController.js | 45 |
2 files changed, 79 insertions, 0 deletions
diff --git a/3rd_party/static/onap-ui/components/directory/directory.html b/3rd_party/static/onap-ui/components/directory/directory.html new file mode 100644 index 0000000..4a04bd7 --- /dev/null +++ b/3rd_party/static/onap-ui/components/directory/directory.html @@ -0,0 +1,34 @@ +<div class="container-fluid common-main-container"> + <h3>ONAP Verified Product Directory</h3> + <div> + <h4>Compliance Marks Granted to {{ctrl.companyID}}</h4> + <img src="api/v1/cvp/applications/getlogo/{{ctrl.company_logo}}" alt="Company Logo"> + <table class="table table-striped table-hover"> + <thead> + <tr> + <th>Product Name</th> + <th>Description</th> + <th>Model Language</th> + <th>Artifact Checksum (SHA256)</th> + <th>Product Version</th> + <th>Version</th> + <th>Date</th> + <th>Product Info</th> + </tr> + </thead> + <tbody class="directory_inner" style="overflow: hidden; text-overflow: ellipsis;"> + <tr style="vertical-align: center;" ng-repeat="prod in ctrl.directory" + ng-if="prod.company_name==ctrl.companyID && prod.approved=='true'"> + <td style="width: 250px;">{{ prod.xnf_name }}</td> + <td style="width: 350px;">{{ prod.xnf_description }}</td> + <td style="width: 350px;">{{ prod.xnfd_model_lang }}</td> + <td style="width: 350px;">{{ prod.xnf_checksum }}</td> + <td style="width: 150px;">{{ prod.xnf_version }}</td> + <td style="width: 150px;">{{ prod.onap_version }}</td> + <td style="width: 150px;">{{ prod.approve_date | limitTo: 10 }}</td> + <td style="width: 150px;"><a href="{{ prod.company_website }}" target="_blank" rel="noopener">{{ prod.company_website }}</a></td> + </tr> + </tbody> + </table> + </div> +</div> diff --git a/3rd_party/static/onap-ui/components/directory/directoryController.js b/3rd_party/static/onap-ui/components/directory/directoryController.js new file mode 100644 index 0000000..a4fc6f3 --- /dev/null +++ b/3rd_party/static/onap-ui/components/directory/directoryController.js @@ -0,0 +1,45 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function () { + 'use strict'; + + angular + .module('testapiApp') + .controller('DirectoryController', DirectoryController); + + DirectoryController.$inject = ['$http', '$stateParams', + 'testapiApiUrl' + ]; + + /** + * This controller handles the directory page + */ + function DirectoryController($http, $stateParams, testapiApiUrl) { + var ctrl = this; + + ctrl.companyID = $stateParams.companyID; + ctrl.company_logo = $stateParams.logo; + getDirectory(); + + function getDirectory() { + $http.get(testapiApiUrl + "/onap/cvp/applications").then(function(response) { + ctrl.directory = response.data.applications; + }, function(error) { + /* do nothing */ + }); + } + } + +})(); |