Skip to content

Commit

Permalink
fix: make URLs modifiable in code (#2337)
Browse files Browse the repository at this point in the history
* fix: make URLs modifiable in code
  • Loading branch information
darrenjaneczek authored Aug 30, 2023
1 parent a292204 commit 8c7b42d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion public/app/hooks/navigateUserIntroPages.hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
selectCurrentUser,
} from '@pyroscope/redux/reducers/user';
import { useHistory } from 'react-router-dom';
import { PAGES } from '@pyroscope/pages/constants';
import { PAGES } from '@pyroscope/pages/urls';

export default function useNavigateUserIntroPages() {
const dispatch = useAppDispatch();
Expand Down
2 changes: 1 addition & 1 deletion public/app/pages/IntroPages/SignIn/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
isInternalAuthEnabled,
isSignupEnabled,
} from '@pyroscope/util/features';
import { PAGES } from '@pyroscope/pages/constants';
import { PAGES } from '@pyroscope/pages/urls';
import { GitlabIcon, GoogleIcon } from '../Icons';
import Divider from '../Divider';
import inputStyles from '../InputGroup.module.css';
Expand Down
2 changes: 1 addition & 1 deletion public/app/pages/IntroPages/SignUp/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { isSignupEnabled } from '@pyroscope/util/features';
import inputStyles from '../InputGroup.module.css';
import styles from '../IntroPages.module.css';
import Divider from '../Divider';
import { PAGES } from '../../constants';
import { PAGES } from '../../urls';

function SignUpPage() {
const dispatch = useAppDispatch();
Expand Down
2 changes: 1 addition & 1 deletion public/app/pages/TagExplorerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import ExploreTooltip from '@pyroscope/components/TimelineChart/ExploreTooltip';
import { getFormatter } from '@pyroscope/legacy/flamegraph/format/format';
import { LoadingOverlay } from '@pyroscope/ui/LoadingOverlay';
import { calculateMean, calculateStdDeviation, calculateTotal } from './math';
import { PAGES } from './constants';
import { PAGES } from './urls';
import {
addSpaces,
getIntegerSpaceLengthForString,
Expand Down
20 changes: 0 additions & 20 deletions public/app/pages/constants.ts

This file was deleted.

2 changes: 1 addition & 1 deletion public/app/pages/tagExplorer/components/TagsSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useAppDispatch } from '@pyroscope/redux/hooks';
import { actions } from '@pyroscope/redux/reducers/continuous';
import { appendLabelToQuery } from '@pyroscope/util/query';
import { brandQuery } from '@pyroscope/models/query';
import { PAGES } from '@pyroscope/pages/constants';
import { PAGES } from '@pyroscope/pages/urls';
import ModalWithToggle from '@pyroscope/ui/Modals/ModalWithToggle';
import styles from './TagsSelector.module.scss';

Expand Down
20 changes: 20 additions & 0 deletions public/app/pages/urls.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export const PAGES = {
CONTINOUS_SINGLE_VIEW: '/',
COMPARISON_VIEW: '/comparison',
COMPARISON_DIFF_VIEW: '/comparison-diff',
SETTINGS: '/settings',
LOGIN: '/login',
SIGNUP: '/signup',
SERVICE_DISCOVERY: '/service-discovery',
ADHOC_SINGLE: '/adhoc-single',
ADHOC_COMPARISON: '/adhoc-comparison',
ADHOC_COMPARISON_DIFF: '/adhoc-comparison-diff',
FORBIDDEN: '/forbidden',
TAG_EXPLORER: '/explore',
TRACING_EXEMPLARS_MERGE: '/exemplars/merge',
TRACING_EXEMPLARS_SINGLE: '/exemplars/single',
};

export default {
PAGES,
};

0 comments on commit 8c7b42d

Please sign in to comment.