Skip to content

Commit bbc68b9

Browse files
committed
fix(ui): always show vuln analysis record view for findings instead of create in place from finding table
1 parent e45feeb commit bbc68b9

File tree

1 file changed

+11
-27
lines changed

1 file changed

+11
-27
lines changed

ui/src/utils/metrics.ts

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -409,34 +409,18 @@ export function buildVulnerabilityColumns(
409409
key: 'actions',
410410
width: 80,
411411
render: (row: any) => {
412-
// If analysisState exists, show view (eye) icon, otherwise show edit icon
413-
if (row.analysisState) {
414-
const viewIcon = h(NIcon, {
415-
title: 'View Analysis',
416-
class: 'icons clickable',
417-
size: 25,
418-
onClick: () => {
419-
if (options?.onViewAnalysis) {
420-
options.onViewAnalysis(row)
421-
}
422-
}
423-
}, { default: () => h(Eye) })
424-
425-
return h('div', {}, [viewIcon])
426-
} else {
427-
const editIcon = h(NIcon, {
428-
title: 'Create Analysis',
429-
class: 'icons clickable',
430-
size: 25,
431-
onClick: () => {
432-
if (options?.onEditFinding) {
433-
options.onEditFinding(row)
434-
}
412+
const viewIcon = h(NIcon, {
413+
title: 'View Analysis',
414+
class: 'icons clickable',
415+
size: 25,
416+
onClick: () => {
417+
if (options?.onViewAnalysis) {
418+
options.onViewAnalysis(row)
435419
}
436-
}, { default: () => h(Edit) })
437-
438-
return h('div', {}, [editIcon])
439-
}
420+
}
421+
}, { default: () => h(Eye) })
422+
423+
return h('div', {}, [viewIcon])
440424
}
441425
}
442426
]

0 commit comments

Comments
 (0)