Skip to content

Commit 0aa0426

Browse files
committed
fix(vexhub): Fix UX/UI bugs for VEX Management - Detail #121
1 parent bc7677e commit 0aa0426

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

pkg/sbombastic-image-vulnerability-scanner/detail/sbombastic.rancher.io.vexhub.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import DetailPage from '@shell/components/Resource/Detail/Page.vue';
33
import Masthead from '@shell/components/Resource/Detail/Masthead/index.vue';
4+
import Date from '@shell/components/formatter/Date.vue';
45
import { useStore } from 'vuex';
56
import { useI18n } from '@shell/composables/useI18n';
67
import UriExternalLink from '@sbombastic-image-vulnerability-scanner/formatters/UriExternalLink.vue';
@@ -21,6 +22,7 @@ const defaultMastheadProps = computed(() => {
2122
resourceName: vexhub.metadata.name,
2223
resourceTypeLabel: t('imageScanner.vexManagement.title'),
2324
resourceTo: vexhub.listLocation,
25+
description: t('imageScanner.vexManagement.detail.description'),
2426
badge: {
2527
color: vexhub.spec.enabled ? ('bg-success' as 'bg-success') : ('bg-error' as 'bg-error'),
2628
label: t(`imageScanner.enum.status.${vexhub.spec.enabled ? 'enabled' : 'disabled'}`)
@@ -47,11 +49,17 @@ const defaultMastheadProps = computed(() => {
4749
},
4850
{
4951
label: 'Last sync',
50-
value: null
52+
value: undefined, // TODO: Add last sync time when backend supports it
5153
},
5254
{
5355
label: 'Updated',
54-
value: vexhub.metadata.creationTimestamp
56+
value: vexhub.metadata.creationTimestamp,
57+
valueOverride: {
58+
component: Date,
59+
props: {
60+
value: vexhub.metadata.creationTimestamp,
61+
}
62+
}
5563
}
5664
],
5765
annotations: [],

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ imageScanner:
136136
enable:
137137
label: Enabled
138138
tooltip: Controls whether this VEX entry is active in vulnerability assessments.
139+
detail:
140+
description: VEX management hub description, if any
139141
enum:
140142
cve:
141143
critical: Critical

pkg/sbombastic-image-vulnerability-scanner/models/sbombastic.rancher.io.vexhub.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export default class SbombasticRancherIoVexhub extends SteveModel {
1414
'downloadyaml',
1515
'viewYaml',
1616
'goToViewYaml',
17-
'viewInApi'
17+
'viewInApi',
18+
'showConfiguration',
1819
]);
1920
out = out.filter((a) => !a?.action || !remove.has(a.action));
2021

0 commit comments

Comments
 (0)