portersupport 4 лет назад
Родитель
Сommit
4fa1334e2a
28 измененных файлов с 35 добавлено и 37 удалено
  1. 1 1
      dashboard/src/components/events/useLastSeenPodStatus.ts
  2. 1 1
      dashboard/src/components/porter-form/field-components/KeyValueArray.tsx
  3. 1 1
      dashboard/src/main/home/cluster-dashboard/NamespaceSelector.tsx
  4. 1 1
      dashboard/src/main/home/cluster-dashboard/chart/JobRunTable.tsx
  5. 1 1
      dashboard/src/main/home/cluster-dashboard/env-groups/CreateEnvGroup.tsx
  6. 1 1
      dashboard/src/main/home/cluster-dashboard/env-groups/ExpandedEnvGroup.tsx
  7. 2 0
      dashboard/src/main/home/cluster-dashboard/env-groups/utils.ts
  8. 3 3
      dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChart.tsx
  9. 1 1
      dashboard/src/main/home/cluster-dashboard/expanded-chart/RevisionSection.tsx
  10. 1 1
      dashboard/src/main/home/cluster-dashboard/expanded-chart/SettingsSection.tsx
  11. 1 1
      dashboard/src/main/home/cluster-dashboard/expanded-chart/jobs/useJobs.ts
  12. 2 2
      dashboard/src/main/home/cluster-dashboard/expanded-chart/status/Logs.tsx
  13. 1 1
      dashboard/src/main/home/cluster-dashboard/preview-environments/ConnectNewRepo.tsx
  14. 0 1
      dashboard/src/main/home/cluster-dashboard/preview-environments/deployments/DeploymentList.tsx
  15. 0 2
      dashboard/src/main/home/infrastructure/ExpandedInfra.tsx
  16. 0 1
      dashboard/src/main/home/integrations/edit-integration/GCRForm.tsx
  17. 1 1
      dashboard/src/main/home/launch/Launch.tsx
  18. 1 1
      dashboard/src/main/home/launch/launch-flow/SettingsPage.tsx
  19. 1 1
      dashboard/src/main/home/modals/LoadEnvGroupModal.tsx
  20. 1 1
      dashboard/src/main/home/modals/PreviewEnvSettingsModal.tsx
  21. 1 1
      dashboard/src/main/home/onboarding/components/RegistryImageList.tsx
  22. 1 1
      dashboard/src/main/home/onboarding/steps/ConnectRegistry/forms/_AWSRegistryForm.tsx
  23. 1 1
      dashboard/src/main/home/onboarding/steps/ProvisionResources/forms/_AWSProvisionerForm.tsx
  24. 2 2
      dashboard/src/main/home/onboarding/steps/ProvisionResources/forms/_DOProvisionerForm.tsx
  25. 2 2
      dashboard/src/main/home/onboarding/steps/ProvisionResources/forms/_GCPProvisionerForm.tsx
  26. 2 2
      dashboard/src/main/home/provisioner/AWSFormSection.tsx
  27. 1 1
      dashboard/src/shared/hooks/useEffectDebugger.ts
  28. 4 4
      dashboard/src/shared/hooks/useWebsockets.ts

+ 1 - 1
dashboard/src/components/events/useLastSeenPodStatus.ts

@@ -59,7 +59,7 @@ const useLastSeenPodStatus = ({
           name: podName,
         }
       );
