|
|
@@ -368,7 +368,7 @@ const ProvisionerSettings: React.FC<Props> = (props) => {
|
|
|
// }
|
|
|
setErrorMessage(undefined);
|
|
|
} catch (err) {
|
|
|
- const errMessage = err.response.data.error.replace("unknown: ", "");
|
|
|
+ const errMessage = err.response?.data?.error?.replace("unknown: ", "") ?? "";
|
|
|
// hacky, need to standardize error contract with backend
|
|
|
setIsClicked(false);
|
|
|
if (errMessage.includes("elastic IP")) {
|
|
|
@@ -763,8 +763,8 @@ const ProvisionerSettings: React.FC<Props> = (props) => {
|
|
|
</ErrorInLine>
|
|
|
)}
|
|
|
|
|
|
- <Spacer y={1} />
|
|
|
- {/* <Checkbox
|
|
|
+ <Spacer y={1} />
|
|
|
+ {/* <Checkbox
|
|
|
checked={accessS3Logs}
|
|
|
disabled={isReadOnly}
|
|
|
toggleChecked={() => {
|
|
|
@@ -832,61 +832,61 @@ const ProvisionerSettings: React.FC<Props> = (props) => {
|
|
|
</>
|
|
|
)}
|
|
|
<FlexCenter>
|
|
|
- <Checkbox
|
|
|
- checked={guardDutyEnabled}
|
|
|
- disabled={isReadOnly}
|
|
|
- toggleChecked={() => {
|
|
|
- setGuardDutyEnabled(!guardDutyEnabled);
|
|
|
- }}
|
|
|
- disabledTooltip={
|
|
|
- "Wait for provisioning to complete before editing this field."
|
|
|
- }
|
|
|
- >
|
|
|
- <Text color="helper">
|
|
|
- Install AWS GuardDuty agent on this cluster (see details to fully enable)
|
|
|
- </Text>
|
|
|
- <Spacer x={.5} inline/>
|
|
|
- <Tooltip
|
|
|
- children={<Icon src={info} />}
|
|
|
- content={
|
|
|
- "In addition to installing the agent, you must enable GuardDuty through your AWS Console and enable EKS Protection in the EKS Protection tab of the GuardDuty console."
|
|
|
- }
|
|
|
- position="right"
|
|
|
- />
|
|
|
- </Checkbox>
|
|
|
+ <Checkbox
|
|
|
+ checked={guardDutyEnabled}
|
|
|
+ disabled={isReadOnly}
|
|
|
+ toggleChecked={() => {
|
|
|
+ setGuardDutyEnabled(!guardDutyEnabled);
|
|
|
+ }}
|
|
|
+ disabledTooltip={
|
|
|
+ "Wait for provisioning to complete before editing this field."
|
|
|
+ }
|
|
|
+ >
|
|
|
+ <Text color="helper">
|
|
|
+ Install AWS GuardDuty agent on this cluster (see details to fully enable)
|
|
|
+ </Text>
|
|
|
+ <Spacer x={.5} inline />
|
|
|
+ <Tooltip
|
|
|
+ children={<Icon src={info} />}
|
|
|
+ content={
|
|
|
+ "In addition to installing the agent, you must enable GuardDuty through your AWS Console and enable EKS Protection in the EKS Protection tab of the GuardDuty console."
|
|
|
+ }
|
|
|
+ position="right"
|
|
|
+ />
|
|
|
+ </Checkbox>
|
|
|
</FlexCenter>
|
|
|
<Spacer y={1} />
|
|
|
<FlexCenter>
|
|
|
- <Checkbox
|
|
|
- checked={kmsEncryptionEnabled}
|
|
|
- disabled={isReadOnly || currentCluster != null}
|
|
|
- toggleChecked={() => {
|
|
|
- setKmsEncryptionEnabled(!kmsEncryptionEnabled);
|
|
|
- }}
|
|
|
- disabledTooltip={ kmsEncryptionEnabled ? "KMS encryption can never be disabled." :
|
|
|
- "Encryption is only supported at cluster creation."
|
|
|
- }
|
|
|
- >
|
|
|
- <Text color="helper">
|
|
|
- Enable KMS encryption for this cluster
|
|
|
- </Text>
|
|
|
- <Spacer x={.5} inline/>
|
|
|
- <Tooltip
|
|
|
- children={<Icon src={info} />}
|
|
|
- content={
|
|
|
- "KMS encryption can never be disabled. Deletion of the KMS key will permanently place this cluster in a degraded state."
|
|
|
- }
|
|
|
- position="right"
|
|
|
- />
|
|
|
- </Checkbox>
|
|
|
- </FlexCenter>
|
|
|
- {kmsEncryptionEnabled && (
|
|
|
- <ErrorInLine>
|
|
|
- <i className="material-icons">error</i>
|
|
|
- {
|
|
|
+ <Checkbox
|
|
|
+ checked={kmsEncryptionEnabled}
|
|
|
+ disabled={isReadOnly || currentCluster != null}
|
|
|
+ toggleChecked={() => {
|
|
|
+ setKmsEncryptionEnabled(!kmsEncryptionEnabled);
|
|
|
+ }}
|
|
|
+ disabledTooltip={kmsEncryptionEnabled ? "KMS encryption can never be disabled." :
|
|
|
+ "Encryption is only supported at cluster creation."
|
|
|
+ }
|
|
|
+ >
|
|
|
+ <Text color="helper">
|
|
|
+ Enable KMS encryption for this cluster
|
|
|
+ </Text>
|
|
|
+ <Spacer x={.5} inline />
|
|
|
+ <Tooltip
|
|
|
+ children={<Icon src={info} />}
|
|
|
+ content={
|
|
|
"KMS encryption can never be disabled. Deletion of the KMS key will permanently place this cluster in a degraded state."
|
|
|
}
|
|
|
- </ErrorInLine>
|
|
|
+ position="right"
|
|
|
+ />
|
|
|
+ </Checkbox>
|
|
|
+ </FlexCenter>
|
|
|
+ {kmsEncryptionEnabled && (
|
|
|
+ <ErrorInLine>
|
|
|
+ <i className="material-icons">error</i>
|
|
|
+ {
|
|
|
+ "KMS encryption can never be disabled. Deletion of the KMS key will permanently place this cluster in a degraded state."
|
|
|
+ }
|
|
|
+ </ErrorInLine>
|
|
|
)}
|
|
|
<Spacer y={1} />
|
|
|
</>
|
|
|
@@ -952,11 +952,11 @@ const ProvisionerSettings: React.FC<Props> = (props) => {
|
|
|
// disabled={isDisabled()}
|
|
|
disabled={
|
|
|
user?.email === "admin@porter.run" ||
|
|
|
- currentProject?.enable_reprovision
|
|
|
+ currentProject?.enable_reprovision
|
|
|
? false
|
|
|
: currentCluster
|
|
|
- ? true
|
|
|
- : isDisabled()
|
|
|
+ ? true
|
|
|
+ : isDisabled()
|
|
|
}
|
|
|
onClick={createCluster}
|
|
|
status={getStatus()}
|