Showing 2,015 of 18,390 total issues
Method update_method
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def update_method
assert_privileges("miq_ae_method_edit")
return unless load_edit("aemethod_edit__#{params[:id]}", "replace_cell__explorer")
get_method_form_vars
- Create a ticketCreate a ticket
Method atomic_st_edit
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def atomic_st_edit
assert_privileges(params[:id] ? 'atomic_catalogitem_edit' : 'atomic_catalogitem_new')
# reset the active tree back to :sandt_tree, it was changed temporairly to display automate entry point tree in a popup div
self.x_active_tree = 'sandt_tree'
- Create a ticketCreate a ticket
Method calculate_rp_config
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def calculate_rp_config(db_record)
rp_config = []
unless db_record.memory_reserve.nil?
rp_config.push(:field => _("Memory Reserve"),
:description => db_record.memory_reserve)
- Create a ticketCreate a ticket
Method prov_req_submit
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def prov_req_submit
id = session[:edit][:req_id] || "new"
return unless load_edit("prov_edit__#{id}", "show_list")
@edit[:new][:schedule_time] = @edit[:new][:schedule_time].in_time_zone("Etc/UTC") if @edit[:new][:schedule_time]
- Create a ticketCreate a ticket
Method automate_button_field_changed
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def automate_button_field_changed
assert_privileges(feature_by_action)
unless params[:target_class]
@edit = session[:edit]
- Create a ticketCreate a ticket
Method custom_buttons
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def custom_buttons(ids = nil, display_options = {})
button = CustomButton.find(params[:button_id])
cls = custom_button_class_model(button.applies_to_class)
@explorer = true if BASE_MODEL_EXPLORER_CLASSES.include?(cls)
ids ||= params[:id] unless relationship_table_screen? && @record.nil?
- Create a ticketCreate a ticket
Method button
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def button
@edit = session[:edit] # Restore @edit for adv search box
params[:page] = @current_page unless @current_page.nil? # Save current page for list refresh
@refresh_div = "main_div" # Default div for button.rjs to refresh
- Create a ticketCreate a ticket
Method method_form_fields
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def method_form_fields
assert_privileges("miq_ae_method_edit")
if params[:id] == 'new'
method = MiqAeMethod.new
- Create a ticketCreate a ticket
Method ap_get_form_vars_registry
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ap_get_form_vars_registry
unless params[:entry]['kname'].present? && params[:entry]['value'].present?
session[:reg_data] = {
:key => params[:entry]['kname'],
:value => params[:entry]['value'],
- Create a ticketCreate a ticket
Method get_node_info_handle_leaf_node
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_node_info_handle_leaf_node(id)
show_record(id)
if @record.atomic? && need_prov_dialogs?(@record.prov_type)
@miq_request = MiqRequest.find_by(:id => @record.service_resources[0].resource_id) if @record.service_resources[0]&.resource_id
if @miq_request
- Create a ticketCreate a ticket
Function createSchema
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createSchema = (data) => {
const fields = [
{
component: componentTypes.SUB_FORM,
name: 'MigrateInstance',
- Create a ticketCreate a ticket
Function deleteDisk
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const deleteDisk = (row, data, setData) => {
let dataTableData = data.dataTable.disks;
let addDisks = data.submitParams.disks.add || [];
const deleteDisks = data.submitParams.disks.delete || [];
let addDiskIds = data.submitParams.diskIds.add || [];
- Create a ticketCreate a ticket
Method set_method_form_vars
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def set_method_form_vars
session[:field_data] = {}
@ae_class = ae_class_for_instance_or_method(@ae_method)
@edit = {}
session[:edit] = {}
- Create a ticketCreate a ticket
Method rbac_edit_reset
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rbac_edit_reset(operation, what, klass)
key = what.to_sym
if operation != "new"
record = find_record_with_rbac(klass, checked_or_params)
if %i[group role].include?(key) && record && record.read_only && operation != 'copy'
- Create a ticketCreate a ticket
Method label_tag_mapping_edit
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def label_tag_mapping_edit
assert_privileges("region_edit")
case params[:button]
when "cancel"
- Create a ticketCreate a ticket
Function miqJqueryRequest
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.miqJqueryRequest = function(url, options) {
if ((ManageIQ.observe.processing || ManageIQ.observe.queue.length) && (!options || !options.observe)) {
console.debug('Postponing miqJqueryRequest - waiting for the observe queue to empty first');
return new Promise((resolve, reject) => {
- Create a ticketCreate a ticket
Function renderComponent
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderComponent = (props) => {
const { group, onClick } = props;
switch (props.group.component) {
case 'GenericGroup':
return (
- Create a ticketCreate a ticket
Function MiqButton
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function MiqButton(props) {
let { title } = props;
if (props.enabled && props.enabledTitle) {
title = props.enabledTitle;
}
- Create a ticketCreate a ticket
Function model
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const model = (isLoading, widgetId, widgetModel, widgetType) => {
let widget;
if (isLoading) {
widget = (
<div className="loadingSpinner">
- Create a ticketCreate a ticket
Method perf_top_chart
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def perf_top_chart
return if perfmenu_click?
@record = identify_tl_or_perf_record
@perf_record = @record.kind_of?(MiqServer) ? @record.vm : @record # Use related server vm record
- Create a ticketCreate a ticket