Showing 2,015 of 18,390 total issues
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const validation = (values) => {
const errors = {};
if (values.ems_id === '-1') {
errors.ems_id = __('Required');
- Create a ticketCreate a ticket
Function onSubmit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSubmit = (values) => {
const submitValues = prepareSubmitData(values, recId, appliesToClass, appliesToId, initialValues, buttonIcon);
let saveMessage = sprintf(__(`Custom Button %s has been successfully saved.`), submitValues.name);
if (recId) {
API.put(`/api/custom_buttons/${recId}`, submitValues, { skipErrors: [400] })
- Create a ticketCreate a ticket
Function buildDataTableObject
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const buildDataTableObject = (pointChoice) => {
const tableData = [];
pointChoice.eventsObj.forEach((event) => {
// TODO: Different timeline show different data, ensure all necessary data is included
const emsUrl = event.ext_management_system.type.includes('StorageManager') ? 'ems_storage' : 'ems_infra/show';
- Create a ticketCreate a ticket
Function modal
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function modal(title, Inner, closed, removeId) {
const overrides = {
addClicked: (orig) => Promise.resolve(orig()).then(closed),
saveClicked: (orig) => Promise.resolve(orig()).then(closed),
cancelClicked: (orig) => Promise.resolve(orig()).then(closed),
- Create a ticketCreate a ticket
Function getPodsTrendChart
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getPodsTrendChart = (isLoading, dashboardData) => {
if (isLoading !== true) {
if (dashboardData.data.pod_metrics.dataAvailable) {
const tooltipType = dashboardData.data.pod_metrics.interval_name;
let config = 'hourlyPodUsageConfig';
- Create a ticketCreate a ticket
Function removeCatalogItems
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const removeCatalogItems = (catalogItems) => {
const apiPromises = [];
miqSparkleOn();
catalogItems.forEach((item) => {
- Create a ticketCreate a ticket
Function GetCompliantResources
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const GetCompliantResources = ({ ...props }) => {
const buttonLabel = __('Check Compliant Resources');
const progressMsg = __('Checking');
const defaultText = __(' ');
const helperText = 'Check which currently attached resources comply with the selected capabilities:';
- Create a ticketCreate a ticket
Function componentDidMount
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
componentDidMount() {
miqSparkleOn();
const { catalogId } = this.props;
if (catalogId) {
Promise.all([
- Create a ticketCreate a ticket
Function toolbarReducer
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const toolbarReducer = (state, action) => {
switch (action.type) {
case 'INCREMENT':
return {
...state,
- Create a ticketCreate a ticket
Function getOverflowButtons
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getOverflowButtons = (widgetButtons, widgetId, widgetType, widgetTitle, setState, widgetModel, lastRun, nextRun) => {
const menuItems = [];
const parsedButtons = JSON.parse(widgetButtons);
parsedButtons.forEach((button) => {
menuItems.push(<OverflowMenuItem
- Create a ticketCreate a ticket
Method get_custom_buttons
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_custom_buttons(model, record, toolbar_result)
cbses = CustomButtonSet.find_all_by_class_name(button_class_name(model), service_template_id(record))
cbses = CustomButtonSet.filter_with_visibility_expression(cbses, record)
cbses.sort_by { |cbs| cbs.set_data[:group_index] }.collect do |cbs|
- Create a ticketCreate a ticket
Method included
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.included(included_class)
included_class.button_group('service_lifecycle', [
included_class.select(
:service_lifecycle_choice,
nil,
- Create a ticketCreate a ticket
Method miq_summary_alert_set_assigned
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def miq_summary_alert_set_assigned(assigned, alert_profile_tag)
rows = []
data = {:title => _('Assigned To'), :mode => "miq_alert_set_assigned"}
if !assigned[:objects].empty?
if assigned[:objects].first.kind_of?(MiqEnterprise)
- Create a ticketCreate a ticket
Method chart_selected
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def chart_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
# Set the perf options in the selected controller's sandbox
- Create a ticketCreate a ticket
Method check_git_task
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def check_git_task
assert_privileges('miq_ae_class_import_export')
task = MiqTask.find(params[:task_id])
json = if task.state != MiqTask::STATE_FINISHED
{:state => task.state}
- Create a ticketCreate a ticket
Method get_node_info
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_node_info(treenodeid, show_list = true)
# resetting action that was stored during edit to determine what is being edited
@sb[:action] = nil
@nodetype, node_id =
- Create a ticketCreate a ticket
Method policies
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def policies
@vm = @record = identify_record(params[:id], VmOrTemplate)
@lastaction = "rsop"
@showtype = "policies"
drop_breadcrumb(:name => _("Policy Simulation Details for %{name}") % {:name => @record.name},
- Create a ticketCreate a ticket
Method create
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create
assert_privileges("miq_ae_class_new")
return unless load_edit("aeclass_edit__new", "replace_cell__explorer")
get_form_vars
- Create a ticketCreate a ticket
Method build_snmp_options
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_snmp_options(subkey, process_variables)
refresh = false
@edit[:new][subkey][:host] = params[:host] if params[:host] # Actions support a single host in this key
@edit[:new][subkey][:host][0] = params[:host_1] if params[:host_1] # Alerts support an array of hosts
@edit[:new][subkey][:host][1] = params[:host_2] if params[:host_2]
- Create a ticketCreate a ticket
Method explorer
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def explorer
@explorer = true
@lastaction = "explorer"
@report_deleted = params[:report_deleted] == 'true' if params[:report_deleted]
@sb[:action] = nil
- Create a ticketCreate a ticket