Skip to content

Commit c4b172a

Browse files
authoredFeb 18, 2022
Show warning for Alpha and Beta connectors (#10319)
* Add warning messsage
1 parent 9d401fc commit c4b172a

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed
 

‎airbyte-webapp/src/locales/en.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,8 @@
436436
"connector.releaseStage.beta": "beta",
437437
"connector.releaseStage.custom": "custom",
438438
"connector.releaseStage.generally_available": "generally available",
439-
439+
"connector.connectorsInDevelopment.alpha": "<b>Alpha connectors</b> are in development. We strongly discourage production use cases and do not offer support SLAs. The release may not be feature complete and breaking changes may be introduced.",
440+
"connector.connectorsInDevelopment.beta": "<b>Beta connectors</b> are considered stable and reliable with no backwards incompatible changes but has yet to be used by a larger group of users so we expect there to be some small issues and bugs to iron out.",
440441
"credits.credits": "Credits",
441442
"credits.whatAreCredits": "What are credits?",
442443
"credits.buyCredits": "+ Buy credits",

‎airbyte-webapp/src/views/Connector/ServiceForm/components/Controls/ConnectorServiceTypeControl.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useField } from "formik";
44
import { components } from "react-select";
55
import { MenuListComponentProps } from "react-select/src/components/Menu";
66
import styled from "styled-components";
7+
import { WarningMessage } from "../WarningMessage";
78

89
import {
910
ControlLabels,
@@ -214,6 +215,11 @@ const ConnectorServiceTypeControl: React.FC<{
214215
documentationUrl={documentationUrl}
215216
/>
216217
)}
218+
{selectedService &&
219+
(selectedService.releaseStage === ReleaseStage.ALPHA ||
220+
selectedService.releaseStage === ReleaseStage.BETA) && (
221+
<WarningMessage stage={selectedService.releaseStage} />
222+
)}
217223
</>
218224
);
219225
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import React from "react";
2+
import { FormattedHTMLMessage } from "react-intl";
3+
import styled from "styled-components";
4+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
5+
import { faExclamationCircle } from "@fortawesome/free-solid-svg-icons";
6+
7+
import { ReleaseStage } from "core/domain/connector";
8+
9+
const Content = styled.div`
10+
display: flex;
11+
flex-direction: row;
12+
padding: 13px 20px;
13+
border: 1px solid ${({ theme }) => theme.redColor};
14+
border-radius: 8px;
15+
font-size: 12px;
16+
line-height: 18px;
17+
white-space: break-spaces;
18+
margin-top: 16px;
19+
`;
20+
21+
const Exclamation = styled(FontAwesomeIcon)`
22+
font-size: 20px;
23+
margin-right: 12px;
24+
color: ${({ theme }) => theme.redColor};
25+
`;
26+
27+
type WarningMessageProps = {
28+
stage: ReleaseStage.ALPHA | ReleaseStage.BETA;
29+
};
30+
31+
const WarningMessage: React.FC<WarningMessageProps> = ({ stage }) => {
32+
return (
33+
<Content>
34+
<Exclamation icon={faExclamationCircle} />
35+
<div>
36+
<FormattedHTMLMessage
37+
id={`connector.connectorsInDevelopment.${stage}`}
38+
/>
39+
</div>
40+
</Content>
41+
);
42+
};
43+
44+
export { WarningMessage };

0 commit comments

Comments
 (0)