diff options
author | grakiss <grakiss.wanglei@huawei.com> | 2017-09-28 03:47:54 -0400 |
---|---|---|
committer | grakiss <grakiss.wanglei@huawei.com> | 2017-09-28 05:15:01 -0400 |
commit | 0cf6b232ac9cf128ee9183a27c08f4f74ab2e2e6 (patch) | |
tree | 7be233b8f8f65fa968c7b93f1d1e75b691952ed9 /cvp/3rd_party/static/testapi-ui/components/guidelines/partials | |
parent | 63c2e2aa4b8d86349a767f611123ceafc19fa6d6 (diff) |
add api&web services for cvp
JIRA: DOVETAIL-512
add api&web services for cvp
Change-Id: I9ef9525e980fe61dc3108035ef9a3ff8783b2697
Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'cvp/3rd_party/static/testapi-ui/components/guidelines/partials')
-rw-r--r-- | cvp/3rd_party/static/testapi-ui/components/guidelines/partials/guidelineDetails.html | 90 | ||||
-rw-r--r-- | cvp/3rd_party/static/testapi-ui/components/guidelines/partials/testListModal.html | 46 |
2 files changed, 136 insertions, 0 deletions
diff --git a/cvp/3rd_party/static/testapi-ui/components/guidelines/partials/guidelineDetails.html b/cvp/3rd_party/static/testapi-ui/components/guidelines/partials/guidelineDetails.html new file mode 100644 index 00000000..05a1ef5c --- /dev/null +++ b/cvp/3rd_party/static/testapi-ui/components/guidelines/partials/guidelineDetails.html @@ -0,0 +1,90 @@ +<!-- +HTML for guidelines page for all OpenStack Powered (TM) guideline schemas +This expects the JSON data of the guidelines file to be stored in scope +variable 'guidelines'. +--> + +<h3 ng-show="ctrl.showMandatory">{{ctrl.data.mandatory.name}}</h3> +<div ng-repeat="area in ctrl.data.mandatory.value" ng-show="ctrl.showMandatory"> + <h4>{{area.area_name}}</h4> + <ol class="capabilities"> + <li class="capability-list-item" ng-repeat="api in area.value"> + <span class="capability-name">{{api.api_name}}</span><br /> + Area: <em>{{area.area_name}}</em><br /> + Status: <span>Mandatory</span><br /> + + <a ng-click="showTests = !showTests">Tests ({{api.value.length}})</a> + <ul uib-collapse="!showTests"> + <li ng-repeat="test in api.value"> + <span ng-class="{'glyphicon glyphicon-flag text-warning': capability.flagged.indexOf(test) > -1}"></span> + {{test}} + </li> + </ul> + </li> + </ol> +</div> + +<h3 ng-show="ctrl.showOptional">{{ctrl.data.optional.name}}</h3> +<div ng-repeat="area in ctrl.data.optional.value" ng-show="ctrl.showOptional"> + <h4>{{area.area_name}}</h4> + <ol class="capabilities"> + <li class="capability-list-item" ng-repeat="api in area.value"> + <span class="capability-name">{{api.api_name}}</span><br /> + Status: <span>Optional</span><br /> + + <a ng-click="showTests = !showTests">Tests ({{api.value.length}})</a> + <ul uib-collapse="!showTests"> + <li ng-repeat="test in api.value"> + <span ng-class="{'glyphicon glyphicon-flag text-warning': capability.flagged.indexOf(test) > -1}"></span> + {{test}} + </li> + </ul> + </li> + </ol> +</div> +<!-- +<ol ng-show="ctrl.data" class="capabilities"> + <li class="capability-list-item" ng-repeat="capability in ctrl.guidelines.capabilities | arrayConverter | filter:ctrl.filterStatus | orderBy:'id'"> + <span class="capability-name">{{capability.id}}</span><br /> + <em>{{capability.description}}</em><br /> + Status: <span class="{{ctrl.targetCapabilities[capability.id]}}">{{ctrl.targetCapabilities[capability.id]}}</span><br /> + <span ng-if="capability.project">Project: {{capability.project | capitalize}}<br /></span> + <a ng-click="showAchievements = !showAchievements">Achievements ({{capability.achievements.length}})</a><br /> + <ol uib-collapse="!showAchievements" class="list-inline"> + <li ng-repeat="achievement in capability.achievements"> + {{achievement}} + </li> + </ol> + + <a ng-click="showTests = !showTests">Tests ({{ctrl.getObjectLength(capability.tests)}})</a> + <ul uib-collapse="!showTests"> + <li ng-if="ctrl.guidelines.schema === '1.2'" ng-repeat="test in capability.tests"> + <span ng-class="{'glyphicon glyphicon-flag text-warning': capability.flagged.indexOf(test) > -1}"></span> + {{test}} + </li> + <li ng-if="ctrl.guidelines.schema > '1.2'" ng-repeat="(testName, testDetails) in capability.tests"> + <span ng-class="{'glyphicon glyphicon-flag text-warning': testDetails.flagged}" title="{{testDetails.flagged.reason}}"></span> + {{testName}} + <div class="test-detail" ng-if="testDetails.aliases"> + <strong>Aliases:</strong> + <ul><li ng-repeat="alias in testDetails.aliases">{{alias}}</li></ul> + </div> + </li> + </ul> + </li> +</ol> + +<div ng-show="ctrl.guidelines" class="criteria"> + <hr> + <h4><a ng-click="showCriteria = !showCriteria">Criteria</a></h4> + <div uib-collapse="showCriteria"> + <ul> + <li ng-repeat="(key, criterion) in ctrl.guidelines.criteria"> + <span class="criterion-name">{{criterion.name}}</span><br /> + <em>{{criterion.Description}}</em><br /> + Weight: {{criterion.weight}} + </li> + </ul> + </div> +</div> +--> diff --git a/cvp/3rd_party/static/testapi-ui/components/guidelines/partials/testListModal.html b/cvp/3rd_party/static/testapi-ui/components/guidelines/partials/testListModal.html new file mode 100644 index 00000000..5b1d698d --- /dev/null +++ b/cvp/3rd_party/static/testapi-ui/components/guidelines/partials/testListModal.html @@ -0,0 +1,46 @@ +<div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" aria-hidden="true" ng-click="modal.close()">×</button> + <h4>Test List ({{modal.testListCount}})</h4> + <p>Use this test list with <a title="testapi-client" target="_blank"href="https://github.com/openstack/testapi-client">testapi-client</a> + to run only tests in the {{modal.version}} OpenStack Powered™ guideline from capabilities with the following statuses: + </p> + <ul class="list-inline"> + <li class="required" ng-if="modal.status.required"> Required</li> + <li class="advisory" ng-if="modal.status.advisory"> Advisory</li> + <li class="deprecated" ng-if="modal.status.deprecated"> Deprecated</li> + <li class="removed" ng-if="modal.status.removed"> Removed</li> + </ul> + <div class="checkbox checkbox-test-list"> + <label><input type="checkbox" ng-model="modal.aliases" ng-change="modal.updateTestListString()">Aliases</label> + <span class="glyphicon glyphicon-info-sign info-hover" aria-hidden="true" + title="Include test aliases as tests may have been renamed over time. It does not hurt to include these."></span> + + <label><input type="checkbox" ng-model="modal.flagged" ng-change="modal.updateTestListString()">Flagged</label> + <span class="glyphicon glyphicon-info-sign info-hover" aria-hidden="true" + title="Include flagged tests."> + </span> + </div> + <p ng-hide="modal.error"> Alternatively, get the test list directly from the API on your CLI:</p> + <code ng-hide="modal.error">wget "{{modal.testListUrl}}" -O {{modal.version}}-test-list.txt</code> + </div> + <div class="modal-body tests-modal-content"> + <div cg-busy="{promise:modal.testListRequest,message:'Loading'}"></div> + <div ng-show="modal.error" class="alert alert-danger" role="alert"> + <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> + <span class="sr-only">Error:</span> + {{modal.error}} + </div> + <div class="form-group"> + <textarea class="form-control" rows="16" id="tests" wrap="off">{{modal.testListString}}</textarea> + </div> + </div> + <div class="modal-footer"> + <a target="_blank" href="{{modal.testListUrl}}" download="{{modal.version + '-test-list.txt'}}"> + <button class="btn btn-primary" ng-if="modal.testListCount > 0" type="button"> + Download + </button> + </a> + <button class="btn btn-primary" type="button" ng-click="modal.close()">Close</button> + </div> +</div> |