Soham Dessai 2 лет назад
Родитель
Сommit
e28bd301b2

+ 0 - 3
dashboard/src/components/SOC2Checks.tsx

@@ -221,9 +221,6 @@ const SOC2Checks: React.FC<Props> = ({
   return (
     <>
       <>
-        {/* <Fieldset>
-        <DonutChart soc2Data={soc2Data} />
-      </Fieldset> */}
         <Spacer y={1} />
         <AppearingDiv>
           {Array.from(combinedKeys).map((checkKey) => (

+ 3 - 2
dashboard/src/components/SOC2EmailComponent.tsx

@@ -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>
@@ -121,5 +121,6 @@ const EmailItem = styled.div`
   padding: 2px;
   margin-bottom: 5px;
   border-radius: 4px;
+  max-width: 38%;
 
 `;

+ 17 - 9
dashboard/src/main/home/cluster-dashboard/dashboard/Compliance.tsx

@@ -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: {
@@ -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: ["example@porter.run"], // 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
+    // },
   },
 };
 
@@ -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, {
@@ -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,
           },
         };
       });