Showing 2,015 of 18,390 total issues
Consider simplifying this complex logical expression. Open
Open
if @edit && @edit[:expression] &&
((default_search?(search.name) || no_default_search?(search.id)) && expression_selected_nil_or_id(search.id) ||
(@edit[:expression][:selected] && @edit[:expression][:selected][:id].zero? && search.id.to_i.zero? ||
expression_selected_id_or_name(:name, search.name)))
'active'
- Create a ticketCreate a ticket
Function getInitialValues
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getInitialValues = (emsId, recordId, isTemplate, setState) => {
const parentOptions = [];
// Get VM Parent Options and filter out current VM
API.get(`/api/vms/?filter[]=ems_id=${emsId}&expand=resources`)
.then(({ resources }) => resources.filter((vm) => vm.id !== `${recordId}`))
- Create a ticketCreate a ticket
Function FontIconPickerDdf
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FontIconPickerDdf = (props) => {
const {
labelText,
FormGroupProps,
iconTypes, selected, iconChange,
- Create a ticketCreate a ticket
Function setDriveFormSubmit
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const setDriveFormSubmit = (data, setData, formData, renderData) => {
const { id } = data.editingRow;
const index = id.substring(5);
const datatableData = data.dataTable.drives;
const submitDrives = data.submitParams.drives.connect || [];
- Create a ticketCreate a ticket
Method timeline_selected
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def timeline_selected(chart_click_data, data_row, ts)
@record = find_record_with_rbac(data_row["resource_type"].constantize, data_row["resource_id"])
return [true, nil] unless @record
controller = data_row["resource_type"].underscore
- Create a ticketCreate a ticket
Method settings_set_form_vars
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def settings_set_form_vars
@right_cell_text = if x_node.split("-").first == "z"
if my_zone_name == @selected_zone.name
_("Settings %{model} \"%{name}\" (current)") % {:name => @selected_zone.description,
:model => ui_lookup(:model => @selected_zone.class.to_s)}
- Create a ticketCreate a ticket
Method rbac_group_seq_edit
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rbac_group_seq_edit
assert_privileges("rbac_group_seq_edit")
case params[:button]
when "cancel"
@edit = nil
- Create a ticketCreate a ticket
Method action_valid_record?
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def action_valid_record?(rec)
edit = @edit[:new]
options = edit[:options]
add_flash(_("Description is required"), :error) if edit[:description].blank?
add_flash(_("Action Type must be selected"), :error) if edit[:action_type].blank?
- Create a ticketCreate a ticket
Method register_nodes
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def register_nodes
assert_privileges("host_register_nodes")
redirect_to(ems_infra_path(params[:id], :display => "hosts")) if params[:cancel]
# Hiding the toolbars
- Create a ticketCreate a ticket
Method prov_redirect
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def prov_redirect(typ = nil)
assert_privileges(params[:pressed])
# we need to do this check before doing anything to prevent
# history being updated
task_supported(typ) if typ
- Create a ticketCreate a ticket
Method export
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def export
assert_privileges('policy_import_export')
@breadcrumbs = []
@layout = "miq_policy_export"
drop_breadcrumb(:name => _("Import / Export"), :url => "miq_policy_export")
- Create a ticketCreate a ticket
Method widget_get_node_info
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def widget_get_node_info
@sb[:nodes] = x_node.split('-')
if @sb[:nodes].length == 1
get_all_widgets
@right_cell_text = _("All Widgets")
- Create a ticketCreate a ticket
Function chartData
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.chartData = function(type, data, data2) {
if (type === undefined) {
return emptyChart();
}
- Create a ticketCreate a ticket
Function getPodsTable
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getPodsTable = (isLoading, dashboardData) => {
if (isLoading !== true) {
if (dashboardData.data.pods.length > 0) {
const rows = dashboardData.data.pods.map((row) => ({
...row,
- Create a ticketCreate a ticket
Function FirmwareRegistryForm
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FirmwareRegistryForm = () => {
const TYPES = {
rest_api_depot: { value: 'FirmwareRegistry::RestApiDepot', label: __('Rest API Depot') },
};
- Create a ticketCreate a ticket
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { isLoaded } = this.props;
if (!isLoaded) {
return (
- Create a ticketCreate a ticket
Method process_vm_buttons
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_vm_buttons(pfx)
case params[:pressed]
when "#{pfx}_policy_sim" then polsimvms
when "#{pfx}_compare" then comparemiq
when "#{pfx}_scan" then scanvms
- Create a ticketCreate a ticket
Method textual_generate_openstack_status
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def textual_generate_openstack_status
@record.service_group_names.collect do |x|
running_count = @record.host_ids_with_running_service_group(x.name).count
failed_count = @record.host_ids_with_failed_service_group(x.name).count
all_count = @record.host_ids_with_service_group(x.name).count
- Create a ticketCreate a ticket
Method disks_attributes
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def disks_attributes
disks = []
return disks if @record.hardware.disks.empty?
# HDDs
- Create a ticketCreate a ticket
Method ab_group_reorder
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ab_group_reorder
assert_privileges("ab_group_reorder")
case params[:button]
when "cancel"
add_flash(_("Button Group Reorder cancelled"))
- Create a ticketCreate a ticket