diff --git a/components/ControlTable.jsx b/components/ControlTable.jsx new file mode 100644 index 00000000..2d4469a8 --- /dev/null +++ b/components/ControlTable.jsx @@ -0,0 +1,69 @@ +import Table from '@mui/material/Table'; +import TableBody from '@mui/material/TableBody'; +import TableCell from '@mui/material/TableCell'; +import TableContainer from '@mui/material/TableContainer'; +import TableHead from '@mui/material/TableHead'; +import TableRow from '@mui/material/TableRow'; +import Paper from '@mui/material/Paper'; +import { Stack } from '@mui/material' +import { Chip } from '@mui/material' + + +function Implementation({ children }) { + return ( + + + + + + ) + +} + +function createData(name, calories, fat, carbs, protein) { + return { name, calories, fat, carbs, protein }; +} + +const rows = [ + createData('Frozen yoghurt', 159, 6.0, 24, 4.0), + createData('Ice cream sandwich', 237, 9.0, 37, 4.3), + createData('Eclair', 262, 16.0, 24, 6.0), + createData('Cupcake', 305, 3.7, 67, 4.3), + createData('Gingerbread', 356, 16.0, 49, 3.9), +]; + + +export function ControlTable({controls, framework='NIST80053'}) { + +console.log('ControlTable:controls: ', controls) + + return ( + + + + + Framework Section + Control + Description + Implementation(s) + Owner + + + + {controls.map((row, i) => ( + + {row.data?.framework?.[framework]?.section ?? null} + {row?.data?.id ?? null} + {row?.data?.description ?? null } + {row?.carbs ?? null} + {row?.data?.control_owner ?? null} + + ))} + +
+
+ ); +} \ No newline at end of file diff --git a/components/TopBar.jsx b/components/TopBar.jsx index e3af8dfb..ac059e09 100644 --- a/components/TopBar.jsx +++ b/components/TopBar.jsx @@ -77,6 +77,11 @@ function Topbar({ Cloud Services + + + Frameworks + + { ); }; +export default dynamic(() => Promise.resolve(Page), { + ssr: false, + }); -export default function Page({ businessUnits }) { +function Page({ businessUnits }) { const topBarHeight = 64; diff --git a/pages/frameworks/index.jsx b/pages/frameworks/index.jsx index 0d2d741f..e8b8b51a 100644 --- a/pages/frameworks/index.jsx +++ b/pages/frameworks/index.jsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useState, useEffect } from 'react' import WarningIcon from "@mui/icons-material/Warning"; import { Typography, Box } from "@mui/material"; import { @@ -26,67 +26,111 @@ import Accordion from '@mui/material/Accordion'; import AccordionSummary from '@mui/material/AccordionSummary'; import AccordionDetails from '@mui/material/AccordionDetails'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import { Menu, NavigationDrawer } from '@/components/airview-ui'; - - -function FrameworkSection({domain}) { +function FrameworkSection({ domain }) { return ( - - } - aria-controls="panel1a-content" - id="panel1a-header" - > - {domain.title} ({domain.id}) - - - {domain.controls ? ( - domain.controls.map((ct, i) => ) - ) : ( - null - )} + + } + aria-controls="panel1a-content" + id="panel1a-header" + > + {domain.title} ({domain.id}) + + + {domain.controls ? ( + domain.controls.map((ct, i) => ) + ) : ( + null + )} - - + + ) } -function FrameworkControl({control}) { +function FrameworkControl({ control }) { console.log('control : ', control) return ( - - {control.title} - - - {control.specification} + sx={{ + // bgcolor: 'background.paper', + // borderColor: 'error', //icon.color, + boxShadow: 0, + border: 1, + borderRadius: 2, + p: 2, + m: '1%' + // minWidth: 300, + }} + > + + {control.title} + + + {control.specification} ) }; export default function Page({ framework }) { + const navItemsDocs = [ + { + groupTitle: "Infrastructure-as-Code", + links: [ + { + label: "terraform-azure-storage", + url: "", + }, + ], + }, + { + groupTitle: "Designs", + links: [ + { + label: "Static Content Website", + url: "", + }, + { + label: "Data Lakes", + url: "", + }, + ], + }, + ]; + const navDrawerWidth = 300; const topBarHeight = 64; - return ( + const [menuOpen, setMenuOpen] = useState(true); + + const handleOnNavButtonClick = () => setMenuOpen((prevState) => !prevState); return ( - -
+ + + + +
+ {framework.name} ({framework.version}) {/* @@ -127,15 +171,15 @@ export default function Page({ framework }) { */} - - - {framework.domains ? ( - framework.domains.map((fr, i) => ) - ) : ( - null - )} - - + {/* */} + <> + {framework.domains ? ( + framework.domains.map((fr, i) => ) + ) : ( + null + )} + + {/* */}
diff --git a/pages/index.js b/pages/index.js index 21906214..f9dedbcf 100644 --- a/pages/index.js +++ b/pages/index.js @@ -14,7 +14,7 @@ import Typography from '@mui/material/Typography'; import Container from '@mui/material/Container'; import Link from '@mui/material/Link'; import { ThemeProvider } from '@mui/material/styles'; -import { theme } from '../constants/baseTheme'; +import { baseTheme } from '@/constants/baseTheme'; import Menu from '@mui/material/Menu'; import MenuItem from '@mui/material/MenuItem'; import { Menu as MenuIcon, ExpandMore as ExpandMoreIcon } from '@mui/icons-material'; @@ -66,7 +66,7 @@ const SiteSection = ({ title, description, link }) => { } const LandingPage = () => { return ( - + {/* Hero Section */} diff --git a/pages/services/[[...parms]].jsx b/pages/services/[[...parms]].jsx index 4f2718fe..cbd5c59e 100644 --- a/pages/services/[[...parms]].jsx +++ b/pages/services/[[...parms]].jsx @@ -17,7 +17,7 @@ import { ErrorBoundary } from 'react-error-boundary' import { useDebounceFn } from 'ahooks' import dynamic from 'next/dynamic' import { useRouter } from 'next/router'; -import { theme } from '../../constants/baseTheme'; +import { baseTheme } from '../../constants/baseTheme'; import { ThemeProvider } from '@mui/material/styles'; import CssBaseline from '@mui/material/CssBaseline'; import { mdComponents } from "../../constants/mdxProvider"; @@ -33,12 +33,13 @@ import Accordion from '@mui/material/Accordion'; import AccordionSummary from '@mui/material/AccordionSummary'; import AccordionDetails from '@mui/material/AccordionDetails'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import { MiniStatisticsCard } from "@/components/dashboard"; import { MDXProvider } from '@mdx-js/react'; import { Menu, NavigationDrawer } from '../../components/airview-ui'; import { getAllFiles, getFileContent } from '../../backend/filesystem'; - +import { ControlTable } from '@/components/ControlTable'; function removeSection(pad, tagName) { const re = new RegExp("<" + tagName + "\\s+[^>]*>(.*?)", "gs"); @@ -348,7 +349,7 @@ function IndexView({ const handleOnNavButtonClick = () => setMenuOpen((prevState) => !prevState); return ( - + setMenuOpen((prevState) => !prevState); return ( - + - - - {frontmatter.status === 'approved' ? : } - {(frontmatter?.resilience?.redundancy) ? : } - {frontmatter?.resilience?.find(item => item.name === "availability") ? ( - item.name === "availability").availability}`} - color="success" - /> - ) : ( - - )} + {/* */} + + + {frontmatter.title} + + {frontmatter.status === 'approved' ? : } + {(frontmatter?.resilience?.redundancy) ? : } + {frontmatter?.resilience?.find(item => item.name === "availability") ? ( + item.name === "availability").availability}`} + color="success" + /> + ) : ( + + )} - - + + + + + + + {/* */} ) } @@ -610,7 +625,7 @@ function ServiceView({ const handleOnNavButtonClick = () => setMenuOpen((prevState) => !prevState); return ( - + - {frontmatter.title && {frontmatter.title}} + {/* {frontmatter.title && {frontmatter.title}} */} {/* {pageData.type && {pageData.type}} */} {frontmatter && } @@ -653,8 +668,9 @@ function ServiceView({ {/* */} {state && state.file && state.file.result ? () : null} - + Controls +
diff --git a/tsconfig.json b/tsconfig.json index a6aeb07c..b7850cf4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,9 @@ "baseUrl": ".", "paths": { "@/components/*": ["components/*"], - "@/context/*": ["context/*"] + "@/context/*": ["context/*"], + "@/constants/*": ["constants/*"] + }, "allowJs": true, "skipLibCheck": true,