Showing 2,015 of 18,390 total issues
Function getSubmitData
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getSubmitData = (values) => {
let customIdentifier = '';
let description = '';
let parentResource = null;
const childResources = [];
- Create a ticketCreate a ticket
Method comparemiq
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def comparemiq
assert_privileges(params[:pressed])
items = if !session[:checked_items].nil? && @lastaction == "set_checked_items"
session[:checked_items]
else
- Create a ticketCreate a ticket
Method group_set_form_vars
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def group_set_form_vars
@sb[:buttons_node] = true
if session[:resolve]
@resolve = session[:resolve]
else
- Create a ticketCreate a ticket
Method create_instance
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create_instance
assert_privileges("miq_ae_instance_new")
case params[:button]
when "cancel"
@sb[:action] = session[:edit] = nil # clean out the saved info
- Create a ticketCreate a ticket
Method update
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def update
assert_privileges("security_group_edit")
@security_group = find_record_with_rbac(SecurityGroup, params[:id])
case params[:button]
- Create a ticketCreate a ticket
Method sync_users
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def sync_users
assert_privileges('ems_cloud_user_sync')
ems = find_record_with_rbac(model, params[:id])
@in_a_form = true
drop_breadcrumb(:name => _("Sync Users"), :url => "/ems_cloud/sync_users")
- Create a ticketCreate a ticket
Method set_ownership
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def set_ownership
assert_privileges(params[:pressed])
# check to see if coming from show_list or drilled into vms from another CI
controller = if request.parameters[:controller] == "vm" || %w[all_vms vms instances].include?(params[:display])
"vm"
- Create a ticketCreate a ticket
Method old_dialogs_button_operation
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def old_dialogs_button_operation(method, display_name)
dialogs = []
# 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 x_get_tree_roots
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def x_get_tree_roots
nodes = [
{:id => 'otcfn',
:tree => "otcfn_tree",
:text => _("CloudFormation Templates"),
- Create a ticketCreate a ticket
Function levelFour
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const levelFour = (nodes, reportMenu, reportDetails) => {
const headers = [...defaultHeaders, ...additionalHeaders];
const rows = [];
const nodeOne = parseInt(nodes[1]);
const nodeTwo = parseInt(nodes[2]);
- Create a ticketCreate a ticket
Function getWorkflow
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getWorkflow = async() => {
reloadCount.current += 1;
const url = `/api/configuration_scripts/${recordId}`;
API.get(url, { skipErrors: [404, 400, 500] })
.then((response) => {
- Create a ticketCreate a ticket
Method settings_users_basic_info
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def settings_users_basic_info(record)
rows = [
row_data(_('ID'), record.id),
row_data(_('Full Name'), record.name),
row_data(_('Username'), record.userid),
- Create a ticketCreate a ticket
Method perf_gen_tag_data_before_wait
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def perf_gen_tag_data_before_wait
case @perf_options[:typ]
when "Hourly"
from_dt = create_time_in_utc(@perf_options[:hourly_date] + " 00:00:00", @perf_options[:tz]) # Get tz 12am in UTC
to_dt = create_time_in_utc(@perf_options[:hourly_date] + " 23:59:59", @perf_options[:tz]) # Get tz 11:59pm in UTC
- Create a ticketCreate a ticket
Method perf_gen_top_data_after_wait
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def perf_gen_top_data_after_wait
miq_task = MiqTask.find(params[:task_id]) # Not first time, read the task record
if miq_task.task_results.kind_of?(Array)
rpts = miq_task.task_results.reverse # Grab the array of report objects (reversed so reports can be popped off)
else
- Create a ticketCreate a ticket
Method exp_remove
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exp_remove(exp, token)
return true if exp[:token] && exp[:token] == token # If the token matches
# Tell caller to remove me
keepkey, keepval, deletekey = nil # Holders for key, value pair to keep and key to delete
- Create a ticketCreate a ticket
Method dialog_get_form_vars
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def dialog_get_form_vars
@record = Dialog.find(@edit[:rec_id])
params.each do |parameter_key, parameter_value|
parameter_key = parameter_key.split("__protected").first if parameter_key.ends_with?("__protected")
- Create a ticketCreate a ticket
Method create
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create
assert_privileges("cloud_volume_new")
case params[:button]
when "cancel"
flash_and_redirect(_("Add of new Cloud Volume was cancelled by the user"))
- Create a ticketCreate a ticket
Method pxe_image_edit
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def pxe_image_edit
assert_privileges("pxe_image_edit")
case params[:button]
when "cancel"
add_flash(_("Edit of PXE Image \"%{name}\" was cancelled by the user") % {:name => session[:edit][:img].name})
- Create a ticketCreate a ticket
Method alert_build_exp_options_info
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def alert_build_exp_options_info
MiqAlert.expression_options(@edit[:new][:expression][:eval_method]).each do |eo|
case eo[:name]
when :ems_id
- Create a ticketCreate a ticket
Function onSubmitData
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSubmitData = (values, miqRequestInitialOptions) => {
// Request Date (created_recently)
if (values.selectedPeriod) { // user selected
daysAgo = values.selectedPeriod;
} else if (miqRequestInitialOptions.timePeriods[1] && miqRequestInitialOptions.timePeriods[1].value) {
- Create a ticketCreate a ticket