-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix(dashboard): fixup Automated Analysis Card #968
fix(dashboard): fixup Automated Analysis Card #968
Conversation
Signed-off-by: Max Cao <macao@redhat.com>
Test image available:
|
Test image available:
|
Seems like another flanky test with jest mocks being called more than expected :(( |
Signed-off-by: Max Cao <macao@redhat.com>
Test image available:
|
I think I'm going to do a little more refactoring on the card. Some of the rules/results changes from updating to JMC 8.2 are making me consider some changes. |
Signed-off-by: Max Cao <macao@redhat.com>
Sort of a hack, but it's a little much to change the backend code to account for all of the JMC rule changes at this point in development but thoughts on these changes? ClickableAALabel tooltip:List view:I found something interesting though, seems like some code somwhere is not picking up on this messageKey: |
Signed-off-by: Max Cao <macao@redhat.com>
Signed-off-by: Max Cao <macao@redhat.com>
Not sure where these pom property ci issues are coming from... |
Test image available:
|
src/app/Dashboard/AutomatedAnalysis/ClickableAutomatedAnalysisLabel.tsx
Outdated
Show resolved
Hide resolved
That's definitely weird. I'm not sure what's causing that exactly, but it's either something in JMC itself or in how I wrote the part that populates those messages: That |
Signed-off-by: Max Cao <macao@redhat.com>
Signed-off-by: Max Cao <macao@redhat.com>
Test image available:
|
I think it's a bug on JMC. They don't call
|
Good find! Seems like it. Next few line shows the correct way. |
* fix aa result icons as well Signed-off-by: Max Cao <macao@redhat.com> * revert directoryName field Signed-off-by: Max Cao <macao@redhat.com> * summary and explanation, change description wrapping to breakWord Signed-off-by: Max Cao <macao@redhat.com> * remove summary on N/A scores Signed-off-by: Max Cao <macao@redhat.com> * update snapshot Signed-off-by: Max Cao <macao@redhat.com> * split on double newlines Signed-off-by: Max Cao <macao@redhat.com> * snapshots, eslint Signed-off-by: Max Cao <macao@redhat.com> --------- Signed-off-by: Max Cao <macao@redhat.com> (cherry picked from commit 8147b49)
|
||
export const transformAADescription = (description: string): JSX.Element => { | ||
const splitDesc = description.split('\n\n'); | ||
const boldRegex = /^([^:]+:\s?)/; // match text up to and including the first colon |
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.
Lets try this:
^([^:]+):\s*(.*)
Tester: https://regex101.com/r/iP2RoX/1
This way, u can pull the matched group out easily.
// Must check matched first
const [_, boldText, content] = matched;
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.
also, we need to check the content (hide it maybe?) as it might be empty (not sure when but best to check).
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.
Opps nvmind :)) I guess this could be a nice refactoring idea then :)
* fix aa result icons as well Signed-off-by: Max Cao <macao@redhat.com> * revert directoryName field Signed-off-by: Max Cao <macao@redhat.com> * summary and explanation, change description wrapping to breakWord Signed-off-by: Max Cao <macao@redhat.com> * remove summary on N/A scores Signed-off-by: Max Cao <macao@redhat.com> * update snapshot Signed-off-by: Max Cao <macao@redhat.com> * split on double newlines Signed-off-by: Max Cao <macao@redhat.com> * snapshots, eslint Signed-off-by: Max Cao <macao@redhat.com> --------- Signed-off-by: Max Cao <macao@redhat.com> (cherry picked from commit 8147b49) Co-authored-by: Max Cao <macao@redhat.com>
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit --amend --signoff
Related: https://github.com/cryostatio/cryostat/pull/1457
Depends on: https://github.com/cryostatio/cryostat/pull/1457
Description of the change:
Fixes icons for AA results to fit the result (warning = warningTriangleIcon, error = exclamation point).
This PR also has a hack to separate new JMC IResult fields within description of Rule results.