Skip to content

Commit

Permalink
test for workflow, it should now pass
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanprior committed Oct 26, 2024
1 parent 05f20df commit 21c9b55
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 31 deletions.
8 changes: 4 additions & 4 deletions client/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Navbar: React.FC<NavbarProps> = ({ toggleDarkMode, isDarkMode }) => {

const handleLogout = () => {
console.log('User logged out');
navigate('/');
navigate('/');
};

useEffect(() => {
Expand All @@ -37,7 +37,7 @@ const Navbar: React.FC<NavbarProps> = ({ toggleDarkMode, isDarkMode }) => {
return (
<nav className={isDarkMode ? 'dark-mode' : ''}>
<Link to="/" className="logo" title="Home">
<img src={LOGO} alt="Wood Plank T" className="logo-image" />
<img src={LOGO} alt="Wood Plank T" className="logo-image" />
</Link>
<div className="nav-buttons">
<Link to="/events-dashboard" className="nav-button">
Expand All @@ -61,8 +61,8 @@ const Navbar: React.FC<NavbarProps> = ({ toggleDarkMode, isDarkMode }) => {
Profile
</Link>
<Link to="/login" className="dropdown-link">
Login
</Link>
Login
</Link>
<div className="dropdown-link" onClick={handleLogout}>
Logout
</div>
Expand Down
5 changes: 2 additions & 3 deletions client/src/components/charts/PieChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const TestPieChart: React.FC = () => {

useEffect(() => {
const intervalId = setInterval(() => {
setData(prevData =>
prevData.map(point => ({
setData((prevData) =>
prevData.map((point) => ({
...point,
value: Math.floor(Math.random() * 500),
}))
Expand Down Expand Up @@ -54,4 +54,3 @@ const TestPieChart: React.FC = () => {
};

export default TestPieChart;

23 changes: 19 additions & 4 deletions client/src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import React, { lazy, useState } from 'react';
import { DragDropContext, Droppable, Draggable, DropResult } from '@hello-pangea/dnd';
import {
DragDropContext,
Droppable,
Draggable,
DropResult,
} from '@hello-pangea/dnd';
import { CardState } from '../types';

const Card = lazy(() => import('../components/Card'));
const UserActivityChart = lazy(() => import('../components/charts/UserActivity'));
const UserActivityChart = lazy(
() => import('../components/charts/UserActivity')
);
const HeatMap = lazy(() => import('../components/charts/HeatMap'));
const IpAccessCombined = lazy(() => import('../components/IpAccessCombined'));
const EventTypeChart = lazy(() => import('../components/charts/EventType'));
Expand All @@ -14,9 +21,17 @@ const Home: React.FC<{ isDarkMode: boolean }> = ({ isDarkMode }) => {
const [currentIp, setCurrentIp] = useState<string | undefined>();

const [cards, setCards] = useState<CardState[]>([
{ id: 'userActivity', title: 'User Activity', component: <UserActivityChart /> },
{
id: 'userActivity',
title: 'User Activity',
component: <UserActivityChart />,
},
{ id: 'eventTypes', title: 'Event Types', component: <EventTypeChart /> },
{ id: 'eventSources', title: 'Event Sources', component: <EventSourceChart /> },
{
id: 'eventSources',
title: 'Event Sources',
component: <EventSourceChart />,
},
{ id: 'heatMap', title: 'IP Address Heat Map', component: <HeatMap /> },
{
id: 'ipAccess',
Expand Down
4 changes: 3 additions & 1 deletion client/src/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ const Login: React.FC = () => {
required
/>
</div>
<button className="login-button" type="submit">Login</button>
<button className="login-button" type="submit">
Login
</button>
</form>
<div className="signup-link">
<p>
Expand Down
66 changes: 48 additions & 18 deletions client/src/pages/Profile.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { ProfileProps } from "../types";
import "../profile.css";
import React from 'react';
import { ProfileProps } from '../types';
import '../profile.css';

interface User {
username: string;
Expand All @@ -12,12 +12,12 @@ interface User {
}

const user: User = {
username: "BobTest",
displayName: "Bob Test",
email: "[email protected]",
phone: "+1 (234) 567-890",
company: "Test Guys Inc.",
link: "https://aws.amazon.com",
username: 'BobTest',
displayName: 'Bob Test',
email: '[email protected]',
phone: '+1 (234) 567-890',
company: 'Test Guys Inc.',
link: 'https://aws.amazon.com',
};

const Profile: React.FC<ProfileProps> = ({ isDarkMode }) => {
Expand All @@ -26,9 +26,9 @@ const Profile: React.FC<ProfileProps> = ({ isDarkMode }) => {
<div className="left-container">
<div className="profile-settings">
<div className="profile-picture">
<img
src="https://m.media-amazon.com/images/I/51IdQIkjlBL._AC_UF894,1000_QL80_.jpg"
alt="Profile"
<img
src="https://m.media-amazon.com/images/I/51IdQIkjlBL._AC_UF894,1000_QL80_.jpg"
alt="Profile"
/>
</div>
<div className="profile-info">
Expand Down Expand Up @@ -68,7 +68,12 @@ const Profile: React.FC<ProfileProps> = ({ isDarkMode }) => {
</div>
<button className="submit-button">Submit</button>
<button className="logout-button logout-button-styled">Logout</button>
<a className="aws-login-button submit-button" href={user.link} target="_blank" rel="noopener noreferrer">
<a
className="aws-login-button submit-button"
href={user.link}
target="_blank"
rel="noopener noreferrer"
>
AWS Log-in Information
</a>
</div>
Expand Down Expand Up @@ -102,22 +107,42 @@ const Profile: React.FC<ProfileProps> = ({ isDarkMode }) => {
<div className="input-container bordered">
<label>Radio Options</label>
<div>
<input type="radio" id="radio1" name="radioOption" value="radio1" />
<input
type="radio"
id="radio1"
name="radioOption"
value="radio1"
/>
<label htmlFor="radio1">Radio 1</label>
</div>
<div>
<input type="radio" id="radio2" name="radioOption" value="radio2" />
<input
type="radio"
id="radio2"
name="radioOption"
value="radio2"
/>
<label htmlFor="radio2">Radio 2</label>
</div>
</div>
<div className="input-container bordered">
<label htmlFor="checkboxOptions">Checkbox Options</label>
<div>
<input type="checkbox" id="checkbox1" name="checkboxOptions" value="checkbox1" />
<input
type="checkbox"
id="checkbox1"
name="checkboxOptions"
value="checkbox1"
/>
<label htmlFor="checkbox1">Checkbox 1</label>
</div>
<div>
<input type="checkbox" id="checkbox2" name="checkboxOptions" value="checkbox2" />
<input
type="checkbox"
id="checkbox2"
name="checkboxOptions"
value="checkbox2"
/>
<label htmlFor="checkbox2">Checkbox 2</label>
</div>
</div>
Expand All @@ -127,7 +152,12 @@ const Profile: React.FC<ProfileProps> = ({ isDarkMode }) => {
</div>
<div className="input-container bordered">
<label htmlFor="tagSelector">Tag Selector</label>
<input type="text" id="tagSelector" name="tagSelector" placeholder="Add tags..." />
<input
type="text"
id="tagSelector"
name="tagSelector"
placeholder="Add tags..."
/>
</div>
<div className="input-container bordered">
<label htmlFor="numberInput">Enter a Number</label>
Expand Down
4 changes: 3 additions & 1 deletion client/src/pages/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ const SignUp: React.FC = () => {
required
/>
</div>
<button className="signup-button" type="submit">Sign Up</button>
<button className="signup-button" type="submit">
Sign Up
</button>
</form>
</div>
);
Expand Down

0 comments on commit 21c9b55

Please sign in to comment.