Showing 2,015 of 18,390 total issues
Function setNetworkFormSubmit
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const setNetworkFormSubmit = (data, setData, formData, roles, renderData) => {
if (data.form.action === 'add') {
// code for add function
const id = `network${data.dataTable.networkAdapters.length}`;
const networkData = {
- Create a ticketCreate a ticket
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
// eslint-disable-next-line consistent-return
const renderSpinner = (spinnerOn) => {
if (spinnerOn) {
return (
- Create a ticketCreate a ticket
Function onClick
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onClick = (button) => {
let buttonUrl;
if (button.confirm && !window.confirm(button.confirm)) {
// No handling unless confirmed.
- Create a ticketCreate a ticket
Method layout_uses_listnav?
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def layout_uses_listnav?
return false if action_name == "show"
return false if show_list_with_no_provider?
return false if show_list_ansible?
- Create a ticketCreate a ticket
Method catalog_basic_information
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def catalog_basic_information(record, sb_params, tenants_tree)
prov_types = catalog_provision_types
prov_data = [prov_types[:template], prov_types[:ovf]].include?(record.prov_type) && (catalog_provision?(record, :playbook) || catalog_provision?(record, :terraform_template)) ? provisioning : nil
data = {:title => _('Basic Information'), :mode => "miq_catalog_basic_information"}
rows = []
- Create a ticketCreate a ticket
Method launch_external_logging
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def launch_external_logging
assert_privileges('ems_container_launch_external_logging')
record = self.class.model.find(params[:id])
ems = record.ext_management_system
route_name = ems.external_logging_route_name
- Create a ticketCreate a ticket
Method view_to_hash
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def view_to_hash(view, fetch_data = false)
root = {:head => [], :rows => []}
has_checkbox = !@embedded && !@no_checkboxes
- Create a ticketCreate a ticket
Method db_get_node_info
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def db_get_node_info
model, rec_id, _ = TreeBuilder.extract_node_model_and_id(x_node)
@sb[:nodes] = x_node.split('-')
if @sb[:nodes].length == 1
@default_ws = MiqWidgetSet.where_unique_on("default").where(:read_only => true).first
- Create a ticketCreate a ticket
Function KeyValueListComponent
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const KeyValueListComponent = (props) => {
const {
input, label, keyLabel, valueLabel,
} = useFieldApi(props);
const formOptions = useFormApi();
- Create a ticketCreate a ticket
Function createSchema
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createSchema = (edit, ems, initialValues, state, setState) => {
let emsId = state.ems_id;
if (initialValues && initialValues.ems_id) {
emsId = initialValues.ems_id;
}
- Create a ticketCreate a ticket
Function componentDidMount
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
componentDidMount() {
const {
recordId, gridChecks, modalData, dispatch,
} = this.props;
const itemsIds = gridChecks && Array.isArray(gridChecks) && gridChecks.length > 0 ? _.uniq(gridChecks) : [recordId];
- Create a ticketCreate a ticket
Function dataHelper
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const dataHelper = (values, timeProfileId, action, userid) => {
let data = {};
let APIaction = 'edit';
let metrics = values.rollup_daily_metrics;
let profileType = values.profile_type;
- Create a ticketCreate a ticket
Function KeyValueListComponent
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const KeyValueListComponent = (props) => {
const {
input, label, keyLabel, valueLabel,
} = useFieldApi(props);
const formOptions = useFormApi();
- Create a ticketCreate a ticket
Method included
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.included(included_class)
included_class.button_group('service_vmdb', [
included_class.select(
:service_vmdb_choice,
nil,
- Create a ticketCreate a ticket
Method build_grid
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_grid
case @edit[:wf]
when MiqProvisionConfiguredSystemWorkflow
build_dialog_page_miq_provision_configured_system_workflow
when MiqProvisionVirtWorkflow
- Create a ticketCreate a ticket
Method prov_edit
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def prov_edit
assert_privileges("miq_request_edit")
if params[:button] == "cancel"
req = MiqRequest.find(session[:edit][:req_id]) if session[:edit] && session[:edit][:req_id]
flash_to_session(
- Create a ticketCreate a ticket
Method schedule_form_fields
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def schedule_form_fields
assert_privileges("schedule_edit")
schedule = MiqSchedule.find(params[:id])
- Create a ticketCreate a ticket
Method prov_set_show_vars
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def prov_set_show_vars
@showtype = "main"
@options = @miq_request.get_options # Get the provision options from the request record
@options[:org_controller] = "vm"
if @options[:schedule_time]
- Create a ticketCreate a ticket
Method action_type
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def action_type(type, amount)
case type
when "advanced_settings"
n_("Advanced Setting", "Advanced Settings", amount)
when "disks"
- Create a ticketCreate a ticket
Method replace_right_cell
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def replace_right_cell(options = {})
action, presenter = options.values_at(:action, :presenter)
@explorer = true
@sb[:action] = action unless action.nil?
if @sb[:action] || params[:display]
- Create a ticketCreate a ticket