GladysProject/Gladys

View on GitHub

Showing 1,932 of 2,674 total issues

Similar blocks of code found in 13 locations. Consider refactoring.
Open

          {props.gatewayLoginStatus === RequestStatus.Error && (
            <div class="alert alert-danger" role="alert">
              <Text id="gatewayLogin.unknownError" />
            </div>
          )}
Severity: Major
Found in front/src/components/gateway/GatewayLoginForm.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 13 locations. Consider refactoring.
Open

                {props.forgotPasswordStatus === RequestStatus.RateLimitError && (
                  <div class="alert alert-danger" role="alert">
                    <Text id="forgotPassword.rateLimitError" />
                  </div>
                )}
Severity: Major
Found in front/src/routes/forgot-password/ForgotPasswordPage.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

  updateRoom = e => {
    this.props.updateDeviceField(this.props.listName, this.props.deviceIndex, 'room_id', e.target.value);
  };
Severity: Major
Found in front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx and 10 other locations - About 55 mins to fix
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 11..13
front/src/routes/scene/edit-scene/actions/BlinkLightParams.jsx on lines 36..38
front/src/routes/scene/edit-scene/actions/CalendarIsEventRunning.jsx on lines 56..58
front/src/routes/scene/edit-scene/actions/DelayActionParams.jsx on lines 10..12
front/src/routes/scene/edit-scene/actions/EcowattCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 13..20
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 22..29
front/src/routes/scene/edit-scene/actions/HttpRequest.jsx on lines 100..102
front/src/routes/scene/edit-scene/actions/SendMqttMessage.jsx on lines 13..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 13 locations. Consider refactoring.
Open

            {props.resetPasswordStatus === ResetPasswordStatus.ResetTokenNotFound && (
              <div class="alert alert-danger" role="alert">
                <Text id="resetPassword.resetTokenNotFound" />
              </div>
            )}
Severity: Major
Found in front/src/routes/reset-password/ResetPasswordForm.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 13 locations. Consider refactoring.
Open

          {props.gatewayLoginStatus === RequestStatus.UserNotAcceptedLocally && (
            <div class="alert alert-danger" role="alert">
              <Text id="gatewayLogin.userNotAcceptedLocally" />
            </div>
          )}
Severity: Major
Found in front/src/components/gateway/GatewayLoginForm.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

  updateName = e => {
    this.props.updateDeviceField(this.props.listName, this.props.deviceIndex, 'name', e.target.value);
  };
Severity: Major
Found in front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx and 10 other locations - About 55 mins to fix
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 15..17
front/src/routes/scene/edit-scene/actions/BlinkLightParams.jsx on lines 36..38
front/src/routes/scene/edit-scene/actions/CalendarIsEventRunning.jsx on lines 56..58
front/src/routes/scene/edit-scene/actions/DelayActionParams.jsx on lines 10..12
front/src/routes/scene/edit-scene/actions/EcowattCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 13..20
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 22..29
front/src/routes/scene/edit-scene/actions/HttpRequest.jsx on lines 100..102
front/src/routes/scene/edit-scene/actions/SendMqttMessage.jsx on lines 13..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

  handleNameChange = e => {
    this.props.updateActionProperty(this.props.columnIndex, this.props.index, 'calendar_event_name', e.target.value);
  };
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 11..13
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 15..17
front/src/routes/scene/edit-scene/actions/BlinkLightParams.jsx on lines 36..38
front/src/routes/scene/edit-scene/actions/DelayActionParams.jsx on lines 10..12
front/src/routes/scene/edit-scene/actions/EcowattCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 13..20
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 22..29
front/src/routes/scene/edit-scene/actions/HttpRequest.jsx on lines 100..102
front/src/routes/scene/edit-scene/actions/SendMqttMessage.jsx on lines 13..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

  handleChangeBlinkingSpeed = e => {
    this.props.updateActionProperty(this.props.columnIndex, this.props.index, 'blinking_speed', e.target.value);
  };
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 11..13
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 15..17
front/src/routes/scene/edit-scene/actions/CalendarIsEventRunning.jsx on lines 56..58
front/src/routes/scene/edit-scene/actions/DelayActionParams.jsx on lines 10..12
front/src/routes/scene/edit-scene/actions/EcowattCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 13..20
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 22..29
front/src/routes/scene/edit-scene/actions/HttpRequest.jsx on lines 100..102
front/src/routes/scene/edit-scene/actions/SendMqttMessage.jsx on lines 13..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

  handleChangeTopic = e => {
    this.props.updateActionProperty(this.props.columnIndex, this.props.index, 'topic', e.target.value);
  };
Severity: Major
Found in front/src/routes/scene/edit-scene/actions/SendMqttMessage.jsx and 10 other locations - About 55 mins to fix
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 11..13
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 15..17
front/src/routes/scene/edit-scene/actions/BlinkLightParams.jsx on lines 36..38
front/src/routes/scene/edit-scene/actions/CalendarIsEventRunning.jsx on lines 56..58
front/src/routes/scene/edit-scene/actions/DelayActionParams.jsx on lines 10..12
front/src/routes/scene/edit-scene/actions/EcowattCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 13..20
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 22..29
front/src/routes/scene/edit-scene/actions/HttpRequest.jsx on lines 100..102

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 13 locations. Consider refactoring.
Open

                {props.forgotPasswordStatus === RequestStatus.NetworkError && (
                  <div class="alert alert-danger" role="alert">
                    <Text id="forgotPassword.networkError" />
                  </div>
                )}
