Showing 893 of 1,587 total issues
Class NetfilterCache
has 58 methods (exceeds 20 allowed). Consider refactoring. Open
class NetfilterCache
include Dcmgr::Logger
include CacheErrors
EMPTY_CACHE_SET = {
- Create a ticketCreate a ticket
Function securityGroupPanel
has 208 lines of code (exceeds 25 allowed). Consider refactoring. Open
DcmgrGUI.prototype.securityGroupPanel = function(){
var total = 0;
var maxrow = 10;
var page = 1;
var list_request = {
- Create a ticketCreate a ticket
Methods
has 55 functions (exceeds 20 allowed). Consider refactoring. Open
Element.Methods = {
visible: function(element) {
return $(element).style.display != 'none';
},
- Create a ticketCreate a ticket
Function imagePanel
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
DcmgrGUI.prototype.imagePanel = function(){
var total = 0;
var maxrow = 10;
var page = 1;
var list_request = {
- Read upRead up
- Create a ticketCreate a ticket
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 sshKeyPairPanel
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
DcmgrGUI.prototype.sshKeyPairPanel = function(){
var total = 0;
var maxrow = 10;
var page = 1;
var list_request = {
- Create a ticketCreate a ticket
Function loadBalancerPanel
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
DcmgrGUI.prototype.loadBalancerPanel = function(){
var total = 0;
var maxrow = 10;
var page = 1;
var list_request = {
- Read upRead up
- Create a ticketCreate a ticket
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
Method bulk_update
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
def bulk_update
input_uuids = []
new_items = []
params['monitors'].each {|idx, m|
if m['uuid']
- Read upRead up
- Create a ticketCreate a ticket
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
Method to_hash
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
def to_hash
h = super
h.merge!({:image=>image.to_hash,
:host_node=> (host_node.nil? ? nil : host_node.to_hash),
- Read upRead up
- Create a ticketCreate a ticket
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 callback
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
callback: function(){
var self = this;
var loading_image = DcmgrGUI.Util.getLoadingImage('boxes');
$(this).find('#select_ssh_key_pair').empty().html(loading_image);
- Create a ticketCreate a ticket
File kvm.rb
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'net/telnet'
require 'timeout'
require 'base64'
module Dcmgr
- Create a ticketCreate a ticket
File ui.selectmenu.js
has 469 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery UI selectmenu
*
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
- Create a ticketCreate a ticket
File 0002_v1203.rb
has 463 lines of code (exceeds 250 allowed). Consider refactoring. Open
Sequel.migration do
up do
alter_table(:host_nodes) do
# HostNode is no longer an account associated resource.
drop_column :account_id
- Create a ticketCreate a ticket
Method add_vnic
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
def add_vnic(vnic_id)
result = @rpc.request('hva-collector', 'get_netfilter_vnic_with_node_id', vnic_id)
raise VNicNotFoundError, "VNic #{vnic_id} doesn't exist" if result.nil?
if result[:vnic][:security_groups].empty?
- Read upRead up
- Create a ticketCreate a ticket
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
File metadata.rb
has 461 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'extlib'
require 'sinatra/base'
require 'sinatra/sequel_transaction'
require 'yaml'
require 'json'
- Create a ticketCreate a ticket
File task_manager.rb
has 460 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Dcmgr
module EdgeNetworking
module Netfilter
# Abstract class for task managers that apply netfilter to extend.
- Create a ticketCreate a ticket
File cache.rb
has 458 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Dcmgr
module EdgeNetworking
module Netfilter
module CacheErrors
- Create a ticketCreate a ticket
File base_new.rb
has 456 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'sequel/model'
module Dcmgr::Models
# Sequal::Model plugin to inject the Taggable feature to the model
- Create a ticketCreate a ticket
Method register_instance
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
def register_instance(instance)
title2pmonitors = {}
instance.monitor_items.each_pair { |k, v|
if v[:title] =~ /^PROCESS$/
title2pmonitors[v[:title]]=v.merge({:uuid=>k})
- Read upRead up
- Create a ticketCreate a ticket
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
File hva_handler.rb
has 448 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'isono'
require 'fileutils'
require 'ipaddress'
require 'yaml'
- Create a ticketCreate a ticket
Function MONITOR_ITEMS
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
DcmgrGUI.VifMonitorSelector.MONITOR_ITEMS = (function(){
return {
'PING': {
title: 'Ping',
ui: function (elem, params){
- Create a ticketCreate a ticket