Skip to content

Commit 5801c79

Browse files
Fixed integration bug and removed vulnerabilities menu
1 parent 91d3f48 commit 5801c79

File tree

7 files changed

+28
-25
lines changed

7 files changed

+28
-25
lines changed

pkg/sbombastic-image-vulnerability-scanner/components/CveDetails.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ export default {
249249
<div class="header-section">
250250
<div class="title">
251251
<span class="resource-header-name">
252-
<RouterLink :to="`/c/${this.$route.params.cluster}/${this.PRODUCT_NAME}/${this.PAGE.VULNERABILITIES}`">{{ t('imageScanner.vulnerabilities.title') }}:</RouterLink>
253-
{{ $route.params.id }}
252+
<!-- <RouterLink :to="`/c/${this.$route.params.cluster}/${this.PRODUCT_NAME}/${this.PAGE.VULNERABILITIES}`">{{ t('imageScanner.vulnerabilities.title') }}:</RouterLink> -->
253+
{{ t('imageScanner.vulnerabilities.title') }}: {{ $route.params.id }}
254254
</span>
255255
<BadgeState
256256
:color="getSeverityColor(cveDetail.severity.toLowerCase())"

pkg/sbombastic-image-vulnerability-scanner/components/ImageDetails.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,8 @@ export default {
411411
412412
const metadata = this.currentImage.imageMetadata;
413413
if (metadata?.registryURI && metadata?.repository && metadata?.tag) {
414-
return `${metadata.registryURI}/${metadata.repository}:${metadata.tag}`;
414+
// return `${metadata.registryURI}/${metadata.repository}:${metadata.tag}`;
415+
return `${metadata.repository.split("/")[0]}:${metadata.tag}`;
415416
}
416417
417418
// Fallback to the hash ID if metadata is not available

pkg/sbombastic-image-vulnerability-scanner/config/sbombastic-image-vulnerability-scanner.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,18 @@ export function init($plugin: any, store: any) {
5353
}
5454
});
5555

56-
virtualType({
57-
labelKey: "imageScanner.vulnerabilities.title",
58-
name: PAGE.VULNERABILITIES,
59-
namespaced: false,
60-
route: {
61-
name: `c-cluster-${PRODUCT_NAME}-${PAGE.VULNERABILITIES}`,
62-
params: {
63-
product: PRODUCT_NAME,
64-
},
65-
meta: { pkg: PRODUCT_NAME, product: PRODUCT_NAME },
66-
},
67-
});
56+
// virtualType({
57+
// labelKey: "imageScanner.vulnerabilities.title",
58+
// name: PAGE.VULNERABILITIES,
59+
// namespaced: false,
60+
// route: {
61+
// name: `c-cluster-${PRODUCT_NAME}-${PAGE.VULNERABILITIES}`,
62+
// params: {
63+
// product: PRODUCT_NAME,
64+
// },
65+
// meta: { pkg: PRODUCT_NAME, product: PRODUCT_NAME },
66+
// },
67+
// });
6868

6969
virtualType({
7070
labelKey: "imageScanner.vexManagement.title",
@@ -81,13 +81,13 @@ export function init($plugin: any, store: any) {
8181

8282
weightType(PAGE.DASHBOARD, 98, true);
8383
weightType(PAGE.IMAGES, 97, true);
84-
weightType(PAGE.VULNERABILITIES, 96, true);
84+
// weightType(PAGE.VULNERABILITIES, 96, true);
8585
weightType(PAGE.VEX_MANAGEMENT, 95, true);
8686

8787
basicType([
8888
PAGE.DASHBOARD,
8989
PAGE.IMAGES,
90-
PAGE.VULNERABILITIES,
90+
// PAGE.VULNERABILITIES,
9191
]);
9292
// Prepend spaces on group name, as Rancher 2.12 render group name algin with sidemenu
9393
basicType([PAGE.REGISTRIES, PAGE.VEX_MANAGEMENT], '&nbsp;&nbsp;&nbsp;&nbsp;Advanced');

pkg/sbombastic-image-vulnerability-scanner/formatters/ImageNameCell.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export default {
2525
displayName() {
2626
// For real Kubernetes resources, show human-readable reference
2727
if (this.row.imageMetadata?.repository) {
28-
return `${this.row.imageMetadata.registryURI}/${this.row.imageMetadata.repository}:${this.row.imageMetadata.tag}`;
28+
// return `${this.row.imageMetadata.registryURI}/${this.row.imageMetadata.repository}:${this.row.imageMetadata.tag}`;
29+
return `${this.row.imageMetadata.repository.split("/")[0]}:${this.row.imageMetadata.tag}`;
2930
}
3031
// For mock data, show the metadata name
3132
return this.row.metadata.name;

pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ imageScanner:
275275
medium: Medium
276276
low: Low
277277
none: None
278-
unknown: Unknown
278+
unknown: None
279279
suppressed: Suppressed
280280
status:
281281
pending: Pending

pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/ImageOverview.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,9 @@
362362
this.rows.push({
363363
id: report.id,
364364
metadata: {
365-
name: `${report.imageMetadata.registry}:${report.imageMetadata.tag}`
365+
name: report.metadata.name,
366366
},
367+
imageMetadata: report.imageMetadata,
367368
spec: {
368369
isBaseImage: true,
369370
hasAffectedPackages: false,

pkg/sbombastic-image-vulnerability-scanner/routes/sbombastic-image-vulnerability-scanner-routes.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ const routes = [
3030
path: `/c/:cluster/${PRODUCT_NAME}/${PAGE.IMAGES}/:id`,
3131
component: ImageDetails,
3232
},
33-
{
34-
name: `c-cluster-${PRODUCT_NAME}-${PAGE.VULNERABILITIES}`,
35-
path: `/c/:cluster/${PRODUCT_NAME}/${PAGE.VULNERABILITIES}`,
36-
component: Vulnerabilities,
37-
},
33+
// {
34+
// name: `c-cluster-${PRODUCT_NAME}-${PAGE.VULNERABILITIES}`,
35+
// path: `/c/:cluster/${PRODUCT_NAME}/${PAGE.VULNERABILITIES}`,
36+
// component: Vulnerabilities,
37+
// },
3838
{
3939
name: `c-cluster-${PRODUCT_NAME}-${PAGE.REGISTRIES}`,
4040
path: `/c/:cluster/${PRODUCT_NAME}/${PAGE.REGISTRIES}`,

0 commit comments

Comments
 (0)