dsd-meetme/frontend

View on GitHub

Showing 132 of 132 total issues

Function controller has 445 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var controller = function ($scope, dataPublisher, mixedContentToArray, userResources, plannerResources, configService, objectResetFields) {

        /*
         Gets the meetings relative to a given group.
         These meetings are stored in the meetings properties of the given group.
Severity: Major
Found in app/components/user/dashboard/udashController.js - About 2 days to fix

    Function controller has 415 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var controller = function (userResources, plannerResources, mixedContentToArray, $scope, $location, $routeParams) {
    
            var mode = 'c';
            var c = this;
            var changedEvents = [];
    Severity: Major
    Found in app/components/user/meeting/nmController.js - About 2 days to fix

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

              var backendEventAdapter = function (events, switcher) {
                  var adaptedEvents = [];
                  if (switcher) {
                      for (var i = 0; i < events.length; i++) {
                          adaptedEvents.push({
      Severity: Major
      Found in app/components/user/composeSchedule/cschedController.js and 1 other location - About 1 day to fix
      app/components/user/meeting/nmController.js on lines 37..61

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

      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

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

              var backendEventAdapter = function (events, switcher) {
                  var adaptedEvents = [];
                  if (switcher) {
                      for (var i = 0; i < events.length; i++) {
                          adaptedEvents.push({
      Severity: Major
      Found in app/components/user/meeting/nmController.js and 1 other location - About 1 day to fix
      app/components/user/composeSchedule/cschedController.js on lines 17..41

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

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

          var controller = function ($routeParams, $location, mixedContentToArray, orgResources, arrayToUrlParams) {
      
              var c = this;
              //group id
              var id = $routeParams.id;
      Severity: Major
      Found in app/components/organization/group/groupController.js - About 1 day to fix

        Function controller has 274 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var controller = function (userResources, mixedContentToArray, $routeParams, $scope, $location) {
        
                var calendar;
                var mode = 1;
                var changedEvents = [];
        Severity: Major
        Found in app/components/user/composeSchedule/cschedController.js - About 1 day to fix

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

                      user: {
                          pages: 1,
                          currentPage: 1,
                          utilArray: null,
                          startIndex: 0,
          Severity: Major
          Found in app/components/organization/dashboard/odashController.js and 2 other locations - About 1 day to fix
          app/components/organization/dashboard/odashController.js on lines 78..100
          app/components/organization/group/groupController.js on lines 75..98

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

          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

                      user: {
                          pages: 1,
                          currentPage: 1,
                          utilArray: null,
                          startIndex: 0,
          Severity: Major
          Found in app/components/organization/group/groupController.js and 2 other locations - About 1 day to fix
          app/components/organization/dashboard/odashController.js on lines 54..77
          app/components/organization/dashboard/odashController.js on lines 78..100

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

          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

                      groups: {
                          pages: 1,
                          currentPage: 1,
                          utilArray: null,
                          startIndex: 0,
          Severity: Major
          Found in app/components/organization/dashboard/odashController.js and 2 other locations - About 1 day to fix
          app/components/organization/dashboard/odashController.js on lines 54..77
          app/components/organization/group/groupController.js on lines 75..98

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

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

              var controller = function ($scope, orgResources, arrayToUrlParams, mixedContentToArray) {
          
                  var c = this;
          
                  var getUsers = function () {
          Severity: Major
          Found in app/components/organization/dashboard/odashController.js - About 1 day to fix

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

                        if (!form.$invalid && !c.invalidFields.passwordMatch) {
                            c.confirmPopup.show();
                            dataPublisher.publish(apiDomain + '/companies/auth/register', {
                                name: c.name,
                                email: c.email,
            Severity: Major
            Found in app/components/organization/registration/regController.js and 1 other location - About 7 hrs to fix
            app/components/organization/recovery/orstController.js on lines 32..52

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

            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 (!form.$invalid) {
                            c.confirmPopup.show();
                            dataPublisher.publish(apiDomain + '/companies/password/reset', {
                                email: c.email,
                                password: c.password,
            Severity: Major
            Found in app/components/organization/recovery/orstController.js and 1 other location - About 7 hrs to fix
            app/components/organization/registration/regController.js on lines 37..58

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

            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

            File udashController.js has 451 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            (function () {
            
                var controller = function ($scope, dataPublisher, mixedContentToArray, userResources, plannerResources, configService, objectResetFields) {
            
                    /*
            Severity: Minor
            Found in app/components/user/dashboard/udashController.js - About 6 hrs to fix

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

                      c.editMode = {
                          flag: false,
                          enter: function () {
                              this.flag = true;
                          },
              Severity: Major
              Found in app/components/organization/profile/opController.js and 1 other location - About 6 hrs to fix
              app/components/user/profile/upController.js on lines 30..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 162.

              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

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

                      c.editMode = {
                          flag: false,
                          enter: function () {
                              this.flag = true;
                          },
              Severity: Major
              Found in app/components/user/profile/upController.js and 1 other location - About 6 hrs to fix
              app/components/organization/profile/opController.js on lines 29..43

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

              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

              File nmController.js has 421 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              (function () {
              
                  var controller = function (userResources, plannerResources, mixedContentToArray, $scope, $location, $routeParams) {
              
                      var mode = 'c';
              Severity: Minor
              Found in app/components/user/meeting/nmController.js - About 6 hrs to fix

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

                                        for (var i = 0; i < response.length; i++) {
                                            splittedTimeStart = response[i].time_start.split(' ');
                                            splittedTimeEnd = response[i].time_end.split(' ');
                                            c.events.push({
                                                title: '',
                Severity: Major
                Found in app/components/user/meeting/nmController.js and 1 other location - About 5 hrs to fix
                app/components/user/composeSchedule/cschedController.js on lines 81..92

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

                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

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

                                        for (var i = 0; i < response.length; i++) {
                                            splittedTimeStart = response[i].time_start.split(' ');
                                            splittedTimeEnd = response[i].time_end.split(' ');
                                            c.events.push({
                                                title: '',
                Severity: Major
                Found in app/components/user/composeSchedule/cschedController.js and 1 other location - About 5 hrs to fix
                app/components/user/meeting/nmController.js on lines 112..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 149.

                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 getUsers = function () {
                            var pages;
                            //employees restful index
                            orgResources.orgUser.query({userId: ''}).$promise
                                .then(function (response) {
                Severity: Major
                Found in app/components/organization/dashboard/odashController.js and 1 other location - About 5 hrs to fix
                app/components/organization/dashboard/odashController.js on lines 19..29

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

                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 getGroups = function () {
                            var pages;
                            //employees restful groups index
                            orgResources.orgGroup.query({groupId: ''}).$promise
                                .then(function (response) {
                Severity: Major
                Found in app/components/organization/dashboard/odashController.js and 1 other location - About 5 hrs to fix
                app/components/organization/dashboard/odashController.js on lines 7..17

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

                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