0.4.4 • Published 4 months ago

@rhc-shared-components/vulnerability-summary v0.4.4

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
4 months ago

@rhc-shared-components/vulnerability-summary

The vulnerability summary component takes two props, a list of vulnerabilities and an image grade. If the image grade is A, a empty state would display, otherwise a summary of vulnerabilities will render in a bar chart form.

NPM JavaScript Style Guide

Install

npm install --save @rhc-shared-components/vulnerability-summary

Usage

import React from 'react';
import { VulnerabilitySummary } from '@rhc-shared-components/vulnerability-summary';

const vulnerabilities = [
  {
    "_id": "61de52def5a0de0193eff061",
    "_links": {},
    "advisory_id": "2022:0064",
    "advisory_type": "RHSA",
    "creation_date": "2022-01-12T04:02:38.666000+00:00",
    "cve_id": "CVE-2021-3712",
    "last_update_date": "2022-01-12T04:02:38.666000+00:00",
    "object_type": "containerImageVulnerability",
    "packages": [
      {
        "rpm_nvra": [
          "openssl-libs-1.0.2k-22.el7_9.ppc64le"
        ],
        "srpm_nevra": "openssl-1:1.0.2k-23.el7_9.src"
      }
    ],
    "public_date": "2022-01-11T00:00:00Z",
    "severity": "Moderate"
  }
];

const App = () => {
  return ( <VulnerabilitySummary vulnerabilities={vulnerabilities} imageGrade="C"/> )
}

License

MIT © eyevana

0.4.4

4 months ago

0.4.3

4 months ago

0.4.2

1 year ago

0.5.0

2 years ago

0.4.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago