Skip to content

Commit b629f9d

Browse files
subirjollySubir Jolly
andauthored
feat: add new not found page (#3320)
* feat: add new page not found page * chore: add page contents * chore: add links and slack icon * chore: remove debugging log * chore: change relative import Co-authored-by: Subir Jolly <subirjolly@Subirs-MacBook-Pro.local>
1 parent abbcf37 commit b629f9d

File tree

5 files changed

+148
-1
lines changed

5 files changed

+148
-1
lines changed

assets/images/NotFoundBottom.png

209 KB
Loading

assets/images/SlackIcon.png

17.7 KB
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.page-not-found {
2+
> .page-not-found-footer {
3+
height: 65%;
4+
background-image: url('~assets/images/NotFoundBottom.png');
5+
background-repeat: no-repeat;
6+
background-size: cover;
7+
position: relative;
8+
9+
> .page-not-found-panel {
10+
top: -120px;
11+
width: 660px;
12+
height: 250px;
13+
margin: 0 auto;
14+
z-index: 10;
15+
16+
> .page-not-found-panel-content {
17+
margin: 30px 65px;
18+
19+
> .page-not-found-panel-section {
20+
margin: 30px 0;
21+
22+
> .page-not-found-panel-title {
23+
font-weight: bold;
24+
margin: 5px 0;
25+
}
26+
}
27+
28+
.page-not-found-community-links {
29+
margin-right: 45px;
30+
31+
> a {
32+
margin: 0 5px;
33+
}
34+
}
35+
}
36+
}
37+
}
38+
}
39+
40+
.slack-icon {
41+
width: 14px;
42+
height: 14px;
43+
background-image: url('~assets/images/SlackIcon.png');
44+
background-repeat: no-repeat;
45+
background-size: cover;
46+
}

src/shared/components/NotFound.tsx

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,97 @@
1+
import {
2+
AlignItems,
3+
AppWrapper,
4+
ComponentSize,
5+
FlexBox,
6+
FunnelPage,
7+
Icon,
8+
IconFont,
9+
InfluxColors,
10+
JustifyContent,
11+
Panel,
12+
} from '@influxdata/clockface'
113
import React, {FC} from 'react'
14+
import LogoWithCubo from 'src/checkout/LogoWithCubo'
15+
import {isFlagEnabled} from 'src/shared/utils/featureFlag'
216

3-
const NotFound: FC = () => (
17+
const NotFoundNew: FC = () => (
18+
<AppWrapper type="funnel" className="page-not-found">
19+
<FunnelPage
20+
logo={<LogoWithCubo />}
21+
enableGraphic={true}
22+
className="page-not-found-funnel"
23+
></FunnelPage>
24+
<FunnelPage.Footer className="page-not-found-footer">
25+
<Panel
26+
className="page-not-found-panel"
27+
backgroundColor={InfluxColors.Grey15}
28+
>
29+
<div className="page-not-found-panel-content">
30+
<div className="page-not-found-panel-section">
31+
<div className="page-not-found-panel-title">Not a URL issue?</div>
32+
<div>
33+
<span>
34+
The webpage you were trying to reach may have been removed or
35+
your access to this page may have expired.&nbsp;
36+
{/* Add rel options to avoid "tabnapping" */}
37+
<a
38+
href="mailto:support@influxdata.com"
39+
target="_blank"
40+
rel="noreferrer noopener"
41+
>
42+
Contact InfluxData Support
43+
</a>
44+
</span>
45+
</div>
46+
</div>
47+
<div className="page-not-found-panel-section">
48+
<div className="page-not-found-panel-title">
49+
Have more feedback?
50+
</div>
51+
<div>
52+
We welcome and encourage your feedback and bug reports for
53+
InfluxDB. The following resources are available:
54+
</div>
55+
</div>
56+
<FlexBox>
57+
<FlexBox className="page-not-found-community-links">
58+
<Icon glyph={IconFont.Cubouniform}></Icon>
59+
{/* Add rel options to avoid "tabnapping" */}
60+
<a
61+
href="https://community.influxdata.com/"
62+
target="_blank"
63+
rel="noreferrer noopener"
64+
>
65+
InfluxData Community
66+
</a>
67+
</FlexBox>
68+
<FlexBox className="page-not-found-community-links">
69+
{/* TODO: Change with Slack Icon */}
70+
<span className="slack-icon" />
71+
{/* Add rel options to avoid "tabnapping" */}
72+
<a
73+
href="https://influxdata.com/slack/"
74+
target="_blank"
75+
rel="noreferrer noopener"
76+
>
77+
InfluxDB Community Slack
78+
</a>
79+
</FlexBox>
80+
</FlexBox>
81+
</div>
82+
</Panel>
83+
<FunnelPage.FooterSection>
84+
<FlexBox
85+
alignItems={AlignItems.Center}
86+
margin={ComponentSize.Large}
87+
justifyContent={JustifyContent.Center}
88+
></FlexBox>
89+
</FunnelPage.FooterSection>
90+
</FunnelPage.Footer>
91+
</AppWrapper>
92+
)
93+
94+
const NotFoundOld: FC = () => (
495
<div className="container-fluid" data-testid="not-found">
596
<div className="panel">
697
<div className="panel-heading text-center">
@@ -10,4 +101,13 @@ const NotFound: FC = () => (
10101
</div>
11102
</div>
12103
)
104+
105+
const NotFound: FC = () => {
106+
if (isFlagEnabled('newNotFoundPage')) {
107+
return <NotFoundNew />
108+
}
109+
110+
return <NotFoundOld />
111+
}
112+
13113
export default NotFound

src/style/chronograf.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
@import 'src/shared/components/ExportOverlay.scss';
4040
@import 'src/shared/components/EditableName.scss';
4141
@import 'src/shared/components/DragAndDrop.scss';
42+
@import 'src/shared/components/NotFound.scss';
4243
@import 'src/shared/components/SearchableDropdown.scss';
4344
@import 'src/shared/components/BoxTooltip.scss';
4445
@import 'src/shared/components/dropdown_auto_refresh/AutoRefreshDropdown.scss';

0 commit comments

Comments
 (0)