Bug #12643
closedCompliance bar appears partially white in some graphes
Description
In nodes list and dashboard, missing values sometimes appear as non-hoverable white.
It does not affect all nodes, no idea how/why.
Seen on Firefox 52 ESR with 4.3.1.
No error in console, cache cleared.
[Edit] it can happen anywhere (compliance bar on rule list, on node list, or even in home page.
Updated by Alexis Mousset over 6 years ago
Seems to fix itself after some time (maybe a webapp restart).
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.3.2 to 410
Updated by François ARMAND over 6 years ago
- Subject changed from Missing appears as white is some compliance graphs to Compliance bar partially appears as white in some graphe
- Description updated (diff)
- Target version changed from 410 to 4.1.13
We can reproduce it in homepage, on Rudder 4.1, by inputing the following value to `homePage` js function:
homePage( [0.0, 0.0, 63.95, 0.96, 0.08, 0.0, 14.06, 20.15, 0.5, 0.0, 0.29, 0.02, 0.0, 0.0] , 62 , {"labels": ["Good (> 75%)", "Average (> 50%)", "Poor (< 50%)"] , "values": [4, 1, 2] , "colors": ["#9bc832", "#f0ad4e", "#c9302c"] } , {"Poor (< 50%)": "#c9302c", "Average (> 50%)": "#f0ad4e", "Good (> 75%)": "#9bc832"} , {"pending": null, "active": 7} );
So it must be a problem in the bar algorithm.
Updated by François ARMAND over 6 years ago
- Subject changed from Compliance bar partially appears as white in some graphe to Compliance bar appears partially white in some graphes
Updated by François ARMAND over 6 years ago
- Status changed from New to In progress
- Assignee changed from Raphael GAUTHIER to François ARMAND
Updated by François ARMAND over 6 years ago
- Status changed from In progress to New
- Assignee changed from François ARMAND to Raphael GAUTHIER
The problem is that the last bar is too large to be contained in the bar and goes on line.
It is because we are using float to calculate a number of pixel, and float are the worst thing ever. I mean, we must only use algorithme that work with int. If it does not work with int, it will lead to that kind of problems (or worse: #10773).
Updated by François ARMAND over 6 years ago
Actually, the problem is perhaps because "totalSmallBarsPx" in getProgressBars is always 0, even if there is bar with min width.
Updated by François ARMAND over 6 years ago
So, for the algo does not work with the example.
We just are NOT ALLOWED to have that wrong. So, this one is of top importance to correct.
But I want in the correction:
- a clear separation of the calculation and the building of bars. IE I want a method that take in input the array of value from the backend, and give as output the array of segment in pixels or percent and the other details;
- UNIT TESTS. I want unit test that demonstrate that the sum is always 100, that the rounding are ok given our will, etc. I don't care if the unit tests are run by the jvm/longhorn, I do want unit tests. That's mandatory.
Updated by François ARMAND over 6 years ago
- Related to Bug #10773: Rounding error in compliance bar can hide error with very small percent added
Updated by François ARMAND over 6 years ago
#10773 may be due to that one, if the compliance is almost 100% OK, the last segment of the bar is small but goes to the following line, maybe we don't notice the missing pixel in all the green.
Updated by François ARMAND over 6 years ago
- Status changed from New to Pending technical review
- Assignee changed from Raphael GAUTHIER to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/1942
Updated by François ARMAND over 6 years ago
- Status changed from Pending technical review to New
- Pull Request deleted (
https://github.com/Normation/rudder/pull/1942)
Updated by Vincent MEMBRÉ over 6 years ago
- Status changed from New to In progress
Updated by Vincent MEMBRÉ over 6 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Vincent MEMBRÉ to François ARMAND
- Pull Request set to https://github.com/Normation/rudder/pull/1944
Updated by Vincent MEMBRÉ over 6 years ago
- Assignee changed from François ARMAND to Raphael GAUTHIER
Updated by Vincent MEMBRÉ over 6 years ago
- Assignee changed from Raphael GAUTHIER to François ARMAND
Updated by Rudder Quality Assistant over 6 years ago
- Assignee changed from François ARMAND to Vincent MEMBRÉ
Updated by Vincent MEMBRÉ over 6 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|8c2abadf63d53920505dd63a729f31e069f8bd0f.
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.13 to 4.1.12
Updated by Benoît PECCATTE over 6 years ago
- Status changed from Pending release to Released
Updated by François ARMAND almost 4 years ago
- Related to Bug #18912: White empty segment in compliance bar due to computation bug added