Skip to content

Commit

Permalink
Cloud Watch Alarms
Browse files Browse the repository at this point in the history
  • Loading branch information
sdess09 committed Jan 4, 2024
1 parent 570ec51 commit f2029bb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
3 changes: 0 additions & 3 deletions dashboard/src/components/SOC2Checks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,6 @@ const SOC2Checks: React.FC<Props> = ({
return (
<>
<>
{/* <Fieldset>
<DonutChart soc2Data={soc2Data} />
</Fieldset> */}
<Spacer y={1} />
<AppearingDiv>
{Array.from(combinedKeys).map((checkKey) => (
Expand Down
5 changes: 3 additions & 2 deletions dashboard/src/components/SOC2EmailComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ const SOC2EmailComponent: React.FC<Props> = ({ emails, setSoc2Data, soc2CheckKey
</div>
<Spacer y={1} />
<div>
{emails.length > 0 && <Text>Subscribers: </Text>}
{emails.length > 0 && <Text color="helper">Subscribers: </Text>}
{emails.map((email, index) => (
<EmailItem key={index}>
<Text color="helper" size={13}>{email}</Text>
<Text size={13}>{email}</Text>
<DeleteButton onClick={() => deleteEmail(email)}>
<i className="material-icons">delete</i>
</DeleteButton>
Expand Down Expand Up @@ -121,5 +121,6 @@ const EmailItem = styled.div`
padding: 2px;
margin-bottom: 5px;
border-radius: 4px;
max-width: 38%;
`;
26 changes: 17 additions & 9 deletions dashboard/src/main/home/cluster-dashboard/dashboard/Compliance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type Props = {
// "locked":(true if unmutable field like KMS),
// "disabledTooltip": "display if message is disabled",
// "hideToggle": true (if you want to hide the toggle
// "email": ["example@porter"] (if you want to add an email field to pass in)
// }
const soc2DataDefault: Soc2Data = {
soc2_checks: {
Expand Down Expand Up @@ -76,15 +77,15 @@ const soc2DataDefault: Soc2Data = {
info: "",
status: "",
},
"Enable CloudWatch Alarms": {
message:
"Enter Email List",
link: "https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning-enhanced.html",
enabled: false,
info: "",
status: "",
email: ["[email protected]"], // this is a special case for email
},
// "Enable CloudWatch Alarms": {
// message:
// "Enter Email List",
// link: "https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning-enhanced.html",
// enabled: false,
// info: "",
// status: "",
// email: [""], // this is a special case for email
// },
},
};

Expand Down Expand Up @@ -171,6 +172,7 @@ const Compliance: React.FC<Props> = (props) => {
soc2Data.soc2_checks["Cluster Secret Encryption"].enabled;
const ecrScanningEnabled =
soc2Data.soc2_checks["Enhanced Image Vulnerability Scanning"].enabled;
//pass in cloudwatch emails here to cluster contract to be saved

const contractData = JSON.parse(atob(base64Contract));
const latestCluster: Cluster = Cluster.fromJson(contractData.cluster, {
Expand Down Expand Up @@ -338,6 +340,12 @@ const Compliance: React.FC<Props> = (props) => {
enabled: eksValues.enableEcrScanning,
status: determineStatus(eksValues.enableEcrScanning),
},
// set Cloudwatch Fields here example:
// "Enable CloudWatch Alarms": {
// ...prevSoc2Data.soc2_checks["Enable CloudWatch Alarms"],
// enabled: eksValues.enableCloudwatchAlarms,
// status: determineStatus(eksValues.enableCloudwatchAlarms),
// email: eksValues.cloudwatchEmails,
},
};
});
Expand Down

0 comments on commit f2029bb

Please sign in to comment.