maestro-server/analytics-front

View on GitHub

Showing 34 of 4,910 total issues

File main.js has 574 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require.config({
    paths: {
        bootstrap: './vendor/bootstrap.min',
        diffMatchPatch: './vendor/diff_match_patch.min',
        handlebars: './vendor/handlebars.min',
Severity: Major
Found in docs/graph/main.js - About 1 day to fix

    Function sendSampleRequest has 88 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function sendSampleRequest(group, name, version, type)
      {
          var $root = $('article[data-group="' + group + '"][data-name="' + name + '"][data-version="' + version + '"]');
    
          // Optional header
    Severity: Major
    Found in docs/graph/utils/send_sample_request.js - About 3 hrs to fix

      Function AppTooltip has 88 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function AppTooltip(app, clk=true) {
          var tooltip = $('#app-tooltip');
          var lock = null;
      
          var connectors = $('.svg-pan-zoom_viewport .conector_h');
      Severity: Major
      Found in assets/js/libs/appTooltip.js - About 3 hrs to fix

        Function AnimateLines has 87 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function AnimateLines(app) {
            var color = "#6b2626";
            var actived = false;
        
            var tooltip = $('#conn-tooltip');
        Severity: Major
        Found in assets/js/libs/animateLines.js - About 3 hrs to fix

          Function UploaderRepository has 80 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const UploaderRepository = () => {
          
              factoryValid(
                  _.pick(process.env, ['AWS_S3_BUCKET_NAME', 'AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY']),
                  s3Valid
          Severity: Major
          Found in app/core/repositories/uploaderS3Repository.js - About 3 hrs to fix

            Function AnimateLines has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
            Open

            function AnimateLines(app) {
                var color = "#6b2626";
                var actived = false;
            
                var tooltip = $('#conn-tooltip');
            Severity: Minor
            Found in assets/js/libs/animateLines.js - About 2 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function changeVersionCompareTo has 61 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function changeVersionCompareTo(e) {
                    e.preventDefault();
            
                    var $root = $(this).parents('article');
                    var selectedVersion = $(this).html();
            Severity: Major
            Found in docs/graph/main.js - About 2 hrs to fix

              Function _handlebarsEachCompared has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function _handlebarsEachCompared(fieldname, source, compare, options)
                  {
                      var dataList = [];
                      var index = 0;
                      if(source) {
              Severity: Major
              Found in docs/graph/utils/handlebars_helper.js - About 2 hrs to fix

                Function ApplicationReport has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const ApplicationReport = (Entity, PersistenceServices = DPersistenceServices, FUploadService = DUploaderService) => {
                
                    const UploadService = FUploadService;
                
                    return {
                Severity: Major
                Found in app/graph/applications/viewGraph.js - About 2 hrs to fix

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

                  const UploaderRepository = () => {
                  
                      const appRoot = getPwdPath();
                      const base = process.env.LOCAL_DIR || LOCAL_DIR_DEFAULT;
                  
                  
                  Severity: Major
                  Found in app/core/repositories/uploaderLocalRepository.js - About 2 hrs to fix

                    Function find has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Query.prototype.find = function (query, options) {
                        let Model = this.model;
                    
                        query = _.assign({}, this.query, query);
                    
                    
                    Severity: Minor
                    Found in app/core/repositories/daos/connector/query.js - About 2 hrs to fix

                      Function UploaderService has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const UploaderService = (Entity, owner, ext = 'html', dfolder='graphs-bussiness') => {
                          const typeU = process.env.MAESTRO_UPLOAD_TYPE || TYPE_DEFAULT;
                          const FUploaderRepository = require(`core/repositories/uploader${typeU}Repository`);
                      
                          const UploaderRepository = FUploaderRepository(Entity.name);
                      Severity: Minor
                      Found in app/core/services/UploaderService.js - About 1 hr to fix

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

                            function add_nav(nav, content, index) {
                                var found_level1 = false;
                                if ( ! content) {
                                  return found_level1;
                                }
                        Severity: Minor
                        Found in docs/graph/main.js - About 1 hr to fix

                          Function pathToRegexp has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function pathToRegexp (path, keys, options) {
                            keys = keys || [];
                          
                            if (!isArray(keys)) {
                              options = keys;
                          Severity: Minor
                          Found in docs/graph/vendor/path-to-regexp/index.js - About 1 hr to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function HTTPService has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          const HTTPService = (url) => (header = {}) => {
                          
                              const factoryRequest = (caller, path, args) => {
                                  return new Promise((resolve, reject) => {
                                      return Connector(url, header)[caller](path, args)
                          Severity: Minor
                          Found in app/core/services/HTTPService.js - About 1 hr to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                          const validateFile = (file, opts) => {
                          
                              const defaultParams = {
                                  maxsize: 1630240, //~1 mb,
                                  minsize: 1024, // 1 kbs
                          Severity: Minor
                          Found in app/core/services/validator/uploadValid.js - About 1 hr to fix

                            Function MenuBar has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function MenuBar() {
                            
                                function hist(result) {
                                    var arr = []
                                    var hist = _.get(result, 'info.histograms');
                            Severity: Minor
                            Found in assets/js/libs/menuBar.js - About 1 hr to fix

                              Function HTTPService has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const HTTPService = (url) => (header = {}) => {
                              
                                  const factoryRequest = (caller, path, args) => {
                                      return new Promise((resolve, reject) => {
                                          return Connector(url, header)[caller](path, args)
                              Severity: Minor
                              Found in app/core/services/HTTPService.js - About 1 hr to fix

                                Function forEach has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  Array.prototype.forEach = function (callback, thisArg) {
                                    var T, k;
                                
                                    if (this == null) {
                                      throw new TypeError(' this is null or not defined');
                                Severity: Minor
                                Found in docs/graph/vendor/polyfill.js - About 1 hr to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function replacePath has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function replacePath (path, keys) {
                                  var index = 0;
                                
                                  function replace (_, escaped, prefix, key, capture, group, suffix, escape) {
                                    if (escaped) {
                                Severity: Minor
                                Found in docs/graph/vendor/path-to-regexp/index.js - About 1 hr to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Severity
                                Category
                                Status
                                Source
                                Language