From 5a08b502720d95ff52d6b52b735a40a87f98d69a Mon Sep 17 00:00:00 2001 From: lsongsuse Date: Tue, 5 Aug 2025 01:18:46 -0700 Subject: [PATCH] create(edit) registries configuration --- .../sbombastic-image-vulnerability-scanner.ts | 4 +- .../edit/sbombastic.rancher.io.registry.vue | 227 +++++++++++++++ .../l10n/en-us.yaml | 28 ++ .../list/sbombastic.rancher.io.registry.vue | 265 ++++++++++++++++++ 4 files changed, 523 insertions(+), 1 deletion(-) create mode 100644 pkg/sbombastic-image-vulnerability-scanner/edit/sbombastic.rancher.io.registry.vue create mode 100644 pkg/sbombastic-image-vulnerability-scanner/list/sbombastic.rancher.io.registry.vue diff --git a/pkg/sbombastic-image-vulnerability-scanner/config/sbombastic-image-vulnerability-scanner.ts b/pkg/sbombastic-image-vulnerability-scanner/config/sbombastic-image-vulnerability-scanner.ts index 4a245a1..bfce941 100644 --- a/pkg/sbombastic-image-vulnerability-scanner/config/sbombastic-image-vulnerability-scanner.ts +++ b/pkg/sbombastic-image-vulnerability-scanner/config/sbombastic-image-vulnerability-scanner.ts @@ -2,6 +2,7 @@ import { IPlugin } from "@shell/core/types"; import { PRODUCT_NAME, PAGE, + RESOURCE } from "@sbombastic-image-vulnerability-scanner/types"; export function init($plugin: IPlugin, store: any) { @@ -65,9 +66,10 @@ export function init($plugin: IPlugin, store: any) { }); basicType([ - PAGE.REGISTRIES, PAGE.IMAGE_OVERVIEW, PAGE.VULNERABILITY_OVERVIEW, ]); + basicType([PAGE.REGISTRIES, RESOURCE.REGISTRY], 'Advanced'); + } \ No newline at end of file diff --git a/pkg/sbombastic-image-vulnerability-scanner/edit/sbombastic.rancher.io.registry.vue b/pkg/sbombastic-image-vulnerability-scanner/edit/sbombastic.rancher.io.registry.vue new file mode 100644 index 0000000..67f8e95 --- /dev/null +++ b/pkg/sbombastic-image-vulnerability-scanner/edit/sbombastic.rancher.io.registry.vue @@ -0,0 +1,227 @@ + + + + \ No newline at end of file diff --git a/pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml b/pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml index b981937..b17a593 100644 --- a/pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml +++ b/pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml @@ -1,3 +1,5 @@ +product: + imageScanner: Image Vulnerability Scanner imageScanner: registries: title: Registries configuration @@ -20,6 +22,29 @@ imageScanner: progress: Progress prevScan: Previous scan configuration: + cru: + description: Start from scratch by using the steps below or go back and clone an existing configuration + registry: + label: Registry + type: + label: Type + ecr: Amazon ECR Registry + azure: Azure Container Registry + custom: Custom Registry + placeholder: Choose a registry type + namespace: + label: Namespace + placeholder: "Choose the registry first" + proxy: + enable: Use the embedded proxy + tooltip: "When enabled, Rancher routes all registry traffic through its secure proxy instead of direct connections." + authLabel: Authentication + scan: + label: Scanning + type: Repositories to scan + schedule: + label: Refresh Interval + placeholder: 'default: {hours}' scan: Start Scan meta: registry: Registry @@ -77,3 +102,6 @@ imageScanner: general: refresh: Refresh data ago: ago + +typeLabel: + sbombastic.rancher.io.registry: Registries configuration \ No newline at end of file diff --git a/pkg/sbombastic-image-vulnerability-scanner/list/sbombastic.rancher.io.registry.vue b/pkg/sbombastic-image-vulnerability-scanner/list/sbombastic.rancher.io.registry.vue new file mode 100644 index 0000000..d2ee604 --- /dev/null +++ b/pkg/sbombastic-image-vulnerability-scanner/list/sbombastic.rancher.io.registry.vue @@ -0,0 +1,265 @@ + + + + + + \ No newline at end of file