|
|
@@ -13,6 +13,7 @@ import SaveButton from "components/SaveButton";
|
|
|
import ExistingClusterSection from "./ExistingClusterSection";
|
|
|
import { RouteComponentProps, withRouter } from "react-router";
|
|
|
import { pushFiltered } from "shared/routing";
|
|
|
+import InfoTooltip from "../../../components/InfoTooltip";
|
|
|
|
|
|
type PropsType = RouteComponentProps & {
|
|
|
isInNewProject?: boolean;
|
|
|
@@ -23,7 +24,7 @@ type PropsType = RouteComponentProps & {
|
|
|
|
|
|
type StateType = {
|
|
|
selectedProvider: string | null;
|
|
|
- displayCosts: boolean;
|
|
|
+ highlightCosts: boolean;
|
|
|
infras: InfraType[];
|
|
|
};
|
|
|
|
|
|
@@ -32,7 +33,7 @@ const providers = ["aws", "gcp", "do"];
|
|
|
class NewProject extends Component<PropsType, StateType> {
|
|
|
state = {
|
|
|
selectedProvider: null as string | null,
|
|
|
- displayCosts: true,
|
|
|
+ highlightCosts: true,
|
|
|
infras: [] as InfraType[],
|
|
|
};
|
|
|
|
|
|
@@ -97,7 +98,7 @@ class NewProject extends Component<PropsType, StateType> {
|
|
|
handleError={this.handleError}
|
|
|
projectName={projectName}
|
|
|
infras={infras}
|
|
|
- displayCosts={this.state.displayCosts}
|
|
|
+ highlightCosts={this.state.highlightCosts}
|
|
|
setSelectedProvisioner={(x: string | null) => {
|
|
|
this.setState({ selectedProvider: x });
|
|
|
}}
|
|
|
@@ -111,6 +112,7 @@ class NewProject extends Component<PropsType, StateType> {
|
|
|
handleError={this.handleError}
|
|
|
projectName={projectName}
|
|
|
infras={infras}
|
|
|
+ highlightCosts={this.state.highlightCosts}
|
|
|
setSelectedProvisioner={(x: string | null) => {
|
|
|
this.setState({ selectedProvider: x });
|
|
|
}}
|
|
|
@@ -124,6 +126,7 @@ class NewProject extends Component<PropsType, StateType> {
|
|
|
handleError={this.handleError}
|
|
|
projectName={projectName}
|
|
|
infras={infras}
|
|
|
+ highlightCosts={this.state.highlightCosts}
|
|
|
setSelectedProvisioner={(x: string | null) => {
|
|
|
this.setState({ selectedProvider: x });
|
|
|
}}
|
|
|
@@ -219,23 +222,24 @@ class NewProject extends Component<PropsType, StateType> {
|
|
|
onClick={() => {
|
|
|
this.setState({
|
|
|
selectedProvider: provider,
|
|
|
- displayCosts: false,
|
|
|
+ highlightCosts: false,
|
|
|
});
|
|
|
}}
|
|
|
>
|
|
|
<Icon src={providerInfo.icon} />
|
|
|
<BlockTitle>{providerInfo.label}</BlockTitle>
|
|
|
- <p
|
|
|
+ <CostSection
|
|
|
onClick={(e) => {
|
|
|
e.stopPropagation();
|
|
|
this.setState({
|
|
|
selectedProvider: provider,
|
|
|
- displayCosts: true,
|
|
|
+ highlightCosts: true,
|
|
|
});
|
|
|
}}
|
|
|
>
|
|
|
$cost/Month
|
|
|
- </p>
|
|
|
+ <InfoTooltip text={"aa"} />
|
|
|
+ </CostSection>
|
|
|
<BlockDescription>Hosted in your own cloud.</BlockDescription>
|
|
|
</Block>
|
|
|
);
|
|
|
@@ -352,3 +356,8 @@ const Block = styled.div<{ disabled?: boolean }>`
|
|
|
}
|
|
|
}
|
|
|
`;
|
|
|
+
|
|
|
+const CostSection = styled.p`
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+`;
|