diff options
author | Dan Xu <xudan16@huawei.com> | 2019-03-22 07:44:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-03-22 07:44:31 +0000 |
commit | aab171fe0b7b749a7414cc8d652b5f4662743106 (patch) | |
tree | 2108f5db2442bdbbd327ee80f2a17c9bf496d079 /3rd_party/static/onap-ui/components/directory | |
parent | 3b78fa2aeb6c69efb86c68ba5f6c7d7efccfb024 (diff) | |
parent | d0bbf3b8952379883550c6eb2062476a6d15043e (diff) |
Merge changes I36bbb6e6,I2f597763
* changes:
Enable Web Portal for ONAP results
Prepare Web Portal for ONAP integration
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 */ + }); + } + } + +})(); |