RackHD/on-http

View on GitHub

Showing 204 of 440 total issues

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

    UPnPService.prototype.start = function() {
        var self = this;
        var endpoint = _.first(self.northbound) || {
            httpsEnabled: false, 
            address: ip.address(), 
Severity: Major
Found in lib/services/upnp-service.js - About 2 hrs to fix

    File taskgraph-api-service.js has 253 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // Copyright 2016, EMC, Inc.
    
    'use strict';
    
    var di = require('di');
    Severity: Minor
    Found in lib/services/taskgraph-api-service.js - About 2 hrs to fix

      Function makeRenderableOptions has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function makeRenderableOptions(req, res, context, ignoreLookup) {
              var scope = res.locals.scope;
              var apiServer = util.format('http://%s:%d',
                  config.get('apiServerAddress'),
                  config.get('apiServerPort')
      Severity: Major
      Found in lib/services/swagger-api-service.js - About 2 hrs to fix

        Function _addLinksHeader has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function _addLinksHeader(req, res, count) {
                var skip = req.swagger.query.$skip;
                var top = req.swagger.query.$top;
                var uriBase = req.url.split('?')[0];
        
        
        Severity: Major
        Found in lib/services/swagger-api-service.js - About 2 hrs to fix

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

          var listSystemProcessors = controller(function(req, res)  {
              var identifier = req.swagger.params.identifier.value;
          
              return redfish.getVendorNameById(identifier)
              .then(function(result){
          Severity: Minor
          Found in lib/api/redfish-1.0/systems.js - About 2 hrs to fix

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

            function taskApiServiceFactory(
                taskProtocol,
                waterline,
                Errors,
                util,
            Severity: Minor
            Found in lib/services/task-api-service.js - About 2 hrs to fix

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

              var getSelLogServiceEntry = controller(function(req, res)  {
                  var identifier = req.swagger.params.identifier.value;
                  var entryId = req.swagger.params.entryId.value;
              
              
              
              Severity: Minor
              Found in lib/api/redfish-1.0/systems.js - About 2 hrs to fix

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

                function Runner(
                    constants,
                    HttpService,
                    core,
                    configuration,
                Severity: Minor
                Found in app.js - About 2 hrs to fix

                  Function skuPackServiceFactory has 16 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      _,
                      waterline,
                      Logger,
                      FileLoader,
                      Templates,
                  Severity: Major
                  Found in lib/services/sku-pack-service.js - About 2 hrs to fix

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

                    function ObmFactory (
                        Promise,
                        Serializable,
                        _,
                        encryption
                    Severity: Minor
                    Found in lib/serializables/v1/obm.js - About 2 hrs to fix

                      Function getManagerEthernetInterface has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var getManagerEthernetInterface = controller(function(req, res) {
                          var identifier = req.swagger.params.identifier.value;
                          var index = req.swagger.params.index.value;
                          var options = redfish.makeOptions(req, res, identifier);
                      
                      
                      Severity: Minor
                      Found in lib/api/redfish-1.0/managers.js - About 1 hr to fix

                        Function getManagerSerialInterface has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var getManagerSerialInterface = controller(function (req, res) {
                            var identifier = req.swagger.params.identifier.value;
                            var options = redfish.makeOptions(req, res);
                            var index = req.swagger.params.index.raw;
                        
                        
                        Severity: Minor
                        Found in lib/api/redfish-1.0/managers.js - About 1 hr to fix

                          Function create has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          module.exports = function create(__, ___, injector) {
                              injector = injector || require('../../index.js').injector;
                              var _ = injector.get('_');
                              var swaggerService = injector.get('Http.Services.Swagger');
                              var conf = injector.get('Services.Configuration');
                          Severity: Minor
                          Found in lib/fittings/error_handler.js - About 1 hr to fix

                            Function swaggerFactory has 15 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                Promise,
                                Errors,
                                _,
                                injector,
                                views,
                            Severity: Major
                            Found in lib/services/swagger-api-service.js - About 1 hr to fix

                              Function UPnPServiceFactory has 15 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  _,
                                  waterline,
                                  Logger,
                                  Profiles,
                                  Promise,
                              Severity: Major
                              Found in lib/services/upnp-service.js - About 1 hr to fix

                                Function walkDirectory has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    StaticFilesApiService.prototype.walkDirectory = function(dir) {
                                        return new Promise(function(resolve, reject) {
                                            var walkResults = [];
                                            if (typeof dir !== 'string') {
                                                console.error("[ERROR] Object of type " + typeof dir + 
                                Severity: Minor
                                Found in lib/services/static-files-api-service.js - About 1 hr to fix

                                  Function tagApiServiceFactory has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function tagApiServiceFactory(
                                      waterline,
                                      Promise,
                                      workflowApiService,
                                      Errors,
                                  Severity: Minor
                                  Found in lib/services/tags-api-service.js - About 1 hr to fix

                                    Function doBootImage has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    var doBootImage = controller(function(req,res) {
                                        var identifier = req.swagger.params.identifier.value;
                                        var payload = req.swagger.params.payload.value;
                                    
                                        return nodeApi.getNodeByIdentifier(identifier)
                                    Severity: Minor
                                    Found in lib/api/redfish-1.0/systems.js - About 1 hr to fix

                                      Function listManagerSerialInterfaces has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      var listManagerSerialInterfaces = controller(function (req, res) {
                                          var identifier = req.swagger.params.identifier.value;
                                          var options = redfish.makeOptions(req, res, identifier);
                                      
                                          return redfish.getVendorNameById(identifier)
                                      Severity: Minor
                                      Found in lib/api/redfish-1.0/managers.js - About 1 hr to fix

                                        Function httpServiceFactory has 14 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            eventsProtocol,
                                            configuration,
                                            lookupService,
                                            swagger,
                                            Logger,
                                        Severity: Major
                                        Found in lib/services/http-service.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language