Fix a bug with analytics allowed by default

This commit is contained in:
Amauri CHAMPEAUX 2021-03-19 10:02:31 +01:00
parent e89960fdd5
commit cb221b2071
1 changed files with 3 additions and 1 deletions

View File

@ -952,10 +952,11 @@ var tarteaucitron = {
} }
// check if all services are allowed // check if all services are allowed
var sumToRemove = 0;
for (index = 0; index < sum; index += 1) { for (index = 0; index < sum; index += 1) {
if (typeof s[tarteaucitron.job[index]].safeanalytic !== "undefined" && s[tarteaucitron.job[index]].safeanalytic === true) { if (typeof s[tarteaucitron.job[index]].safeanalytic !== "undefined" && s[tarteaucitron.job[index]].safeanalytic === true) {
sum -= 1; sumToRemove += 1;
continue; continue;
} }
@ -967,6 +968,7 @@ var tarteaucitron = {
nbAllowed += 1; nbAllowed += 1;
} }
} }
sum -= sumToRemove;
tarteaucitron.userInterface.css(c + 'DotGreen', 'width', ((100 / sum) * nbAllowed) + '%'); tarteaucitron.userInterface.css(c + 'DotGreen', 'width', ((100 / sum) * nbAllowed) + '%');
tarteaucitron.userInterface.css(c + 'DotYellow', 'width', ((100 / sum) * nbPending) + '%'); tarteaucitron.userInterface.css(c + 'DotYellow', 'width', ((100 / sum) * nbPending) + '%');