From 9ec1397dd9fc9ae3c97ef5a8059dc5b57717c9dc Mon Sep 17 00:00:00 2001 From: Stamatis Katsaounis Date: Tue, 12 Feb 2019 16:03:17 +0200 Subject: Fix lint and identation issues and remove unwanted parts of code Change-Id: Ic294155075962f0b78e3102cff993ee2421ad99e Signed-off-by: Stamatis Katsaounis --- .../components/application/application.html | 631 +++++---- .../application/applicationController.js | 265 ++-- .../testapi-ui/components/application/logo-request | 1417 -------------------- .../components/application/modal/confirmModal.html | 4 +- .../testapi-ui/components/directory/directory.html | 2 +- .../guidelines/partials/testListModal.html | 4 +- .../static/testapi-ui/components/home/home.html | 36 +- .../components/profile/importPubKeyModal.html | 2 +- .../results-report/data/2018.09/testcases.json | 1060 +++++++-------- .../static/testapi-ui/components/sut/sut.html | 66 +- opnfv_testapi/tests/unit/fake_pymongo.py | 6 +- 11 files changed, 1015 insertions(+), 2478 deletions(-) delete mode 100644 3rd_party/static/testapi-ui/components/application/logo-request diff --git a/3rd_party/static/testapi-ui/components/application/application.html b/3rd_party/static/testapi-ui/components/application/application.html index 28b15ab..0b45ab3 100644 --- a/3rd_party/static/testapi-ui/components/application/application.html +++ b/3rd_party/static/testapi-ui/components/application/application.html @@ -1,365 +1,334 @@ - - - - - Logo Request » OpenStack Open Source Cloud Computing Software - - - -
-
-
-

Complete this application then start your CVP journey

-
+
+
+
+

Complete this application then start your CVP journey

+
-
-
-
- -
-
- - -
- -
+
+
+ + +
+
+ + +
+
-
- - -
- -
+
+
+ + +
+
-
- +
+
- -
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Create DateOrganization nameOrganization websiteProduct nameProduct specificationsProduct documentationProduct categoriesPrimary contact namePrimary business emailPrimary postal addressPrimary phone numberUser ID TypeUser IDDescriptionSUT versionSUT HW versionOVP versionOVP categoryCompany logoApprove dateApprovedTest IDLocationOperation
{{ app.creation_date | limitTo: 10 }}{{ app.organization_name }}{{ app.organization_web }}{{ app.product_name}}{{app.product_spec}}{{app.product_documentation}}{{ app.product_categories | category }}{{ app.prim_name }}{{ app.prim_email }}{{ app.prim_address }}{{ app.prim_phone }}{{ app.id_type }}{{ app.user_id }}{{ app.description }}{{ app.sut_version }}{{ app.sut_hw_version }}{{ app.ovp_version }}{{ app.ovp_category }}{{ app.company_logo }}{{ app.approve_date }}{{ app.approved }}{{ app.test_id }} - {{ app.lab_location | labLocation}} - - - - - -
- -
- - -
+
+
- -
-
-

Company Logo Upload for Directory

-
-
- +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Create DateOrganization nameOrganization websiteProduct nameProduct specificationsProduct documentationProduct categoriesPrimary contact namePrimary business emailPrimary postal addressPrimary phone numberOwnerDescriptionSUT versionSUT HW versionOVP versionOVP categoryCompany logoApprove dateApprovedTest IDLocationOperation
{{ app.creation_date | limitTo: 10 }}{{ app.organization_name }}{{ app.organization_web }}{{ app.product_name}}{{app.product_spec}}{{app.product_documentation}}{{ app.product_categories | category }}{{ app.prim_name }}{{ app.prim_email }}{{ app.prim_address }}{{ app.prim_phone }}{{ app.owner }}{{ app.description }}{{ app.sut_version }}{{ app.sut_hw_version }}{{ app.ovp_version }}{{ app.ovp_category }}{{ app.company_logo }}{{ app.approve_date }}{{ app.approved }}{{ app.test_id }} + {{ app.lab_location | labLocation}} + + + + + +
+ +
+ +
- + +
+
+

Company Logo Upload for Directory

