Showing 2,015 of 18,390 total issues
Method st_set_record_vars
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def st_set_record_vars(st)
common_st_record_vars(st)
st.remove_all_resources
@add_rsc = true
unless @edit[:new][:selected_resources].empty?
- Create a ticketCreate a ticket
Method upload
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def upload
assert_privileges("miq_report_export")
@sb[:flash_msg] = []
if params.fetch_path(:upload, :file) && File.size(params[:upload][:file].tempfile).zero?
- Create a ticketCreate a ticket
Method render_exception
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def render_exception(msg, error)
respond_to do |format|
format.js do
render :update do |page|
page << javascript_prologue
- Create a ticketCreate a ticket
Function miqOnLoad
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.miqOnLoad = function() {
// controller to be used in url in miqDropComplete method
ManageIQ.widget.dashboardUrl = 'dashboard/widget_dd_done';
// Initialize the dashboard column sortables
- Create a ticketCreate a ticket
Function miqInitCodemirror
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.miqInitCodemirror = function(options) {
if (!miqDomElementExists(options.text_area_id)) {
return;
}
- Create a ticketCreate a ticket
Function saveDialogDetails
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function saveDialogDetails() {
var action;
var dialogData;
var dialogId;
- Create a ticketCreate a ticket
Function createSchema
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createSchema(ems, recordId, loadSchema, emptySchema, providerFields = []) {
const providers = ems.filter((tenant) => tenant.type !== 'ManageIQ::Providers::Nuage::NetworkManager');
const providerOptions = providers.map(({ id, name }) => ({ label: name, value: id }));
providerOptions.unshift({ label: `<${__('Choose')}>`, value: '-1' });
- Create a ticketCreate a ticket
Function Quaditem
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Quaditem = (props) => {
const {
text, fonticon, color, fileicon, piechart, className, tooltip, background,
} = props;
const shortText = abbrNumber(text);
- Create a ticketCreate a ticket
Function GenericTableRow
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function GenericTableRow(props) {
const { item, onClick } = props;
const value = renderValue(item.value, onClick);
return (
- Create a ticketCreate a ticket
Method report_schedule
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def report_schedule(schedules)
data = {:title => _('Schedules'), :mode => "miq_report_schedules bordered-list simple_table", :rows => []}
if schedules.blank?
data[:message] = _("Report is not Scheduled.")
else
- Create a ticketCreate a ticket
Function componentDidMount
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
componentDidMount() {
const apiPromises = [];
const { recordId, gridChecks, dispatch } = this.props;
const catalogItemsIds = recordId ? [recordId] : _.uniq(gridChecks);
- Create a ticketCreate a ticket
Method list_view
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def list_view(display, record)
data = {:mode => "miq_host_#{display}"}
rows = []
case display
when "devices"
- Create a ticketCreate a ticket
Method set_active_tab
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def set_active_tab(nodetype)
node = nodetype.downcase.split("-")
case x_active_tree
when :settings_tree
case node[0]
- Create a ticketCreate a ticket
Method prefill_val_types
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def prefill_val_types
self.val1 ||= {}
self.val2 ||= {}
val1[:type] = case exp_typ
when 'field'
- Create a ticketCreate a ticket
Method chart_chooser
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def chart_chooser
assert_privileges('utilization')
unless params[:task_id] # Only do this first time thru
@sb[:options][:chart_date] = params[:miq_date_1] if params[:miq_date_1]
@sb[:options][:chart_date] = params[:miq_date_2] if params[:miq_date_2]
- Create a ticketCreate a ticket
Method add_update_method_add
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add_update_method_add
method = params[:id] != "new" ? find_record_with_rbac(MiqAeMethod, params[:id]) : MiqAeMethod.new
old_method_attributes = method.attributes.clone
method.name = params["name"]
- Create a ticketCreate a ticket
Method miq_policy_edit_events
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def miq_policy_edit_events
assert_privileges('miq_policy_events_assignment')
case params[:button]
when "cancel"
@sb[:action] = @edit = nil
- Create a ticketCreate a ticket
Method rbac_replace_right_cell
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rbac_replace_right_cell(nodetype, presenter)
if %w[accordion_select change_tab tree_select].include?(params[:action])
presenter.replace(:ops_tabs, r[:partial => "all_tabs"])
elsif nodetype == "group_seq"
presenter.update(:rbac_details, r[:partial => "ldap_seq_form"])
- Create a ticketCreate a ticket
Method set_instances_form_vars
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def set_instances_form_vars
session[:inst_data] = {}
@edit = {
:ae_inst_id => @ae_inst.id,
:ae_class_id => @ae_class.id,
- Create a ticketCreate a ticket
Method rsop_option_changed
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rsop_option_changed
assert_privileges('policy_simulation')
if params[:event_typ]
@sb[:rsop][:event] = params[:event_typ].presence
@sb[:rsop][:event_value] = nil
- Create a ticketCreate a ticket