New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #24829: Replace compliance chart with Score chart and and new details score charts #5648
Conversation
Commit modified |
8b5df0f
to
6e2f39e
Compare
case D => "#fedc04" | ||
case E => "#f0940e" | ||
case F => "#da291c" | ||
case NoScore => "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not grey ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact i think we want to filter Nodes without a score, but i don't know really. Yes in this case we should display them in grey
Commit modified |
6e2f39e
to
a646b03
Compare
PR updated with a new commit |
@@ -336,6 +314,7 @@ class HomePage extends StatefulSnippet { | |||
, ${data.toJsCmd} | |||
, ${diagramColor.toJsCmd} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not used anymore and should be removed
The problem with percent is because the total number of node is not the same in the array than in the total :
I have disabled and pending nodes, which seems to be excluded from |
78a4233
to
c4b14b3
Compare
@@ -114,8 +114,8 @@ function homePage ( | |||
globalCompliance | |||
, globalGauge | |||
, nodeCompliance | |||
, nodeComplianceColors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's not used anywhere
@@ -183,8 +184,21 @@ function homePage ( | |||
$("#gauge-value").text(globalGauge+"%"); | |||
|
|||
var complianceHColors = nodeCompliance.colors.map(x => complianceHoverColors[x]); | |||
doughnutChart('nodeCompliance', nodeCompliance, allNodes, nodeCompliance.colors, complianceHColors); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the count is now computed directly in doughnutChart
function
|
||
var context = $("#"+id) | ||
var count = data.values.length < 1 ? 0 : data.values.reduce((a, b) => a + b, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in place of count, compute the sum of values here.
I didn't see a case where it should be ok to have a different count, and all calling place in scala backend use the same source of data to build both
…etails score charts
PR rebased |
c4b14b3
to
4c4d9ab
Compare
OK, merging this PR |
8ff84ae
into
Normation:branches/rudder/8.1
https://issues.rudder.io/issues/24829