New rule: oversized images (#276)

New rule: oversized images
This commit is contained in:
Gaël Métais
2019-01-13 17:18:03 +05:30
committed by GitHub
parent fa216dddd5
commit 8ffab2ae70
10 changed files with 200 additions and 6 deletions
+2 -2
View File
@@ -261,8 +261,8 @@
}
.smallPreview {
display: block;
max-height: 4em;
max-width: 8em;
max-height: 6em;
max-width: 16em;
border: 1px solid #000;
margin: 1em auto 0.2em;
}
+2 -2
View File
@@ -290,8 +290,8 @@
.smallPreview {
display: block;
max-height: 4em;
max-width: 8em;
max-height: 6em;
max-width: 16em;
border: 1px solid #000;
margin: 1em auto 0.2em;
}
+6
View File
@@ -137,6 +137,12 @@
<url-link url="offender" max-length="100"></url-link>
</div>
<div ng-if="policyName === 'imagesTooLarge'">
<img ng-src="{{offender.url | https}}" class="smallPreview checker"></img>
<div>{{offender.width}}x{{offender.height}}</div>
<url-link url="offender.url" max-length="100"></url-link>
</div>
<div ng-if="policyName === 'notFound' || policyName === 'emptyRequests' || policyName === 'closedConnections' || policyName === 'multipleRequests' || policyName === 'cachingDisabled' || policyName === 'cachingNotSpecified'">
<url-link url="offender" max-length="100"></url-link>
</div>