diff options
author | Eddie Arrage <eddie.arrage@huawei.com> | 2018-05-22 22:08:13 +0000 |
---|---|---|
committer | Eddie Arrage <eddie.arrage@huawei.com> | 2018-05-22 22:11:58 +0000 |
commit | 46f4c2ab5fc870f424e8f74a179ec3bea2c96537 (patch) | |
tree | 21555a76df788538e8dba0583fa0a90601cc3640 /cvp/3rd_party/static/testapi-ui | |
parent | 9d93e3383376dab08257b9e70d9e68ad99608989 (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')
9 files changed, 251 insertions, 6 deletions
diff --git a/cvp/3rd_party/static/testapi-ui/app.js b/cvp/3rd_party/static/testapi-ui/app.js index eea8e38e..02cd7688 100644 --- a/cvp/3rd_party/static/testapi-ui/app.js +++ b/cvp/3rd_party/static/testapi-ui/app.js @@ -45,6 +45,11 @@ templateUrl: 'testapi-ui/components/about/about.html', controller: 'AboutController as ctrl' }). + state('directory', { + url: '/directory/:companyID&:logo', + templateUrl: 'testapi-ui/components/directory/directory.html', + controller: 'DirectoryController as ctrl' + }). state('guidelines', { url: '/guidelines', templateUrl: 'testapi-ui/components/guidelines/guidelines.html', diff --git a/cvp/3rd_party/static/testapi-ui/assets/css/home/home.css b/cvp/3rd_party/static/testapi-ui/assets/css/home/home.css index 04db323a..ce8c88e2 100644 --- a/cvp/3rd_party/static/testapi-ui/assets/css/home/home.css +++ b/cvp/3rd_party/static/testapi-ui/assets/css/home/home.css @@ -28,3 +28,36 @@ .home-content-img { width: 80%; } + +#directory_inner th { + font-size: 20px; +} + +#directory_inner tbody { + font-size: 18px; +} + +#directory_inner tr { + vertical-align: center; +} + +#directory_inner { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} + +#directory_break { + height: 1px; + display: flex; + border: 1px solid #ccc; +} + +#directory_inner > thead > tr > th { + border-bottom: 2px solid #ddd; + padding: 8px; +} + +#directory_inner > tbody > tr > td { + border-bottom: 1px solid #ddd; +} diff --git a/cvp/3rd_party/static/testapi-ui/components/application/application.html b/cvp/3rd_party/static/testapi-ui/components/application/application.html index 5d57fe78..dc27585d 100644 --- a/cvp/3rd_party/static/testapi-ui/components/application/application.html +++ b/cvp/3rd_party/static/testapi-ui/components/application/application.html @@ -124,6 +124,62 @@ urpose. Once we understand more about your product or service, we can determine </div> </div> <div class="field text col-md-4"> + <label class="left">Description</label> + <i uib-tooltip="Product Description" class="glyphicon glyphicon-question-sign opnfv-blue"></i> + <div class="middleColumn"> + <input type="text" class="text form-control" ng-model="ctrl.description" /> + </div> + </div> + <div class="field text col-md-4"> + <label class="left">SUT Version</label> + <i uib-tooltip="SUT Version" class="glyphicon glyphicon-question-sign opnfv-blue"></i> + <div class="middleColumn"> + <input type="text" class="text form-control" ng-model="ctrl.sut_version" /> + </div> + </div> + <div class="field text col-md-4"> + <label class="left">SUT HW Version</label> + <i uib-tooltip="SUT HW Version - leave blank if not applicable" class="glyphicon glyphicon-question-sign opnfv-blue"></i> + <div class="middleColumn"> + <input type="text" class="text form-control" ng-model="ctrl.sut_hw_version" /> + </div> + </div> + <div class="field text col-md-4"> + <label class="left">OVP Version</label> + <i uib-tooltip="OVP Version" class="glyphicon glyphicon-question-sign opnfv-blue"></i> + <div class="middleColumn"> + <input type="text" class="text form-control" ng-model="ctrl.ovp_version" /> + </div> + </div> + <div class="field text col-md-4"> + <label class="left">OVP Category</label> + <i uib-tooltip="OVP Category" class="glyphicon glyphicon-question-sign opnfv-blue"></i> + <div class="middleColumn"> + <input type="text" class="text form-control" ng-model="ctrl.ovp_category" /> + </div> + </div> + <div class="field text col-md-4"> + <label class="left">Company Logo</label> + <i uib-tooltip="Company Logo" class="glyphicon glyphicon-question-sign opnfv-blue"></i> + <div class="middleColumn"> + <input type="text" class="text form-control" ng-model="ctrl.company_logo" /> + </div> + </div> + <div class="field text col-md-4"> + <label class="left">Approve Date</label> + <i uib-tooltip="Approve Date - YYYY-MM-DD" class="glyphicon glyphicon-question-sign opnfv-blue"></i> + <div class="middleColumn"> + <input type="text" class="text form-control" ng-model="ctrl.approve_date" /> + </div> + </div> + <div class="field text col-md-4"> + <label class="left">Approved</label> + <i uib-tooltip="Approved - insert true or false" class="glyphicon glyphicon-question-sign opnfv-blue"></i> + <div class="middleColumn"> + <input type="text" class="text form-control" ng-model="ctrl.approved" /> + </div> + </div> + <div class="field text col-md-4"> <label class="left">Location</label> <i uib-tooltip="Location" class="glyphicon glyphicon-question-sign opnfv-blue"></i> <div class="middleColumn"> @@ -179,6 +235,14 @@ urpose. Once we understand more about your product or service, we can determine <th>Primary phone number</th> <th>User ID Type</th> <th>User ID</th> + <th>Description</th> + <th>SUT version</th> + <th>SUT HW version</th> + <th>OVP version</th> + <th>OVP category</th> + <th>Company logo</th> + <th>Approve date</th> + <th>Approved</th> <th>Location</th> <th>Operation</th> </tr> @@ -230,6 +294,14 @@ urpose. Once we understand more about your product or service, we can determine <td>{{ app.prim_phone }}</td> <td>{{ app.id_type }}</td> <td>{{ app.user_id }}</td> + <td>{{ app.description }}</td> + <td>{{ app.sut_version }}</td> + <td>{{ app.sut_hw_version }}</td> + <td>{{ app.ovp_version }}</td> + <td>{{ app.ovp_category }}</td> + <td>{{ app.company_logo }}</td> + <td>{{ app.approve_date }}</td> + <td>{{ app.approved }}</td> <td><span popover-enable="app.lab_location != 'internal'" uib-popover-template="ctrl.lab_tpl" popover-title="Lab Info" popover-placement="top" popover-trigger="mouseenter">{{ app.lab_location | labLocation}}</span><i ng-if="app.lab_location != 'internal'" class="glyphicon glyphicon-info-sign opnfv-blue"></i></td> <td><a ng-click="ctrl.deleteApp(app._id)" class="badge badge-info"><i class="glyphicon glyphicon-remove" ></i></a></td> </tr> diff --git a/cvp/3rd_party/static/testapi-ui/components/application/applicationController.js b/cvp/3rd_party/static/testapi-ui/components/application/applicationController.js index f392d05e..32f1053e 100644 --- a/cvp/3rd_party/static/testapi-ui/components/application/applicationController.js +++ b/cvp/3rd_party/static/testapi-ui/components/application/applicationController.js @@ -43,7 +43,15 @@ ctrl.prim_address = null; ctrl.prim_phone = null; ctrl.id_type = "Linux Foundation"; - ctrl.user_id = null; + ctrl.user_id = null; + ctrl.description = null; + ctrl.sut_version = null; + ctrl.sut_hw_version = null; + ctrl.ovp_version = "2018.01"; + ctrl.ovp_category = "Infrastructure"; + ctrl.company_logo = null; + ctrl.approve_date = null; + ctrl.approved = "false"; ctrl.lab_location="internal"; ctrl.lab_name = null; ctrl.lab_email=null; @@ -78,6 +86,14 @@ "prim_phone": ctrl.prim_phone, "id_type": ctrl.id_type, "user_id": ctrl.user_id, + "description": ctrl.description, + "sut_version": ctrl.sut_version, + "sut_hw_version": ctrl.sut_hw_version, + "ovp_version": ctrl.ovp_version, + "ovp_category": ctrl.ovp_category, + "company_logo": ctrl.company_logo, + "approve_date": ctrl.approve_date, + "approved": ctrl.approved, "lab_location": ctrl.lab_location, "lab_email": ctrl.lab_email, "lab_address": ctrl.lab_address, diff --git a/cvp/3rd_party/static/testapi-ui/components/directory/directory.html b/cvp/3rd_party/static/testapi-ui/components/directory/directory.html new file mode 100644 index 00000000..d1383138 --- /dev/null +++ b/cvp/3rd_party/static/testapi-ui/components/directory/directory.html @@ -0,0 +1,34 @@ +<div class="container-fluid common-main-container"> + <h3>OPNFV Verified Product Directory</h3> + + <div> + <h4>Compliance Marks Granted to {{ctrl.companyID}}</h4> + <img class="" src="testapi-ui/assets/img/{{ctrl.company_logo}}" /> + <table class="table table-striped table-hover"> + <thead> + <tr class=""> + <th>Product</th> + <th>Description</th> + <th>OVP Cateogry</th> + <th>OVP Version</th> + <th>Product Info</th> + <th>SUT Version</th> + <th>SUT HW Version</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.organization_name==ctrl.companyID && prod.approved=='true'"> + <td width="250">{{ prod.product_name}}</td> + <td width="350">{{ prod.description}}</td> + <td width="150">{{ prod.ovp_category}}</td> + <td width="150">{{ prod.ovp_version}}</td> + <td><a href="{{ prod.product_documentation}}" target="_blank">{{ prod.product_documentation}}</a></td> + <td width="150">{{ prod.sut_version}}</td> + <td width="150">{{ prod.sut_hw_version}}</td> + </tr> + </tbody> + </table> + + </div> + +</div> 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){ + }); + } + + } +})(); diff --git a/cvp/3rd_party/static/testapi-ui/components/home/home.html b/cvp/3rd_party/static/testapi-ui/components/home/home.html index e748dcd3..f7d61cda 100644 --- a/cvp/3rd_party/static/testapi-ui/components/home/home.html +++ b/cvp/3rd_party/static/testapi-ui/components/home/home.html @@ -17,7 +17,7 @@ <div><a href="https://www.opnfv.org/wp-content/uploads/sites/12/2018/01/OVP-Terms-and-Conditions-011918.pdf" target="_blank">Terms & Conditions <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span></a></div> <div><a href="http://docs.opnfv.org/en/stable-danube/submodules/dovetail/docs/testing/user/certificationworkflow/index.html " target="_blank">Process Workflow <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span></a></div> - <div><a href="https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=e03e78d7-c32e-47d3-8292-350b747a0105" target="_blank">Participation Form <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span></a></div> + <div><a href="https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=579ac00d-0a1f-4db3-82ea-ddd977769a60" target="_blank">Participation Form <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span></a></div> <!-- <div><a target="_blank">Approved 3rd Party Labs <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span></a></div> --> @@ -100,7 +100,7 @@ <img class="home-content-img" src="testapi-ui/assets/img/icon.png" /> </div> <div class="col-md-10"> - <p class="home-content-text"> + <p class="home-content-text" style="padding-bottom:40px;"> The OPNFV Verified program demonstrates the readiness and availability of commercial products based on OPNFV. Verified products and services submitted by vendors and service providers become compliant by implementing explicitly defined interfaces, behaviors and key features while retaining distinct and value-added innovations across features and capabilities. @@ -109,6 +109,32 @@ </p> </div> </div> + <div id="directory_break"> + </div> + <div class="home-content-title"> + <h1>OPNFV Verified Products Directory</h1> + </div> + <div class="directory_main"> + <table id="directory_inner" class="table-striped table-hover"> + <thead> + <tr> + <th>Company</th> + <th>Product</th> + <th>Cateogry</th> + <th>Version</th> + </tr> + </thead> + <tbody style="overflow: hidden; text-overflow: ellipsis;"> + <tr ng-click="ctrl.getCompany(app)" ng-repeat="app in ctrl.applications | filter:{approved:true} | orderBy : 'approve_date'"> + <td width="450"><img src="testapi-ui/assets/img/{{app.company_logo}}" /> {{ app.organization_name}}</td> + <td width="300">{{ app.product_name}}</td> + <td width="150">{{ app.ovp_category}}</td> + <td width="150">{{ app.ovp_version}}</td> + </tr> + </tbody> + </table> + </div> + </div> </div> </div> diff --git a/cvp/3rd_party/static/testapi-ui/components/home/homeController.js b/cvp/3rd_party/static/testapi-ui/components/home/homeController.js index 4a31448b..bed86ab7 100644 --- a/cvp/3rd_party/static/testapi-ui/components/home/homeController.js +++ b/cvp/3rd_party/static/testapi-ui/components/home/homeController.js @@ -20,7 +20,7 @@ .controller('HomeController', HomeController); HomeController.$inject = [ - '$scope', '$rootScope', '$state' + '$http', '$scope', '$rootScope', '$state', 'testapiApiUrl' ]; /** @@ -28,10 +28,11 @@ * This controller is for the '/results' page where a user can browse * a listing of community uploaded results. */ - function HomeController($scope, $rootScope, $state) { + function HomeController($http, $scope, $rootScope, $state, testapiApiUrl) { var ctrl = this; + getApplication(); - ctrl.height = $(document).height() - 115; + ctrl.height = $(document).height() + 500; ctrl.gotoApplication = function(){ if($rootScope.auth.isAuthenticated){ @@ -40,5 +41,18 @@ $rootScope.auth.doSignIn('cas'); } } + + function getApplication(){ + $http.get(testapiApiUrl + "/cvp/applications").then(function(response){ + ctrl.applications = response.data.applications; + }, function(error){ + }); + } + + ctrl.getCompany = function(row){ + //console.log(row) + $state.go('directory', {'companyID': row.organization_name, 'logo': row.company_logo}); + } + } })(); diff --git a/cvp/3rd_party/static/testapi-ui/index.html b/cvp/3rd_party/static/testapi-ui/index.html index 497e4a0b..29d4316a 100644 --- a/cvp/3rd_party/static/testapi-ui/index.html +++ b/cvp/3rd_party/static/testapi-ui/index.html @@ -53,6 +53,7 @@ <script src="testapi-ui/shared/alerts/confirmModalFactory.js"></script> <script src="testapi-ui/components/home/homeController.js"></script> <script src="testapi-ui/components/about/aboutController.js"></script> + <script src="testapi-ui/components/directory/directoryController.js"></script> <script src="testapi-ui/components/guidelines/guidelinesController.js"></script> <script src="testapi-ui/components/results/resultsController.js"></script> <script src="testapi-ui/components/results-report/resultsReportController.js"></script> |