Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove har to yaml from controller #272

Merged
merged 4 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions controller/components/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import {
PAGE_ADMIN,
PAGE_CALENDAR,
PAGE_START_TEST,
PAGE_TEST_HISTORY,
PAGE_YAML_WRITER
PAGE_TEST_HISTORY
} from "../../types";
import { Button, LinkButton, defaultButtonTheme } from "../LinkButton";
import React, { useEffect } from "react";
Expand All @@ -20,6 +19,8 @@ import getConfig from "next/config";
const publicRuntimeConfig: any = getConfig() && getConfig().publicRuntimeConfig ? getConfig().publicRuntimeConfig : process.env;
const HIDE_ENVIRONMENT: unknown = publicRuntimeConfig.HIDE_ENVIRONMENT;

export const PAGE_YAML_WRITER: string = "https://familysearch.github.io/pewpew/results-viewer-react/yaml.html";

export type OtherControllers = Record<string, {
url: string;
hover?: string;
Expand Down Expand Up @@ -154,7 +155,7 @@ export const Layout = ({
<LinkButton href={PAGE_CALENDAR} title="View the test calendar">Calendar</LinkButton>
</LinkDiv>
<LinkDiv>
<LinkButton href={PAGE_YAML_WRITER} title="Convert a HAR file to a YAML load test">Yaml Writer</LinkButton>
<LinkButton href={PAGE_YAML_WRITER} title="Create a PewPew YAML load test" target="_blank">Yaml Writer</LinkButton>
</LinkDiv>
{authPermission === AuthPermission.Admin &&
<LinkDiv>
Expand Down
6 changes: 4 additions & 2 deletions controller/components/LinkButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const defaultButtonTheme: LinkButtonTheme = { buttonFontSize: ".8rem", bu
export interface LinkButtonProps {
name?: string;
href: string;
target?: string;
title?: string;
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
theme?: LinkButtonTheme;
Expand All @@ -33,6 +34,7 @@ export interface LinkButtonProps {
export const LinkButton = ({
name,
href,
target,
title,
onClick,
theme,
Expand All @@ -41,8 +43,8 @@ export const LinkButton = ({
return (
<React.Fragment>
{/* https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor */}
<Link href={href} as={formatPageHref(href)} title={title} legacyBehavior>
<a href={formatPageHref(href)} title={title}>
<Link href={href} as={formatPageHref(href)} title={title} passHref legacyBehavior>
<a href={formatPageHref(href)} title={title} target={target}>
<Button name={name} theme={{...defaultButtonTheme, ...theme}} onClick={onClick}>{children}</Button>
</a>
</Link>
Expand Down
214 changes: 0 additions & 214 deletions controller/components/Modal/index.tsx

This file was deleted.

Loading
Loading