Project

General

Profile

Bug #12643

Compliance bar appears partially white in some graphes

Added by Alexis MOUSSET 7 months ago. Updated 6 months ago.

Status:
Released
Priority:
N/A
Category:
Web - UI & UX
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

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.


Subtasks

Bug #12682: JS test templateReleasedVincent MEMBRÉ

Related issues

Related to Rudder - Bug #10773: Rounding error in compliance barNew

Associated revisions

Revision 8c2abadf (diff)
Added by Vincent MEMBRÉ 7 months ago

Fixes #12643: Compliance bar appears partially white in some graphes

History

#1 Updated by Alexis MOUSSET 7 months ago

Seems to fix itself after some time (maybe a webapp restart).

#2 Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 4.3.2 to 410

#3 Updated by François ARMAND 7 months 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.

#4 Updated by François ARMAND 7 months ago

  • Subject changed from Compliance bar partially appears as white in some graphe to Compliance bar appears partially white in some graphes

#5 Updated by François ARMAND 7 months ago

  • Status changed from New to In progress
  • Assignee changed from Raphael GAUTHIER to François ARMAND

#6 Updated by François ARMAND 7 months 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).

#7 Updated by François ARMAND 7 months ago

Actually, the problem is perhaps because "totalSmallBarsPx" in getProgressBars is always 0, even if there is bar with min width.

#8 Updated by François ARMAND 7 months 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.

#9 Updated by François ARMAND 7 months ago

  • Related to Bug #10773: Rounding error in compliance bar added

#10 Updated by François ARMAND 7 months 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.

#11 Updated by François ARMAND 7 months 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

#12 Updated by François ARMAND 7 months ago

  • Status changed from Pending technical review to New
  • Pull Request deleted (https://github.com/Normation/rudder/pull/1942)

#13 Updated by Vincent MEMBRÉ 7 months ago

  • Status changed from New to In progress

#14 Updated by Vincent MEMBRÉ 7 months 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

#15 Updated by Vincent MEMBRÉ 7 months ago

  • Assignee changed from François ARMAND to Raphael GAUTHIER

#16 Updated by Vincent MEMBRÉ 7 months ago

  • Assignee changed from Raphael GAUTHIER to François ARMAND

#17 Updated by Normation Quality Assistant 7 months ago

  • Assignee changed from François ARMAND to Vincent MEMBRÉ

#18 Updated by Vincent MEMBRÉ 7 months ago

  • Status changed from Pending technical review to Pending release

#19 Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 4.1.13 to 4.1.12

#20 Updated by Benoît PECCATTE 6 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.12, 4.2.6 and 4.3.1 which were released today.

Also available in: Atom PDF