* fix(player): fix initial visual offset jump check * change(ui): add empty feature flags page * change(ui): add empty feature flags page * fix(ui): some more fixes * change(ui): add subrouting for sessions tab * change(ui): more fixes for routing * change(ui): add flag creation page, flags list table, flag store/type * change(tracker): flags in tracker * change(tracker): return all flags * feat(ui): add API and types connector * feat(ui): split components to prevent rerendering * feat(ui): add icon, fix redirect.path crashlooping * feat(ui): add conditions and stuff, add flags class to tracker to handle stuff * feat(ui): add condition state and filters * feat(ui): fix flag creation with api change * feat(ui): fix flag editing (api changes); simplify new/edit flag component * feat(ui): add filters, make table pretty :insert_magic_emoji: * feat(ui): remove rollout percentage from list, remove console logs * feat(ui): multivar toggler * feat(tracker): add more methods to tracker * feat(tracker): more type coverage * feat(tracker): add tests * fix(ui): some fixes for multivar * feat(ui): multivar api support * fix(ui):start adding tests for fflags * fix(ui): rm not working file.. * fix(ui): rm unused packages * fix(ui): remove name field, fix some api and type names * fix(ui): fix crash * fix(tracker/ui): keep flags in sessionStorage, support API errors in feature flags storage * fix(tracker/ui): clear unused things, fix url handling, fix icons rendering etc
59 lines
2 KiB
TypeScript
59 lines
2 KiB
TypeScript
import React from 'react';
|
|
import withPageTitle from 'HOCs/withPageTitle';
|
|
import NoSessionsMessage from 'Shared/NoSessionsMessage';
|
|
import MainSearchBar from 'Shared/MainSearchBar';
|
|
import SessionSearch from 'Shared/SessionSearch';
|
|
import SessionsTabOverview from 'Shared/SessionsTabOverview/SessionsTabOverview';
|
|
import cn from 'classnames';
|
|
import OverviewMenu from 'Shared/OverviewMenu';
|
|
import FFlagsList from 'Components/FFlags';
|
|
import NewFFlag from 'Components/FFlags/NewFFlag';
|
|
import { Switch, Route } from 'react-router';
|
|
import { sessions, fflags, withSiteId, newFFlag, fflag, notes } from 'App/routes';
|
|
import { withRouter, RouteComponentProps } from 'react-router-dom';
|
|
|
|
// @ts-ignore
|
|
interface IProps extends RouteComponentProps {
|
|
match: {
|
|
params: {
|
|
siteId: string;
|
|
fflagId?: string;
|
|
};
|
|
};
|
|
}
|
|
|
|
function Overview({ match: { params } }: IProps) {
|
|
const { siteId, fflagId } = params;
|
|
|
|
return (
|
|
<div className="page-margin container-90 flex relative">
|
|
<div className={cn('side-menu')}>
|
|
<OverviewMenu />
|
|
</div>
|
|
<div className={cn('side-menu-margined w-full')}>
|
|
<Switch>
|
|
<Route exact strict path={[withSiteId(sessions(), siteId), withSiteId(notes(), siteId)]}>
|
|
<div className="mb-5 w-full mx-auto" style={{ maxWidth: '1300px' }}>
|
|
<NoSessionsMessage />
|
|
<MainSearchBar />
|
|
<SessionSearch />
|
|
<div className="my-4" />
|
|
<SessionsTabOverview />
|
|
</div>
|
|
</Route>
|
|
<Route exact strict path={withSiteId(fflags(), siteId)}>
|
|
<FFlagsList siteId={siteId} />
|
|
</Route>
|
|
<Route exact strict path={withSiteId(newFFlag(), siteId)}>
|
|
<NewFFlag siteId={siteId} />
|
|
</Route>
|
|
<Route exact strict path={withSiteId(fflag(), siteId)}>
|
|
<NewFFlag siteId={siteId} fflagId={fflagId} />
|
|
</Route>
|
|
</Switch>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default withPageTitle('Sessions - OpenReplay')(withRouter(Overview));
|