@rhc-shared-components/packages-table 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2186,18 +2186,11 @@ var ExcludedPackagesTable = function ExcludedPackagesTable(_ref) {
2186
2186
  var excludedPackages = _ref.excludedPackages,
2187
2187
  isLoading = _ref.isLoading;
2188
2188
  var renderPackagesRow = function renderPackagesRow(_ref2) {
2189
- var gpg = _ref2.gpg,
2190
- name = _ref2.name,
2191
- version = _ref2.version,
2192
- release = _ref2.release,
2193
- architecture = _ref2.architecture,
2194
- nvra = _ref2.nvra,
2189
+ var nvra = _ref2.nvra,
2195
2190
  summary = _ref2.summary;
2196
- return [gpg ? React__default["default"].createElement("a", {
2197
- href: "https://access.redhat.com/downloads/content/" + name + "/" + version + "}-" + release + "/" + architecture + "/" + (gpg == null ? void 0 : gpg.slice(-8)) + "/package",
2198
- target: '_blank',
2199
- rel: 'noopener noreferrer'
2200
- }, nvra) : React__default["default"].createElement("span", null, nvra), summary];
2191
+ return [React__default["default"].createElement("span", {
2192
+ key: nvra
2193
+ }, nvra), summary];
2201
2194
  };
2202
2195
  var onTextInputFilterChange = function onTextInputFilterChange(text, _ref3) {
2203
2196
  var nvra = _ref3.nvra,
@@ -2527,19 +2520,9 @@ var PackagesTable = function PackagesTable(_ref) {
2527
2520
  uniqueVulnerabilities.sort(function (vulnerability) {
2528
2521
  return severitySortOrder[vulnerability.severity];
2529
2522
  });
2530
- // filter out vulnerabilities with duplicate CVE IDs
2531
- uniqueVulnerabilities.filter(function (value, index, self) {
2532
- return self.findIndex(function (vulnerability) {
2533
- return vulnerability.cve_id === value.cve_id;
2534
- }) === index;
2535
- });
2536
- uniqueVulnerabilities.filter(function (vulnerability) {
2537
- if (vulnerability.rpm_nvra_with_link_data.length > 0) {
2538
- console.log(vulnerability);
2539
- return vulnerability;
2540
- }
2541
- });
2542
- setUniqueVulnerabilities(uniqueVulnerabilities);
2523
+ setUniqueVulnerabilities(uniqueVulnerabilities.filter(function (vulnerability) {
2524
+ return vulnerability.rpm_nvra_with_link_data.length > 0;
2525
+ }));
2543
2526
  }, [rpms, vulnerabilities]);
2544
2527
  InsertCss();
2545
2528
  return React__namespace.createElement(React__namespace.Fragment, null, (uniqueVulnerabilities.length > 0 || excludedPackages.length > 0) && React__namespace.createElement("div", {
@@ -2029,19 +2029,12 @@ const ExcludedPackagesTable = ({
2029
2029
  isLoading
2030
2030
  }) => {
2031
2031
  const renderPackagesRow = ({
2032
- gpg,
2033
- name,
2034
- version,
2035
- release,
2036
- architecture,
2037
2032
  nvra,
2038
2033
  summary
2039
2034
  }) => {
2040
- return [gpg ? React__default.createElement("a", {
2041
- href: `https://access.redhat.com/downloads/content/${name}/${version}}-${release}/${architecture}/${gpg == null ? void 0 : gpg.slice(-8)}/package`,
2042
- target: '_blank',
2043
- rel: 'noopener noreferrer'
2044
- }, nvra) : React__default.createElement("span", null, nvra), summary];
2035
+ return [React__default.createElement("span", {
2036
+ key: nvra
2037
+ }, nvra), summary];
2045
2038
  };
2046
2039
  const onTextInputFilterChange = (text, {
2047
2040
  nvra,
@@ -2336,15 +2329,7 @@ const PackagesTable = ({
2336
2329
  });
2337
2330
  // sort vulnerabilities by severity
2338
2331
  uniqueVulnerabilities.sort(vulnerability => severitySortOrder[vulnerability.severity]);
2339
- // filter out vulnerabilities with duplicate CVE IDs
2340
- uniqueVulnerabilities.filter((value, index, self) => self.findIndex(vulnerability => vulnerability.cve_id === value.cve_id) === index);
2341
- uniqueVulnerabilities.filter(vulnerability => {
2342
- if (vulnerability.rpm_nvra_with_link_data.length > 0) {
2343
- console.log(vulnerability);
2344
- return vulnerability;
2345
- }
2346
- });
2347
- setUniqueVulnerabilities(uniqueVulnerabilities);
2332
+ setUniqueVulnerabilities(uniqueVulnerabilities.filter(vulnerability => vulnerability.rpm_nvra_with_link_data.length > 0));
2348
2333
  }, [_rpms, _vulnerabilities]);
2349
2334
  InsertCss();
2350
2335
  return React.createElement(React.Fragment, null, (uniqueVulnerabilities.length > 0 || excludedPackages.length > 0) && React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhc-shared-components/packages-table",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "project description",
5
5
  "author": "redhatofficial",
6
6
  "license": "MIT",