get rid of console.log

This commit is contained in:
Mario Pesch 2021-03-24 17:07:23 +01:00
parent d835ffc449
commit 6a6b2e2f58
14 changed files with 1 additions and 23 deletions

View File

@ -38,13 +38,11 @@ export const getTutorials = () => (dispatch, getState) => {
axios.get(`${process.env.REACT_APP_BLOCKLY_API}/tutorial`) axios.get(`${process.env.REACT_APP_BLOCKLY_API}/tutorial`)
.then(res => { .then(res => {
var tutorials = res.data.tutorials; var tutorials = res.data.tutorials;
console.log(tutorials);
existingTutorials(tutorials, getState().tutorial.status).then(status => { existingTutorials(tutorials, getState().tutorial.status).then(status => {
dispatch({ dispatch({
type: TUTORIAL_SUCCESS, type: TUTORIAL_SUCCESS,
payload: status payload: status
}); });
console.log('zwei');
dispatch(updateStatus(status)); dispatch(updateStatus(status));
dispatch({ dispatch({
type: GET_TUTORIALS, type: GET_TUTORIALS,
@ -167,7 +165,6 @@ export const tutorialCheck = (status, step) => (dispatch, getState) => {
type: status === 'success' ? TUTORIAL_SUCCESS : TUTORIAL_ERROR, type: status === 'success' ? TUTORIAL_SUCCESS : TUTORIAL_ERROR,
payload: tutorialsStatus payload: tutorialsStatus
}); });
console.log('drei');
dispatch(updateStatus(tutorialsStatus)); dispatch(updateStatus(tutorialsStatus));
dispatch(tutorialChange()); dispatch(tutorialChange());
dispatch(returnSuccess('', '', 'TUTORIAL_CHECK_SUCCESS')); dispatch(returnSuccess('', '', 'TUTORIAL_CHECK_SUCCESS'));

View File

@ -17,7 +17,6 @@ export const onChangeCode = () => (dispatch, getState) => {
var xmlDom = Blockly.Xml.workspaceToDom(workspace); var xmlDom = Blockly.Xml.workspaceToDom(workspace);
code.xml = Blockly.Xml.domToPrettyText(xmlDom); code.xml = Blockly.Xml.domToPrettyText(xmlDom);
var selectedBlock = Blockly.selected var selectedBlock = Blockly.selected
console.log(selectedBlock)
if (selectedBlock !== null) { if (selectedBlock !== null) {
code.helpurl = selectedBlock.helpUrl code.helpurl = selectedBlock.helpUrl
code.tooltip = selectedBlock.tooltip code.tooltip = selectedBlock.tooltip

View File

@ -61,7 +61,6 @@ class BlocklyWindow extends Component {
var xmlDom = Blockly.Xml.textToDom(xml); var xmlDom = Blockly.Xml.textToDom(xml);
Blockly.Xml.clearWorkspaceAndLoadFromXml(xmlDom, workspace); Blockly.Xml.clearWorkspaceAndLoadFromXml(xmlDom, workspace);
// var toolbox = workspace.getToolbox(); // var toolbox = workspace.getToolbox();
// console.log(toolbox);
// workspace.updateToolbox(toolbox.toolboxDef_); // workspace.updateToolbox(toolbox.toolboxDef_);
} }
Blockly.svgResize(workspace); Blockly.svgResize(workspace);

View File

@ -1148,9 +1148,7 @@ Blockly.Blocks['procedures_callnoreturn'] = {
// This should only be possible programatically and may indicate a problem // This should only be possible programatically and may indicate a problem
// with event grouping. If you see this message please investigate. If the // with event grouping. If you see this message please investigate. If the
// use ends up being valid we may need to reorder events in the undo stack. // use ends up being valid we may need to reorder events in the undo stack.
console.log(
'Saw an existing group while responding to a definition change'
);
} }
Blockly.Events.setGroup(event.group); Blockly.Events.setGroup(event.group);
if (event.newValue) { if (event.newValue) {

View File

@ -73,7 +73,6 @@ Blockly.Blocks['sensebox_osem_connection'] = {
* Blockly.Blocks['controls_flow_statements'].LOOP_TYPES.push('custom_loop'); * Blockly.Blocks['controls_flow_statements'].LOOP_TYPES.push('custom_loop');
*/ */
selectedBox = this.getFieldValue('BoxID'); selectedBox = this.getFieldValue('BoxID');
console.log(selectedBox)
if (selectedBox !== '' && boxes) { if (selectedBox !== '' && boxes) {
var accessToken = boxes.find(element => element._id === selectedBox).access_token var accessToken = boxes.find(element => element._id === selectedBox).access_token
if (accessToken !== undefined) { if (accessToken !== undefined) {
@ -160,7 +159,6 @@ Blockly.Blocks['sensebox_send_to_osem'] = {
for (var i = 0; i < box.sensors.length; i++) { for (var i = 0; i < box.sensors.length; i++) {
dropdown.push([box.sensors[i].title, box.sensors[i]._id]) dropdown.push([box.sensors[i].title, box.sensors[i]._id])
} }
console.log(dropdown)
} }
if (dropdown.length > 1) { if (dropdown.length > 1) {
var options = dropdown.slice(1) var options = dropdown.slice(1)

View File

@ -68,7 +68,6 @@ Blockly.Arduino['procedures_defreturn'] = function (block) {
}; };
function translateType(type) { function translateType(type) {
console.log(type);
switch (type) { switch (type) {
case 'int': case 'int':

View File

@ -33,7 +33,6 @@ Blockly.Arduino.sensebox_ws2818_led = function () {
var dropdown_pin = this.getFieldValue('Port'); var dropdown_pin = this.getFieldValue('Port');
var position = Blockly.Arduino.valueToCode(this, 'POSITION', Blockly.Arduino.ORDER_ATOMIC) || '0'; var position = Blockly.Arduino.valueToCode(this, 'POSITION', Blockly.Arduino.ORDER_ATOMIC) || '0';
var color = Blockly.Arduino.valueToCode(this, 'COLOR', Blockly.Arduino.ORDER_ATOMIC) || '0' var color = Blockly.Arduino.valueToCode(this, 'COLOR', Blockly.Arduino.ORDER_ATOMIC) || '0'
console.log(color)
var code = `rgb_led_${dropdown_pin}.setPixelColor(${position},rgb_led_${dropdown_pin}.Color(${color}));\nrgb_led_${dropdown_pin}.show();\n`; var code = `rgb_led_${dropdown_pin}.setPixelColor(${position},rgb_led_${dropdown_pin}.Color(${color}));\nrgb_led_${dropdown_pin}.show();\n`;
return code; return code;
}; };

View File

@ -15,7 +15,6 @@ class Content extends Component {
componentDidMount() { componentDidMount() {
if (this.props.language === 'de_DE') { if (this.props.language === 'de_DE') {
console.log("change Language")
Blockly.setLocale(De); Blockly.setLocale(De);
} else if (this.props.language === 'en_US') { } else if (this.props.language === 'en_US') {
Blockly.setLocale(En); Blockly.setLocale(En);
@ -23,13 +22,10 @@ class Content extends Component {
} }
componentDidUpdate(props) { componentDidUpdate(props) {
console.log(this.props.language)
if (props.language !== this.props.language) { if (props.language !== this.props.language) {
if (this.props.language === 'de_DE') { if (this.props.language === 'de_DE') {
console.log("change Language")
Blockly.setLocale(De); Blockly.setLocale(De);
} else if (this.props.language === 'en_US') { } else if (this.props.language === 'en_US') {
console.log("change Language")
Blockly.setLocale(En); Blockly.setLocale(En);
} }
} }

View File

@ -56,8 +56,6 @@ class Project extends Component {
getProject = () => { getProject = () => {
var id = this.props.location.pathname.replace(/\/[a-z]{1,}\//, ''); var id = this.props.location.pathname.replace(/\/[a-z]{1,}\//, '');
var param = this.props.location.pathname.replace(`/${id}`, '').replace('/', ''); var param = this.props.location.pathname.replace(`/${id}`, '').replace('/', '');
console.log('param', param);
console.log(id);
this.props.getProject(param, id); this.props.getProject(param, id);
} }

View File

@ -60,7 +60,6 @@ class Badge extends Component {
this.setState({badges: res.data.badges, badgeName: this.props.badge ? res.data.badges.filter(badge => badge._id === this.props.badge)[0].name : '' }); this.setState({badges: res.data.badges, badgeName: this.props.badge ? res.data.badges.filter(badge => badge._id === this.props.badge)[0].name : '' });
}) })
.catch(err => { .catch(err => {
console.log(err);
}); });
}; };

View File

@ -28,7 +28,6 @@ class Tutorial extends Component {
// retrieve tutorial only if a potential user is loaded - authentication // retrieve tutorial only if a potential user is loaded - authentication
// is finished (success or failed) // is finished (success or failed)
if(!this.props.progress){ if(!this.props.progress){
console.log(this.props);
this.props.getTutorial(this.props.match.params.tutorialId); this.props.getTutorial(this.props.match.params.tutorialId);
} }
} }

View File

@ -38,7 +38,6 @@ export class Login extends Component {
} }
componentDidUpdate(props) { componentDidUpdate(props) {
console.log(this.state.redirect);
const { message } = this.props; const { message } = this.props;
if (message !== props.message) { if (message !== props.message) {
if (message.id === 'LOGIN_SUCCESS') { if (message.id === 'LOGIN_SUCCESS') {

View File

@ -80,7 +80,6 @@ class Compile extends Component {
}) })
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
console.log(data);
this.setState({ id: data.data.id }, () => { this.setState({ id: data.data.id }, () => {
this.createFileName(); this.createFileName();
}); });

View File

@ -127,7 +127,6 @@ class SaveProject extends Component {
} }
render() { render() {
console.log(1, this.props);
return ( return (
<div style={this.props.style}> <div style={this.props.style}>
<Tooltip title={this.state.projectType === 'project' ? Blockly.Msg.tooltip_update_project : Blockly.Msg.tooltip_save_project} arrow> <Tooltip title={this.state.projectType === 'project' ? Blockly.Msg.tooltip_update_project : Blockly.Msg.tooltip_save_project} arrow>