Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update constants
  • Loading branch information
dkmyta authored and nateweller committed Dec 5, 2024
commit 4742c9afd35a8c726fb753dd0d68c4013066adc7
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const THREAT_ICONS = {

export const THREAT_FIELD_ICON = 'icon';
export const THREAT_FIELD_TYPE = 'type';
export const THREAT_FIELD_EXTENSION = 'extension';
export const THREAT_FIELD_NAME = 'name';
export const THREAT_FIELD_SAFETY = 'safety';
export const THREAT_FIELD_UPDATE = 'update';
export const THREAT_FIELD_VERSION = 'version';
15 changes: 5 additions & 10 deletions projects/js-packages/components/components/scan-report/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useCallback, useMemo, useState } from 'react';
import ShieldAlertIcon from '../shield-alert';
import ShieldCheckIcon from '../shield-check';
import {
THREAT_FIELD_EXTENSION,
THREAT_FIELD_NAME,
THREAT_FIELD_VERSION,
THREAT_FIELD_ICON,
THREAT_FIELD_SAFETY,
Expand Down Expand Up @@ -50,19 +50,14 @@ export default function ScanReport( { data, filters, onChangeSelection } ): JSX.
const defaultLayouts: SupportedLayouts = {
table: {
...baseView,
fields: [
THREAT_FIELD_SAFETY,
THREAT_FIELD_TYPE,
THREAT_FIELD_EXTENSION,
THREAT_FIELD_VERSION,
],
fields: [ THREAT_FIELD_SAFETY, THREAT_FIELD_TYPE, THREAT_FIELD_NAME, THREAT_FIELD_VERSION ],
layout: {
primaryField: THREAT_FIELD_SAFETY,
},
},
list: {
...baseView,
fields: [ THREAT_FIELD_SAFETY, THREAT_FIELD_EXTENSION, THREAT_FIELD_VERSION ],
fields: [ THREAT_FIELD_SAFETY, THREAT_FIELD_NAME, THREAT_FIELD_VERSION ],
layout: {
primaryField: THREAT_FIELD_TYPE,
mediaField: THREAT_FIELD_ICON,
Expand Down Expand Up @@ -138,8 +133,8 @@ export default function ScanReport( { data, filters, onChangeSelection } ): JSX.
},
},
{
id: THREAT_FIELD_EXTENSION,
label: __( 'Extension', 'jetpack' ),
id: THREAT_FIELD_NAME,
label: __( 'Name', 'jetpack' ),
enableGlobalSearch: true,
render( { item } ) {
return item.name ? item.name : '';
Expand Down