Showing 18,390 of 18,390 total issues
Function miqBuildChartMenuEx
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.miqBuildChartMenuEx = function(col, row, _value, category, series, chart_set, chart_index) {
const chart_data = ManageIQ.charts.chartData[chart_set];
const chart_el = $(`#miq_chart_parent_${chart_set}_${chart_index}`);
const chartmenu_el = $(`#miq_chartmenu_${chart_set}_${chart_index}`);
chartmenu_el.empty();
- Create a ticketCreate a ticket
Function simpleData
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const simpleData = () => {
const miqHeaders = [
{
key: 'name',
header: 'Name',
- Create a ticketCreate a ticket
Function settingsLabelTagMappingData
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const settingsLabelTagMappingData = () => {
const headers = [
{ header: __('Resource Entity'), key: 'resource_entity' },
{ header: __('Resource Label'), key: 'resource_label' },
{ header: __('Tag Category'), key: 'tag_category' },
- Create a ticketCreate a ticket
Function timeProfileReportsData
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const timeProfileReportsData = () => {
const miqHeaders = [
{
key: 'name',
header: 'Name',
- Create a ticketCreate a ticket
Function TableListView
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function TableListView(props) {
const { headers, values, title } = props;
/** Function to generate heders/rows for the default structured list. */
const miqListDefaultTable = () => {
- Create a ticketCreate a ticket
Method request_details_summary
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def request_details_summary(miq_request, user)
rows = [
row_data(_('Request ID'), miq_request.id),
row_data(_('Status'), _(miq_request.status)),
row_data(_('Request State'), _(miq_request.state.titleize))
- Create a ticketCreate a ticket
Method build_select_button
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_select_button(bgi, index)
bs_children = false
props = toolbar_button(bgi, :id => bgi[:id], :type => :buttonSelect)
return nil if props.nil?
- Create a ticketCreate a ticket
Method reconfigure_form_data
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def reconfigure_form_data(vm = @reconfigitems.first)
{
:recordId => @reconfigitems.collect(&:id),
:requestId => @request_id || 'new',
:roles => {
- Create a ticketCreate a ticket
Method perf_gen_tag_data_after_wait
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def perf_gen_tag_data_after_wait
miq_task = MiqTask.find(params[:task_id]) # Not first time, read the task record
rpt = miq_task.miq_report_result.report_results # Grab the report object from the blob
miq_task.destroy # Get rid of the task and results
- Create a ticketCreate a ticket
Method show_taskbar_in_header?
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def show_taskbar_in_header?
return false if @explorer
return false if controller.action_name.end_with?("tagging_edit")
hide_actions = %w[
- Create a ticketCreate a ticket
Method rate_summary
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rate_summary(data, optional)
rows = []
data.to_a.sort_by { |rd| [rd.chargeable_field[:group].downcase, rd.chargeable_field[:description].downcase, rd[:sub_metric].to_s.downcase] }.each_with_index do |detail, detail_index|
cells = []
tiers = detail.chargeback_tiers.order(:start)
- Create a ticketCreate a ticket
Method at_tree_select
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def at_tree_select(edit_key)
id = parse_nodetype_and_id(params[:id]).last
if params[:id].start_with?("aei-")
record = MiqAeInstance.find_by(:id => id)
@edit[:automate_tree_selected_path] = record.fqname
- Create a ticketCreate a ticket
Method build_tags_for_provisioning
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_tags_for_provisioning(wf, vm_tags, _edit_mode)
# for some reason @tags is set in wf, and it is changed by map bellow which causes bugs
wf.instance_variable_set(:@tags, nil)
tags = wf.allowed_tags.map do |cat|
{
- Create a ticketCreate a ticket
Method resolve_button_throw
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def resolve_button_throw
if valid_resolve_object?
add_flash(_("Automation Simulation has been run"))
@sb[:name] = @resolve[:new][:instance_name].presence || @resolve[:new][:other_name]
@sb[:attrs] = {}
- Create a ticketCreate a ticket
Method build_download_rpt
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_download_rpt(cols, csv, typ)
if typ.nil? || typ == "all"
if csv # If generating CSV, remove * from data
cols.each_with_index do |c, i|
if c.to_s.starts_with?("* ")
- Create a ticketCreate a ticket
Method adv_search_build
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def adv_search_build(model)
# Restore @edit hash if it's saved in @settings
@expkey = :expression # Reset to use default expression key
if session.fetch_path(:adv_search, model.to_s) && %w[tag service_tag].exclude?(@sb[:action])
adv_search_model = session[:adv_search][model.to_s]
- Create a ticketCreate a ticket
Method retrieve_git_datastore
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def retrieve_git_datastore
assert_privileges('miq_ae_class_import_export')
git_url = params[:git_url]
if git_url.blank?
- Create a ticketCreate a ticket
Method policy_field_changed
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def policy_field_changed
return unless load_edit("miq_policy_edit__#{params[:id]}")
case @edit[:typ]
when "events"
- Create a ticketCreate a ticket
Method ap_set_record_vars
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ap_set_record_vars(mems, scanitemset)
unless mems.empty?
mems_to_delete = []
mems.each { |m| mems_to_delete.push(m) }
ap_deletescanitems(mems_to_delete)
- Create a ticketCreate a ticket
Method delete_subnets
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def delete_subnets
assert_privileges("cloud_subnet_delete")
subnets = find_records_with_rbac(CloudSubnet, checked_or_params)
subnets_to_delete = []
- Create a ticketCreate a ticket