Showing 2,015 of 18,390 total issues
Consider simplifying this complex logical expression. Open
Open
if (typeof $scope.pglogicalReplicationModel.dbname !== 'undefined' && $scope.pglogicalReplicationModel.dbname !== '' &&
typeof $scope.pglogicalReplicationModel.host !== 'undefined' && $scope.pglogicalReplicationModel.host !== '' &&
typeof $scope.pglogicalReplicationModel.user !== 'undefined' && $scope.pglogicalReplicationModel.user !== '' &&
typeof $scope.pglogicalReplicationModel.password !== 'undefined' && $scope.pglogicalReplicationModel.password !== ''
) {
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
Open
if @tagitems || @politems || @ownershipitems || @retireitems
breadcrumbs.push(special_page_breadcrumb(@tagitems || @politems || @ownershipitems || @retireitems, true, options[:x_node]))
breadcrumbs.push(:title => right_cell_text)
else
# Ancestry parents breadcrumbs (only in services)
- Create a ticketCreate a ticket
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
options, selectedTagCategory, onTagCategoryChange, assignedTags,
} = this.props;
const isDisabled = options && options.isDisabled;
- Create a ticketCreate a ticket
Function link
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(scope, _elem, attr, ctrl) {
var model = function() {
return scope.$eval(ctrl.model || scope.model);
};
- Create a ticketCreate a ticket
Function submitButtonClicked
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function submitButtonClicked() {
vm.dialogData.action = apiAction;
miqService.sparkleOn();
var apiData = DialogData.outputConversion(vm.dialogData);
- Create a ticketCreate a ticket
Function link
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(scope, elem, attr, ctrl) {
ctrl.$formatters.push(function(value) {
if (value) {
return moment(value).utc().format('MM/DD/YYYY');
}
- Create a ticketCreate a ticket
Function disconnectDrives
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const disconnectDrives = (row, data, setData) => {
const { id } = row;
const index = id.substring(5);
const datatableData = data.dataTable.drives;
const submitDrives = data.submitParams.drives.disconnect || [];
- Create a ticketCreate a ticket
Function getAggStatusInfo
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getAggStatusInfo = (data, providerId) => {
const attributes = ['nodes', 'containers', 'registries', 'projects', 'pods', 'services', 'images', 'routes'];
const attrHsh = {
nodes: __('Nodes'),
containers: __('Containers'),
- Create a ticketCreate a ticket
Method process_elements
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_elements(elements, klass, task, display_name = nil, order_field = nil)
order_field ||= %w[name description title].find { |field| klass.column_names.include?(field) }
order_by = order_field == "ems_id" ? order_field : klass.arel_table[order_field].lower
- Create a ticketCreate a ticket
Method _toolbar_builder
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def _toolbar_builder
ToolbarBuilder.new(
self,
binding,
:active => @active,
- Create a ticketCreate a ticket
Method exp_add_joiner
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exp_add_joiner(exp, token, joiner)
if exp[:token] && exp[:token] == token # If the token matches
exp.keys.each do |key| # Find the key
if key == :token
exp.delete(key) # Remove the :token key
- Create a ticketCreate a ticket
Method exp_build_string
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exp_build_string(exp)
main_font = calculate_font_color(exp['result'])
if exp['and']
exp_string = join_binary(exp, 'and', main_font)
- Create a ticketCreate a ticket
Method button_set_record_vars
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def button_set_record_vars(button)
button.name = @edit[:new][:name]
button.description = @edit[:new][:description]
button.applies_to_class = x_active_tree == :ab_tree ? @resolve[:target_class] : "ServiceTemplate"
button.applies_to_id = x_active_tree == :ab_tree ? nil : @sb[:applies_to_id]
- Create a ticketCreate a ticket
Method adv_search_clear
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def adv_search_clear
respond_to do |format|
format.js do
@explorer = true
if x_active_tree.to_s =~ /_filter_tree$/ &&
- Create a ticketCreate a ticket
Method fetch_saved_report
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def fetch_saved_report(id)
rr = MiqReportResult.for_user(current_user).find_by(:id => id)
if rr.nil? # Saved report no longer exists
@report = nil
add_flash(_("Error: Report no longer exists in the database"), :error)
- Create a ticketCreate a ticket
Method timeprofile_set_days_hours
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def timeprofile_set_days_hours(_timeprofile = @timeprofile)
@timeprofile_details = {}
@timeprofiles.each do |timeprofile|
@timeprofile_details[timeprofile.description] = {}
profile_key = timeprofile.profile[:days].nil? ? "days" : :days
- Create a ticketCreate a ticket
Method forest_accept
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def forest_accept
assert_privileges("ops_settings")
forest_get_form_vars
no_changes = true
- Create a ticketCreate a ticket
Method ap_get_form_vars
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ap_get_form_vars
@scan = @edit[:scan_id] ? ScanItemSet.find(@edit[:scan_id]) : ScanItemSet.new
@edit[:new][:name] = params[:name] if params[:name]
@edit[:new][:description] = params[:description] if params[:description]
- Create a ticketCreate a ticket
Method action_handle_selection_buttons
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def action_handle_selection_buttons(members,
members_chosen = :members_chosen,
choices = :choices,
choices_chosen = :choices_chosen)
if params[:button].ends_with?("_left")
- Create a ticketCreate a ticket
Method miq_alert_set_assign
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def miq_alert_set_assign
assert_privileges("miq_alert_set_assign")
@assign = @sb[:assign]
@alert_profile = @assign[:alert_profile] if @assign
case params[:button]
- Create a ticketCreate a ticket