Showing 18,390 of 18,390 total issues
Function link
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(scope, elem, attr, ctrl) {
elem.datetimepicker({showClear: true, showClose: true});
// datetime picker uses its own event for change
elem.on('dp.change', function(event) {
- Create a ticketCreate a ticket
Function miqCheckForChanges
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.miqCheckForChanges = function() {
let type = 'old'; // 'old' | 'angular' | 'tagging' | 'react'
let dirty = false;
const ignore = miqDomElementExists('ignore_form_changes');
- Create a ticketCreate a ticket
Method center_toolbar_filename_report
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def center_toolbar_filename_report
if x_active_tree == :db_tree
node = x_node
if %w[root xx-g].include?(node)
return nil
- Create a ticketCreate a ticket
Method miq_catalog_resource
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def miq_catalog_resource(resources)
headers = ["", _("Name"), _("Description"), _("Action Order"), _("Provision Order"), _("Action Start"), _("Action Stop"), _("Delay (mins) Start"), _("Delay (mins) Stop")]
data = {:rows => [], :headers => headers}
prev_group = 0
resources.sort_by { |rsc| [rsc.group_idx, rsc.resource_name.downcase] }.each_with_index do |r, i|
- Create a ticketCreate a ticket
Method remove_host
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def remove_host
assert_privileges("host_aggregate_remove_host")
@host_aggregate = find_record_with_rbac(HostAggregate, params[:id])
case params[:button]
- Create a ticketCreate a ticket
Method add_host
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add_host
assert_privileges("host_aggregate_add_host")
@host_aggregate = find_record_with_rbac(HostAggregate, params[:id])
case params[:button]
- Create a ticketCreate a ticket
Method comp_add_header_compressed
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def comp_add_header_compressed(view, h, i)
txt = h[:name].truncate(16)
html_text = ""
if %w[Vm VmOrTemplate].include?(@sb[:compare_db])
img = ActionController::Base.helpers.image_path(h.decorate.fileicon)
- Create a ticketCreate a ticket
Method adv_search_button
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def adv_search_button
@edit = session[:edit]
@view = session[:view]
# setting default to false
- Create a ticketCreate a ticket
Method handle_bottom_cell
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def handle_bottom_cell(presenter)
if allowed(@sb[:action]) && (@pages || @in_a_form)
if @pages
presenter.hide(:form_buttons_div)
elsif @in_a_form && @sb[:action]
- Create a ticketCreate a ticket
Method tree_select
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def tree_select
assert_accordion_and_tree_privileges(x_active_tree)
params[:miq_grid_checks] = []
@explorer = true
@lastaction = "explorer"
- Create a ticketCreate a ticket
Method button
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def button
case params[:pressed]
when 'embedded_configuration_script_source_refresh' # refresh repositories
repository_refresh
when "embedded_configuration_script_source_edit" # edit repository
- Create a ticketCreate a ticket
Method folder_get_info
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def folder_get_info(folder_node)
nodetype, nodeid = folder_node.split("_")
@sb[:mode] = nil
@sb[:nodeid] = nil
@sb[:folder] = nodeid.nil? ? nodetype.split("-").last : nodeid
- Create a ticketCreate a ticket
Method retirevms
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def retirevms
assert_privileges(params[:pressed])
# check to see if coming from show_list or drilled into vms from another CI
if request.parameters[:controller] == "vm" || %w[all_vms instances vms].include?(params[:display])
rec_cls = "vm"
- Create a ticketCreate a ticket
Method stacks_ot_copy_submit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def stacks_ot_copy_submit
assert_privileges('orchestration_template_copy')
original_template = find_record_with_rbac(OrchestrationTemplate, params[:templateId])
if params[:templateContent] == original_template.content
add_flash(_("Unable to create a new template copy \"%{name}\": old and new template content have to differ.") %
- Create a ticketCreate a ticket
Method vm_reconfigure
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def vm_reconfigure
assert_privileges('vm_reconfigure_all', :any => true)
# if coming in to edit from miq_request list view
recs = checked_or_params
- Create a ticketCreate a ticket
Method alert_profile_build_assign_screen
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def alert_profile_build_assign_screen
@assign = {}
@assign[:new] = {}
@assign[:current] = {}
@sb[:action] = "miq_alert_set_assign"
- Create a ticketCreate a ticket
Method process_saved_reports
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_saved_reports(saved_reports, task)
success_count = 0
failure_count = 0
params[:miq_grid_checks] = params[:miq_grid_checks]&.split(",")
MiqReportResult.for_user(current_user).where(:id => saved_reports).order(MiqReportResult.arel_table[:name].lower).each do |rep|
- Create a ticketCreate a ticket
Method open_parent_nodes
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def open_parent_nodes(record)
existing_node = nil # Init var
if record.kind_of?(OrchestrationTemplate)
parents = [:id => template_to_node_name(record)]
- Create a ticketCreate a ticket
Method show_preview
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def show_preview
assert_privileges(session.fetch_path(:edit, :rpt_id) ? "miq_report_edit" : "miq_report_new")
unless params[:task_id] # First time thru, kick off the report generate task
@rpt = create_report_object # Build a report object from the latest edit fields
- Create a ticketCreate a ticket
Method remove_interface
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def remove_interface
assert_privileges("network_router_remove_interface")
@router = find_record_with_rbac(NetworkRouter, params[:id])
case params[:button]
- Create a ticketCreate a ticket