Skip to content

Commit

Permalink
Updates defaultLayouts fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmyta committed Dec 12, 2024
1 parent db6d851 commit 99cd20f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export const THREAT_TYPES = [
];

export const THREAT_ICONS = {
plugin: pluginIcon,
theme: themeIcon,
plugins: pluginIcon,
themes: themeIcon,
core: coreIcon,
file: fileIcon,
default: shieldIcon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
THREAT_FIELD_SIGNATURE,
THREAT_FIELD_STATUS,
THREAT_FIELD_THEME,
THREAT_FIELD_THREAT,
THREAT_FIELD_TITLE,
THREAT_FIELD_TYPE,
THREAT_ICONS,
Expand Down Expand Up @@ -101,23 +100,10 @@ export default function ThreatsDataViews( {
const defaultLayouts: SupportedLayouts = {
table: {
...baseView,
fields: [
THREAT_FIELD_SEVERITY,
THREAT_FIELD_THREAT,
THREAT_FIELD_TYPE,
THREAT_FIELD_AUTO_FIX,
],
layout: {
primaryField: THREAT_FIELD_SEVERITY,
combinedFields: [
{
id: THREAT_FIELD_THREAT,
label: __( 'Threat', 'jetpack-components' ),
children: [ THREAT_FIELD_TITLE, THREAT_FIELD_DESCRIPTION ],
direction: 'vertical',
},
],
},
fields: [ THREAT_FIELD_SEVERITY, THREAT_FIELD_TYPE, THREAT_FIELD_AUTO_FIX ],
titleField: THREAT_FIELD_TITLE,
descriptionField: THREAT_FIELD_DESCRIPTION,
showMedia: false,
},
list: {
...baseView,
Expand All @@ -127,10 +113,9 @@ export default function ThreatsDataViews( {
THREAT_FIELD_EXTENSION,
THREAT_FIELD_SIGNATURE,
],
layout: {
primaryField: THREAT_FIELD_TITLE,
mediaField: THREAT_FIELD_ICON,
},
titleField: THREAT_FIELD_TITLE,
mediaField: THREAT_FIELD_ICON,
showMedia: true,
},
};

Expand Down

0 comments on commit 99cd20f

Please sign in to comment.