From 02fddd8a4f112d52f143a898483614c67be2c21c Mon Sep 17 00:00:00 2001
From: Anton Kulyk <kuliks.anton@gmail.com>
Date: Mon, 12 Jul 2021 15:45:51 +0300
Subject: [PATCH] Remove console logs (#16982)

---
 frontend/src/metabase/App.jsx                                   | 1 -
 frontend/src/metabase/containers/Form.jsx                       | 2 --
 frontend/src/metabase/lib/expressions/parser.js                 | 2 --
 .../src/metabase/query_builder/components/AggregationWidget.jsx | 1 -
 .../query_builder/components/AlertListPopoverContent.jsx        | 1 -
 .../query_builder/components/filters/pickers/TimePicker.jsx     | 1 -
 .../src/metabase/visualizations/components/TableInteractive.jsx | 1 -
 7 files changed, 9 deletions(-)

diff --git a/frontend/src/metabase/App.jsx b/frontend/src/metabase/App.jsx
index 6bacc9515ca..dd176e98698 100644
--- a/frontend/src/metabase/App.jsx
+++ b/frontend/src/metabase/App.jsx
@@ -55,7 +55,6 @@ export default class App extends Component {
   }
 
   componentDidCatch(error, errorInfo) {
-    console.log("COMPONENT DID CATCH LOLE");
     this.setState({ errorInfo });
   }
 
diff --git a/frontend/src/metabase/containers/Form.jsx b/frontend/src/metabase/containers/Form.jsx
index 853e55717a7..c93174526f3 100644
--- a/frontend/src/metabase/containers/Form.jsx
+++ b/frontend/src/metabase/containers/Form.jsx
@@ -255,7 +255,6 @@ export default class Form extends React.Component {
 
   _registerFormField = (field: FormFieldDefinition) => {
     if (!_.isEqual(this.state.inlineFields[field.name], field)) {
-      // console.log("_registerFormField", field.name);
       this.setState(prevState =>
         assocIn(prevState, ["inlineFields", field.name], field),
       );
@@ -264,7 +263,6 @@ export default class Form extends React.Component {
 
   _unregisterFormField = (field: FormFieldDefinition) => {
     if (this.state.inlineFields[field.name]) {
-      // console.log("_unregisterFormField", field.name);
       // this.setState(prevState =>
       //   dissocIn(prevState, ["inlineFields", field.name]),
       // );
diff --git a/frontend/src/metabase/lib/expressions/parser.js b/frontend/src/metabase/lib/expressions/parser.js
index a80ceccc14c..074e7e16a39 100644
--- a/frontend/src/metabase/lib/expressions/parser.js
+++ b/frontend/src/metabase/lib/expressions/parser.js
@@ -391,12 +391,10 @@ export class ExpressionParser extends CstParser {
   }
 
   canTokenTypeBeInsertedInRecovery() {
-    // console.log("insert", this.tokenRecoveryEnabled);
     return this.tokenRecoveryEnabled;
   }
 
   canRecoverWithSingleTokenDeletion() {
-    // console.log("delete", this.tokenRecoveryEnabled);
     return this.tokenRecoveryEnabled;
   }
 }
diff --git a/frontend/src/metabase/query_builder/components/AggregationWidget.jsx b/frontend/src/metabase/query_builder/components/AggregationWidget.jsx
index 61216094c96..78bfd52583f 100644
--- a/frontend/src/metabase/query_builder/components/AggregationWidget.jsx
+++ b/frontend/src/metabase/query_builder/components/AggregationWidget.jsx
@@ -48,7 +48,6 @@ export default class AggregationWidget extends React.Component {
       children,
       className,
     } = this.props;
-    console.log("aggregation", aggregation);
 
     const popover = this.state.isOpen && (
       <Popover onClose={this.handleClose}>
diff --git a/frontend/src/metabase/query_builder/components/AlertListPopoverContent.jsx b/frontend/src/metabase/query_builder/components/AlertListPopoverContent.jsx
index 0260e1fbb52..26073b73b3a 100644
--- a/frontend/src/metabase/query_builder/components/AlertListPopoverContent.jsx
+++ b/frontend/src/metabase/query_builder/components/AlertListPopoverContent.jsx
@@ -286,7 +286,6 @@ export class AlertScheduleText extends Component {
 
       return `${verbose ? "daily at " : "Daily, "} ${hour} ${amPm}`;
     } else if (scheduleType === "weekly") {
-      console.log(schedule);
       const hourOfDay = schedule.schedule_hour;
       const day = _.find(
         DAY_OF_WEEK_OPTIONS,
diff --git a/frontend/src/metabase/query_builder/components/filters/pickers/TimePicker.jsx b/frontend/src/metabase/query_builder/components/filters/pickers/TimePicker.jsx
index ac1140d75c3..35e1f5fba64 100644
--- a/frontend/src/metabase/query_builder/components/filters/pickers/TimePicker.jsx
+++ b/frontend/src/metabase/query_builder/components/filters/pickers/TimePicker.jsx
@@ -56,7 +56,6 @@ const MultiTimePicker = ({ filter, onFilterChange }) => (
 );
 
 const sortTimes = (a, b) => {
-  console.log(parseTime(a).isAfter(parseTime(b)));
   return parseTime(a).isAfter(parseTime(b)) ? [b, a] : [a, b];
 };
 
diff --git a/frontend/src/metabase/visualizations/components/TableInteractive.jsx b/frontend/src/metabase/visualizations/components/TableInteractive.jsx
index 6c9ed57e1fe..618d8dcf9ba 100644
--- a/frontend/src/metabase/visualizations/components/TableInteractive.jsx
+++ b/frontend/src/metabase/visualizations/components/TableInteractive.jsx
@@ -869,7 +869,6 @@ export default class TableInteractive extends Component {
   _benchmark() {
     const grid = ReactDOM.findDOMNode(this.grid);
     const height = grid.scrollHeight;
-    console.log("height", height);
     let top = 0;
     let start = Date.now();
     // console.profile();
-- 
GitLab