diff options
Diffstat (limited to 'cvp/3rd_party/static/testapi-ui/components/application')
-rw-r--r-- | cvp/3rd_party/static/testapi-ui/components/application/application.html | 23 | ||||
-rw-r--r-- | cvp/3rd_party/static/testapi-ui/components/application/applicationController.js | 21 |
2 files changed, 44 insertions, 0 deletions
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 dc27585d..17b17c68 100644 --- a/cvp/3rd_party/static/testapi-ui/components/application/application.html +++ b/cvp/3rd_party/static/testapi-ui/components/application/application.html @@ -180,6 +180,13 @@ 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">Test ID</label> + <i uib-tooltip="Test ID - enter approved test_id" class="glyphicon glyphicon-question-sign opnfv-blue"></i> + <div class="middleColumn"> + <input type="text" class="text form-control" ng-model="ctrl.test_id" /> + </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"> @@ -243,6 +250,7 @@ urpose. Once we understand more about your product or service, we can determine <th>Company logo</th> <th>Approve date</th> <th>Approved</th> + <th>Test ID</th> <th>Location</th> <th>Operation</th> </tr> @@ -302,6 +310,7 @@ urpose. Once we understand more about your product or service, we can determine <td>{{ app.company_logo }}</td> <td>{{ app.approve_date }}</td> <td>{{ app.approved }}</td> + <td>{{ app.test_id }}</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> @@ -322,4 +331,18 @@ urpose. Once we understand more about your product or service, we can determine </uib-pagination> </div> </div> + +<div> + <br> + <h3>Company Logo Upload for Directory</h3> + <form enctype="multipart/form-data" method="post"> + <div class="form-group col-m-3"> + <input class="form-contrl btn btn-success cvp-btn medium accent-color regular-button" file-model="logoFile" type="file"> + </div> + <div class="form-group col-m-3"> + <a class="btn btn-success cvp-btn medium accent-color regular-button" ng-click="ctrl.uploadLogo()"><span>Upload Logo</span></a> + </div> + </form> +</div> + </div> 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 32f1053e..5666ff23 100644 --- a/cvp/3rd_party/static/testapi-ui/components/application/applicationController.js +++ b/cvp/3rd_party/static/testapi-ui/components/application/applicationController.js @@ -30,6 +30,7 @@ $uibModal, testapiApiUrl, raiseAlert, ngDialog, $scope) { var ctrl = this; + ctrl.uploadLogo=uploadLogo; function init(){ ctrl.organization_name = null; @@ -52,6 +53,7 @@ ctrl.company_logo = null; ctrl.approve_date = null; ctrl.approved = "false"; + ctrl.test_id = null; ctrl.lab_location="internal"; ctrl.lab_name = null; ctrl.lab_email=null; @@ -94,6 +96,7 @@ "company_logo": ctrl.company_logo, "approve_date": ctrl.approve_date, "approved": ctrl.approved, + "test_id": ctrl.test_id, "lab_location": ctrl.lab_location, "lab_email": ctrl.lab_email, "lab_address": ctrl.lab_address, @@ -141,6 +144,24 @@ }); } + function uploadLogo(){ + var file = $scope.logoFile; + var fd = new FormData(); + fd.append('file', file); + + $http.post(testapiApiUrl + "/cvp/applications/uploadlogo", fd, { + transformRequest: angular.identity, + headers: {'Content-Type': undefined} + }).then(function(resp){ + if(resp.data.code && resp.data.code != 0) { + alert(resp.data.msg); + return; + } + }, function(error){ + }); + + }; + function getApplication(){ $http.get(testapiApiUrl + "/cvp/applications?page="+ctrl.currentPage+"&signed&per_page="+ctrl.itemsPerPage).then(function(response){ ctrl.applications = response.data.applications; |