Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Takuma Igarashi <[email protected]>
Signed-off-by: vvvprabhakar <[email protected]>
  • Loading branch information
tacigar authored and tiffon committed Feb 7, 2019
1 parent b5ec9d4 commit a0ba64f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/jaeger-ui/src/components/SearchTracePage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import store from 'store';

import SearchForm from './SearchForm';
import SearchResults, { sortFormSelector } from './SearchResults';
import { isSameQuery } from './url';
import { isSameQuery, getUrl } from './url';
import * as jaegerApiActions from '../../actions/jaeger-api';
import ErrorMessage from '../common/ErrorMessage';
import LoadingIndicator from '../common/LoadingIndicator';
Expand All @@ -33,6 +33,7 @@ import { actions as traceDiffActions } from '../TraceDiff/duck';
import { fetchedState } from '../../constants';
import { sortTraces } from '../../model/search';
import getLastXformCacher from '../../utils/get-last-xform-cacher';
import { stripEmbeddedState } from '../../utils/embedded-url';

import './index.css';
import JaegerLogo from '../../img/jaeger-logo.svg';
Expand Down Expand Up @@ -66,7 +67,8 @@ export class SearchTracePageImpl extends Component {

goToTrace = traceID => {
const { queryOfResults } = this.props;
this.props.history.push(getTraceLocation(traceID, { fromSearch: queryOfResults }));
const searchUrl = getUrl(stripEmbeddedState(queryOfResults));
this.props.history.push(getTraceLocation(traceID, { fromSearch: searchUrl }));
};

render() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('<SearchTracePage>', () => {
expect(historyPush.mock.calls.length).toBe(1);
expect(historyPush.mock.calls[0][0]).toEqual({
pathname: `/trace/${traceID}`,
state: { fromSearch: queryOfResults },
state: { fromSearch: '/search?' },
});
});

Expand Down

0 comments on commit a0ba64f

Please sign in to comment.