Skip to content

Commit

Permalink
Remove har to yaml from controller (#272)
Browse files Browse the repository at this point in the history
* Removed the yamlwriter and all its components from the controller

* Changed the yamlwriter link in the layout to go to the guide yaml writer

* Removed Non Prod message for login

* Removed unneeded vars
  • Loading branch information
tkmcmaster authored Dec 6, 2024
1 parent 8b681f6 commit 797b95b
Show file tree
Hide file tree
Showing 42 changed files with 19 additions and 5,040 deletions.
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

0 comments on commit 797b95b

Please sign in to comment.