+ +
+ +
+ + +
+
diff --git a/3rd_party/static/testapi-ui/components/application/applicationController.js b/3rd_party/static/testapi-ui/components/application/applicationController.js index 5666ff2..e2a4f75 100644 --- a/3rd_party/static/testapi-ui/components/application/applicationController.js +++ b/3rd_party/static/testapi-ui/components/application/applicationController.js @@ -24,154 +24,147 @@ '$uibModal', 'testapiApiUrl', 'raiseAlert', 'ngDialog', '$scope' ]; - /** - */ - function ApplicationController($http, $stateParams, $window, $sce, + function ApplicationController ($http, $stateParams, $window, $sce, $uibModal, testapiApiUrl, raiseAlert, ngDialog, $scope) { var ctrl = this; - ctrl.uploadLogo=uploadLogo; - - function init(){ - ctrl.organization_name = null; - ctrl.organization_web = null; - ctrl.product_name = null; - ctrl.product_spec = null; - ctrl.product_documentation = null; - ctrl.product_categories = "soft&hard"; - ctrl.prim_name = null; - ctrl.prim_email = null; - ctrl.prim_address = null; - ctrl.prim_phone = null; - ctrl.id_type = "Linux Foundation"; - 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.test_id = null; - ctrl.lab_location="internal"; - ctrl.lab_name = null; - ctrl.lab_email=null; - ctrl.lab_address=null; - ctrl.lab_phone=null; - ctrl.applications = []; - ctrl.showApplications = []; - - ctrl.totalItems = null; - ctrl.currentPage = 1; - ctrl.itemsPerPage = 5; - ctrl.numPages = null; - ctrl.lab_tpl = "lab.tpl.html"; - ctrl.product_tpl = "product.tpl.html"; - //ctrl.lab_html=$sce.trustAsHtml('
{{app.lab_email}}
{{app.lab_address}}
{{app.lab_phone}}
'); - - getApplication(); - } - - - ctrl.submitForm = function(){ - var data = { - "organization_name": ctrl.organization_name, - "organization_web": ctrl.organization_web, - "product_name": ctrl.product_name, - "product_spec": ctrl.product_spec, - "product_documentation": ctrl.product_documentation, - "product_categories": ctrl.product_categories, - "prim_name": ctrl.prim_name, - "prim_email": ctrl.prim_email, - "prim_address": ctrl.prim_address, - "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, - "test_id": ctrl.test_id, - "lab_location": ctrl.lab_location, - "lab_email": ctrl.lab_email, - "lab_address": ctrl.lab_address, - "lab_phone": ctrl.lab_phone - }; - console.log(data); - $http.post(testapiApiUrl + "/cvp/applications", data).then(function(resp){ - if(resp.data.code && resp.data.code != 0) { - alert(resp.data.msg); - return; - } - getApplication(); - }, function(error){ - }); - } - - ctrl.openConfirmModal = function(){ - var resp = confirm("Are you sure to submit?"); - if (resp) { - ctrl.submitForm(); + ctrl.uploadLogo = uploadLogo; + + function init() { + ctrl.organization_name = null; + ctrl.organization_web = null; + ctrl.product_name = null; + ctrl.product_spec = null; + ctrl.product_documentation = null; + ctrl.product_categories = "soft&hard"; + ctrl.prim_name = null; + ctrl.prim_email = null; + ctrl.prim_address = null; + ctrl.prim_phone = 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.test_id = null; + ctrl.lab_location = "internal"; + ctrl.lab_name = null; + ctrl.lab_email = null; + ctrl.lab_address = null; + ctrl.lab_phone = null; + ctrl.applications = []; + ctrl.showApplications = []; + + ctrl.totalItems = null; + ctrl.currentPage = 1; + ctrl.itemsPerPage = 5; + ctrl.numPages = null; + ctrl.lab_tpl = "lab.tpl.html"; + ctrl.product_tpl = "product.tpl.html"; + //ctrl.lab_html=$sce.trustAsHtml('
{{app.lab_email}}
{{app.lab_address}}
{{app.lab_phone}}
'); + + getApplication(); + } + + + ctrl.submitForm = function() { + var data = { + "organization_name": ctrl.organization_name, + "organization_web": ctrl.organization_web, + "product_name": ctrl.product_name, + "product_spec": ctrl.product_spec, + "product_documentation": ctrl.product_documentation, + "product_categories": ctrl.product_categories, + "prim_name": ctrl.prim_name, + "prim_email": ctrl.prim_email, + "prim_address": ctrl.prim_address, + "prim_phone": ctrl.prim_phone, + "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, + "test_id": ctrl.test_id, + "lab_location": ctrl.lab_location, + "lab_email": ctrl.lab_email, + "lab_address": ctrl.lab_address, + "lab_phone": ctrl.lab_phone + }; + $http.post(testapiApiUrl + "/cvp/applications", data).then(function(resp) { + if (resp.data.code && resp.data.code != 0) { + alert(resp.data.msg); + return; } - } + getApplication(); + }, function(error) { + }); + } - ctrl.cancelSubmit = function(){ - ngDialog.close(); - } + ctrl.openConfirmModal = function() { + var resp = confirm("Are you sure to submit?"); + if (resp) { + ctrl.submitForm(); + } + } + + ctrl.cancelSubmit = function() { + ngDialog.close(); + } - ctrl.updatePage = function(){ + ctrl.updatePage = function() { getApplication(); - } + } - ctrl.deleteApp = function(id){ - var resp = confirm('Are you sure to delete this application?'); - if (!resp) - return; + ctrl.deleteApp = function(id) { + var resp = confirm('Are you sure to delete this application?'); + if (!resp) + return; - var delUrl = testapiApiUrl + "/cvp/applications/" + id; - $http.delete(delUrl) - .then( function(ret) { - if(ret.data.code && ret.data.code != 0) { + var delUrl = testapiApiUrl + "/cvp/applications/" + id; + $http.delete(delUrl).then(function(ret) { + if (ret.data.code && ret.data.code != 0) { alert(ret.data.msg); return; - } - getApplication(); - }); + } + getApplication(); + }); } - 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; - ctrl.totalItems = response.data.pagination.total_pages* ctrl.itemsPerPage; - ctrl.currentPage = response.data.pagination.current_page; - ctrl.numPages = response.data.pagination.total_pages; - }, function(error){ - }); - } - - init(); + 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; + ctrl.totalItems = response.data.pagination.total_pages * ctrl.itemsPerPage; + ctrl.currentPage = response.data.pagination.current_page; + ctrl.numPages = response.data.pagination.total_pages; + }, function(error) { + }); + } + + init(); } + })(); diff --git a/3rd_party/static/testapi-ui/components/application/logo-request b/3rd_party/static/testapi-ui/components/application/logo-request deleted file mode 100644 index c7bb109..0000000 --- a/3rd_party/static/testapi-ui/components/application/logo-request +++ /dev/null @@ -1,1417 +0,0 @@ - - - - - - - - - - Logo Request » OpenStack Open Source Cloud Computing Software - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-

-

Join the global OpenStack community for use cases & training at the OpenStack Summit Sydney, November 6-8     - Register now -

-
-
- - - - - - -
- -
- -
-
- - -

Request information on OpenStack trademark licensing

-

If you plan to offer an OpenStack-related product or service using a trademark or brand that includes an OpenStack mark (e.g. logo or the word OpenStack), you are required to apply for and obtain a trademark license. We’ve created a family of logos and a set of standards specifically for this purpose. Once we understand more about your product or service, we can determine which (if any) logo program it falls under, and send you the appropriate license for signature.  

- -
- - - - - -
- - -
- -
- -
- - - -
- - -
- -
- -
- - - -
- - - - - -
- -
- -
- - - -
- - -
- -
-
    - - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - - -
-
- - - -
- - -
- -
- - - - -
- - -
- - - - -
- -
- -
- - - -
- - -
- -
- -
- -
- -
- - - -
- - -
- -
- -
- -
- - - -
- - - If your proposed product name includes the OpenStack word mark, it will need to be approved as part of the licensing process.

- -
- -
- -
- -
- - - -
- - -
- -
-
    - - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - - -
-
- - - -
- - -
- -
-
    - - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - - -
-
- - - -
- - -
- -
-
    - - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - -
  • - - -
  • - - -
-
- - - -
- - -
- - - - -
- - -
- -
- -
- - - -
- - - - - -
-
- - -
- - - - - - -
- - -
- - - - -
- -
- -
-
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/3rd_party/static/testapi-ui/components/application/modal/confirmModal.html b/3rd_party/static/testapi-ui/components/application/modal/confirmModal.html index 11c34c5..fddb7fb 100644 --- a/3rd_party/static/testapi-ui/components/application/modal/confirmModal.html +++ b/3rd_party/static/testapi-ui/components/application/modal/confirmModal.html @@ -18,8 +18,8 @@
- - + +
diff --git a/3rd_party/static/testapi-ui/components/directory/directory.html b/3rd_party/static/testapi-ui/components/directory/directory.html index 3be13d4..b48e90d 100644 --- a/3rd_party/static/testapi-ui/components/directory/directory.html +++ b/3rd_party/static/testapi-ui/components/directory/directory.html @@ -22,7 +22,7 @@ {{ prod.description}} {{ prod.ovp_category}} {{ prod.ovp_version}} - {{ prod.product_documentation}} + {{ prod.product_documentation}} {{ prod.sut_version}} {{ prod.sut_hw_version}} diff --git a/3rd_party/static/testapi-ui/components/guidelines/partials/testListModal.html b/3rd_party/static/testapi-ui/components/guidelines/partials/testListModal.html index 0b572c5..c8dae33 100644 --- a/3rd_party/static/testapi-ui/components/guidelines/partials/testListModal.html +++ b/3rd_party/static/testapi-ui/components/guidelines/partials/testListModal.html @@ -3,7 +3,7 @@

Test List ({{modal.testListCount}})

Use this test list with - testapi-client + testapi-client to run only tests in the {{modal.version}} OpenStack Powered™ guideline from capabilities with the following statuses:

@@ -39,7 +39,7 @@