Skip to content

Commit b2d7974

Browse files
authored
feat: Replace Contact Support with GitHub issue in OSS (#853)
1 parent 84a9119 commit b2d7974

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

packages/app/src/DBDashboardPage.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import { useHover, usePrevious } from '@mantine/hooks';
5151
import { notifications } from '@mantine/notifications';
5252
import { useQueryClient } from '@tanstack/react-query';
5353

54+
import { ContactSupportText } from '@/components/ContactSupportText';
5455
import EditTimeChartForm from '@/components/DBEditTimeChartForm';
5556
import DBNumberChart from '@/components/DBNumberChart';
5657
import { DBSqlRowTable } from '@/components/DBRowTable';
@@ -751,8 +752,11 @@ function DBDashboardPage({ presetConfig }: { presetConfig?: Dashboard }) {
751752
() => {
752753
notifications.show({
753754
color: 'red',
754-
message:
755-
'An error occurred. Please contact support for more details.',
755+
message: (
756+
<>
757+
An error occurred. <ContactSupportText />
758+
</>
759+
),
756760
});
757761
},
758762
);

packages/app/src/DBSearchPage.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import { useIsFetching } from '@tanstack/react-query';
5353
import CodeMirror from '@uiw/react-codemirror';
5454

5555
import { useTimeChartSettings } from '@/ChartUtils';
56+
import { ContactSupportText } from '@/components/ContactSupportText';
5657
import DBDeltaChart from '@/components/DBDeltaChart';
5758
import DBHeatmapChart from '@/components/DBHeatmapChart';
5859
import DBRowSidePanel from '@/components/DBRowSidePanel';
@@ -821,8 +822,11 @@ function DBSearchPage() {
821822
onError: () => {
822823
notifications.show({
823824
color: 'red',
824-
message:
825-
'An error occurred. Please contact support for more details.',
825+
message: (
826+
<>
827+
An error occurred. <ContactSupportText />
828+
</>
829+
),
826830
});
827831
},
828832
},
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { IS_OSS } from '@/config';
2+
3+
const GH_LINK = 'https://github.com/hyperdxio/hyperdx/issues';
4+
5+
export const ContactSupportText = () => {
6+
if (IS_OSS) {
7+
return (
8+
<span>
9+
Please open an issue on{' '}
10+
<a href={GH_LINK} target="_blank">
11+
GitHub
12+
</a>
13+
.
14+
</span>
15+
);
16+
}
17+
18+
return <span>Please contact support.</span>;
19+
};

packages/app/src/components/DBTraceWaterfallChart.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
} from '@hyperdx/common-utils/dist/types';
1010
import { Text } from '@mantine/core';
1111

12+
import { ContactSupportText } from '@/components/ContactSupportText';
1213
import useOffsetPaginatedQuery from '@/hooks/useOffsetPaginatedQuery';
1314
import useRowWhere from '@/hooks/useRowWhere';
1415
import {
@@ -555,7 +556,9 @@ export function DBTraceWaterfallChartContainer({
555556
{isFetching ? (
556557
<div className="my-3">Loading Traces...</div>
557558
) : rows == null ? (
558-
<div>An unknown error occurred, please contact support.</div>
559+
<div>
560+
An unknown error occurred. <ContactSupportText />
561+
</div>
559562
) : (
560563
<TimelineChart
561564
style={{

0 commit comments

Comments
 (0)