aboutsummaryrefslogtreecommitdiffstats
path: root/3rd_party/static/onap-ui/components
diff options
context:
space:
mode:
Diffstat (limited to '3rd_party/static/onap-ui/components')
-rw-r--r--3rd_party/static/onap-ui/components/application/application.html14
-rw-r--r--3rd_party/static/onap-ui/components/application/applicationController.js20
-rw-r--r--3rd_party/static/onap-ui/components/directory/directory.html9
-rw-r--r--3rd_party/static/onap-ui/components/home/home.html19
-rw-r--r--3rd_party/static/onap-ui/components/logout/logout.html9
-rw-r--r--3rd_party/static/onap-ui/components/profile/profile.html9
-rw-r--r--3rd_party/static/onap-ui/components/results-report/partials/reportDetails.html9
-rw-r--r--3rd_party/static/onap-ui/components/results-report/resultsReport.html11
-rw-r--r--3rd_party/static/onap-ui/components/results-report/resultsReportController.js62
-rw-r--r--3rd_party/static/onap-ui/components/results/modal/applicationModal.html9
-rw-r--r--3rd_party/static/onap-ui/components/results/modal/applicationView.html9
-rw-r--r--3rd_party/static/onap-ui/components/results/modal/reviewsModal.html9
-rw-r--r--3rd_party/static/onap-ui/components/results/modal/sharedModal.html9
-rw-r--r--3rd_party/static/onap-ui/components/results/results.html12
-rw-r--r--3rd_party/static/onap-ui/components/results/resultsController.js74
15 files changed, 247 insertions, 37 deletions
diff --git a/3rd_party/static/onap-ui/components/application/application.html b/3rd_party/static/onap-ui/components/application/application.html
index 2238ca4..4cf956f 100644
--- a/3rd_party/static/onap-ui/components/application/application.html
+++ b/3rd_party/static/onap-ui/components/application/application.html
@@ -1,3 +1,12 @@
+<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
<div class="container-fluid common-main-container">
<div class="results-table" style="margin-top: 30px; overflow: scroll;">
<table class="table table-striped table-hover">
@@ -56,7 +65,8 @@
</div>
</script>
<tbody style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
- <tr ng-if="results.status != 'review'" ng-repeat="app in ctrl.applications">
+ <tr ng-if="auth.currentUser.role.indexOf('administrator') != -1"
+ ng-repeat="app in ctrl.applications">
<td>{{ app.creation_date | limitTo: 10 }}</td>
<td>{{ app.owner }}</td>
<td>{{ app.onap_version }}</td>
@@ -80,7 +90,7 @@
<i ng-if="app.lab_location != 'internal'" class="glyphicon glyphicon-info-sign opnfv-blue"></i>
</td>
<td>
- <a ng-click="ctrl.toggleApproveApp(app._id, 'true')" class="badge badge-info"
+ <a ng-click="ctrl.toggleApproveApp(app._id, 'true', app.owner)" class="badge badge-info"
ng-if="app.approved == 'false'"
data-toggle="tooltip" title="Approve Application">
<i class="glyphicon glyphicon-ok" ></i>
diff --git a/3rd_party/static/onap-ui/components/application/applicationController.js b/3rd_party/static/onap-ui/components/application/applicationController.js
index 094ffdc..134b002 100644
--- a/3rd_party/static/onap-ui/components/application/applicationController.js
+++ b/3rd_party/static/onap-ui/components/application/applicationController.js
@@ -20,17 +20,28 @@
.controller('ApplicationController', ApplicationController);
ApplicationController.$inject = [
- '$http', '$stateParams', '$window', '$sce',
+ '$http', '$state', '$stateParams', '$window', '$sce',
'$uibModal', 'testapiApiUrl', 'raiseAlert', 'ngDialog', '$scope'
];
/**
*/
- function ApplicationController($http, $stateParams, $window, $sce,
+ function ApplicationController($http, $state, $stateParams, $window, $sce,
$uibModal, testapiApiUrl, raiseAlert, ngDialog, $scope) {
var ctrl = this;
+ /** Check to see if this page should display community results. */
+ ctrl.isAdministrator = $scope.auth.currentUser.role.indexOf('administrator') != -1;
+ // Should only be on user-results-page if authenticated.
+ if (!$scope.auth.isAuthenticated) {
+ $state.go('home');
+ }
+ // Should only be on applications if administrator
+ if (!ctrl.isAdministrator) {
+ $state.go('home');
+ }
+
function init() {
ctrl.applications = [];
@@ -65,7 +76,7 @@
});
}
- ctrl.toggleApproveApp = function(id, approved) {
+ ctrl.toggleApproveApp = function(id, approved, owner) {
if (approved === 'true') {
var text = 'Are you sure you want to approve this application?';
} else {
@@ -80,6 +91,7 @@
var data = {};
data['item'] = 'approved';
data['approved'] = approved;
+ data['owner'] = owner;
$http.put(updateUrl, JSON.stringify(data), {
transformRequest: angular.identity,
@@ -95,7 +107,7 @@
}
function getApplication() {
- $http.get(testapiApiUrl + "/onap/cvp/applications?page=" + ctrl.currentPage + "&signed&per_page=" + ctrl.itemsPerPage).then(function(response) {
+ $http.get(testapiApiUrl + "/onap/cvp/applications?page=" + ctrl.currentPage + "&signed&per_page=" + ctrl.itemsPerPage + "&applications").then(function(response) {
ctrl.applications = response.data.applications;
ctrl.totalItems = response.data.pagination.total_pages * ctrl.itemsPerPage;
ctrl.currentPage = response.data.pagination.current_page;
diff --git a/3rd_party/static/onap-ui/components/directory/directory.html b/3rd_party/static/onap-ui/components/directory/directory.html
index 4a04bd7..54bc90d 100644
--- a/3rd_party/static/onap-ui/components/directory/directory.html
+++ b/3rd_party/static/onap-ui/components/directory/directory.html
@@ -1,3 +1,12 @@
+<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
<div class="container-fluid common-main-container">
<h3>ONAP Verified Product Directory</h3>
<div>
diff --git a/3rd_party/static/onap-ui/components/home/home.html b/3rd_party/static/onap-ui/components/home/home.html
index 1c1490d..ca58b0a 100644
--- a/3rd_party/static/onap-ui/components/home/home.html
+++ b/3rd_party/static/onap-ui/components/home/home.html
@@ -1,3 +1,12 @@
+<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
<div class="container-fluid">
<div class="row">
<div class="col-md-2 home-category" ng-style="{'height': ctrl.height}">
@@ -13,7 +22,7 @@
<div id="collapseTwo" class="panel-collapse collapse">
<div class="panel-body">
<div>
- <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/userguide/testing_guide.html"
+ <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/userguide/vnf_test_guide.html"
target="_blank" rel="noopener">OVP / Dovetail User Guide&nbsp;
<span class="glyphicon glyphicon-new-window" aria-hidden="true"></span>
</a>
@@ -98,18 +107,20 @@
<a target="_blank" rel="noopener" href="https://www.lfnetworking.org/OVP">OPNFV Verification Program (OVP) page</a>
for more information</p></li>
<li><p class="home-content-text">
- From the home page, Submit the Participation Form</p></li>
+ From the home page, submit the
+ <a target="_blank" rel="noopener" href="https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=034ffa32-3c2d-4a78-b2ed-af63c3acf192&env=na3-eu1&v=2">
+ Participation Form</a></p></li>
<li><p class="home-content-text">
Follow the step-by-step
instructions in the doc:
- <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/certificationworkflow/index.html">OVP
+ <a target="_blank" rel="noopener" href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/certificationworkflow/index.html">OVP
Workflow</a></p></li>
<li><p class="home-content-text">
Use this portal to upload your VNF test results when
ready</p></li>
</ul>
<p class="home-content-text" style="padding-bottom: 40px;">
- Please send any questions to <a href="mailto:verified@opnfv.org">verified@opnfv.org</a>.
+ Please send any questions to <a href="mailto:ovp-support@lfnetworking.org">ovp-support@lfnetworking.org</a>.
</p>
</div>
</div>
diff --git a/3rd_party/static/onap-ui/components/logout/logout.html b/3rd_party/static/onap-ui/components/logout/logout.html
index 38a5c36..135784e 100644
--- a/3rd_party/static/onap-ui/components/logout/logout.html
+++ b/3rd_party/static/onap-ui/components/logout/logout.html
@@ -1 +1,10 @@
+<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
<div cg-busy="{promise:ctrl.redirectWait,message:'Logging you out...'}"></div>
diff --git a/3rd_party/static/onap-ui/components/profile/profile.html b/3rd_party/static/onap-ui/components/profile/profile.html
index cb73335..fa633d5 100644
--- a/3rd_party/static/onap-ui/components/profile/profile.html
+++ b/3rd_party/static/onap-ui/components/profile/profile.html
@@ -1,3 +1,12 @@
+<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
<div class="container-fluid common-main-container">
<h3>User profile</h3>
<div cg-busy="{promise:ctrl.authRequest,message:'Loading'}"></div>
diff --git a/3rd_party/static/onap-ui/components/results-report/partials/reportDetails.html b/3rd_party/static/onap-ui/components/results-report/partials/reportDetails.html
index 3f3e9c9..20295ab 100644
--- a/3rd_party/static/onap-ui/components/results-report/partials/reportDetails.html
+++ b/3rd_party/static/onap-ui/components/results-report/partials/reportDetails.html
@@ -1,4 +1,13 @@
<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
+<!--
HTML for each accordion group that separates the status types on the results
report page.
-->
diff --git a/3rd_party/static/onap-ui/components/results-report/resultsReport.html b/3rd_party/static/onap-ui/components/results-report/resultsReport.html
index 38e602d..236ebfd 100644
--- a/3rd_party/static/onap-ui/components/results-report/resultsReport.html
+++ b/3rd_party/static/onap-ui/components/results-report/resultsReport.html
@@ -1,3 +1,12 @@
+<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
<div class="container-fluid common-main-container">
<h3>Test Run Results</h3>
@@ -15,8 +24,6 @@
<strong>Total: {{ctrl.statistics.total}}, Pass: {{ ctrl.statistics.pass}}, Rate: {{ ctrl.statistics.pass / ctrl.statistics.total * 100 | number:2 }}%</strong><br>
<strong>Mandatory Total: {{ctrl.statistics.mandatory.total}}, Pass: {{ ctrl.statistics.mandatory.pass }}, Rate: {{ ctrl.statistics.mandatory.pass / ctrl.statistics.mandatory.total * 100 | number:2 }}%</strong><br>
<strong>Optional Total: {{ctrl.statistics.optional.total}}, Pass: {{ ctrl.statistics.optional.pass }}, Rate: {{ ctrl.statistics.optional.pass / ctrl.statistics.optional.total * 100 | number:2 }}%</strong><br>
- <hr>
- <strong>{{ ctrl.validation }}</strong><br>
<div>
<hr>
diff --git a/3rd_party/static/onap-ui/components/results-report/resultsReportController.js b/3rd_party/static/onap-ui/components/results-report/resultsReportController.js
index 09601ad..1997c3d 100644
--- a/3rd_party/static/onap-ui/components/results-report/resultsReportController.js
+++ b/3rd_party/static/onap-ui/components/results-report/resultsReportController.js
@@ -78,24 +78,54 @@
}
function gotoResultLog(case_name) {
- var case_area = case_name.split(".")[0];
- var log_url = "/logs/" + ctrl.testId + "/results/";
- log_url += case_area + "_logs/" + case_name + ".out";
- var is_reachable = false;
-
- $.ajax({
- url: log_url,
- async: false,
- success: function (response) {
- is_reachable = true;
- },
- error: function (response) {
- alert("Log file could not be found. Please confirm this case has been executed successfully.");
+ function openFile(log_url) {
+ var is_reachable = false;
+
+ $.ajax({
+ url: log_url,
+ async: false,
+ success: function (response) {
+ is_reachable = true;
+ },
+ error: function (response) {
+ alert("Log file could not be found. Please confirm this case has been executed successfully.");
+ }
+ });
+
+ if (is_reachable == true) {
+ window.open(log_url);
}
- });
+ }
- if (is_reachable == true) {
- window.open(log_url);
+ var log_url = "/logs/" + ctrl.testId + "/results/";
+ if (ctrl.version == '2019.04') {
+ var case_area = case_name.split(".")[0];
+ log_url += case_area + "_logs/" + case_name + ".out";
+ openFile(log_url);
+ } else {
+ var test_url = testapiApiUrl + '/onap/tests/' + ctrl.innerId;
+ $http.get(test_url).then(function(test_resp){
+ var result_url = testapiApiUrl + '/results/' + test_resp.data.results[0];
+ $http.get(result_url).then(function(result_resp){
+ var keepGoing = true;
+ angular.forEach(result_resp.data.testcases_list, function(testcase, index) {
+ if (keepGoing == true) {
+ if (testcase.name == case_name) {
+ log_url += testcase.portal_key_file;
+ openFile(log_url);
+ keepGoing = false;
+ }
+ }
+ });
+ if (keepGoing == true) {
+ alert("Log file could not be found. Please confirm this case has been executed successfully.");
+ }
+ }, function(result_error) {
+ alert('Error when get result record');
+ });
+ }, function(test_error) {
+ alert('Error when get test record');
+ });
}
}
diff --git a/3rd_party/static/onap-ui/components/results/modal/applicationModal.html b/3rd_party/static/onap-ui/components/results/modal/applicationModal.html
index 0ca4b84..4d6f836 100644
--- a/3rd_party/static/onap-ui/components/results/modal/applicationModal.html
+++ b/3rd_party/static/onap-ui/components/results/modal/applicationModal.html
@@ -1,3 +1,12 @@
+<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
<div class="container-fluid common-main-container">
<div class="top-site-banner">
<div class="container">
diff --git a/3rd_party/static/onap-ui/components/results/modal/applicationView.html b/3rd_party/static/onap-ui/components/results/modal/applicationView.html
index 79341f8..d5e3a26 100644
--- a/3rd_party/static/onap-ui/components/results/modal/applicationView.html
+++ b/3rd_party/static/onap-ui/components/results/modal/applicationView.html
@@ -1,3 +1,12 @@
+<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
<div class="container-fluid common-main-container">
<div class="top-site-banner">
<div class="container">
diff --git a/3rd_party/static/onap-ui/components/results/modal/reviewsModal.html b/3rd_party/static/onap-ui/components/results/modal/reviewsModal.html
index c93d1ef..e3faa5b 100644
--- a/3rd_party/static/onap-ui/components/results/modal/reviewsModal.html
+++ b/3rd_party/static/onap-ui/components/results/modal/reviewsModal.html
@@ -1,3 +1,12 @@
+<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
<div class="container-fluid common-main-container">
<div class="top-site-banner">
<div class="container">
diff --git a/3rd_party/static/onap-ui/components/results/modal/sharedModal.html b/3rd_party/static/onap-ui/components/results/modal/sharedModal.html
index 021a355..a029aa5 100644
--- a/3rd_party/static/onap-ui/components/results/modal/sharedModal.html
+++ b/3rd_party/static/onap-ui/components/results/modal/sharedModal.html
@@ -1,3 +1,12 @@
+<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
<div>
<h4>Enter user name or email</h4>
<input type="text" ng-model="ctrl.userName">
diff --git a/3rd_party/static/onap-ui/components/results/results.html b/3rd_party/static/onap-ui/components/results/results.html
index ce43036..daa9ae4 100644
--- a/3rd_party/static/onap-ui/components/results/results.html
+++ b/3rd_party/static/onap-ui/components/results/results.html
@@ -1,3 +1,12 @@
+<!--
+ Copyright (c) 2019 opnfv.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
<div class="container-fluid common-main-container">
<h3>{{ctrl.pageHeader}}</h3>
<p>{{ctrl.pageParagraph}}</p>
@@ -81,7 +90,8 @@
<a ng-class="{'hide': result.status != 'review'}"
ng-click="ctrl.deleteApplication(result)">withdraw submit</a>
</li>
- <li role="menuitem" ng-if="auth.currentUser.openid == result.owner && ctrl.isUserResults"
+ <li role="menuitem"
+ ng-if="auth.currentUser.openid == result.owner && ctrl.isUserResults && auth.currentUser.role.indexOf('user') != -1"
class="menu-item menu-item-type-post_type menu-item-object-page">
<a ng-class="{'hide': result.status != 'private'}"
ng-click="ctrl.openApplicationModal(result)">submit to review</a>
diff --git a/3rd_party/static/onap-ui/components/results/resultsController.js b/3rd_party/static/onap-ui/components/results/resultsController.js
index d459495..e8187f3 100644
--- a/3rd_party/static/onap-ui/components/results/resultsController.js
+++ b/3rd_party/static/onap-ui/components/results/resultsController.js
@@ -257,21 +257,58 @@
"primary_business_email": ctrl.primary_business_email
};
- $http.post(testapiApiUrl + "/onap/cvp/applications", data).then(function(resp) {
- if (resp.data.code && resp.data.code != 0) {
- alert(resp.data.msg);
- return;
+ if (ctrl.company_name == null ||
+ ctrl.company_website == null ||
+ ctrl.primary_contact_name == null ||
+ ctrl.primary_phone_number == null ||
+ ctrl.primary_business_email== null ||
+ ctrl.xnf_version == null ||
+ ctrl.xnf_name == null ||
+ ctrl.xnf_description == null ||
+ ctrl.xnfd_id == null) {
+
+ alert('There are empty required fields in the application form');
+
+ } else if (ctrl.lab_location == 'third') {
+ if (ctrl.lab_name == null ||
+ ctrl.lab_email == null ||
+ ctrl.lab_address == null ||
+ ctrl.lab_phone == null) {
+
+ alert('There are empty required fields in the application form');
+
+ } else {
+ $http.post(testapiApiUrl + "/onap/cvp/applications", data).then(function(resp) {
+ if (resp.data.code && resp.data.code != 0) {
+ alert(resp.data.msg);
+ return;
+ }
+ toggleCheck(result, 'status', 'review');
+ }, function(error) {
+ /* do nothing */
+ });
}
- toggleCheck(result, 'status', 'review');
- }, function(error) {
- /* do nothing */
- });
+ } else {
+ $http.post(testapiApiUrl + "/onap/cvp/applications", data).then(function(resp) {
+ if (resp.data.code && resp.data.code != 0) {
+ alert(resp.data.msg);
+ return;
+ }
+ toggleCheck(result, 'status', 'review');
+ }, function(error) {
+ /* do nothing */
+ });
+ }
}
}, function(error) {
/* do nothing */
});
logo_name = file.name;
}
+
+ if (typeof file === 'undefined') {
+ alert('There are empty required fields in the application form');
+ }
ngDialog.close();
}
@@ -515,6 +552,7 @@
var start = $filter('date')(ctrl.startDate, 'yyyy-MM-dd');
var end = $filter('date')(ctrl.endDate, 'yyyy-MM-dd');
+ ctrl.PageName = null;
content_url += '?page=' + ctrl.currentPage;
content_url += '&per_page=' + ctrl.itemsPerPage;
if (start) {
@@ -525,6 +563,7 @@
}
if (ctrl.isUserResults) {
content_url += '&signed';
+ ctrl.PageName = 'MyResults';
} else {
content_url += '&status={"$ne":"private"}&review';
}
@@ -535,6 +574,25 @@
ctrl.totalItems = ctrl.data.pagination.total_pages * ctrl.itemsPerPage;
ctrl.currentPage = ctrl.data.pagination.current_page;
ctrl.numPages = ctrl.data.pagination.total_pages;
+ if (ctrl.PageName === 'MyResults') {
+ for (var i=0; i<data.tests.length; i++) {
+ if (data.tests[i].owner !== ctrl.currentUser) {
+ var sharing = false;
+ if (data.tests[i].shared !== null){
+ for (var j=0; j<data.tests[i].shared.length; j++) {
+ if (data.tests[i].shared[j] === ctrl.currentUser){
+ sharing = true;
+ }
+ }
+ }
+ if (sharing == false){
+ data.tests.splice(i,1);
+ i = i - 1;
+ }
+ }
+ }
+ ctrl.data = data;
+ }
}).error(function (error) {
ctrl.data = null;
ctrl.totalItems = 0;