jaumard/ngx-dashboard

View on GitHub

Showing 75 of 75 total issues

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

    DashboardComponent.prototype._onMouseMove = function (e) {
        if (this._isDragging) {
            //scroll while drag
            if (this._isTouchEvent(e))
                e = e.touches.length > 0 ? e.touches[0] : e.changedTouches[0];
Severity: Minor
Found in demo/demoDist/main.bundle.js - About 1 hr to fix

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

    /***/ (function(module, exports) {
    
    /*
        MIT License http://www.opensource.org/licenses/mit-license.php
        Author Tobias Koppers @sokra
    Severity: Minor
    Found in demo/demoDist/styles.bundle.js - About 1 hr to fix

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

        private _onMouseMove(e: any): boolean {
          if (this._isDragging) {
            //scroll while drag
            if (this._isTouchEvent(e))
              e = e.touches.length > 0 ? e.touches[0] : e.changedTouches[0];
      Severity: Minor
      Found in src/components/dashboard/dashboard.component.ts - About 1 hr to fix

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

        function addStyle(obj, options) {
            var styleElement, update, remove;
        
            if (options.singleton) {
                var styleIndex = singletonCounter++;
        Severity: Minor
        Found in demo/demoDist/styles.bundle.js - About 1 hr to fix

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

          module.exports = function (config) {
            config.set({
              basePath: '',
              frameworks: ['jasmine', 'angular-cli'],
              plugins: [
          Severity: Minor
          Found in demo/karma.conf.js - About 1 hr to fix

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

            module.exports = function() {
                var list = [];
            
                // return the list of modules as css string
                list.toString = function toString() {
            Severity: Minor
            Found in demo/demoDist/styles.bundle.js - About 1 hr to fix

              Function AppComponent has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var AppComponent = (function () {
                  function AppComponent() {
                      this.title = 'app works!';
                      this.widgetsSize = [300, 150];
                      this.dashboardMargin = 20;
              Severity: Minor
              Found in demo/demoDist/main.bundle.js - About 1 hr to fix

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

                var __metadata = (this && this.__metadata) || function (k, v) {
                    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
                };
                Severity: Major
                Found in demo/demoDist/main.bundle.js and 1 other location - About 1 hr to fix
                demo/demoDist/main.bundle.js on lines 934..936

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

                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

                var __metadata = (this && this.__metadata) || function (k, v) {
                    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
                };
                Severity: Major
                Found in demo/demoDist/main.bundle.js and 1 other location - About 1 hr to fix
                demo/demoDist/main.bundle.js on lines 1022..1024

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

                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 exports has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                module.exports = function(list, options) {
                    if(typeof DEBUG !== "undefined" && DEBUG) {
                        if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
                    }
                
                
                Severity: Minor
                Found in demo/demoDist/styles.bundle.js - About 1 hr to fix

                  Function 318 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  /***/ (function(module, exports, __webpack_require__) {
                  
                  "use strict";
                  
                  Object.defineProperty(exports, "__esModule", { value: true });
                  Severity: Minor
                  Found in demo/demoDist/main.bundle.js - About 1 hr to fix

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

                        if (widget2.instance.offset.top > widget1.instance.offset.top + widget1.instance.height / 2) {
                          return -1;
                        }
                    Severity: Major
                    Found in src/components/dashboard/dashboard.component.ts and 1 other location - About 1 hr to fix
                    src/components/dashboard/dashboard.component.ts on lines 505..507

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

                    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

                            if (widget1.instance.offset.top > widget2.instance.offset.top + widget2.instance.height / 2) {
                                return +1;
                            }
                    Severity: Major
                    Found in demo/demoDist/main.bundle.js and 1 other location - About 1 hr to fix
                    demo/demoDist/main.bundle.js on lines 408..410

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

                    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

                            if (widget2.instance.offset.top > widget1.instance.offset.top + widget1.instance.height / 2) {
                                return -1;
                            }
                    Severity: Major
                    Found in demo/demoDist/main.bundle.js and 1 other location - About 1 hr to fix
                    demo/demoDist/main.bundle.js on lines 405..407

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

                    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

                        if (widget1.instance.offset.top > widget2.instance.offset.top + widget2.instance.height / 2) {
                          return +1;
                        }
                    Severity: Major
                    Found in src/components/dashboard/dashboard.component.ts and 1 other location - About 1 hr to fix
                    src/components/dashboard/dashboard.component.ts on lines 508..510

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

                    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 _onMouseUp has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      private _onMouseUp(e: any): boolean {
                        if (this._isDragging) {
                          this._isDragging = false;
                          this._isScrolling = false;
                          if (this._currentElement) {
                    Severity: Minor
                    Found in src/components/dashboard/dashboard.component.ts - About 1 hr to fix

                      Function _onMouseUp has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          DashboardComponent.prototype._onMouseUp = function (e) {
                              if (this._isDragging) {
                                  this._isDragging = false;
                                  this._isScrolling = false;
                                  if (this._currentElement) {
                      Severity: Minor
                      Found in demo/demoDist/main.bundle.js - About 1 hr to fix

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

                            DashboardComponent.prototype.disableDrag = function () {
                                this.dragEnable = false;
                                this._renderer.addClass(this._ngEl.nativeElement, 'disabled');
                            };
                        Severity: Major
                        Found in demo/demoDist/main.bundle.js and 1 other location - About 1 hr to fix
                        demo/demoDist/main.bundle.js on lines 82..85

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

                        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

                            DashboardComponent.prototype.enableDrag = function () {
                                this.dragEnable = true;
                                this._renderer.removeClass(this._ngEl.nativeElement, 'disabled');
                            };
                        Severity: Major
                        Found in demo/demoDist/main.bundle.js and 1 other location - About 1 hr to fix
                        demo/demoDist/main.bundle.js on lines 86..89

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

                        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

                            Object.defineProperty(DashboardComponent.prototype, "width", {
                                get: function () {
                                    return this._ngEl.nativeElement.offsetWidth;
                                },
                                enumerable: true,
                        Severity: Minor
                        Found in demo/demoDist/main.bundle.js and 1 other location - About 55 mins to fix
                        demo/demoDist/main.bundle.js on lines 42..48

                        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