Showing 2,015 of 18,390 total issues
Method chart_current_hourly
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def chart_current_hourly(ts)
@record = identify_tl_or_perf_record
@perf_record = @record.kind_of?(MiqServer) ? @record.vm : @record # Use related server vm record
@perf_options[:typ] = "Hourly"
@perf_options[:hourly_date] = [ts.month, ts.day, ts.year].join("/")
- Create a ticketCreate a ticket
Method rbac_and_user_make_subarrays
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rbac_and_user_make_subarrays
if @set_filter_values.present?
temp1arr = []
@set_filter_values = @set_filter_values.flatten
temp_categories = @set_filter_values.dup
- Create a ticketCreate a ticket
Method adv_search_button_delete
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def adv_search_button_delete
s = MiqSearch.find(@edit[@expkey][:selected][:id])
id = s.id
sname = s.description
begin
- Create a ticketCreate a ticket
Method get_event_actions
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_event_actions
@event ||= MiqEventDefinition.find_by(:id => @edit[:new][:event_id])
@edit[:new][:actions_true] = []
@policy ||= MiqPolicy.find_by(:id => @edit[:new][:policy_id]) # Get the policy above this event
- Create a ticketCreate a ticket
Method label_tag_mapping_update
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def label_tag_mapping_update(id, cat_description)
assert_privileges("region_edit")
mapping = ProviderTagMapping.find(id)
begin
if mapping.labeled_resource_type == ALL_ENTITIES
- Create a ticketCreate a ticket
Method label_tag_mapping_delete
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def label_tag_mapping_delete
assert_privileges("region_edit")
mapping = ProviderTagMapping.find(params[:id])
category = mapping.tag.classification
label_name = mapping.label_name
- Create a ticketCreate a ticket
Method replace_right_cell
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def replace_right_cell(options = {})
# FIXME: nodetype passed here, but not used
_nodetype, replace_trees = options.values_at(:nodetype, :replace_trees)
replace_trees = @replace_trees if @replace_trees # get_node_info might set this
# FIXME
- Create a ticketCreate a ticket
Method delete_networks
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def delete_networks
assert_privileges("cloud_network_delete")
networks = find_records_with_rbac(CloudNetwork, checked_or_params)
networks_to_delete = []
networks.each do |network|
- Create a ticketCreate a ticket
Method iso_datastore_button_operation
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def iso_datastore_button_operation(method, display_name)
isds = []
# Either a list or coming from a different controller (eg from host screen, go to its vms)
if !params[:id]
- Create a ticketCreate a ticket
Method timeprofile_delete
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def timeprofile_delete
assert_privileges("my_settings_time_profiles")
timeprofiles = []
unless params[:id] # showing a list, scan all selected timeprofiles
timeprofiles = find_checked_items
- Create a ticketCreate a ticket
Method show
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def show
return if perfmenu_click?
return unless init_show
@center_toolbar = self.class.toolbar_singular if self.class.toolbar_singular
- Create a ticketCreate a ticket
Method create
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create
assert_privileges("cloud_network_new")
case params[:button]
when "cancel"
javascript_redirect(:action => 'show_list',
- Create a ticketCreate a ticket
Method show_association
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def show_association(action, display_name, method, klass, association = nil, scopes = nil)
params[:display] = klass.name
# Ajax request means in explorer, or if current explorer is one of the explorer controllers
@explorer = true if request.xml_http_request? && explorer_controller?
if @explorer # Save vars for tree history array
- Create a ticketCreate a ticket
Method edit
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def edit
assert_privileges("#{permission_prefix}_edit")
begin
@ems = find_record_with_rbac(model, params[:id]) ## TODO is params[:id] supposed to be checked_item_id? This assumes only one id is passed in
rescue => err
- Create a ticketCreate a ticket
Method get_cis_all
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_cis_all
@edit[:cb_assign][:cis] = {}
klass = @edit[:new][:cbshow_typ]
return if klass == NOTHING_FORM_VALUE || klass.nil? # no rate was selected
unless WHITELIST_INSTANCE_TYPE.include?(klass)
- Create a ticketCreate a ticket
Method features
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def features
[
{
:role => "pxe_server_accord",
:role_any => true,
- Create a ticketCreate a ticket
Method features
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def features
[
{
:role => "svc_catalog_accord",
:role_any => true,
- Create a ticketCreate a ticket
Method svc_catalog_provision
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def svc_catalog_provision
assert_privileges("svc_catalog_provision")
checked = find_checked_items
checked[0] = params[:id] if checked.blank? && params[:id]
st = find_record_with_rbac(ServiceTemplate, checked[0])
- Create a ticketCreate a ticket
Method menu_folders
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def menu_folders(view)
view.compact.map do |row|
row_id = nil
if @edit[:user_typ]
- Create a ticketCreate a ticket
Method prov_copy
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def prov_copy
assert_privileges("miq_request_copy")
org_req = MiqRequest.where(:id => params[:req_id].to_i).first
req = MiqRequest.new(
:approval_state => 'pending_approval',
- Create a ticketCreate a ticket