Replace Cayley with SQLite3

This commit is contained in:
David Stotijn
2020-10-04 11:50:03 +02:00
parent d48f1f058d
commit ba7d88dfc5
22 changed files with 649 additions and 861 deletions

View File

@ -154,7 +154,7 @@ export function Layout({ title, page, children }: Props): JSX.Element {
<MenuIcon />
</IconButton>
<Typography variant="h5" noWrap>
<span className={title !== "" && classes.titleHighlight}>
<span className={title !== "" ? classes.titleHighlight : ""}>
Hetty://
</span>
{title}

View File

@ -32,7 +32,7 @@ const HTTP_REQUEST_LOG = gql`
`;
interface Props {
requestId: string;
requestId: number;
}
function LogDetail({ requestId: id }: Props): JSX.Element {

View File

@ -25,14 +25,14 @@ const HTTP_REQUEST_LOGS = gql`
function LogsOverview(): JSX.Element {
const router = useRouter();
const detailReqLogId = router.query.id as string;
console.log(detailReqLogId);
const detailReqLogId =
router.query.id && parseInt(router.query.id as string, 10);
const { loading, error, data } = useQuery(HTTP_REQUEST_LOGS, {
pollInterval: 1000,
});
const handleLogClick = (reqId: string) => {
const handleLogClick = (reqId: number) => {
router.push("/proxy/logs?id=" + reqId, undefined, {
shallow: false,
});

View File

@ -31,8 +31,8 @@ const useStyles = makeStyles((theme: Theme) =>
interface Props {
logs: Array<any>;
selectedReqLogId?: string;
onLogClick(requestId: string): void;
selectedReqLogId?: number;
onLogClick(requestId: number): void;
theme: Theme;
}
@ -63,8 +63,8 @@ function RequestList({
interface RequestListTableProps {
logs?: any;
selectedReqLogId?: string;
onLogClick(requestId: string): void;
selectedReqLogId?: number;
onLogClick(requestId: number): void;
theme: Theme;
}