1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

feat: add event log to project (#2136)

This commit is contained in:
Aneesh Relan 2022-10-12 18:10:37 +05:30 committed by GitHub
parent 8f02b4ddd7
commit e1b903a36c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

View File

@ -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',
@ -84,6 +85,11 @@ const Project = () => {
path: `${basePath}/archive`,
name: 'archive',
},
{
title: 'Event log',
path: `${basePath}/logs`,
name: 'logs',
},
];
const activeTab = [...tabs]
@ -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>

View File

@ -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>
);
};