-
-
- {{t('imageScanner.vexManagement.description')}}
-
-
import { RESOURCE } from "@pkg/types";
import ResourceTable from "@shell/components/ResourceTable";
-import Banner from '@components/Banner/Banner.vue';
import RegisterStatusBadge from "@pkg/components/common/RegisterStatusBadge";
import { VEX_MANAGEMENT_TABLE } from "@pkg/config/table-headers";
import {
@@ -33,7 +27,6 @@ import {
export default {
name: 'VexManagement',
components: {
- Banner,
ResourceTable,
RegisterStatusBadge,
},
@@ -63,123 +56,15 @@ export default {
await m.save();
}));
await this.$fetch();
- },
- createVexHub() {
- this.$router.push({
- name: `${ PRODUCT_NAME }-c-cluster-resource-create`,
- params: {
- resource: RESOURCE.VEX_HUB,
- cluster: this.$route.params.cluster,
- product: PRODUCT_NAME
- }
- });
}
},
computed: {
schema() {
return this.$store.getters['cluster/schemaFor']?.(RESOURCE.VEX_HUB);
- },
- showMasthead(){
- const showMasthead = getters[`type-map/optionsFor`](this.resource).showListMasthead;
- console.log("=====showMasthead", showMasthead, this.resource);
- return false;
}
}
}
diff --git a/pkg/sbombastic-image-vulnerability-scanner/models/VexHub.js b/pkg/sbombastic-image-vulnerability-scanner/models/VexHub.js
new file mode 100644
index 0000000..0519ecb
--- /dev/null
+++ b/pkg/sbombastic-image-vulnerability-scanner/models/VexHub.js
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/pkg/sbombastic-image-vulnerability-scanner/models/sbombastic.rancher.io.vexhub.js b/pkg/sbombastic-image-vulnerability-scanner/models/sbombastic.rancher.io.vexhub.js
index 42acc5e..bff9e30 100644
--- a/pkg/sbombastic-image-vulnerability-scanner/models/sbombastic.rancher.io.vexhub.js
+++ b/pkg/sbombastic-image-vulnerability-scanner/models/sbombastic.rancher.io.vexhub.js
@@ -19,6 +19,19 @@ export default class SbombasticRancherIoVexhub extends SteveModel {
]);
out = out.filter((a) => !a?.action || !remove.has(a.action));
+ // Customize the edit action label
+ out = out.map((action) => {
+ // Check for various possible edit action names
+ if (action?.action === 'edit' || action?.action === 'goToEdit' || action?.action === 'editConfig') {
+ return {
+ ...action,
+ label: this.t('imageScanner.vexManagement.buttons.editConfiguration') || 'Edit configuration'
+ };
+ }
+
+ return action;
+ });
+
const isEnabled = !!this.spec?.enabled;
const toggle = this.toggle;
diff --git a/pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/VexManagement.vue b/pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/VexManagement.vue
index 29e22cc..9b203db 100644
--- a/pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/VexManagement.vue
+++ b/pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/VexManagement.vue
@@ -21,26 +21,13 @@
-
-
+