Showing 2,015 of 18,390 total issues
Function formOptions
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var formOptions = function(vm) {
miqService.sparkleOn();
if (vm[vm.model].catalog_id !== undefined) {
allApiPromises.push(API.get('/api/service_catalogs/?expand=resources&attributes=id,name' + sortOptions)
.then(function(data) {
- Create a ticketCreate a ticket
Function add_flash
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.add_flash = function(msg, level, options) {
level = level || 'success';
options = options || {};
var cls = { alert: '', icon: '' };
- Create a ticketCreate a ticket
Function deleteNetwork
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const deleteNetwork = (row, data, setData, roles) => {
let dataTableData = data.dataTable.networkAdapters || [];
let submitNetworks = data.submitParams.networks.add || [];
let addNetworkIds = data.submitParams.networkIds.add || [];
const deleteNetworksData = data.submitParams.networks.delete || [];
- Create a ticketCreate a ticket
Method dialog_form_button_pressed
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def dialog_form_button_pressed
case params[:button]
when "cancel"
return unless load_edit("dialog_edit__#{params[:id]}", "replace_cell__explorer")
- Create a ticketCreate a ticket
Method x_button
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def x_button
model, action = pressed2model_action(params[:pressed])
allowed_models = %w[common image instance vm miq_template provider automation storage infra_networking]
raise ActionController::RoutingError, 'Invalid button action' unless
allowed_models.include?(model)
- Create a ticketCreate a ticket
Method exp_commit_find
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exp_commit_find(exp)
if @edit[@expkey][:exp_field].nil?
add_flash(_("A find field must be chosen to commit this expression element"), :error)
elsif %w[checkall checkany].include?(@edit[@expkey][:exp_check]) &&
@edit[@expkey][:exp_cfield].nil?
- Create a ticketCreate a ticket
Method buttons_get_node_info
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def buttons_get_node_info(node)
nodetype = node.split("_")
# initializing variables to hold data for selected node
@custom_button = nil
@sb[:button_groups] = nil
- Create a ticketCreate a ticket
Method cu_build_edit_screen
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cu_build_edit_screen
@edit = {}
@edit[:new] = {}
@edit[:current] = {}
@edit[:key] = "cu_edit__collection"
- Create a ticketCreate a ticket
Method action_field_changed
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def action_field_changed
return unless load_edit("miq_action_edit__#{params[:id]}")
@action = @edit[:action_id] ? MiqAction.find(@edit[:action_id]) : MiqAction.new
- Create a ticketCreate a ticket
Method provision_dialogs_update_create
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def provision_dialogs_update_create
case params[:button]
when "add", "save"
dialog = params[:id].blank? ? MiqDialog.new : MiqDialog.find(params[:id]) # Get new or existing record
if params[:name].blank?
- Create a ticketCreate a ticket
Method set_form_vars
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def set_form_vars
@edit[:new][:name] = @record.name
@edit[:new][:description] = @record.description
@edit[:new][:long_description] = @record.long_description
@edit[:new][:provision_cost] = @record.provision_cost
- Create a ticketCreate a ticket
Function ErrorModalController
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ErrorModalController($timeout) {
var $ctrl = this;
$ctrl.data = null;
$ctrl.error = null;
$ctrl.isHtml = false;
- Create a ticketCreate a ticket
Function createSchema
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createSchema = (data) => {
const fields = [
{
component: componentTypes.SUB_FORM,
name: 'EvacuateInstance',
- Create a ticketCreate a ticket
Function MultiSelectWithSelectAll
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MultiSelectWithSelectAll = (props) => {
const {
initialValues, options, id, titleText, label, placeholder,
...rest
} = useFieldApi(prepareProps(props));
- Create a ticketCreate a ticket
Function createSchema
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createSchema(routerId, providerFields = [], subnets, loadSchema, emptySchema) {
if (subnets) showSubnets = true;
const fields = [{
component: componentTypes.SUB_FORM,
title: __('Network Management Provider'),
- Create a ticketCreate a ticket
Function DiagnosticsCURepairForm
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DiagnosticsCURepairForm = () => {
const [data, setData] = useState({
isLoading: true,
timezones: undefined,
response: undefined,
- Create a ticketCreate a ticket
Function render
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
selectedTagCategory, tags, assignedTags,
onTagDeleteClick, onTagCategoryChange,
onTagValueChange, onSingleTagValueChange, showReset,
- Create a ticketCreate a ticket
Method edit_reports
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def edit_reports
@edit[:selected_reports] = []
current_group_id = current_user.current_group.try(:id).to_i
id = session[:node_selected].split('__')
@selected = id[1].split(':')
- Create a ticketCreate a ticket
Method db_edit
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def db_edit
assert_privileges("db_edit")
case params[:button]
when "cancel"
- Create a ticketCreate a ticket
Function getInitialValues
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getInitialValues = (recId, setState) => {
if (recId) {
API.get(`/api/custom_buttons/${recId}?attributes=resource_action,uri_attributes`)
.then((initialValues) => {
if (initialValues.options.button_type === 'ansible_playbook') {
- Create a ticketCreate a ticket