Showing 2,015 of 18,390 total issues
Method st_edit
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def st_edit
assert_privileges(params[:id] ? 'catalogitem_edit' : '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 determine_api_endpoints
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def determine_api_endpoints(obj, display_options = {})
base_name = obj.class.base_model.name
case base_name
when /EmsCluster/
api_collection_name = "clusters"
- Create a ticketCreate a ticket
Function setDiskFormSubmit
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const setDiskFormSubmit = (data, setData, formData, roles, renderData) => {
const dataTableData = data.dataTable.disks || [];
if (data.form.action === 'add') {
// code for add
const id = `disk${dataTableData.length}`;
- Create a ticketCreate a ticket
Function CloudObjectStoreContainerForm
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CloudObjectStoreContainerForm = () => {
const [{
initialValues, fields, isLoading,
}, setState] = useState({});
- Create a ticketCreate a ticket
Method button
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def button
@edit = session[:edit] # Restore @edit for adv search box
params[:display] = @display if %w[all_vms vms hosts].include?(@display) # Were we displaying vms or hosts
if params[:pressed].starts_with?("vm_", # Handle buttons from sub-items screen
- Create a ticketCreate a ticket
Method widget_get_form_vars
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def widget_get_form_vars
@widget = @edit[:widget_id] ? MiqWidget.find(@edit[:widget_id]) : MiqWidget.new
copy_params_if_set(@edit[:new], params, %i[title description])
@edit[:new][:filter] = params[:filter_typ] if params[:filter_typ]
- Create a ticketCreate a ticket
Class SecurityGroupController
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class SecurityGroupController < ApplicationController
before_action :check_privileges
before_action :get_session_data
after_action :cleanup_action
after_action :set_session_data
- Create a ticketCreate a ticket
Class ContainerDashboardService
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class ContainerDashboardService < DashboardService
include ContainerServiceMixin
include Mixins::CheckedIdMixin
include TextualMixins::TextualRefreshStatus
- Create a ticketCreate a ticket
Function notificationReducer
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const notificationReducer = (state = notificationInitialState, action) => {
switch (action.type) {
case INIT_NOTIFICATIONS:
return {
...state,
- Create a ticketCreate a ticket
Method ab_button_add
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ab_button_add
assert_privileges("ab_button_new")
@sb[:active_tab] = "ab_options_tab"
@resolve = session[:resolve]
name = @edit[:new][:instance_name].presence || @edit[:new][:other_name]
- Create a ticketCreate a ticket
Method menu_update
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def menu_update
assert_privileges("miq_report_menu_editor")
menu_get_form_vars
# @changed = (@edit[:new] != @edit[:current])
- Create a ticketCreate a ticket
File quadicons.js
has 419 lines of code (exceeds 400 allowed). Consider refactoring. Open
Open
export const quads = [
{
topLeft: {
fonticon: 'fa fa-cog',
color: '#0099cc',
- Create a ticketCreate a ticket
Function onSubmit
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSubmit = (values, formApi) => {
promise.then(async({ data: { allowed_association_types } }) => {
// check to determine whether to delete or replace existing custom image
if (values.file_upload) {
const fileList = get(values, formApi.fileInputs[0]).inputFiles;
- Create a ticketCreate a ticket
Function render
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const usedServicesMessage = (data) => {
let warningItems = [];
if (data.length === 1) { // We're deleting just one catalog item
const services = {};
- Create a ticketCreate a ticket
Method pre_prov
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def pre_prov
assert_privileges("miq_request_edit")
if params[:button] == "cancel"
flash_to_session(_("Add of new %{type} Request was cancelled by the user") % {:type => session[:edit][:prov_type]})
@explorer = session[:edit][:explorer] || false
- Create a ticketCreate a ticket
Method miq_event_edit
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def miq_event_edit
assert_privileges("miq_policy_event_edit")
case params[:button]
when "cancel"
@edit = nil
- Create a ticketCreate a ticket
Method button
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def button
@edit = session[:edit] # Restore @edit for adv search box
params[:display] = @display if ["instances"].include?(@display) # Were we displaying vms/hosts/storages
params[:page] = @current_page if @current_page.nil? # Save current page for list refresh
- Create a ticketCreate a ticket
Method old_dialogs_update_create
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def old_dialogs_update_create
old_dialogs_get_form_vars
case params[:button]
when "cancel"
@edit = session[:edit] = nil # clean out the saved info
- Create a ticketCreate a ticket
Method add_field_to_col_order
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add_field_to_col_order(rpt, field)
# Get the sort columns, removing the suffix if it exists
sortby1 = if MiqReport.is_break_suffix?(@edit[:new][:sortby1].split("__")[1])
@edit[:new][:sortby1].split("__").first
else
- Create a ticketCreate a ticket
Method check_tabs
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def check_tabs
@sb[:miq_tab] = params[:tab]
active_tab = 'edit_1'
case @sb[:miq_tab].split('_')[1]
when '8'
- Create a ticketCreate a ticket