Showing 2,015 of 18,390 total issues
Function KebabListItem
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const KebabListItem = (item, props) => {
if (item.type === 'separator') {
return <SideNavDivider key={item.id} />;
}
- Create a ticketCreate a ticket
Function onSubmit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSubmit = (values) => {
miqSparkleOn();
if (appliesToId) {
values.owner_id = appliesToId;
}
- Create a ticketCreate a ticket
Method li_link
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def li_link(args)
args[:if] = (args[:count] != 0) if args[:count]
args[:if] = true unless args.key?(:if)
link_text, title = build_link_text(args)
- Create a ticketCreate a ticket
Method shared_button_basic_info
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def shared_button_basic_info(record, sb_items, custom_button)
style = record&.options&.[](:button_color)&.to_s
display_for = record&.options&.[](:display_for)
display_how_map = {'single' => _('Single entity'), 'list' => _('List'), 'both' => _('Single and list')}
display_for_value = display_how_map[display_for] if display_for.present?
- Create a ticketCreate a ticket
Method center_toolbar_filename_services
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def center_toolbar_filename_services
if x_active_tree == :sandt_tree
if TreeBuilder.get_model_for_prefix(@nodetype) == "ServiceTemplate"
"servicetemplate_center_tb"
elsif @sb[:buttons_node]
- Create a ticketCreate a ticket
Method edit_record
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def edit_record
assert_privileges(params[:pressed])
obj = find_checked_items
db = params[:db] if params[:db]
- Create a ticketCreate a ticket
Method build_automate_tree
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_automate_tree(type)
tree_name = "#{type}_tree".to_sym
# build the ae tree to show the tree select box for entry point
if x_active_tree == tree_name && @edit && @edit[:new][:fqname]
- Create a ticketCreate a ticket
Method group_reorder_set_form_vars
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def group_reorder_set_form_vars
@edit = {}
@edit[:new] = {}
@edit[:current] = {}
@edit[:key] = "group_reorder"
- Create a ticketCreate a ticket
Method show_details
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def show_details(db, options = {})
association = options[:association]
conditions = options[:conditions]
clickable = options[:clickable].nil?
@showtype = "details"
- Create a ticketCreate a ticket
Method create_action_url
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create_action_url(node)
if @sb[:action] == "miq_ae_domain_priority_edit"
'domains_priority_edit'
elsif @sb[:action] == 'miq_ae_field_seq'
'fields_seq_edit'
- Create a ticketCreate a ticket
Method copy_save
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def copy_save
assert_privileges(feature_by_action)
return unless load_edit("copy_objects__#{params[:id]}", "replace_cell__explorer")
begin
- Create a ticketCreate a ticket
Method fields_set_form_vars
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def fields_set_form_vars
@in_a_form_fields = true
session[:field_data] = {}
@edit = {
:ae_class_id => @ae_class.id,
- Create a ticketCreate a ticket
Method replace_right_cell
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def replace_right_cell(_nodetype)
# Get the tags for this node for the Classification pulldown
@sb[:tags] = nil unless params[:miq_date_1] || params[:miq_date_2] # Clear tags unless just changing date
unless @nodetype == "h" || @nodetype == "s" || params[:miq_date_1] || params[:miq_date_2] # Get the tags for the pulldown, unless host, storage, or just changing the date
if @sb[:options][:chart_date]
- Create a ticketCreate a ticket
Method button
has 27 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 ["#{params[:controller]}s"].include?(@display) # displaying container_*
params[:page] = @current_page if @current_page.nil? # Save current page for list refresh
- Create a ticketCreate a ticket
Method update
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def update
assert_privileges("cloud_volume_edit")
@volume = find_record_with_rbac(CloudVolume, params[:id])
case params[:button]
- Create a ticketCreate a ticket
Method replace_list_grid
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def replace_list_grid
view = @view
button_div = 'center_tb'
action_url = if @lastaction == "scan_history"
"scan_history"
- Create a ticketCreate a ticket
Method gfv_model
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def gfv_model
if params[:chosen_model] && # Check for db table changed
params[:chosen_model] != @edit[:new][:model]
@edit[:new][:model] = params[:chosen_model]
@edit[:new][:perf_interval] = nil # Clear performance interval setting
- Create a ticketCreate a ticket
Method get_node_info
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_node_info(treenodeid, _show_list = true)
@explorer ||= true
@nodetype, id = parse_nodetype_and_id(valid_active_node(treenodeid))
# saving this so it can be used while adding buttons/groups in buttons editor
@sb[:applies_to_id] = id
- Create a ticketCreate a ticket
Method db_available_widgets_options
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def db_available_widgets_options
# Build the available widgets for the pulldown
col_widgets = @edit[:new][:col1] +
@edit[:new][:col2]
if @sb[:nodes].length == 2 && @sb[:nodes][1] != "g"
- Create a ticketCreate a ticket
Method get_all_reps
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_all_reps(nodeid = nil)
# set nodeid from @sb, incase sort was pressed
nodeid = x_active_tree == :reports_tree ? x_node.split('-').last : x_node.split('-').last.split('_')[0] if nodeid.nil?
@sb[:miq_report_id] = nodeid
@record = @miq_report = MiqReport.for_user(current_user).find(@sb[:miq_report_id])
- Create a ticketCreate a ticket