aboutsummaryrefslogtreecommitdiffstats
path: root/3rd_party/static/onap-ui/components/results/results.html
diff options
context:
space:
mode:
authorpkaralis <pkaralis@intracom-telecom.com>2018-12-06 00:43:12 +0200
committerPanagiotis Karalis <pkaralis@intracom-telecom.com>2019-03-20 15:28:23 +0200
commitd0bbf3b8952379883550c6eb2062476a6d15043e (patch)
tree106f65b223054077279bda7ff988a73bea314a34 /3rd_party/static/onap-ui/components/results/results.html
parent5f20495d6e3ec984c4e86fd76399ddf0d042b336 (diff)
Enable Web Portal for ONAP results
The web portal needs to be able to read test results of the ONAP compliance program and display them. In order for the above goal to be achieved, the following two parts should be impacted: 1- A new front-end should be prepared in order to handle and display the results 2- The REST API should be extended in order to support the aforementioned operation. JIRA: DOVETAIL-669 Change-Id: I36bbb6e602a67020d7e27aedbfc776f5cf4f3dc3 Signed-off-by: pkaralis <pkaralis@intracom-telecom.com> Co-Authored-By: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to '3rd_party/static/onap-ui/components/results/results.html')
-rw-r--r--3rd_party/static/onap-ui/components/results/results.html168
1 files changed, 168 insertions, 0 deletions
diff --git a/3rd_party/static/onap-ui/components/results/results.html b/3rd_party/static/onap-ui/components/results/results.html
new file mode 100644
index 0000000..ce43036
--- /dev/null
+++ b/3rd_party/static/onap-ui/components/results/results.html
@@ -0,0 +1,168 @@
+<div class="container-fluid common-main-container">
+ <h3>{{ctrl.pageHeader}}</h3>
+ <p>{{ctrl.pageParagraph}}</p>
+ <form class="form-inline" ng-show="ctrl.isUserResults">
+ <h4>Upload Results
+ <i class="glyphicon glyphicon-question-sign opnfv-blue"
+ uib-tooltip="results file is logs.xxx.tar.gz under your dovetail installation path"></i>
+ </h4>
+ <div class="form-group col-m-3">
+ <input class="form-contrl btn btn-success-cust cvp-btn medium accent-color regular-button" type="file"
+ file-model="resultFile">
+ </div>
+ <div class="form-group col-m-3">
+ <a class="btn btn-success-cust cvp-btn medium accent-color regular-button" ng-click="ctrl.uploadFile()">
+ <span>upload result</span>
+ </a>
+ </div>
+ <div>
+ <label>{{ctrl.uploadState}}</label>
+ </div>
+ </form>
+ <div class="row" style="margin-bottom: 24px;"></div>
+ <div cg-busy="{promise:ctrl.authRequest,message:'Loading'}"></div>
+ <div cg-busy="{promise:ctrl.resultsRequest,message:'Loading'}"></div>
+
+ <div ng-show="ctrl.data" class="results-table" style="width: 100%; overflow-x: scroll;">
+ <table ng-data="ctrl.data.result" ng-show="ctrl.data" class="table table-striped table-hover">
+ <thead>
+ <tr>
+ <th>Upload Date</th>
+ <th>Test ID</th>
+ <th>ONAP Version</th>
+ <th>Modeling Language</th>
+ <th>Owner</th>
+ <th>File Name</th>
+ <th>Label</th>
+ <th>Status</th>
+ <th>Log</th>
+ <th>Application</th>
+ <th>Review Status</th>
+ <th class="col-md-2">Operation</th>
+ <th class="col-md-2">Share List</th>
+ </tr>
+ </thead>
+
+ <tbody style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
+ <tr ng-repeat="(index, result) in ctrl.data.tests">
+ <td>{{ result.upload_date | limitTo:19}}</td>
+ <td>
+ <a uib-tooltip="{{ result.id }}" tooltip-placement="top" tooltip-append-to-body="true"
+ ng-click="ctrl.gotoResultDetail(result.id, result._id)">{{ result.id | limitTo:8 }}</a>
+ </td>
+ <td>{{ result.version || "2019.04" }}</td>
+ <td>{{ result.vnf_type.toUpperCase() }}</td>
+ <td>{{ result.owner }}</td>
+ <td>{{ result.filename || "None"}}</td>
+ <td>
+ <div class="popover-wrapper">
+ <a editable-theme="bs3" onbeforesave="ctrl.changeLabel(result, 'label', $data)"
+ editable-text="result.label">{{ result.label || "None" }}</a>
+ </div>
+ </td>
+ <td>{{ result.status }}</td>
+ <td><a ng-click="ctrl.downloadLogs(result.id)">logs</a></td>
+ <td>
+ <a ng-if="result.status !='private'" ng-click="ctrl.openApplicationView(result)">View Application</a>
+ <div ng-if="result.status == 'private'">Not created</div>
+ </td>
+ <td><a ng-if="result.status !='private'" ng-click="ctrl.openReviewsModal(result.id)">View Reviews</a>
+ <div ng-if="result.status == 'private'"></div>
+ </td>
+ <td>
+ <div class="btn-group" uib-dropdown>
+ <a id="single-button" type="button" class="btn btn-success-cust cvp-btn medium accent-color regular-button"
+ uib-dropdown-toggle>
+ Operation<span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button">
+ <li role="menuitem" ng-if="auth.currentUser.openid == result.owner && ctrl.isUserResults"
+ class="menu-item menu-item-type-post_type menu-item-object-page">
+ <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"
+ 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>
+ </li>
+ <li role="menuitem"
+ ng-if="auth.currentUser.role.indexOf('reviewer') != -1 && !ctrl.isUserResults"
+ class="menu-item menu-item-type-post_type menu-item-object-page">
+ <a ng-class="{'hide': (result.voted == 'true') || (result.status != 'review')}"
+ ng-click="ctrl.toApprove(result)">approve</a>
+ </li>
+ <li role="menuitem"
+ ng-if="auth.currentUser.role.indexOf('reviewer') != -1 && !ctrl.isUserResults"
+ class="menu-item menu-item-type-post_type menu-item-object-page">
+ <a ng-class="{'hide': (result.voted == 'true') || (result.status != 'review')}"
+ ng-click="ctrl.toDisapprove(result)">not approve</a>
+ </li>
+ <li role="menuitem"
+ ng-if="auth.currentUser.role.indexOf('reviewer') != -1 && !ctrl.isUserResults"
+ class="menu-item menu-item-type-post_type menu-item-object-page">
+ <a ng-class="{'hide': (result.voted == 'false') || (result.status != 'review')}"
+ ng-click="ctrl.toUndo(result)">undo</a>
+ </li>
+ <li role="menuitem" ng-if="auth.currentUser.openid == result.owner && ctrl.isUserResults"
+ class="menu-item menu-item-type-post_type menu-item-object-page">
+ <a ng-click="ctrl.openSharedModal(result)">share with</a>
+ </li>
+ <li role="menuitem" ng-if="auth.currentUser.openid == result.owner && ctrl.isUserResults"
+ class="menu-item menu-item-type-post_type menu-item-object-page">
+ <a ng-click="ctrl.deleteTest(result._id)">delete</a>
+ </li>
+ </ul>
+ </div>
+ </td>
+ <td>
+ <div class="btn-group" uib-dropdown>
+ <a id="single-button-two" type="button"
+ class="btn btn-success-cust cvp-btn medium accent-color regular-button" style="width: 130px;"
+ uib-dropdown-toggle>
+ Share List<span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button-two"
+ style="min-width: 200%;">
+ <li class="menu-item menu-item-type-post_type menu-item-object-page" role="menuitem"
+ ng-repeat="share in result.shared track by $index">
+ <span>
+ {{ share }}
+ <i ng-if="auth.currentUser.openid == result.owner" class="pull-right glyphicon glyphicon-remove"
+ ng-click="ctrl.removeSharedUser(result, share)"></i>
+ </span>
+ </li>
+ </ul>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <div class="pages">
+ <uib-pagination
+ total-items="ctrl.totalItems"
+ ng-model="ctrl.currentPage"
+ items-per-page="ctrl.itemsPerPage"
+ max-size="ctrl.maxSize"
+ class="pagination-sm"
+ boundary-links="true"
+ rotate="false"
+ num-pages="ctrl.numPages"
+ ng-change="ctrl.update()">
+ </uib-pagination>
+ </div>
+ </div>
+</div>
+
+<div ng-show="ctrl.showError" class="alert alert-danger" role="alert">
+ <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
+ <span class="sr-only">Error:</span>
+ {{ctrl.error}}
+</div>
+
+
+<style>
+ .button-disabled {
+ pointer-events: none;
+ }
+</style>