diff --git a/controller/components/TestInfo/index.tsx b/controller/components/TestInfo/index.tsx index ec93bc8a..db4e42d6 100644 --- a/controller/components/TestInfo/index.tsx +++ b/controller/components/TestInfo/index.tsx @@ -15,22 +15,10 @@ import { formatError, formatPageHref, isTestManagerMessage } from "../../pages/a import Div from "../Div"; import { H3 } from "../Headers"; import LinkButton from "../LinkButton"; -// Must reference the PpaasTestId file directly or we pull in stuff that won't compile on the client -import { PpaasTestId } from "@fs/ppaas-common/dist/src/ppaastestid"; import { TestStatus } from "@fs/ppaas-common/dist/types"; import styled from "styled-components"; import { useRouter } from "next/router"; -const pewpewDashboardBaseUrl: string = "https://familysearch.splunkcloud.com/en-US/app/QA/pewpew_dashboard?form.envSelector="; -const agentDashboardBaseUrl: string = "https://familysearch.splunkcloud.com/en-US/app/QA/pewpew_agent_dashboard?form.envSelector="; -const hostnameSearchBaseUrl: string = "https://familysearch.splunkcloud.com/en-US/app/QA/search?q=search%20index%3Dproduction%20host%3D"; -const dashboardEarliestQuery: string = "&form.timeSelector.earliest="; -const dashboardLatestQuery: string = "&form.timeSelector.latest="; -const dashboardRefreshQuery: string = "&form.autoRefresh=1m"; -const dashboardAgentQuery: string = "&form.agentSelector="; -const searchEarliestQuery: string = "&earliest="; -const searchLatestQuery: string = "&latest="; - const StopTestButton = styled.button` font-size: 1.25rem; color: red; @@ -89,28 +77,6 @@ export const TestInfo = ({ testData, ...testInfoProps }: TestInfoProps) => { testData.hostname = split.join("-"); } - let testIdPlusTime: string = testData.testId; - let hostnamePlusTime: string = testData.hostname || ""; - try { - const ppaasTestId: PpaasTestId = PpaasTestId.getFromTestId(testData.testId); - const startTime: number = Math.floor((testData.startTime || ppaasTestId.date.getTime()) / 1000); - testIdPlusTime += dashboardEarliestQuery + startTime; - hostnamePlusTime += searchEarliestQuery + startTime; - if (testData.endTime) { - const endTime: number = Math.floor((testData.endTime) / 1000); - testIdPlusTime += dashboardLatestQuery + (endTime + 30); // 30 seconds for the data to upload to Splunk - hostnamePlusTime += searchLatestQuery + endTime; - } - } catch (error) { - log("Caught error parsing testId: " + testData.testId, LogLevel.ERROR, error); - } - if (testIsRunning) { - testIdPlusTime += dashboardRefreshQuery; - } - const pewpewDashboard: string = pewpewDashboardBaseUrl + testIdPlusTime; - const agentDashboard: string = agentDashboardBaseUrl + testIdPlusTime + (testData.hostname ? `${dashboardAgentQuery}${testData.hostname}` : ""); - const hostnameSearch: string = hostnameSearchBaseUrl + hostnamePlusTime; - const onClick = async (event: React.MouseEvent, deleteSchedule?: boolean) => { event.preventDefault(); if (doubleClickCheck) { @@ -182,15 +148,13 @@ The previous "Stop" will automatically send a "Kill" after a few minutes if pewp
  • TestId: {testData.testId}
  • S3 Folder: {testData.s3Folder}
  • {testData.instanceId &&
  • InstanceId: {testData.instanceId}
  • } - {testData.hostname &&
  • Hostname: {testData.hostname}
  • } + {testData.hostname &&
  • Hostname: {testData.hostname}
  • } {testData.ipAddress &&
  • IPAddress: {testData.ipAddress}
  • } {testData.queueName &&
  • Test Queue: {testData.queueName}
  • } {testData.version &&
  • Pewpew Version: {testData.version}
  • } {testData.userId &&
  • UserId: {testData.userId}
  • } {testData.resultsFileLocation && testData.resultsFileLocation.map((resultsLocation: string, index: number) =>
  • S3 Results Url{index > 0 ? ` ${index + 1}` : ""}
  • )} -
  • PewPew Dashboard
  • -
  • PewPew Agent Dashboard
  • Status: {testData.status === TestStatus.Created ? "Test Uploaded, Waiting for Agent" : testData.status}
  • {testData.lastUpdated &&
  • Last Updated: {new Date(testData.lastUpdated).toLocaleString()}
  • }