Katello/katello

View on GitHub

Showing 2,737 of 2,737 total issues

Function getEnabledComponent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const getEnabledComponent = (enabledReposState, onPaginationChange) => {
  const {
    repositories,
    searchIsActive,
    pagination,
Severity: Minor
Found in webpack/scenes/RedHatRepositories/helpers.js - About 1 hr to fix

    Function buildRows has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const buildRows = useCallback(() => {
        const newRows = [];
        results.forEach((filter) => {
          let errataByDate = false;
          const {
    Severity: Minor
    Found in webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js - About 1 hr to fix

      Function DebsController has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function DebsController($scope, $location, translate, Nutupane, Deb, CurrentOrganization) {
              var nutupane;
      
              var params = {
                  'organization_id': CurrentOrganization,

        Method pulp_disk_usage has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              def pulp_disk_usage
                if pulp3_enabled?
                  storage = ping_pulp3['storage']
                  if storage.nil?
                    [
        Severity: Minor
        Found in app/models/katello/concerns/smart_proxy_extensions.rb - About 1 hr to fix

          Function ApiErrorHandler has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function ApiErrorHandler(translate, Notification) {
                  function handleError(response, $scope, defaultErrorMessage) {
                      if (response.hasOwnProperty('data') && response.data.hasOwnProperty('errors')) {
                          angular.forEach(response.data.errors, function (error) {
                              Notification.setErrorMessage(error);

            Function FeatureFlag has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function FeatureFlag(Features) {
                    var featureFlags = {};
            
                    angular.forEach(Features, function (enabled, feature) {
                        featureFlags[feature] = {states: [], enabled: enabled};

              Function addHostCollections has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      $scope.addHostCollections = function (host) {
                          var deferred = $q.defer(),
                              success,
                              error,
                              data,

                Function syncStatusText has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        $scope.syncStatusText = function (currentSyncState, syncStatus) {
                            var message, syncableEnvs, envNames;
                
                            if (angular.isUndefined(syncStatus)) {
                                return "";

                  Method content_unit_pulp_ids has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def content_unit_pulp_ids(repo, additional_included_errata = [])
                        return [] if erratum_rules.blank?
                  
                        if filter_by_id?
                          errata_ids = erratum_rules.map(&:errata_id)
                  Severity: Minor
                  Found in app/models/katello/content_view_erratum_filter.rb - About 1 hr to fix

                    Method resource_name has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          def resource_name(_i18n = true)
                            case resource_class.to_s
                            when "Katello::Erratum"
                              _("Erratum")
                            when "Katello::Deb"

                      Method ssl_remote_options has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            def ssl_remote_options
                              options = {}
                              if root.redhat? && root.cdn_configuration.redhat_cdn?
                                options = {
                                  client_cert: root.product.certificate,
                      Severity: Minor
                      Found in app/services/katello/pulp3/repository.rb - About 1 hr to fix

                        Method index_relation_content_unit has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def index_relation_content_unit(query)
                              if params[:deb_id]
                                query = query.joins(:debs)
                                  .where("#{Deb.table_name}.id" => Deb.with_identifiers(params[:deb_id]))
                              end
                        Severity: Minor
                        Found in app/controllers/katello/api/v2/repositories_controller.rb - About 1 hr to fix

                          Method save_pulp_push_repository_href has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def save_pulp_push_repository_href
                                instance_repo = root_repository&.library_instance
                          
                                unless root_repository.present? && instance_repo.present?
                                  return render_podman_error(
                          Severity: Minor
                          Found in app/controllers/katello/api/registry/registry_proxies_controller.rb - About 1 hr to fix

                            Method deliver! has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                      def deliver!
                                        ::Organization.unscoped.all.each do |organization|
                                          if (notification = existing_notification(organization))
                                            days_remaining = organization.manifest_expire_days_remaining
                                            if days_remaining == 0 || days_remaining > Setting[:expire_soon_days].to_i

                              Method show_all has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def show_all
                                    kc = Katello::ContentView.table_name
                                    kcc = Katello::ContentViewComponent.table_name
                                    join_query = <<-SQL
                                       LEFT OUTER JOIN #{kcc}

                                Method plan has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        def plan(version, environment, description, incremental_update = false)
                                          history = ::Katello::ContentViewHistory.create!(:content_view_version => version, :user => ::User.current.login,
                                                                                          :environment => environment, :task => self.task,
                                                                                          :status => ::Katello::ContentViewHistory::IN_PROGRESS,
                                                                                          :action => 'promotion',
                                Severity: Minor
                                Found in app/lib/actions/katello/content_view/promote_to_environment.rb - About 1 hr to fix

                                  Method docker_search has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          def docker_search
                                            request_params = {
                                              method: :get,
                                              headers: { accept: :json },
                                              url: "#{@uri}v1/search?q=#{@search}"
                                  Severity: Minor
                                  Found in app/lib/katello/resources/discovery/container.rb - About 1 hr to fix

                                    Method run has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            def run
                                              content = { ::Katello::Erratum::CONTENT_TYPE => [],
                                                          ::Katello::Rpm::CONTENT_TYPE => [],
                                                          ::Katello::ModuleStream::CONTENT_TYPE => [],
                                                          ::Katello::Deb::CONTENT_TYPE => []
                                    Severity: Minor
                                    Found in app/lib/actions/katello/content_view_version/incremental_update.rb - About 1 hr to fix

                                      Method resolve_traces has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          def self.resolve_traces(traces)
                                            traces.each do |trace|
                                              if trace.reboot_required?
                                                trace.helper = 'reboot'
                                              end
                                      Severity: Minor
                                      Found in app/services/katello/host_trace_manager.rb - About 1 hr to fix

                                        Method alternate_content_source_permissions has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            def alternate_content_source_permissions
                                              @plugin.permission :view_alternate_content_sources,
                                                                 {
                                                                   'katello/api/v2/alternate_content_sources' => [:index, :show, :auto_complete_search]
                                                                 },
                                        Severity: Minor
                                        Found in lib/katello/permission_creator.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language