Skip to content

Commit

Permalink
fix direct url load for trace analytics
Browse files Browse the repository at this point in the history
Signed-off-by: Shenoy Pratik <[email protected]>
  • Loading branch information
ps48 committed Aug 1, 2024
1 parent a939635 commit 3c7c388
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion public/components/trace_analytics/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,15 @@ export const Home = (props: HomeProps) => {

const [dataSourceMDSId, setDataSourceMDSId] = useState([{ id: '', label: '' }]);
const [currentSelectedService, setCurrentSelectedService] = useState('');
const { defaultRoute = '/services' } = props;
let defaultRoute = '';
const currentHash = window.location.hash.split('#')[1];

if (currentHash === '/traces' || currentHash === '/services') {
defaultRoute = currentHash;
} else {
defaultRoute = props.defaultRoute ?? '/services';
}

const { chrome } = props;
const isNavGroupEnabled = chrome.navGroup.getNavGroupEnabled();

Expand Down

0 comments on commit 3c7c388

Please sign in to comment.