Ver código fonte

Adjust scoring

Gaël Métais 4 anos atrás
pai
commit
7e9b12f818
2 arquivos alterados com 5 adições e 2 exclusões
  1. 4 1
      front/src/views/rule.html
  2. 1 1
      lib/metadata/scoreProfileGeneric.json

+ 4 - 1
front/src/views/rule.html

@@ -22,9 +22,12 @@
                 <span ng-if="rule.policy.isOkThreshold > rule.policy.isBadThreshold">or more</span>
                 to get the 100/100 score on this issue.
             </div>
-            <div class="okThreshold" ng-if="rule.globalScoreIfFixed > result.scoreProfiles.generic.globalScore && rule.globalScoreIfFixed > 0">
+            <div class="okThreshold" ng-if="rule.globalScoreIfFixed > result.scoreProfiles.generic.globalScore && rule.globalScoreIfFixed > 0 && result.scoreProfiles.generic.globalScore >= 0">
                 Your new global would increase by {{rule.globalScoreIfFixed - result.scoreProfiles.generic.globalScore}} points ({{rule.globalScoreIfFixed}}/100).
             </div>
+            <div class="okThreshold" ng-if="rule.globalScoreIfFixed > result.scoreProfiles.generic.globalScore && rule.globalScoreIfFixed > 0 && result.scoreProfiles.generic.globalScore < 0">
+                Your new global would increase by {{rule.globalScoreIfFixed}} points ({{rule.globalScoreIfFixed}}/100).
+            </div>
             <div class="okThreshold" ng-if="rule.globalScoreIfFixed > result.scoreProfiles.generic.globalScore && rule.globalScoreIfFixed <= 0">
                 Your new global score would increase, but still not enough to reach 0/100. That's embarassing...
             </div>

+ 1 - 1
lib/metadata/scoreProfileGeneric.json

@@ -15,7 +15,7 @@
             "policies": {
                 "totalRequests": 2,
                 "domains": 3,
-                "notFound": 3,
+                "notFound": 2,
                 "identicalFiles": 2,
                 "emptyRequests": 3,
                 "lazyLoadableImagesBelowTheFold": 2,