Showing 2,015 of 18,390 total issues
Method delete_cloud_tenants
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def delete_cloud_tenants
assert_privileges("cloud_tenant_delete")
tenants = find_records_with_rbac(CloudTenant, checked_or_params)
tenants_to_delete = []
tenants.each do |tenant|
- Create a ticketCreate a ticket
Method heatmaps_data
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def heatmaps_data(metrics)
node_cpu_usage = []
node_memory_usage = []
metrics.each do |m|
- Create a ticketCreate a ticket
Method notification_data
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def notification_data(components, component_type)
if components&.first.respond_to?(:health_state)
count = 0
health_states = components.each_with_object({}) do |component, health_state|
health_state[component.health_state&.downcase] = (health_state[component.health_state&.downcase] || 0) + 1
- Create a ticketCreate a ticket
Function selectListElement
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var selectListElement = function(scope, timeout, ctrl, refresh) {
timeout(function() {
if (refresh) {
if (scope[scope['form_' + ctrl.$name + '_ngHide']] === true) {
angular.element(scope['form_' + ctrl.$name]).selectpicker('hide');
- Create a ticketCreate a ticket
Function createSchema
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createSchema(ems, cloudNetworkId, loadSchema, emptySchema, providerFields = []) {
const providers = ems.filter((tenant) => tenant.type !== 'ManageIQ::Providers::Nuage::NetworkManager');
const fields = [{
component: componentTypes.SUB_FORM,
title: __('Network Provider'),
- Create a ticketCreate a ticket
Function datetime_range
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
datetime_range: function(val, options) {
options = options || {};
if (!options.format) {
return val;
}
- Create a ticketCreate a ticket
Function link
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(_scope, _elm, attrs, ctrl) {
function multipleValidator(modelValue) {
var memtype = attrs.memtype;
var multiple = attrs.validateMultiple;
var minvalue = attrs.miqmin;
- Create a ticketCreate a ticket
Function cancelDisconnectDrives
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const cancelDisconnectDrives = (row, data, setData) => {
const { id } = row;
const index = id.substring(5);
const datatableData = data.dataTable.drives;
datatableData[index].filename = datatableData[index].disconnect_filename;
- Create a ticketCreate a ticket
Function reducers
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const reducers = (oncheck, onclick) => (state = {}, action) => {
const node = action.nodeId !== undefined ? Tree.nodeSelector(state, action.nodeId) : undefined;
switch (action.type) {
case ACTIONS.CHECKED_DIRECTLY:
- Create a ticketCreate a ticket
Function createSchema
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createSchema = (recordId, data, setData, roles, options, memory, onCellClick, buttonClick) => {
let formFields;
switch (data.form.type) {
case TYPES.DISK:
- Create a ticketCreate a ticket
Function getPodsData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getPodsData = (data, createdlabel, deletedLabel) => {
if (data && data.xData && data.yCreated && data.yDeleted) {
const columnsData = data.xData;
const createdData = data.yCreated;
const deletedData = data.yDeleted;
- Create a ticketCreate a ticket
Function cancelConnectDrives
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const cancelConnectDrives = (row, data, setData) => {
const { id } = row;
const index = id.substring(5);
const datatableData = data.dataTable.drives;
datatableData[index].filename = datatableData[index].old_filename;
- Create a ticketCreate a ticket
Function cancelEditNetwork
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const cancelEditNetwork = (row, data, setData, roles) => {
const index = row.id.substring(7);
const networkRows = data.dataTable.networkAdapters;
if (!roles.isVmwareCloud) {
- Create a ticketCreate a ticket
Function taggingMiddleware
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const taggingMiddleware = (store) => (next) => (action) => {
let selected;
const { type, meta, tag } = action;
if (meta && meta.url) {
- Create a ticketCreate a ticket
Function packagesFromModules
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const packagesFromModules = (modules) => {
// find the package.json file for each module
modules = modules.filter(m => m.includes("node_modules"));
var packagePaths = modules.map(m => {
var match = m.match(/(.*node_modules\/)([^/]+)(\/[^/]+)?/);
- Create a ticketCreate a ticket
Function onSubmit
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSubmit = (values) => {
miqSparkleOn();
var vm_id, volume_id, redirectUrl;
if (dropdownLabel == "Instance") {
- Create a ticketCreate a ticket
Function setRenderForm
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const setRenderForm = (row, type, action) => {
if (type === TYPES.DISK && action === 'edit') {
return true;
}
if (type === TYPES.NETWORK || type === TYPES.EDITNETWORK) {
- Create a ticketCreate a ticket
Function FormButtons
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function FormButtons(props) {
const primaryTitle = props.customLabel || (props.newRecord ? __('Add') : __('Save'));
const primaryHandler = (props.newRecord ? props.addClicked : props.saveClicked) || props.addClicked || props.saveClicked;
// NOTE: These strings will be translated by <MiqButton />
- Create a ticketCreate a ticket
Method apply_common_props
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def apply_common_props(button, input)
button.update(
:color => input[:color],
:data => button.data(input[:data]),
:hidden => button[:hidden] || !!input[:hidden],
- Create a ticketCreate a ticket
Method calculate_disk_name
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def calculate_disk_name(disk)
case disk.device_type
when "cdrom-raw"
"CD-ROM (IDE #{disk.location})"
when "atapi-cdrom"
- Create a ticketCreate a ticket