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 #24627: We can add the same score details column many times in nodes tables #5645
Conversation
success: function (data) { | ||
scoreList = data.data | ||
}, | ||
}).done( function() {refresh(gridId)} ) |
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.
This does a 2nd API request for node details every time we create the table, is there a way without the refresh
?
Commit modified |
669f68b
to
28956d9
Compare
|
||
$.ajax({ | ||
type: 'GET', | ||
url: "/rudder/secure/api/scores/list", | ||
success: function (data) { | ||
scoreList = data.data | ||
}, | ||
}) | ||
|
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.
We still have a race condition with this block, that executes asynchronously ($.ajax
is fire-and-forget).
When it finished BEFORE the execution of the code that looks into localStorage for score columns, it works normally. But it often finishes AFTER, and the list is []
, so we are still displaying system-updates Score
instead of System updates Score
(because there is a "guard" to just display the id
when we don't know the name
of the score...)
28956d9
to
5a81422
Compare
Commit modified |
PR rebased |
5a81422
to
35f8915
Compare
Commit modified |
35f8915
to
483798a
Compare
OK, merging this PR |
7925b78
into
Normation:branches/rudder/8.1
https://issues.rudder.io/issues/24627