Z-Wave-Me/home-automation-ui

View on GitHub

Showing 172 of 172 total issues

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

                _.span({key: 'data-group-version', className: 'data-group'},
                    _.span({key: 'label-item-version', className: 'label-item'}, __('version'), ': '),
                    _.span({key: 'value-item-version', className: 'value-item'}, version)
                ),
js/modules/preferences/components/modules_components/step1.js on lines 99..102
js/modules/preferences/components/modules_components/step1.js on lines 103..106
js/modules/preferences/components/modules_components/step1.js on lines 121..124
js/modules/preferences/components/modules_components/step1.js on lines 125..128

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 67.

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

                _.span({key: 'data-group-title', className: 'data-group'},
                    _.span({key: 'label-item-title', className: 'label-item'}, __('title'), ': '),
                    _.span({key: 'value-item-title', className: 'value-item'}, title)
                ),
js/modules/preferences/components/modules_components/step1.js on lines 103..106
js/modules/preferences/components/modules_components/step1.js on lines 117..120
js/modules/preferences/components/modules_components/step1.js on lines 121..124
js/modules/preferences/components/modules_components/step1.js on lines 125..128

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 67.

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

                _.span({key: 'data-group-author', className: 'data-group'},
                    _.span({key: 'label-item-author', className: 'label-item'}, __('author'), ': '),
                    _.span({key: 'value-item-author', className: 'value-item'}, author)
                ),
js/modules/preferences/components/modules_components/step1.js on lines 99..102
js/modules/preferences/components/modules_components/step1.js on lines 117..120
js/modules/preferences/components/modules_components/step1.js on lines 121..124
js/modules/preferences/components/modules_components/step1.js on lines 125..128

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 67.

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

                _.span({key: 'data-group-description', className: 'data-group no-inline'},
                    _.span({key: 'label-item-description', className: 'label-item'}, __('description'), ': '),
                    _.span({key: 'value-item-description', className: 'value-item'}, description)
                ),
js/modules/preferences/components/modules_components/step1.js on lines 99..102
js/modules/preferences/components/modules_components/step1.js on lines 103..106
js/modules/preferences/components/modules_components/step1.js on lines 117..120
js/modules/preferences/components/modules_components/step1.js on lines 121..124

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 67.

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

                _.span({key: 'data-group-maturity', className: 'data-group'},
                    _.span({key: 'label-item-maturity', className: 'label-item'}, __('maturity'), ': '),
                    _.span({key: 'value-item-maturity', className: 'value-item'}, maturity)
                ),
js/modules/preferences/components/modules_components/step1.js on lines 99..102
js/modules/preferences/components/modules_components/step1.js on lines 103..106
js/modules/preferences/components/modules_components/step1.js on lines 117..120
js/modules/preferences/components/modules_components/step1.js on lines 125..128

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 67.

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

