palash-signoz 9f7c60d2c1
Fe: Feat/trace detail (#764)
* feat: new trace detail page flame graph

* feat: new trace detail page layout

* test: trace detail is wip

* chore: trace details in wip

* feat: trace detail page timeline component

* chore: spantoTree is updated

* chore: gantchart is updated

* chore: onClick is added

* chore: isSpanPresentInSearchString util is added

* chore: trace graph is updated

* chore: added the hack to work

* feat: is span present util is added

* chore: in span ms is added

* chore: tooltip is updated

* WIP: chore: trace details changes are updated

* feat: getTraceItem is added

* feat: trace detail page is updated

* feat: trace detail styling changes

* feat: trace detail page is updated

* feat: implement span hover, select, focus and reset

* feat: reset focus

* feat: spanId as query table and unfurling

* feat: trace details is updated

* chore: remove lodash

* chore: remove lodash

* feat: trace details is updated

* feat: new trace detail page styling changes

* feat: new trace detail page styling changes

* feat: improved styling

* feat: remove horizontal scrolling

* feat: new trace detail page modify caret icon

* chore styles are updated

* Revert "chore: Trace styles"

* chore styles are updated

* feat: timeline normalisation

* chore: remove mock data

* chore: sort tree data util is added and selected span component is updated

* chore: trace changes are updated

* chore: trace changes are updated

* chore: trace changes are updated

* feat: refactored time units for new trace detail page

* chore: remove mockdata

* feat: new trace detail page themeing and interval loop fix

* chore: error tag is updated

* chore: error tag is updated

* chore: error tag is updated

* chore: error tag is updated

* chore: console is removed

* fix: error tag expand button

* chore: expanded panel is updated

* feat: scroll span from gantt chart intoview

* chore: trace detail is removed

Co-authored-by: Pranshu Chittora <pranshu@signoz.io>
2022-03-03 19:04:23 +05:30

51 lines
1.2 KiB
TypeScript

import ROUTES from 'constants/routes';
import TopNav from 'container/Header';
import SideNav from 'container/SideNav';
import history from 'lib/history';
import React, { ReactNode, useEffect, useState } from 'react';
import { useSelector } from 'react-redux';
import { AppState } from 'store/reducers';
import AppReducer from 'types/reducer/app';
import { Content, Footer, Layout } from './styles';
const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
const { isLoggedIn } = useSelector<AppState, AppReducer>((state) => state.app);
const [isSignUpPage, setIsSignUpPage] = useState(
ROUTES.SIGN_UP === location.pathname,
);
useEffect(() => {
if (!isLoggedIn) {
setIsSignUpPage(true);
history.push(ROUTES.SIGN_UP);
} else {
if (isSignUpPage) {
setIsSignUpPage(false);
}
}
}, [isLoggedIn, isSignUpPage]);
const currentYear = new Date().getFullYear();
return (
<Layout>
{!isSignUpPage && <SideNav />}
<Layout>
<Content>
{!isSignUpPage && <TopNav />}
{children}
</Content>
{/* <Footer>{`SigNoz Inc. © ${currentYear}`}</Footer> */}
</Layout>
</Layout>
);
};
interface AppLayoutProps {
children: ReactNode;
}
export default AppLayout;