-      console.log(getPodStatus(res.data.status));
+      //console.log(getPodStatus(res.data.status));
 
       setCurrentStatus(getPodStatus(res.data.status));
     } catch (error) {

+ 1 - 1
dashboard/src/components/porter-form/field-components/KeyValueArray.tsx

@@ -60,7 +60,7 @@ const KeyValueArray: React.FC<Props> = (props) => {
   useEffect(() => {
     if (hasSetValue(props) && !Array.isArray(state?.synced_env_groups)) {
       const values = props.value[0];
-      console.log(values);
+      // console.log(values);
       const envGroups = values?.synced || [];
       const promises = Promise.all(
         envGroups.map(async (envGroup: any) => {

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/NamespaceSelector.tsx

@@ -102,7 +102,7 @@ export default class NamespaceSelector extends Component<PropsType, StateType> {
   }
 
   handleSetActive = (namespace: any) => {
-    console.log("SELECTED", namespace);
+    // console.log("SELECTED", namespace);
     this.props.setNamespace(namespace);
   };
 

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/chart/JobRunTable.tsx

@@ -148,7 +148,7 @@ const JobRunTable: React.FC<Props> = ({
         tmpJobRuns.current = [...tmpJobRuns.current, data];
       },
       onclose: (event) => {
-        console.log(event);
+        // console.log(event);
         closeAllWebsockets();
       },
       onerror: (error) => {

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/env-groups/CreateEnvGroup.tsx

@@ -101,7 +101,7 @@ export default class CreateEnvGroup extends Component<PropsType, StateType> {
       )
       .then((res) => {
         this.setState({ submitStatus: "successful" });
-        console.log(res);
+        // console.log(res);
         this.props.goBack();
       })
       .catch((err) => {

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/env-groups/ExpandedEnvGroup.tsx

@@ -334,7 +334,7 @@ export const ExpandedEnvGroupFC = ({
         };
       }, {});
 
-      console.log({ normalObject, secretObject });
+      // console.log({ normalObject, secretObject });
 
       try {
         const updatedEnvGroup = await api

+ 2 - 0
dashboard/src/main/home/cluster-dashboard/env-groups/utils.ts

@@ -37,9 +37,11 @@ export const parseStringToEnvObject = (src: any, options: any) => {
 
         obj[key] = val;
       } else if (debug) {
+        /*
         console.log(
           `did not match key and value when parsing line ${idx + 1}: ${line}`
         );
+        */
       }
     });
 

+ 3 - 3
dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChart.tsx

@@ -221,7 +221,7 @@ const ExpandedChart: React.FC<Props> = (props) => {
   };
 
   const onSubmit = async (rawValues: any) => {
-    console.log("raw", rawValues);
+    // console.log("raw", rawValues);
     // Convert dotted keys to nested objects
     let values: any = {};
 
@@ -318,7 +318,7 @@ const ExpandedChart: React.FC<Props> = (props) => {
 
     setSaveValueStatus("loading");
 
-    console.log("valuesYaml", valuesYaml);
+    // console.log("valuesYaml", valuesYaml);
     try {
       await api.upgradeChartValues(
         "<token>",
@@ -421,7 +421,7 @@ const ExpandedChart: React.FC<Props> = (props) => {
   const renderTabContents = (currentTab: string) => {
     let { setSidebar } = props;
     let chart = currentChart;
-    console.log("CONTROLLERS", controllers);
+    // console.log("CONTROLLERS", controllers);
     switch (currentTab) {
       case "metrics":
         return <MetricsSection currentChart={chart} />;

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/expanded-chart/RevisionSection.tsx

@@ -89,7 +89,7 @@ class RevisionSection extends Component<PropsType, StateType> {
     const ws = new WebSocket(`${url}${apiPath}`);
 
     ws.onopen = () => {
-      console.log("connected to chart live updates websocket");
+      // console.log("connected to chart live updates websocket");
     };
 
     ws.onmessage = (evt: MessageEvent) => {

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/expanded-chart/SettingsSection.tsx

@@ -90,7 +90,7 @@ const SettingsSection: React.FC<PropsType> = ({
   const handleSubmit = async () => {
     setSaveValuesStatus("loading");
 
-    console.log(selectedImageUrl);
+    // console.log(selectedImageUrl);
 
     let values = {};
     if (selectedTag) {

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/expanded-chart/jobs/useJobs.ts

@@ -331,7 +331,7 @@ export const useJobs = (chart: ChartType) => {
         jobsRef.current = [...jobsRef.current, data];
       },
       onclose: (event) => {
-        console.log(event);
+        // console.log(event);
         closeWebsocket(websocketId);
       },
       onerror: (error) => {

+ 2 - 2
dashboard/src/main/home/cluster-dashboard/expanded-chart/status/Logs.tsx

@@ -229,7 +229,7 @@ const LogsFC: React.FC<{
         <Refresh
           onClick={() => {
             // this.refreshLogs();
-            console.log("Refresh logs");
+            // console.log("Refresh logs");
             refresh();
           }}
         >
@@ -400,7 +400,7 @@ const useLogs = (
   };
 
   useEffect(() => {
-    console.log("Selected pod updated");
+    // console.log("Selected pod updated");
     if (currentPod?.metadata?.name === currentPodName.current) {
       return () => {};
     }

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/preview-environments/ConnectNewRepo.tsx

@@ -52,7 +52,7 @@ const ConnectNewRepo: React.FC = () => {
         }
       )
       .then(({ data }) => {
-        console.log("github account", data);
+        // console.log("github account", data);
 
         if (!Array.isArray(data)) {
           throw Error("Data is not an array");

+ 0 - 1
dashboard/src/main/home/cluster-dashboard/preview-environments/deployments/DeploymentList.tsx

@@ -62,7 +62,6 @@ const DeploymentList = ({ environments }: { environments: Environment[] }) => {
     );
 
     if (repo && true) {
-      console.log("tested", repo);
       setSelectedRepo(`${repo.git_repo_owner}/${repo.git_repo_name}`);
     }
   }, [location.search, history]);

+ 0 - 2
dashboard/src/main/home/infrastructure/ExpandedInfra.tsx

@@ -115,8 +115,6 @@ const ExpandedInfra: React.FunctionComponent = () => {
   };
 
   const setLatestOperation = (operation: Operation) => {
-    console.log("SETTING LATEST OPERATION", operation);
-
     let newInfra = infra;
     newInfra.latest_operation = operation;
     setInfra(newInfra);

+ 0 - 1
dashboard/src/main/home/integrations/edit-integration/GCRForm.tsx

@@ -71,7 +71,6 @@ export default class GCRForm extends Component<PropsType, StateType> {
         )
       )
       .then((res) => {
-        console.log(res.data);
         this.props.closeForm();
       })
       .catch(this.catchError);

+ 1 - 1
dashboard/src/main/home/launch/Launch.tsx

@@ -118,7 +118,7 @@ class Templates extends Component<PropsType, StateType> {
           (v: any) => v.name === template_name
         );
 
-        console.log(currentTemplate);
+        // console.log(currentTemplate);
         if (currentTemplate.versions.find((v: any) => v === version)) {
           currentTemplate.currentVersion = version;
         }

+ 1 - 1
dashboard/src/main/home/launch/launch-flow/SettingsPage.tsx

@@ -153,7 +153,7 @@ class SettingsPage extends Component<PropsType, StateType> {
               !this.props.isAuthorized("namespace", "", ["get", "create"])
             }
             onSubmit={(val) => {
-              console.log(val);
+              // console.log(val);
               onSubmit(val);
             }}
             hideBottomSpacer={!!this.props.fullActionConfig?.git_repo}

+ 1 - 1
dashboard/src/main/home/modals/LoadEnvGroupModal.tsx

@@ -153,7 +153,7 @@ export default class LoadEnvGroupModal extends Component<PropsType, StateType> {
   };
 
   potentiallyOverriddenKeys(incoming: Record<string, string>): KeyValue[] {
-    console.log(incoming, this.props.existingValues);
+    // console.log(incoming, this.props.existingValues);
     return Object.entries(incoming)
       .filter(([key]) => this.props.existingValues[key])
       .map(([key, value]) => ({ key, value }));

+ 1 - 1
dashboard/src/main/home/modals/PreviewEnvSettingsModal.tsx

@@ -41,7 +41,7 @@ const PreviewEnvSettingsModal = () => {
         }
       )
       .then(({ data }) => {
-        console.log("github account", data);
+        // console.log("github account", data);
 
         if (!Array.isArray(data)) {
           throw Error("Data is not an array");

+ 1 - 1
dashboard/src/main/home/onboarding/components/RegistryImageList.tsx

@@ -28,7 +28,7 @@ const RegistryImageList: React.FC<{
         if (!res?.data) {
           throw new Error("No data found");
         }
-        console.log(res.data);
+        // console.log(res.data);
         setImageList(res.data);
       })
       .catch(console.error);

+ 1 - 1
dashboard/src/main/home/onboarding/steps/ConnectRegistry/forms/_AWSRegistryForm.tsx

@@ -321,7 +321,7 @@ export const TestRegistryConnection: React.FC<{ nextFormStep: () => void }> = ({
   nextFormStep,
 }) => {
   const snap = useSnapshot(StateHandler);
-  console.log(snap.connected_registry.settings);
+  // console.log(snap.connected_registry.settings);
   return (
     <>
       <RegistryImageList

+ 1 - 1
dashboard/src/main/home/onboarding/steps/ProvisionResources/forms/_AWSProvisionerForm.tsx

@@ -361,7 +361,7 @@ export const SettingsForm: React.FC<{
   };
 
   const provisionECR = async (awsIntegrationId: number) => {
-    console.log("Started provision ECR");
+    // console.log("Started provision ECR");
 
     // See if there's an infra for EKS that is in an errored state and the last operation
     // was an attempt at creation. If so, re-use that infra.

+ 2 - 2
dashboard/src/main/home/onboarding/steps/ProvisionResources/forms/_DOProvisionerForm.tsx

@@ -249,7 +249,7 @@ export const SettingsForm: React.FC<{
   };
 
   const provisionDOCR = async (integrationId: number, tier: string) => {
-    console.log("Provisioning DOCR...");
+    // console.log("Provisioning DOCR...");
 
     // See if there's an infra for DOKS that is in an errored state and the last operation
     // was an attempt at creation. If so, re-use that infra.
@@ -302,7 +302,7 @@ export const SettingsForm: React.FC<{
     region: string,
     clusterName: string
   ) => {
-    console.log("Provisioning DOKS...");
+    // console.log("Provisioning DOKS...");
 
     // See if there's an infra for DOKS that is in an errored state and the last operation
     // was an attempt at creation. If so, re-use that infra.

+ 2 - 2
dashboard/src/main/home/onboarding/steps/ProvisionResources/forms/_GCPProvisionerForm.tsx

@@ -388,7 +388,7 @@ export const SettingsForm: React.FC<{
   };
 
   const provisionGCR = async (id: number) => {
-    console.log("Provisioning GCR");
+    // console.log("Provisioning GCR");
 
     // See if there's an infra for GKE that is in an errored state and the last operation
     // was an attempt at creation. If so, re-use that infra.
@@ -428,7 +428,7 @@ export const SettingsForm: React.FC<{
   };
 
   const provisionGKE = async (id: number) => {
-    console.log("Provisioning GKE");
+    // console.log("Provisioning GKE");
 
     // See if there's an infra for GKE that is in an errored state and the last operation
     // was an attempt at creation. If so, re-use that infra.

+ 2 - 2
dashboard/src/main/home/provisioner/AWSFormSection.tsx

@@ -186,7 +186,7 @@ const AWSFormSectionFC: React.FC<PropsType> = (props) => {
   };
 
   const provisionECR = async (awsIntegrationId: number) => {
-    console.log("Started provision ECR");
+    // console.log("Started provision ECR");
     const { currentProject } = context;
     try {
       await api.provisionInfra(
@@ -405,7 +405,7 @@ const AWSFormSectionFC: React.FC<PropsType> = (props) => {
           selected={selectedInfras}
           setSelected={(x: { value: string; label: string }[]) => {
             setIsFormDirty(true);
-            console.log(x);
+            // console.log(x);
             setSelectedInfras(x);
           }}
         />

+ 1 - 1
dashboard/src/shared/hooks/useEffectDebugger.ts

@@ -27,7 +27,7 @@ export const useEffectDebugger = (
   );
 
   if (Object.keys(changedDeps).length) {
-    console.log("[use-effect-debugger] ", changedDeps);
+    // console.log("[use-effect-debugger] ", changedDeps);
   }
 
   useEffect(effectHook, dependencies);

+ 4 - 4
dashboard/src/shared/hooks/useWebsockets.ts

@@ -36,12 +36,12 @@ export const useWebsockets = () => {
     options: NewWebsocketOptions
   ): WebsocketConfig => {
     if (!id) {
-      console.log("Id cannot be empty");
+      // console.log("Id cannot be empty");
       return;
     }
 
     if (!apiEndpoint) {
-      console.log("Api endpoint string cannot be empty");
+      // console.log("Api endpoint string cannot be empty");
       return;
     }
 
@@ -75,7 +75,7 @@ export const useWebsockets = () => {
 
     // Prevent calling openWebsocket before newWebsocket
     if (!wsConfig) {
-      console.log("Couldn't find ws config");
+      // console.log("Couldn't find ws config");
       return;
     }
     // In case of having a previous websocket opened with the same ID, close the previous one
@@ -103,7 +103,7 @@ export const useWebsockets = () => {
     const ws = websocketMap.current[id];
 
     if (!ws) {
-      console.log(`Couldn't find websocket to close for id: ${id}`);
+      // console.log(`Couldn't find websocket to close for id: ${id}`);
       return;
     }