Add CSS colors count and a palette as offender

This commit is contained in:
Gaël Métais
2015-01-26 19:29:08 +01:00
parent 61c09a5b49
commit ed4ddc0a43
7 changed files with 154 additions and 10 deletions
+7
View File
@@ -143,6 +143,13 @@
<dom-tree tree="rule.offendersObj.tree"></dom-tree>
</div>
<div ng-if="policyName === 'cssColors' && rule.offendersObj.count > 0">
<p>This is the color palette, sized by total occurrences:</p>
<div class="colorPalette">
<div ng-repeat="offender in rule.offendersObj.palette" style="background-color: {{offender.color}}; width: {{offender.occurrences * 100 / rule.offendersObj.palette[0].occurrences}}%"><div>{{offender.color}} ({{offender.occurrences}} times)</div></div>
</div>
</div>
</div>
</div>