Showing 2,015 of 18,390 total issues
Method st_upload_image
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def st_upload_image
assert_privileges("st_catalog_edit")
err = false
identify_catalog(params[:id])
- Create a ticketCreate a ticket
Method log_depot_validate
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def log_depot_validate
@schedule = nil # setting to nil, since we are using same view for both db_back and log_depot edit
# if zone is selected in tree replace tab#3
pfx = if x_active_tree == :diagnostics_tree
if @sb[:active_tab] == "diagnostics_database"
- Create a ticketCreate a ticket
Method stamp
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def stamp
assert_privileges(rbac_feature_id("miq_request_approval"))
if params[:button] == "cancel"
if (session[:edit] && session[:edit][:stamp_typ]) == "a"
flash_to_session(_("Request approval was cancelled by the user"))
- Create a ticketCreate a ticket
Method validate_user
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def validate_user(user, task_id = nil, request = nil, authenticate_options = {})
if task_id.present?
validate_user_collect_task(user, task_id)
else # First time thru, kick off authenticate task
validation = validate_user_kick_off_task(user, request, authenticate_options)
- Create a ticketCreate a ticket
Method textual_collection_link
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def textual_collection_link(collection, as: nil, controller_collection: nil, explorer: false, feature: nil, label: nil, link: nil)
if collection.kind_of?(Array)
unless as && link
raise ArgumentError, ":as and :link are both required when linking to an array",
caller.reject { |x| x =~ /^#{__FILE__}:/ }
- Create a ticketCreate a ticket
Method group_information_summary
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def group_information_summary(group)
rows = [
row_data(_('ID'), group.id),
row_data(_('Description'), group.description),
row_data(_('Detailed Description'), group.detailed_description),
- Create a ticketCreate a ticket
Method save_default_search
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def save_default_search
@edit = session[:edit]
@view = session[:view]
cols_key = @view.scoped_association.nil? ? @view.db.to_sym : (@view.db + "-" + @view.scoped_association).to_sym
if params[:id]
- Create a ticketCreate a ticket
Method compare_miq
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def compare_miq(_db = nil)
@compressed = session[:miq_compressed]
@exists_mode = session[:miq_exists_mode]
if @compare.nil? # == nil
compare_init("compare") # Init compare screen variables
- Create a ticketCreate a ticket
Method index
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def index
case params[:model]
when 'ExtManagementSystem'
record = ExtManagementSystem.find_by(:id => params[:id])
if record
- Create a ticketCreate a ticket
Method import_automate_datastore
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def import_automate_datastore
assert_privileges('miq_ae_class_import_export')
if params[:selected_namespaces].present?
selected_namespaces = determine_all_included_namespaces(params[:selected_namespaces])
import_file_upload = ImportFileUpload.where(:id => params[:import_file_upload_id]).first
- Create a ticketCreate a ticket
Method button
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def button
@edit = session[:edit] # Restore @edit for adv search box
params[:display] = @display if display_methods.include?(@display) # Were we displaying nested list
# Handle Toolbar Policy Tag Button
- Create a ticketCreate a ticket
Method create_method
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create_method
assert_privileges("miq_ae_method_new")
@in_a_form = true
case params[:button]
when "cancel"
- Create a ticketCreate a ticket
Method build_details_grid
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_details_grid(view, mode = true)
xml = REXML::Document.load("")
xml << REXML::XMLDecl.new(1.0, "UTF-8")
# Create root element
- Create a ticketCreate a ticket
Method set_right_cell_text
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def set_right_cell_text(id, rec = nil)
nodes = id.split('-')
case nodes[0]
when "root"
txt = _("Datastore")
- Create a ticketCreate a ticket
Method schedule_set_record_vars
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def schedule_set_record_vars(schedule)
schedule.resource_type = schedule_resource_type_from_params_action
schedule.sched_action = {:method => schedule_method_from_params_action}
if params[:action_typ] == "automation_request"
- Create a ticketCreate a ticket
Method rbac_field_changed
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rbac_field_changed(rec_type)
id = params[:id].split('__').first || 'new' # Get the record id
id = id unless %w[new seq].include?(id)
return unless load_edit("rbac_#{rec_type}_edit__#{id}", "replace_cell__explorer")
- Create a ticketCreate a ticket
Method refresh_screen
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def refresh_screen
@explorer = true
if params[:pressed] == "delete_server" || params[:pressed] == "zone_delete_server"
@sb[:diag_selected_id] = nil
build_replaced_trees(%i[settings diagnostics], %i[settings diagnostics])
- Create a ticketCreate a ticket
Method live_migrate_vm
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def live_migrate_vm
assert_privileges("instance_live_migrate")
case params[:button]
when "cancel"
add_flash(_("Live migration of Instances was cancelled by the user"))
- Create a ticketCreate a ticket
Method get_view_process_search_text
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_view_process_search_text(view)
# Check for new search by name text entered
if params[:search]
@search_text = params[:search][:text].blank? ? nil : params[:search][:text].strip
elsif params[:search_text] && @explorer
- Create a ticketCreate a ticket
Method fetch_playbook_details
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def fetch_playbook_details
playbook_details = {}
provision = @record.config_info[:provision]
provisioning_details = {}
provisioning_details[:repository] = fetch_name_from_object(ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationScriptSource, provision[:repository_id])
- Create a ticketCreate a ticket