Project

General

Profile

Actions

Bug #12643

closed

Compliance bar appears partially white in some graphes

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

Added by Alexis Mousset over 7 years ago. Updated over 7 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

Updated by Alexis Mousset over 7 years ago Actions #1

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

Updated by Vincent MEMBRÉ over 7 years ago Actions #2

  • Target version changed from 4.3.2 to 410

Updated by François ARMAND over 7 years ago Actions #3

  • 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 7 years ago Actions #4

  • 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 7 years ago Actions #5

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

Updated by François ARMAND over 7 years ago Actions #6

  • 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 7 years ago Actions #7

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 7 years ago Actions #8

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 7 years ago Actions #9

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

Updated by François ARMAND over 7 years ago Actions #10

#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 7 years ago Actions #11

  • 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 7 years ago Actions #12

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

Updated by Vincent MEMBRÉ over 7 years ago Actions #13

  • Status changed from New to In progress

Updated by Vincent MEMBRÉ over 7 years ago Actions #14

  • 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 7 years ago Actions #15

  • Assignee changed from François ARMAND to Raphael GAUTHIER

Updated by Vincent MEMBRÉ over 7 years ago Actions #16

  • Assignee changed from Raphael GAUTHIER to François ARMAND

Updated by Rudder Quality Assistant over 7 years ago Actions #17

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

Updated by Vincent MEMBRÉ over 7 years ago Actions #18

  • Status changed from Pending technical review to Pending release

Updated by Vincent MEMBRÉ over 7 years ago Actions #19

  • Target version changed from 4.1.13 to 4.1.12

Updated by Benoît PECCATTE over 7 years ago Actions #20

  • 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.

Updated by François ARMAND over 4 years ago Actions #21

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

Also available in: PDF Atom