Skip to content

Commit

Permalink
Merge branch 'develop' into rsc-filter-resources
Browse files Browse the repository at this point in the history
  • Loading branch information
chrtorres committed Apr 23, 2024
2 parents 22c529a + 372e467 commit d2fb7ea
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 178 deletions.
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:18-alpine3.17
USER root

RUN apk update && apk upgrade
RUN apk update && apk upgrade && apk add g++ make py3-pip

WORKDIR /app
COPY ./package* ./
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/components/ReadySetCyber/RSCDashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React, { useEffect, useCallback, useState } from 'react';
import React, { useEffect, useCallback } from 'react';
import Box from '@mui/material/Box';
import Grid from '@mui/material/Grid';
import Stack from '@mui/material/Stack';
import Divider from '@mui/material/Divider';
import { RSCSideNav } from './RSCSideNav';
import { RSCDefaultSideNav } from './RSCDefaultSideNav';
import { RSCResult } from './RSCResult';
import { useAuthContext } from 'context';

export const RSCDashboard: React.FC = () => {
const { user, apiGet } = useAuthContext();
const { apiGet } = useAuthContext();

const [results, setResults] = React.useState<
{
Expand All @@ -33,7 +32,7 @@ export const RSCDashboard: React.FC = () => {

useEffect(() => {
fetchResults();
}, []);
}, [fetchResults]);

return (
<Box sx={{ flexGrow: 1, padding: 2 }}>
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/components/ReadySetCyber/RSCDefaultSideNav.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import React from 'react';
import { useParams } from 'react-router-dom';
import Box from '@mui/material/Box';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import Divider from '@mui/material/Divider';

export const RSCDefaultSideNav: React.FC = () => {
const { id } = useParams<{ id: string }>();

return (
<div>
<Box sx={{ width: '100%', maxWidth: 360, bgcolor: 'background.paper' }}>
Expand Down
159 changes: 0 additions & 159 deletions frontend/src/components/ReadySetCyber/RSCHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,162 +187,3 @@ export const RSCHeader: React.FC = () => {
</Box>
);
};

// import React from 'react';
// import { AppBar, Box, Container, Tooltip, IconButton, Menu, MenuItem } from '@mui/material';
// import { Toolbar } from '@mui/material';
// import { Typography } from '@mui/material';
// import { useHistory } from 'react-router-dom';
// import { useAuthContext } from 'context';
// import RSCLogo from '../../assets/ReadySetCyberLogo.png';

// export const RSCHeader: React.FC = () => {
// const history = useHistory();
// const handleNavHome = () => {
// history.push('/readysetcyber');
// };

// const { user, logout } = useAuthContext();
// return (
// <Box>
// <AppBar position="static" sx={{ bgcolor: 'white' }}>
// <Container maxWidth="xl">
// <Toolbar disableGutters>
// <Tooltip title="Go to Ready Set Cyber" arrow>
// <IconButton
// onClick={handleNavHome}
// sx={{ display: { xs: 'none', md: 'flex' }, mr: 1 }}
// style={{ backgroundColor: 'white', outline: 'none' }}
// disableFocusRipple
// >
// <img
// src={RSCLogo}
// alt="Ready Set Cyber Logo"
// style={{
// width: '4em',
// height: '2em'
// }}
// />
// </IconButton>
// </Tooltip>
// <Typography
// variant="h6"
// component="div"
// sx={{
// flexGrow: 1,
// color: '#07648D',
// display: { xs: 'none', md: 'flex' },
// mr: 2
// }}
// >
// Dashboard
// </Typography>
// <Box sx={{ flexGrow: 1, display: { xs: 'flex', md: 'none' } }}>
// <Tooltip title="Go to Ready Set Cyber" arrow>
// <IconButton
// onClick={handleNavHome}
// sx={{ display: { xs: 'flex', md: 'none' }, mr: 0 }}
// style={{ backgroundColor: 'white', outline: 'none' }}
// >
// <img
// src={RSCLogo}
// alt="Ready Set Cyber Logo"
// style={{
// width: '4em',
// height: '2em'
// }}
// />
// </IconButton>
// </Tooltip>
// </Box>
// {user && (
// <>
// <IconButton
// size="large"
// aria-label="nav menu"
// aria-controls="menu-navbar"
// aria-haspopup="true"
// color="primary"
// onClick={handleOpenNavMenu}
// style={{ outline: 'none' }}
// sx={{ display: { xs: 'block', md: 'none' } }}
// >
// <MenuIcon />
// </IconButton>
// <Menu
// id="menu-appbar"
// anchorEl={anchorElNav}
// anchorOrigin={{
// vertical: 'top',
// horizontal: 'right'
// }}
// keepMounted
// transformOrigin={{
// vertical: 'top',
// horizontal: 'right'
// }}
// open={Boolean(anchorElNav)}
// onClose={handleCloseNavMenu}
// sx={{ display: { xs: 'block', md: 'none' } }}
// >
// <MenuItem style={{ outline: 'none' }}>
// {' '}
// Welcome, user
// </MenuItem>
// <MenuItem style={{ outline: 'none' }} onClick={handleNavHome}>
// Dashboard
// </MenuItem>
// <MenuItem style={{ outline: 'none' }}>
// {' '}
// Take Questionnaire Again{' '}
// </MenuItem>
// <MenuItem style={{ outline: 'none' }} onClick={logout}>
// Logout
// </MenuItem>
// </Menu>
// </>
// )}
// {user && (
// <Box sx={{ flexGrow: 0, display: { xs: 'none', md: 'flex' } }}>
// <Tooltip title="Open Menu" arrow>
// <IconButton
// sx={{ p: 0 }}
// size="large"
// aria-label="account of current user"
// aria-controls="menu-appbar"
// aria-haspopup="true"
// color="primary"
// onClick={handleMenu}
// style={{ outline: 'none' }}
// >
// <AccountCircle />
// </IconButton>
// </Tooltip>
// <Menu
// sx={{ marginTop: '40px' }}
// id="menu-appbar"
// anchorEl={anchorEl}
// anchorOrigin={{
// vertical: 'top',
// horizontal: 'right'
// }}
// keepMounted
// transformOrigin={{
// vertical: 'top',
// horizontal: 'right'
// }}
// open={Boolean(anchorEl)}
// onClose={handleClose}
// >
// <MenuItem style={{ outline: 'none' }} onClick={logout}>
// Logout
// </MenuItem>
// </Menu>
// </Box>
// )}
// </Toolbar>
// </Container>
// </AppBar>
// </Box>
// );
// };
9 changes: 1 addition & 8 deletions frontend/src/components/ReadySetCyber/RSCQuestion.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import React from 'react';
import {
Box,
Button,
Grid,
Typography,
FormControlLabel,
Radio
} from '@mui/material';
import { Box, Button, Grid, Typography, Radio } from '@mui/material';
import { isResourceVisible } from './helpers/index';
import { IconFilter } from './components/index';

Expand Down
3 changes: 0 additions & 3 deletions frontend/src/components/ReadySetCyber/RSCSideNav.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { useParams } from 'react-router-dom';
import Box from '@mui/material/Box';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
Expand All @@ -14,8 +13,6 @@ export interface Category {
name: string;
}
export const RSCSideNav: React.FC<Props> = ({ categories }) => {
const { id } = useParams<{ id: string }>();

return (
<div>
<Box sx={{ width: '100%', maxWidth: 360, bgcolor: 'background.paper' }}>
Expand Down

0 comments on commit d2fb7ea

Please sign in to comment.