Showing 2,015 of 18,390 total issues
Method status
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
def status
routes_count = if @ems.present?
@ems.respond_to?(:container_routes) ? @ems.container_routes.count : 0 # ems might not have routes
else
ContainerRoute.count
- Create a ticketCreate a ticket
File textual_summary.rb
has 408 lines of code (exceeds 400 allowed). Consider refactoring. Open
module HostHelper::TextualSummary
include TextualMixins::TextualCustomButtonEvents
include TextualMixins::TextualDevices
include TextualMixins::TextualOsInfo
include TextualMixins::TextualVmmInfo
- Create a ticketCreate a ticket
Class WorkflowRepositoryController
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class WorkflowRepositoryController < ApplicationController
before_action :check_prototype
before_action :check_privileges
before_action :get_session_data
- Create a ticketCreate a ticket
Class ContainerDashboardController
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class ContainerDashboardController < ApplicationController
extend ActiveSupport::Concern
include Mixins::GenericSessionMixin
include Mixins::BreadcrumbsMixin
- Create a ticketCreate a ticket
Function loadTable
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
const loadTable = (values, tz, users) => {
const filters = [];
const {
zone, timePeriod, taskStatus, taskState, user,
} = values; // User selected values
- Create a ticketCreate a ticket
Method rbac_group_right_tree
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def rbac_group_right_tree(selected_nodes)
case @sb[:active_rbac_group_tab]
when 'rbac_customer_tags'
cats = Classification.categories.select do |c|
c.show || !%w[folder_path_blue folder_path_yellow].include?(c.name) && !(c.read_only? || c.entries.empty?)
- Create a ticketCreate a ticket
File miq_ae_customization_controller.rb
has 405 lines of code (exceeds 400 allowed). Consider refactoring. Open
class MiqAeCustomizationController < ApplicationController
require "English"
include CustomButtons
include OldDialogs
include Dialogs
- Create a ticketCreate a ticket
Method fields_get_form_vars
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
def fields_get_form_vars
@ae_class = MiqAeClass.find_by(:id => @edit[:ae_class_id])
@in_a_form = true
@in_a_form_fields = true
if params[:item].blank? && !%w[accept save].include?(params[:button]) && params["action"] != "field_delete"
- Create a ticketCreate a ticket
Method build_edit_screen
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_edit_screen
build_tabs
get_time_profiles # Get time profiles list (global and user specific)
cb_entities_by_provider if Chargeback.db_is_chargeback?(@edit[:new][:model]) && [ChargebackContainerImage, ChargebackContainerProject, MeteringContainerImage, MeteringContainerProject].include?(@edit[:new][:model].safe_constantize)
- Create a ticketCreate a ticket
Method gfv_chargeback
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
def gfv_chargeback
# Chargeback options
if params.key?(:cb_show_typ)
@edit[:new][:cb_show_typ] = params[:cb_show_typ].presence
@refresh_div = "filter_div"
- Create a ticketCreate a ticket
File schedules.rb
has 405 lines of code (exceeds 400 allowed). Consider refactoring. Open
module ReportController::Schedules
extend ActiveSupport::Concern
def show_schedule
if @schedule.nil?
- Create a ticketCreate a ticket
Function Datastore
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const Datastore = ({
type, initialData, hasOptions, datastoreTypes,
}) => {
const {
miqHeaders, miqRows, hasCheckbox, nodeTree,
- 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 OrcherstrationTemplateForm
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const OrcherstrationTemplateForm = ({ isStack, otId, copy }) => {
const [initialValues, setinItialValues] = useState({});
const [submitAction, setSubmitAction] = useState();
const [isLoading, setLoading] = useState(true);
- 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 WorkflowRepositoryForm
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const WorkflowRepositoryForm = ({ repositoryId }) => {
const [{
initialValues, isLoading, provider,
}, setState] = useState({
isLoading: true,
- 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 HostInitiatorForm
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const HostInitiatorForm = ({ redirect, storageManagerId }) => {
const [state, setState] = useState({});
const [storageId, setStorageId] = useState(undefined);
const { isLoading, initialValues } = state;
- 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 report_information
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def report_information(sb_data, report)
if sb_data[:miq_report_id] && report
data = {:title => _('Basic Information'), :mode => 'miq_report_basic_information'}
rows = []
rows.push(row_data(_('ID'), report.id))
- 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 AnsibleRepositoryForm
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const AnsibleRepositoryForm = ({ repositoryId }) => {
const [{
initialValues, isLoading, provider,
}, setState] = useState({
isLoading: true,
- 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 EmbeddedTerraformRepositoryForm
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const EmbeddedTerraformRepositoryForm = ({ repositoryId }) => {
const [{
initialValues, isLoading, provider,
}, setState] = useState({
isLoading: true,
- 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 schema_data
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def schema_data(schema_data)
schema_items = ["name", "description", "default_value", "collect", "message", "on_entry", "on_exit", "on_error", "max_retries", "max_time"]
schema_data.each_with_index do |ae_field, index|
cells = []
icon = ae_field.substitute ? "pficon pficon-ok" : "pficon pficon-close"
- 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 group_information_summary
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def group_information_summary(group)
rows = [
row_data(_('ID'), group.id),
row_data(_('Description'), group.description),
row_data(_('Detailed Description'), group.detailed_description),
- 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"