Function render has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        render: function () {
            var _ = React.DOM,
                __ = this.gls,
                notification = this.getBinding('notification'),
                index = this.props.index,
Severity: Minor
Found in js/modules/notifications/components/event.js - About 1 hr to fix

Function render has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        render: function () {
            var __ = React.DOM,
                binding = this.getDefaultBinding(),
                data_binding = this.getBinding('data'),
                primary_filter = binding.get('primaryFilter'),
Severity: Minor
Found in js/modules/widgets/main.js - About 1 hr to fix

Function success has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                        success: function (response, xhr) {
                            if (callback && typeof callback === 'function') {
                                callback(response);
                            }

Severity: Minor
Found in js/mixins/sync/autosync.js - About 1 hr to fix

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

                activeNode[0].options.buttons.indexOf('remove') !== -1 ? _.button({ className: 'button-element remove-button', onClick: this.setActiveNodeTreeStatus.bind(null, 'pending') }, '-') : null,
Severity: Major
Found in js/modules/preferences/components/common/_base_button.js and 2 other locations - About 1 hr to fix
js/modules/preferences/components/common/_base_button.js on lines 17..17
js/modules/preferences/components/common/_base_button.js on lines 19..19

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 66.

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 3 locations. Consider refactoring.
Open

                activeNode[0].options.buttons.indexOf('duplicate') !== -1 ? _.button({ className: 'button-element duplicate-button', onClick: this.setActiveNodeTreeStatus.bind(null, 'duplicate') }, 'd') : null
Severity: Major
Found in js/modules/preferences/components/common/_base_button.js and 2 other locations - About 1 hr to fix
js/modules/preferences/components/common/_base_button.js on lines 17..17
js/modules/preferences/components/common/_base_button.js on lines 18..18

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 66.

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 3 locations. Consider refactoring.
Open

                activeNode[0].options.buttons.indexOf('add') !== -1 ? _.button({ className: 'button-element add-button', onClick: this.setActiveNodeTreeStatus.bind(null, 'add') }, '+') : null,
Severity: Major
Found in js/modules/preferences/components/common/_base_button.js and 2 other locations - About 1 hr to fix
js/modules/preferences/components/common/_base_button.js on lines 18..18
js/modules/preferences/components/common/_base_button.js on lines 19..19

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 66.

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

Function render has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        render: function () {
            var that = this,
                _ = React.DOM,
                __ = this.gls,
                instanceId = this.getBinding('preferences').get('leftPanelItemSelectedId'),
Severity: Minor
Found in js/modules/preferences/components/models/_automation.js - About 1 hr to fix

Function render has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        render: function () {
            var _ = React.DOM,
                binding = this.getDefaultBinding(),
                title = binding.sub('metrics').get('title'),
                url = binding.sub('metrics').get('url');
Severity: Minor
Found in js/modules/widgets/components/_camera.js - About 1 hr to fix

Function getDevicesAvailable has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        getDevicesAvailable: function () {
            var that = this,
                _ = React.DOM,
                __ = this.gls,
                devices_binding = that.getBinding('data').sub('devices'),
Severity: Minor
Found in js/modules/preferences/components/models/_profile.js - About 1 hr to fix

Function getDevicesAvailable has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        getDevicesAvailable: function () {
            var that = this,
                _ = React.DOM,
                __ = this.gls,
                devices_binding = that.getBinding('data').sub('devices'),
Severity: Minor
Found in js/modules/preferences/components/models/_room.js - About 1 hr to fix

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

                    _.div({
                        key: 'save-button',
                        className: 'modern-button green-mode center',
                        onClick: this.saveHandler
                    }, __('save', 'upper'),
Severity: Major
Found in js/modules/preferences/components/common/_buttons_group.js and 1 other location - About 1 hr to fix
js/modules/preferences/components/common/_buttons_group.js on lines 117..122

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 64.

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 2 locations. Consider refactoring.
Open

                    _.div({
                        key: 'save-button',
                        className: 'modern-button green-mode center',
                        onClick: this.saveHandler }, __('create', 'upper'),
                        this.state.loading ? _.div({ className: 'spinner' }) : null
Severity: Major
Found in js/modules/preferences/components/common/_buttons_group.js and 1 other location - About 1 hr to fix
js/modules/preferences/components/common/_buttons_group.js on lines 149..155

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 64.

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

Function save has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        save: function (options) {
            options = options || {};

            var that = this,
                model = options.model,
Severity: Minor
Found in js/mixins/sync/sync-layer.js - About 1 hr to fix

Function render has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        render: function () {
            var that = this,
                _ = React.DOM,
                binding = this.getDefaultBinding();

Severity: Minor
Found in js/modules/core/main.js - About 1 hr to fix

Function render has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        render: function () {
            var binding = this.getDefaultBinding(),
                dataBinding = this.getBinding('data'),
                _ = React.DOM,
                __ = this.gls,
Severity: Minor
Found in js/modules/core/components/filters.js - About 1 hr to fix
Severity
Category
Status
Source
Language