diff --git a/components/compliance/ControlData.jsx b/components/compliance/ControlData.jsx index a429917d..ee985ecd 100644 --- a/components/compliance/ControlData.jsx +++ b/components/compliance/ControlData.jsx @@ -20,7 +20,7 @@ function FrameworkPanel({value, index, framework}) { - {framework.mapping.map((mapping, index) => ( + {framework.mappings && framework.mappings.map((mapping, index) => ( {mapping.domain} {mapping.control_id} @@ -164,20 +164,25 @@ export function ControlDataDisplay({ data }) { {activeStep === 0 && ( - {data?.description || 'N/A'} - - + {data?.description || ''} + {data?.discussion || ''} + Provider: - + Service: {data?.service || 'N/A'} - + Control Owner: - + Quality Model: + + Control Owner: + + + )} {activeStep === 1 && ( diff --git a/components/dashboard/Menus/ControlsMenu.js b/components/dashboard/Menus/ControlsMenu.js index 1a5dbc53..a2496782 100644 --- a/components/dashboard/Menus/ControlsMenu.js +++ b/components/dashboard/Menus/ControlsMenu.js @@ -40,7 +40,7 @@ export function ControlsMenu({ }} scroll='paper'> - {controlUrl.selectedControl?.data?.name} ({controlUrl.selectedControl?.data?.id || 'N/A'}) + {controlUrl.selectedControl?.data?.friendly_name || controlUrl.selectedControl?.data?.name } ({controlUrl.selectedControl?.data?.id || 'N/A'}) setDialogOpen(false)} aria-label="close"> @@ -61,7 +61,7 @@ function createControlMenu(controls) { // console.log('createControlMenu:controls: ', controls) try { const links = controls.map((control) => { - const label = control.data.name || control.data.id || ''; // Adjust the property name according to your control data structure + const label = control.data.friendly_name || control.data.id || ''; // Adjust the property name according to your control data structure const url = control.file; return { diff --git a/pages/services/[...service].jsx b/pages/services/[...service].jsx index 4d1eb50c..f9557dde 100644 --- a/pages/services/[...service].jsx +++ b/pages/services/[...service].jsx @@ -87,14 +87,15 @@ export async function getServerSideProps(context) { true, ".toml" ); + const controlContent = controlFiles.map(async (file) => { const content = await getFileContent( siteConfig.content.services.owner, siteConfig.content.services.repo, siteConfig.content.services.branch, - file + file.path ); - return { data: parse(content), file: file }; + return { data: parse(content), file: file.path }; }); // const util = require('util')