aboutsummaryrefslogtreecommitdiffstats
path: root/3rd_party/static/onap-ui/components/directory
diff options
context:
space:
mode:
Diffstat (limited to '3rd_party/static/onap-ui/components/directory')
-rw-r--r--3rd_party/static/onap-ui/components/directory/directory.html34
-rw-r--r--3rd_party/static/onap-ui/components/directory/directoryController.js45
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 */
+ });
+ }
+ }
+
+})();