diff --git a/src/components/App/TraceIDSearchInput.js b/src/components/App/TraceIDSearchInput.js index 284dc73ad7..83c25e80ad 100644 --- a/src/components/App/TraceIDSearchInput.js +++ b/src/components/App/TraceIDSearchInput.js @@ -16,9 +16,11 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { withRouter } from 'react-router-dom'; +import prefixUrl from '../../utils/prefix-url'; + class TraceIDSearchInput extends Component { goToTrace(e) { - this.props.history.push(`/trace/${this.traceIDInput.value}`); + this.props.history.push(prefixUrl(`/trace/${this.traceIDInput.value}`)); e.preventDefault(); return false; } diff --git a/src/components/TracePage/index.js b/src/components/TracePage/index.js index 9c3b724de7..4c38162be4 100644 --- a/src/components/TracePage/index.js +++ b/src/components/TracePage/index.js @@ -20,7 +20,7 @@ import _mapValues from 'lodash/mapValues'; import _maxBy from 'lodash/maxBy'; import _values from 'lodash/values'; import { connect } from 'react-redux'; -import type { Match } from 'react-router-dom'; +import type { RouterHistory, Match } from 'react-router-dom'; import { bindActionCreators } from 'redux'; import type { CombokeysHandler, ShortcutCallbacks } from './keyboard-shortcuts'; @@ -35,14 +35,16 @@ import NotFound from '../App/NotFound'; import * as jaegerApiActions from '../../actions/jaeger-api'; import { getTraceName } from '../../model/trace-viewer'; import type { Trace } from '../../types'; +import prefixUrl from '../../utils/prefix-url'; import './index.css'; type TracePageProps = { fetchTrace: string => void, - trace: ?Trace, - loading: boolean, + history: RouterHistory, id: string, + loading: boolean, + trace: ?Trace, }; type TracePageState = { @@ -205,6 +207,11 @@ export default class TracePage extends React.PureComponent