
With an updated eslint version and the addition of eslint-config-openstack and eslint-plugin-angular, there are several more stylistic guidelines to follow. However, this is what other OpenStack angular projects follow such as Horizon. Some notable changes are: * Wrapped javascript content in anonymous functions. This is a safeguard to keep the code from conflicting with other variables with the same name in other scripts on the same page. * Explicitly inject dependencies and have controllers, factories, etc as explicitly declared functions. * Use angular "controller as" syntax instead of assigning variables to $scope. * Added eslint rule that requires JSDoc for every function declaration. Note these are mainly stylistic changes and all the functionality of RefStack should remain the same. Change-Id: I044b1f473d589681a2ae9d2704700dd85687cbb6
43 lines
1.8 KiB
HTML
43 lines
1.8 KiB
HTML
<!--
|
|
HTML for capabilites page when the Defcore capabilities schema is 1.3.
|
|
This expects the JSON data of the capability file to be stored in scope
|
|
variable 'capabilities'.
|
|
-->
|
|
|
|
<ol ng-show="ctrl.capabilities" class="capabilities">
|
|
<li class="capability-list-item" ng-repeat="capability in ctrl.capabilities.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 />
|
|
Project: {{capability.project | capitalize}}<br />
|
|
<a ng-click="showAchievements = !hshowAchievements">Achievements ({{capability.achievements.length}})</a><br />
|
|
<ol 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 collapse="!showTests">
|
|
<li ng-repeat="(testName, testDetails) in capability.tests">
|
|
<span ng-class="{'glyphicon glyphicon-flag text-warning': testDetails.flagged}" title="{{testDetails.flagged.reason}}"></span>
|
|
{{testName}}
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ol>
|
|
|
|
<div ng-show="ctrl.capabilities" class="criteria">
|
|
<hr>
|
|
<h4><a ng-click="showCriteria = !showCriteria">Criteria</a></h4>
|
|
<div collapse="showCriteria">
|
|
<ul>
|
|
<li ng-repeat="(key, criterion) in ctrl.capabilities.criteria">
|
|
<span class="criterion-name">{{criterion.name}}</span><br />
|
|
<em>{{criterion.Description}}</em><br />
|
|
Weight: {{criterion.weight}}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|