Katello/katello

View on GitHub

Showing 2,737 of 2,737 total issues

Method find_version_environments has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def find_version_environments
      #Generates a data structure for incremental update:
      # [{:content_view_version => ContentViewVersion, :environments => [KTEnvironment]}]

      list = params[:content_view_version_environments]
Severity: Minor
Found in app/controllers/katello/api/v2/content_view_versions_controller.rb - About 1 hr to fix

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

            def plan(repository, files, content_type = nil, options = {})
              action_subject(repository)
              repository.check_ready_to_act!
              repository.clear_smart_proxy_sync_histories
              tmp_files = prepare_tmp_files(files)
    Severity: Minor
    Found in app/lib/actions/katello/repository/upload_files.rb - About 1 hr to fix

      Method copy_content_chunked has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              def copy_content_chunked(data)
                tasks = []
                # Don't chunk if there aren't enough content units
                if data.config.sum { |repo_config| repo_config[:content].size } <= UNIT_LIMIT
                  return api.copy_api.copy_content(data)
      Severity: Minor
      Found in app/services/katello/pulp3/repository/yum.rb - About 1 hr to fix

        Method initialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              def initialize(settings:)
                ssl_params = Stomp::SSLParams.new(
                  key_file: settings[:ssl_key_file],
                  cert_file: settings[:ssl_cert_file],
                  ts_files: settings[:ssl_ca_file],
        Severity: Minor
        Found in app/lib/katello/messaging/stomp_connection.rb - About 1 hr to fix

          Method content_credential_permissions has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def content_credential_permissions
                @plugin.permission :view_content_credentials,
                                   {
                                     'katello/api/v2/content_credentials' => [:index, :show, :content, :auto_complete_search],
                                     'katello/api/v2/gpg_keys' => [:index, :show, :content, :auto_complete_search]
          Severity: Minor
          Found in lib/katello/permission_creator.rb - About 1 hr to fix

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

                      def plan(organization, opts = {})
                        options = {
                          destination_server: nil,
                          chunk_size: nil,
                          from_history: nil,

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                await patientlyWaitFor(() => {
                  expect(queryByText(firstResultName)).toBeInTheDocument();
                  expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'false');
                });
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 240..243
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 128..131
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 187..190
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 119..122
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 177..180
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 120..123
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 176..179

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                await patientlyWaitFor(() => {
                  expect(getByText(name)).toBeInTheDocument();
                  expect(getAllByLabelText('Actions')[2]).toHaveAttribute('aria-expanded', 'false');
                });
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 108..111
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 240..243
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 187..190
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 119..122
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 177..180
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 120..123
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 176..179

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                await patientlyWaitFor(() => {
                  expect(getByText(name)).toBeInTheDocument();
                  expect(getAllByLabelText('Actions')[3]).toHaveAttribute('aria-expanded', 'false');
                });
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 108..111
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 240..243
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 128..131
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 187..190
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 119..122
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 177..180
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 176..179

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                await patientlyWaitFor(() => {
                  expect(getByText(name)).toBeInTheDocument();
                  expect(getAllByLabelText('Actions')[2]).toHaveAttribute('aria-expanded', 'false');
                });
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 108..111
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 240..243
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 128..131
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 187..190
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 119..122
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 177..180
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 120..123

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                await patientlyWaitFor(() => {
                  expect(getByText(name)).toBeInTheDocument();
                  expect(getAllByLabelText('Actions')[3]).toHaveAttribute('aria-expanded', 'false');
                });
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 108..111
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 240..243
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 128..131
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 119..122
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 177..180
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 120..123
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 176..179

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                await patientlyWaitFor(() => {
                  expect(queryByText(firstResultName)).toBeInTheDocument();
                  expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'false');
                });
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 108..111
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 128..131
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 187..190
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 119..122
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 177..180
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 120..123
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 176..179

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                await patientlyWaitFor(() => {
                  expect(getByText(errataId)).toBeInTheDocument();
                  expect(getAllByLabelText('Actions')[3]).toHaveAttribute('aria-expanded', 'false');
                });
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 108..111
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 240..243
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 128..131
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 187..190
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 177..180
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 120..123
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 176..179

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 5 locations. Consider refactoring.
              Open

                  $stateProvider.state('products', {
                      url: '/products',
                      permission: 'view_products',
                      views: {
                          '@': {
              engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js on lines 12..24
              engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js on lines 11..23
              engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.routes.js on lines 11..23
              engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.routes.js on lines 25..37

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 5 locations. Consider refactoring.
              Open

                  $stateProvider.state('content-hosts', {
                      url: '/content_hosts',
                      permission: 'view_hosts',
                      views: {
                          '@': {
              engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js on lines 11..23
              engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.routes.js on lines 11..23
              engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.routes.js on lines 11..23
              engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.routes.js on lines 25..37

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                await patientlyWaitFor(() => {
                  expect(getByText(errataId)).toBeInTheDocument();
                  expect(getAllByLabelText('Actions')[2]).toHaveAttribute('aria-expanded', 'false');
                });
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 108..111
              webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 240..243
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 128..131
              webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 187..190
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js on lines 119..122
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 120..123
              webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 176..179

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 5 locations. Consider refactoring.
              Open

                  $stateProvider.state('sync-plans', {
                      url: '/sync_plans',
                      permission: 'view_sync_plans',
                      views: {
                          '@': {
              engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js on lines 12..24
              engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js on lines 11..23
              engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.routes.js on lines 11..23
              engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.routes.js on lines 25..37

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 5 locations. Consider refactoring.
              Open

                  $stateProvider.state('environments', {
                      url: '/lifecycle_environments',
                      permission: 'view_lifecycle_environments',
                      views: {
                          '@': {
              engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js on lines 12..24
              engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.routes.js on lines 11..23
              engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.routes.js on lines 11..23
              engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.routes.js on lines 25..37

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                      success = function () {
                          $scope.table.working = false;
                          Notification.setSuccessMessage(translate('Repository Sets settings saved successfully.'));
                          $scope.nutupane.refresh();
                      };
              engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js on lines 45..49

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 5 locations. Consider refactoring.
              Open

                  $stateProvider.state('sync-plans.new', {
                      url: '/sync_plans/new',
                      permission: 'create_sync_plans',
                      views: {
                          '@': {
              engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js on lines 12..24
              engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js on lines 11..23
              engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.routes.js on lines 11..23
              engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.routes.js on lines 11..23

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 56.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language