summaryrefslogtreecommitdiffstats
path: root/cvp/3rd_party/static/testapi-ui/components/directory/directoryController.js
diff options
context:
space:
mode:
authorEddie Arrage <eddie.arrage@huawei.com>2018-05-22 22:08:13 +0000
committerEddie Arrage <eddie.arrage@huawei.com>2018-05-22 22:11:58 +0000
commit46f4c2ab5fc870f424e8f74a179ec3bea2c96537 (patch)
tree21555a76df788538e8dba0583fa0a90601cc3640 /cvp/3rd_party/static/testapi-ui/components/directory/directoryController.js
parent9d93e3383376dab08257b9e70d9e68ad99608989 (diff)
Implemented directory within OVP portal
- Added OVP directory to portal home page as summary view to showcase vendors offerings that have received marks - Each row of table in directory summary represents a product offering that has received compliance verification marks and will be ordered by approve date - Currently, a vendor with multiple products will be displayed as separate rows, as agreed by OPNFV marketing - Added new angular component/controller for OVP directory secondary drill-down view, which provides more detailed info including Description, Product Info, SUT HW Version (optional from vendor) and SUT Version. Product info links to product_documentation field in Applications collection but can be improved as requirements are flushed out - Added new db fields to existing applications collection in mongodb - Applications collection is fetched on home page and detailed directory views - Updated Applications management view (administrator role) with new db fields including description, ovp_category, ovp_version, company_logo, approve_date, approved, sut_version, sut_hw_version, allowing admin to delete and add back with updates. - Updated participation form link for exemption process addition - Consider for another patch - upload form for company logos in Applications view for administrator to add. The initial wave of logos will need to be included in the patch for now when available from OPNFV marketing - Consider for another patch - improve 'Product Info' field to accept HTML as input allowing administrator to add raw HTML in mongod - Consider for another patch - update an existing application for admin role in Applications view rather than forcing a delete/add operation for an update Change-Id: I41d08a7164ee4513106bd09ea30d20be5abd911e Signed-off-by: Eddie Arrage <eddie.arrage@huawei.com>
Diffstat (limited to 'cvp/3rd_party/static/testapi-ui/components/directory/directoryController.js')
-rw-r--r--cvp/3rd_party/static/testapi-ui/components/directory/directoryController.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/cvp/3rd_party/static/testapi-ui/components/directory/directoryController.js b/cvp/3rd_party/static/testapi-ui/components/directory/directoryController.js
new file mode 100644
index 00000000..18fda09e
--- /dev/null
+++ b/cvp/3rd_party/static/testapi-ui/components/directory/directoryController.js
@@ -0,0 +1,44 @@
+/*
+ * 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 = ['$location', '$http', '$stateParams',
+ 'testapiApiUrl'
+ ];
+
+ /**
+ * This controller handles the directory page
+ */
+ function DirectoryController($location, $http, $stateParams, testapiApiUrl) {
+ var ctrl = this;
+
+ ctrl.companyID = $stateParams.companyID;
+ ctrl.company_logo = $stateParams.logo;
+ getDirectory();
+
+ function getDirectory(){
+ $http.get(testapiApiUrl + "/cvp/applications").then(function(response){
+ ctrl.directory = response.data.applications;
+ }, function(error){
+ });
+ }
+
+ }
+})();