some more
This commit is contained in:
parent
d057a4f770
commit
1d17703320
|
|
@ -147,6 +147,7 @@ export const AttachmentsTab: React.FunctionComponent<{
|
||||||
|
|
||||||
function attachmentURL(attachment: Attachment, queryParams: Record<string, string> = {}) {
|
function attachmentURL(attachment: Attachment, queryParams: Record<string, string> = {}) {
|
||||||
const params = new URLSearchParams(queryParams);
|
const params = new URLSearchParams(queryParams);
|
||||||
|
// TODO: put in testServerURL here
|
||||||
if (attachment.sha1) {
|
if (attachment.sha1) {
|
||||||
params.set('trace', attachment.traceUrl);
|
params.set('trace', attachment.traceUrl);
|
||||||
return 'sha1/' + attachment.sha1 + '?' + params.toString();
|
return 'sha1/' + attachment.sha1 + '?' + params.toString();
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import type { ContextEntry } from '../types/entries';
|
||||||
import type { SourceLocation } from './modelUtil';
|
import type { SourceLocation } from './modelUtil';
|
||||||
import { MultiTraceModel } from './modelUtil';
|
import { MultiTraceModel } from './modelUtil';
|
||||||
import { Workbench } from './workbench';
|
import { Workbench } from './workbench';
|
||||||
|
import { testServerBaseURL } from '../searchParams';
|
||||||
|
|
||||||
export const TraceView: React.FC<{
|
export const TraceView: React.FC<{
|
||||||
item: { treeItem?: TreeItem, testFile?: SourceLocation, testCase?: reporterTypes.TestCase },
|
item: { treeItem?: TreeItem, testFile?: SourceLocation, testCase?: reporterTypes.TestCase },
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ import { FiltersView } from './uiModeFiltersView';
|
||||||
import { TestListView } from './uiModeTestListView';
|
import { TestListView } from './uiModeTestListView';
|
||||||
import { TraceView } from './uiModeTraceView';
|
import { TraceView } from './uiModeTraceView';
|
||||||
import { SettingsView } from './settingsView';
|
import { SettingsView } from './settingsView';
|
||||||
|
import { testServerWebSocketURL, searchParams } from '../searchParams';
|
||||||
|
|
||||||
let xtermSize = { cols: 80, rows: 24 };
|
let xtermSize = { cols: 80, rows: 24 };
|
||||||
const xtermDataSource: XtermDataSource = {
|
const xtermDataSource: XtermDataSource = {
|
||||||
|
|
@ -46,10 +47,6 @@ const xtermDataSource: XtermDataSource = {
|
||||||
resize: () => {},
|
resize: () => {},
|
||||||
};
|
};
|
||||||
|
|
||||||
const searchParams = new URLSearchParams(window.location.search);
|
|
||||||
const guid = searchParams.get('ws');
|
|
||||||
const wsURL = new URL(`../${guid}`, window.location.toString());
|
|
||||||
wsURL.protocol = (window.location.protocol === 'https:' ? 'wss:' : 'ws:');
|
|
||||||
const queryParams = {
|
const queryParams = {
|
||||||
args: searchParams.getAll('arg'),
|
args: searchParams.getAll('arg'),
|
||||||
grep: searchParams.get('grep') || undefined,
|
grep: searchParams.get('grep') || undefined,
|
||||||
|
|
@ -109,7 +106,7 @@ export const UIModeView: React.FC<{}> = ({
|
||||||
const inputRef = React.useRef<HTMLInputElement>(null);
|
const inputRef = React.useRef<HTMLInputElement>(null);
|
||||||
|
|
||||||
const reloadTests = React.useCallback(() => {
|
const reloadTests = React.useCallback(() => {
|
||||||
setTestServerConnection(new TestServerConnection(new WebSocketTestServerTransport(wsURL)));
|
setTestServerConnection(new TestServerConnection(new WebSocketTestServerTransport(testServerWebSocketURL)));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Load tests on startup.
|
// Load tests on startup.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue