Skip to content

Commit

Permalink
feat: add event log to project (#2136)
Browse files Browse the repository at this point in the history
  • Loading branch information
aneeshrelan committed Oct 12, 2022
1 parent 8f02b4d commit e1b903a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontend/src/component/project/Project/Project.tsx
Expand Up @@ -23,6 +23,7 @@ import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { Routes, Route, useLocation } from 'react-router-dom';
import { DeleteProjectDialogue } from './DeleteProject/DeleteProjectDialogue';
import { ProjectLog } from './ProjectLog/ProjectLog';

const StyledDiv = styled('div')(() => ({
display: 'flex',
Expand Down Expand Up @@ -84,6 +85,11 @@ const Project = () => {
path: `${basePath}/archive`,
name: 'archive',
},
{
title: 'Event log',
path: `${basePath}/logs`,
name: 'logs',
},
];

const activeTab = [...tabs]
Expand Down Expand Up @@ -211,6 +217,7 @@ const Project = () => {
<Route path="access/*" element={<ProjectAccess />} />
<Route path="environments" element={<ProjectEnvironment />} />
<Route path="archive" element={<ProjectFeaturesArchive />} />
<Route path="logs" element={<ProjectLog />} />
<Route path="*" element={<ProjectOverview />} />
</Routes>
</div>
Expand Down
23 changes: 23 additions & 0 deletions frontend/src/component/project/Project/ProjectLog/ProjectLog.tsx
@@ -0,0 +1,23 @@
import { EventLog } from 'component/events/EventLog/EventLog';
import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
import { styled } from '@mui/material';

const StyledDiv = styled('div')(({ theme }) => ({
borderRadius: '12.5px',
backgroundColor: theme.palette.background.paper,
padding: '2rem',
}));

export const ProjectLog = () => {
const projectId = useRequiredPathParam('projectId');

return (
<StyledDiv>
<EventLog
title="Event Log"
project={projectId}
displayInline
></EventLog>
</StyledDiv>
);
};

0 comments on commit e1b903a

Please sign in to comment.