Skip to content
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

Improve Report UI #2

Closed
1 task
nprail opened this issue Jun 14, 2018 · 18 comments
Closed
1 task

Improve Report UI #2

nprail opened this issue Jun 14, 2018 · 18 comments
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest released
Projects

Comments

@nprail
Copy link
Member

nprail commented Jun 14, 2018

The report UI doesn't look super great and could be better. Let's improve it.

To-Do

  • Improve Report UI
@nprail nprail added enhancement New feature or request good first issue Good for newcomers labels Jun 14, 2018
@nprail nprail added this to To do in Development Dec 15, 2018
@davityavryan
Copy link

Hi @nprail,

I have a suggestions for you:

  1. Would be good to have an option for CLI to enable/disable showing unique vulnerabilities. For example if you have installed imagemin-webpack-plugin@2.3.0 then you will have 6 vulnerabilities, because of tunnel-agent@0.4.3 but they are same vulnerabilities.
  2. Also as you can see here I have added collapsable for "Reasons" section (which makes sense if point 1 is a case). Note that it is CSS only solution, mainly because these kind of reports are used in CI-s where you don't want to (or can't) have JS.

@giocodes
Copy link

Is someone still interested in working on this? I landed here because I was looking for a way to filter a table of just the high risk vulnerabilities.

@AdrianoCahete
Copy link

Is someone still interested in working on this?

To be honest, is in my ToDo list in a while, but I didn't have time to see it yet. Feel free to open a PR, because i'm not part of the team. :P

@nprail
Copy link
Member Author

nprail commented Aug 28, 2019

@giocodes I am planning on working on this at some point soon. But like @AdrianoCahete said, PRs are welcome!

Are you looking for filtering after the report was generated or during? For example, you could achieve filtering by doing this:

npm audit --json --audit-level=high | npm-audit-html

@nprail
Copy link
Member Author

nprail commented Aug 28, 2019

Okay, so turns out that --json outputs everything regardless of the other flags like --audit-level or --only (although, --production does affect the JSON output). So filtering does have to be done by npm-audit-html.

@giocodes
Copy link

giocodes commented Aug 28, 2019

Aw too bad the flag does not work.

Yeah, I'll be happy to help. 😃What do you all have in mind for the new UI to look like?

I want to suggest a table where vulnerabilities can be sorted and users can choose the columns (information) they want to see. Similar to what Jira has for the issues view:
jira-issue-git-rollup-issues

For npm-audit-html it would be a lot simpler, no sidebar or tabs. Just the filters on top and the sortable table. Let me know what you think @nprail @SAIGlobal

@nprail
Copy link
Member Author

nprail commented Aug 28, 2019

@giocodes Actually, determining what the improved look should be is most of why I haven't done it yet. So feedback like this is great! 👏👏👏

I like the idea of a sortable/filterable table that you can open collapses (or modals) to see more details for each vulnerability.

@AdrianoCahete @giocodes
What primary information do you think should be visible/sortable? My thoughts are name, severity, and vulnerable module name at least. Maybe a date published and/or link to the advisory as well?

@AdrianoCahete
Copy link

What primary information do you think should be visible/sortable? My thoughts are name, severity, and vulnerable module name at least. Maybe a date published and/or link to the advisory as well?

If possible, everything (why not give the user that degree of customization?). But the most important ones are severity, CVE, name and module name, I think.

About the UI, my first idea was design an UI for this, but I'm with a lack of time this months. :(

@nprail
Copy link
Member Author

nprail commented Aug 29, 2019

@AdrianoCahete Sure, giving the option to add any sortable columns to the table would be best. I just meant, what should the default columns be.

The trouble with CVE is that it is an array of CVEs. There can be more than one. Would it make sense to group them all into one column?

Example:

Name Severity Module CVEs
Arbitrary File Overwrite High fstream CWE-59, CVE-2019-13173

@nprail
Copy link
Member Author

nprail commented Oct 2, 2019

I've started to work on the new design!

What do you think about a dark theme?

Here's a preview of the new layout:
audit

@nprail
Copy link
Member Author

nprail commented Oct 2, 2019

DARK MODE!
🎉🎉🎉

Feedback is much appreciated.

Annotation 2019-10-02 141945

@giocodes
Copy link

giocodes commented Oct 2, 2019

Is the palette easy to change? On my screen the green colors don't seem to have enough contrast.
Maybe you could try the color palette from https://material.io/design/color/dark-theme.html#anatomy

@nprail
Copy link
Member Author

nprail commented Oct 2, 2019

Yep, totally. I think I'll add a CLI option for dark or light mode.

I'll definitely be making adjustments to the color palette too.

@nikhilgeo
Copy link

nikhilgeo commented Nov 8, 2019

Hope this will roll out soon. I have a small suggestion, It would be great if there is a breakdown of total no of issues based on the severity also.

@nprail
Copy link
Member Author

nprail commented Nov 8, 2019

@nikhilgeo I'll be working on finishing this up and hopefully releasing a new version with it tomorrow!

I'm probably going to make dark mode an option but not the default.

@nprail nprail moved this from To do to In progress in Development Nov 8, 2019
@nprail
Copy link
Member Author

nprail commented Nov 8, 2019

I've improved the dark theme a lot (borrowed some styles from VS Code) and also added code highlighting with highlight.js.

If you want dark mode, you will have to add --theme dark as a CLI option. 2.0 will probably switch to dark mode by default.

Dark mode

Annotation 2019-11-08 165514

Light mode

Annotation 2019-11-08 165945

@nikhilgeo
Copy link

Awesome, thank you for the new looks. Looking forward for the new release.

@nprail nprail closed this as completed in 980daf9 Nov 10, 2019
Development automation moved this from In progress to Done Nov 10, 2019
@nprail
Copy link
Member Author

nprail commented Nov 10, 2019

🎉 This issue has been resolved in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest released
Projects
Development
  
Done
Development

No branches or pull requests

5 participants