Severity: Major
Found in front/src/routes/forgot-password/ForgotPasswordPage.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

  handleDayChange = e => {
    this.props.updateActionProperty(this.props.columnIndex, this.props.index, 'edf_tempo_day', e.target.value);
  };
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 11..13
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 15..17
front/src/routes/scene/edit-scene/actions/BlinkLightParams.jsx on lines 36..38
front/src/routes/scene/edit-scene/actions/CalendarIsEventRunning.jsx on lines 56..58
front/src/routes/scene/edit-scene/actions/DelayActionParams.jsx on lines 10..12
front/src/routes/scene/edit-scene/actions/EcowattCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 13..20
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 22..29
front/src/routes/scene/edit-scene/actions/HttpRequest.jsx on lines 100..102
front/src/routes/scene/edit-scene/actions/SendMqttMessage.jsx on lines 13..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 13 locations. Consider refactoring.
Open

          {props.gatewayLoginStatus === LoginStatus.WrongCredentialsError && (
            <div class="alert alert-danger" role="alert">
              <Text id="gatewayLogin.wrongCredentials" />
            </div>
          )}
Severity: Major
Found in front/src/components/gateway/GatewayLoginForm.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

  handlePeakDayTypeChange = e => {
    this.props.updateActionProperty(
      this.props.columnIndex,
      this.props.index,
      'edf_tempo_peak_day_type',
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 11..13
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 15..17
front/src/routes/scene/edit-scene/actions/BlinkLightParams.jsx on lines 36..38
front/src/routes/scene/edit-scene/actions/CalendarIsEventRunning.jsx on lines 56..58
front/src/routes/scene/edit-scene/actions/DelayActionParams.jsx on lines 10..12
front/src/routes/scene/edit-scene/actions/EcowattCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 22..29
front/src/routes/scene/edit-scene/actions/HttpRequest.jsx on lines 100..102
front/src/routes/scene/edit-scene/actions/SendMqttMessage.jsx on lines 13..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 13 locations. Consider refactoring.
Open

                {props.forgotPasswordStatus === RequestStatus.Error && (
                  <div class="alert alert-danger" role="alert">
                    <Text id="forgotPassword.unknownError" />
                  </div>
                )}
Severity: Major
Found in front/src/routes/forgot-password/ForgotPasswordPage.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 13 locations. Consider refactoring.
Open

            {props.resetPasswordStatus === RequestStatus.NetworkError && (
              <div class="alert alert-danger" role="alert">
                <Text id="httpErrors.networkError" />
              </div>
            )}
Severity: Major
Found in front/src/routes/reset-password/ResetPasswordForm.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

  handleNetworkStatusChange = e => {
    this.props.updateActionProperty(this.props.columnIndex, this.props.index, 'ecowatt_network_status', e.target.value);
  };
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 11..13
front/src/routes/integration/all/ewelink/EweLinkDeviceBox.jsx on lines 15..17
front/src/routes/scene/edit-scene/actions/BlinkLightParams.jsx on lines 36..38
front/src/routes/scene/edit-scene/actions/CalendarIsEventRunning.jsx on lines 56..58
front/src/routes/scene/edit-scene/actions/DelayActionParams.jsx on lines 10..12
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 9..11
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 13..20
front/src/routes/scene/edit-scene/actions/EdfTempoCondition.jsx on lines 22..29
front/src/routes/scene/edit-scene/actions/HttpRequest.jsx on lines 100..102
front/src/routes/scene/edit-scene/actions/SendMqttMessage.jsx on lines 13..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

      features: [
        {
          name: 'SP2',
          category: 'switch',
          type: 'binary',
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemote.cy.js on lines 17..29
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemoteSkipAll.cy.js on lines 17..29
front/src/config/demo.js on lines 1392..1404
front/src/config/demo.js on lines 1468..1480

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

      features: [
        {
          name: 'Power',
          external_id: 'broadlink:8008bda3ae44:binary',
          selector: 'broadlink-8008bda3ae44-binary',
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkDeviceList.cy.js on lines 15..27
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemote.cy.js on lines 17..29
front/src/config/demo.js on lines 1392..1404
front/src/config/demo.js on lines 1468..1480

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

      features: [
        {
          name: 'sp2',
          category: 'switch',
          type: 'binary',
Severity: Major
Found in front/src/config/demo.js and 4 other locations - About 55 mins to fix
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkDeviceList.cy.js on lines 15..27
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemote.cy.js on lines 17..29
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemoteSkipAll.cy.js on lines 17..29
front/src/config/demo.js on lines 1392..1404

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

        features: [
          {
            name: 'SP2',
            category: 'switch',
            type: 'binary',
Severity: Major
Found in front/src/config/demo.js and 4 other locations - About 55 mins to fix
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkDeviceList.cy.js on lines 15..27
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemote.cy.js on lines 17..29
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemoteSkipAll.cy.js on lines 17..29
front/src/config/demo.js on lines 1468..1480

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language