Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ export default {
<div class="header-section">
<div class="title">
<span class="resource-header-name">
<RouterLink :to="`/c/${this.$route.params.cluster}/${this.PRODUCT_NAME}/${this.PAGE.VULNERABILITIES}`">{{ t('imageScanner.vulnerabilities.title') }}:</RouterLink>
{{ $route.params.id }}
<!-- <RouterLink :to="`/c/${this.$route.params.cluster}/${this.PRODUCT_NAME}/${this.PAGE.VULNERABILITIES}`">{{ t('imageScanner.vulnerabilities.title') }}:</RouterLink> -->
{{ t('imageScanner.vulnerabilities.title') }}: {{ $route.params.id }}
</span>
<BadgeState
:color="getSeverityColor(cveDetail.severity.toLowerCase())"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
</div>
<div class="info-item" v-if="showAllProperties">
<span class="label">{{ t('imageScanner.imageDetails.layers') }}:</span>
<span class="value">{{ imageDetails.layers || '12' }}</span>
<span class="value">{{ imageDetails.layers?.length || '0' }}</span>
</div>
</div>
</div>
Expand Down Expand Up @@ -411,7 +411,8 @@ export default {

const metadata = this.currentImage.imageMetadata;
if (metadata?.registryURI && metadata?.repository && metadata?.tag) {
return `${metadata.registryURI}/${metadata.repository}:${metadata.tag}`;
// return `${metadata.registryURI}/${metadata.repository}:${metadata.tag}`;
return `${metadata.repository.split("/")[0]}:${metadata.tag}`;
}

// Fallback to the hash ID if metadata is not available
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
<InstallHelmCharts
style="margin-top: 16px;"
chart-name="sbombastic"
repo-url="https://github.com/rancher-sandbox/sbombastic.git"
repo-url="https://rancher-sandbox.github.io"
repo-name="sbombastic"
target-namespace="sbombastic"
chart-display-name="sbombastic"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ export default {
type: Array,
default: () => []
},
reloadFn: {
type: Function,
default: () => {}
}
},
methods: {
async startScan() {
Expand Down Expand Up @@ -54,10 +50,6 @@ export default {
title: this.t('imageScanner.registries.messages.registryScanFailed'),
message: e.message,
});
} finally {
setTimeout(() => {
this.reloadFn(true);
}, 2000);
}
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ export function init($plugin: any, store: any) {
route: {
name: `c-cluster-${PRODUCT_NAME}-${PAGE.REGISTRIES}`,
params: {
product: PRODUCT_NAME
product: PRODUCT_NAME,
resource: RESOURCE.REGISTRY,
},
meta: { pkg: PRODUCT_NAME, product: PRODUCT_NAME }
}
},
});

virtualType({
Expand All @@ -52,18 +53,18 @@ export function init($plugin: any, store: any) {
}
});

virtualType({
labelKey: "imageScanner.vulnerabilities.title",
name: PAGE.VULNERABILITIES,
namespaced: false,
route: {
name: `c-cluster-${PRODUCT_NAME}-${PAGE.VULNERABILITIES}`,
params: {
product: PRODUCT_NAME,
},
meta: { pkg: PRODUCT_NAME, product: PRODUCT_NAME },
},
});
// virtualType({
// labelKey: "imageScanner.vulnerabilities.title",
// name: PAGE.VULNERABILITIES,
// namespaced: false,
// route: {
// name: `c-cluster-${PRODUCT_NAME}-${PAGE.VULNERABILITIES}`,
// params: {
// product: PRODUCT_NAME,
// },
// meta: { pkg: PRODUCT_NAME, product: PRODUCT_NAME },
// },
// });

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

weightType(PAGE.DASHBOARD, 98, true);
weightType(PAGE.IMAGES, 97, true);
weightType(PAGE.VULNERABILITIES, 96, true);
// weightType(PAGE.VULNERABILITIES, 96, true);
weightType(PAGE.VEX_MANAGEMENT, 95, true);

basicType([
PAGE.DASHBOARD,
PAGE.IMAGES,
PAGE.VULNERABILITIES,
// PAGE.VULNERABILITIES,
]);
// Prepend spaces on group name, as Rancher 2.12 render group name algin with sidemenu
basicType([PAGE.REGISTRIES, PAGE.VEX_MANAGEMENT], '&nbsp;&nbsp;&nbsp;&nbsp;Advanced');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const REGISTRY_SCAN_TABLE = [
{
name: "scanInterval",
labelKey: "imageScanner.registries.registrytable.header.schedule",
value: (row: any) => `Every ${row.spec.scanInterval}`,
value: "spec.scanInterval",
formatter: "ScanInterval",
sort: "spec.scanInterval",
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export default {
displayName() {
// For real Kubernetes resources, show human-readable reference
if (this.row.imageMetadata?.repository) {
return `${this.row.imageMetadata.registryURI}/${this.row.imageMetadata.repository}:${this.row.imageMetadata.tag}`;
// return `${this.row.imageMetadata.registryURI}/${this.row.imageMetadata.repository}:${this.row.imageMetadata.tag}`;
return `${this.row.imageMetadata.repository.split("/")[0]}:${this.row.imageMetadata.tag}`;
}
// For mock data, show the metadata name
return this.row.metadata.name;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<template>
<div class="scan-interval-cell">
<span v-if="value" class="scan-interval-text">{{ t('imageScanner.general.every') }}&nbsp;{{ value }}</span>
<span v-else class="scan-interval-text text-muted">n/a</span>
</div>
</template>
<script>
export default {
props: {
value: {
type: String,
required: true
}
},
};
</script>

<style lang="scss" scoped>
.scan-interval-cell {
display: flex;
align-items: center;
font-size: 14px;
color: var(--text-secondary);

.scan-interval-text {
margin-left: 8px;
}
}
</style>
3 changes: 2 additions & 1 deletion pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ imageScanner:
medium: Medium
low: Low
none: None
unknown: Unknown
unknown: None
suppressed: Suppressed
status:
pending: Pending
Expand All @@ -302,6 +302,7 @@ imageScanner:
schedule: Every {i}
reload: Reload
any: Any
every: Every

typeLabel:
sbombastic.rancher.io.registry: Registries configuration
Expand Down
Loading