Skip to content

Commit

Permalink
update url #, send mode to applications
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Tackett <[email protected]>
  • Loading branch information
Adam Tackett committed Jan 7, 2025
1 parent f4a34af commit 411c523
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function DataSourcePicker(props: {
const hash = window.location.hash;

if (hash) {
const [hashPath, hashQueryString] = hash.split('?');
const [hashPath, hashQueryString] = hash.substring(1).split('?');
const queryParams = new URLSearchParams(hashQueryString || '');
queryParams.set('mode', key);

Expand Down
4 changes: 4 additions & 0 deletions public/components/trace_analytics/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ export const Home = (props: HomeProps) => {
tracesTableMode={tracesTableMode}
setTracesTableMode={setTracesTableMode}
{...commonProps}
mode={((traceMode as unknown) as TraceAnalyticsMode) || mode}
/>
</SideBarComponent>
);
Expand Down Expand Up @@ -450,6 +451,7 @@ export const Home = (props: HomeProps) => {
render={(_routerProps) => {
const queryParams = new URLSearchParams(window.location.href.split('?')[1]);
const serviceId = queryParams.get('serviceId');
const serviceMode = queryParams.get('mode');

const SideBarComponent = !isNavGroupEnabled ? TraceSideBar : React.Fragment;
if (!serviceId) {
Expand All @@ -463,6 +465,7 @@ export const Home = (props: HomeProps) => {
toasts={toasts}
dataSourceMDSId={dataSourceMDSId}
{...commonProps}
mode={((serviceMode as unknown) as TraceAnalyticsMode) || mode}
/>
</SideBarComponent>
);
Expand All @@ -471,6 +474,7 @@ export const Home = (props: HomeProps) => {
<ServiceView
serviceName={decodeURIComponent(serviceId)}
{...commonProps}
mode={((serviceMode as unknown) as TraceAnalyticsMode) || mode}
addFilter={(filter: FilterType) => {
for (const addedFilter of filters) {
if (
Expand Down

0 comments on commit 411c523

Please sign in to comment.