Project

General

Profile

Actions

Bug #12643

closed

Compliance bar appears partially white in some graphes

Added by Alexis Mousset almost 6 years ago. Updated almost 6 years ago.

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

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 1 (0 open1 closed)

Bug #12682: JS test templateReleasedVincent MEMBRÉActions

Related issues 2 (0 open2 closed)

Related to Rudder - Bug #10773: Rounding error in compliance bar can hide error with very small percentReleasedVincent MEMBRÉActions
Related to Rudder - Bug #18912: White empty segment in compliance bar due to computation bugResolvedRaphael GAUTHIERActions
Actions #1

Updated by Alexis Mousset almost 6 years ago

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

Actions #2

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 4.3.2 to 410
Actions #3

Updated by François ARMAND almost 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.

Actions #4

Updated by François ARMAND almost 6 years ago

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

Updated by François ARMAND almost 6 years ago

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

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

Actions #7

Updated by François ARMAND almost 6 years ago

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

Actions #8

Updated by François ARMAND almost 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.

Actions #9

Updated by François ARMAND almost 6 years ago

  • Related to Bug #10773: Rounding error in compliance bar can hide error with very small percent added
Actions #10

Updated by François ARMAND almost 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.

Actions #11

Updated by François ARMAND almost 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
Actions #12

Updated by François ARMAND almost 6 years ago

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

Updated by Vincent MEMBRÉ almost 6 years ago

  • Status changed from New to In progress
Actions #14

Updated by Vincent MEMBRÉ almost 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
Actions #15

Updated by Vincent MEMBRÉ almost 6 years ago

  • Assignee changed from François ARMAND to Raphael GAUTHIER
Actions #16

Updated by Vincent MEMBRÉ almost 6 years ago

  • Assignee changed from Raphael GAUTHIER to François ARMAND
Actions #17

Updated by Rudder Quality Assistant almost 6 years ago

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

Updated by Vincent MEMBRÉ almost 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #19

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 4.1.13 to 4.1.12
Actions #20

Updated by Benoît PECCATTE almost 6 years 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.

Actions #21

Updated by François ARMAND about 3 years ago

  • Related to Bug #18912: White empty segment in compliance bar due to computation bug added
Actions

Also available in: Atom PDF