Showing 719 of 1,266 total issues
File host_edit.js
has 905 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
//= require parameter_override
var compute_resource_id = null;
$(document).ready(function() {
var searchParams = new URLSearchParams(window.location.search);
if(searchParams.has('hostgroup_id')) {
Class Managed
has 97 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Host::Managed < Host::Base
# audit the changes to this model
audited :except => [:last_report, :last_compile, :lookup_value_matcher, :global_status]
has_associated_audits
# redefine audits relation because of the type change (by default the relation will look for auditable_type = 'Host::Managed')
File managed.rb
has 776 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class Host::Managed < Host::Base
# audit the changes to this model
audited :except => [:last_report, :last_compile, :lookup_value_matcher, :global_status]
has_associated_audits
# redefine audits relation because of the type change (by default the relation will look for auditable_type = 'Host::Managed')
File hosts_controller.rb
has 774 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class HostsController < ApplicationController
include Foreman::Controller::ActionPermissionDsl
include ScopesPerAction
include Foreman::Controller::HostDetails
include Foreman::Controller::AutoCompleteSearch
Function HostsIndex
has 351 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const HostsIndex = () => {
const [menuOpen, setMenuOpen] = useState(false);
const [allColumns, setAllColumns] = useState(
getColumnData({ tableName: 'hosts' })
);
File vmware.rb
has 731 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'foreman/exception'
begin
require 'rbvmomi'
rescue LoadError
Class ComputeResource
has 89 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class ComputeResource < ApplicationRecord
audited :except => [:attrs]
include Taxonomix
include Encryptable
include Authorizable
Class HostsController
has 83 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class HostsController < ApplicationController
include Foreman::Controller::ActionPermissionDsl
include ScopesPerAction
include Foreman::Controller::HostDetails
include Foreman::Controller::AutoCompleteSearch
Class User
has 82 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class User < ApplicationRecord
audited :except => [:last_login_on, :password_hash, :password_salt, :password_confirmation],
:associations => [:roles, :usergroups]
include Authorizable
include Foreman::TelemetryHelper
Class Ovirt
has 79 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Ovirt < ComputeResource
ALLOWED_DISPLAY_TYPES = %w(vnc spice)
validates :url, :format => { :with => URI::DEFAULT_PARSER.make_regexp }, :presence => true,
:url_schema => ['http', 'https']
Class Plugin
has 77 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Plugin
DEFAULT_REGISTRIES = {
fact_importer: 'Foreman::Plugin::FactImporterRegistry',
fact_parser: 'Foreman::Plugin::FactParserRegistry',
report_scanner: 'Foreman::Plugin::ReportScannerRegistry',
Function RegistrationCommandsPage
has 281 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const RegistrationCommandsPage = () => {
const dispatch = useDispatch();
// Context
const currentOrganization = useForemanOrganization();
File user.rb
has 613 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'digest/sha1'
class User < ApplicationRecord
audited :except => [:last_login_on, :password_hash, :password_salt, :password_confirmation],
:associations => [:roles, :usergroups]
Class Vmware
has 72 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Vmware < ComputeResource
include ComputeResourceConsoleCommon
include ComputeResourceCaching
validates :user, :password, :server, :datacenter, :presence => true
File ovirt.rb
has 611 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'foreman/exception'
require 'uri'
module Foreman::Model
class Ovirt < ComputeResource
Class Base
has 58 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Base < ApplicationRecord
KERNEL_RELEASE_FACTS = ['kernelrelease', 'ansible_kernel', 'kernel::release', 'uname::release']
prepend Foreman::STI
include Authorizable
File base.rb
has 509 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module Host
class Base < ApplicationRecord
KERNEL_RELEASE_FACTS = ['kernelrelease', 'ansible_kernel', 'kernel::release', 'uname::release']
prepend Foreman::STI
Method guest_types_descriptions
has 197 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def guest_types_descriptions
{
"almalinux_64Guest" => "AlmaLinux (64-bit)",
"amazonlinux2_64Guest" => "Amazon Linux 2 (64 bit)",
"amazonlinux3_64Guest" => "Amazon Linux 3 (64 bit)",
Function render
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
data: {
name,
isSafemodeEnabled,
Class Subnet
has 50 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Subnet < ApplicationRecord
audited
IP_FIELDS = [:network, :mask, :gateway, :dns_primary, :dns_secondary, :from, :to]
REQUIRED_IP_FIELDS = [:network, :mask]
SUBNET_TYPES = {:'Subnet::Ipv4' => N_('IPv4'), :'Subnet::Ipv6' => N_('IPv6')}