Katello/katello

View on GitHub
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js

Summary

Maintainability
F
2 wks
Test Coverage

File ContentViewDetailActions.js has 566 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { API_OPERATIONS, APIActions, get, put, post } from 'foremanReact/redux/API';
import { translate as __ } from 'foremanReact/common/I18n';
import { lowerCase } from 'lodash';
import {
  RPM_PACKAGES_CONTENT,
Severity: Major
Found in webpack/scenes/ContentViews/Details/ContentViewDetailActions.js - About 1 day to fix

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

    export const getPackageGroupsComparison = (versionOne, versionTwo, viewBy, params) => {
      const versions = { content_view_version_ids: [versionOne, versionTwo] };
      const restrictComparison = { restrict_comparison: viewBy };
      const apiParams = { ...versions, ...restrictComparison, ...params };
      const apiUrl = '/package_groups/compare';
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

    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 139.

    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 9 locations. Consider refactoring.
    Open

    export const getContainerManifestListsComparison = (versionOne, versionTwo, viewBy, params) => {
      const versions = { content_view_version_ids: [versionOne, versionTwo] };
      const restrictComparison = { restrict_comparison: viewBy };
      const apiParams = { ...versions, ...restrictComparison, ...params };
      const apiUrl = '/docker_manifest_lists/compare';
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

    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 139.

    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 9 locations. Consider refactoring.
    Open

    export const getErrataComparison = (versionOne, versionTwo, viewBy, params) => {
      const versions = { content_view_version_ids: [versionOne, versionTwo] };
      const restrictComparison = { restrict_comparison: viewBy };
      const apiParams = { ...versions, ...restrictComparison, ...params };
      const apiUrl = '/errata/compare';
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

    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 139.

    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 9 locations. Consider refactoring.
    Open

    export const getDebPackagesComparison = (versionOne, versionTwo, viewBy, params) => {
      const versions = { content_view_version_ids: [versionOne, versionTwo] };
      const restrictComparison = { restrict_comparison: viewBy };
      const apiParams = { ...versions, ...restrictComparison, ...params };
      const apiUrl = '/debs/compare';
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

    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 139.

    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 9 locations. Consider refactoring.
    Open

    export const getRPMPackagesComparison = (versionOne, versionTwo, viewBy, params) => {
      const versions = { content_view_version_ids: [versionOne, versionTwo] };
      const restrictComparison = { restrict_comparison: viewBy };
      const apiParams = { ...versions, ...restrictComparison, ...params };
      const apiUrl = '/packages/compare';
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

    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 139.

    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 9 locations. Consider refactoring.
    Open

    export const getRepositoriesComparison = (versionOne, versionTwo, viewBy, params) => {
      const versions = { content_view_version_ids: [versionOne, versionTwo] };
      const restrictComparison = { restrict_comparison: viewBy };
      const apiParams = { ...versions, ...restrictComparison, ...params };
      const apiUrl = '/repositories/compare';
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

    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 139.

    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 9 locations. Consider refactoring.
    Open

    export const getModuleStreamsComparison = (versionOne, versionTwo, viewBy, params) => {
      const versions = { content_view_version_ids: [versionOne, versionTwo] };
      const restrictComparison = { restrict_comparison: viewBy };
      const apiParams = { ...versions, ...restrictComparison, ...params };
      const apiUrl = '/module_streams/compare';
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

    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 139.

    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 9 locations. Consider refactoring.
    Open

    export const getDockerTagsComparison = (versionOne, versionTwo, viewBy, params) => {
      const versions = { content_view_version_ids: [versionOne, versionTwo] };
      const restrictComparison = { restrict_comparison: viewBy };
      const apiParams = { ...versions, ...restrictComparison, ...params };
      const apiUrl = '/docker_tags/compare';
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

    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 139.

    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 9 locations. Consider refactoring.
    Open

    export const getFilesComparison = (versionOne, versionTwo, viewBy, params) => {
      const versions = { content_view_version_ids: [versionOne, versionTwo] };
      const restrictComparison = { restrict_comparison: viewBy };
      const apiParams = { ...versions, ...restrictComparison, ...params };
      const apiUrl = '/files/compare';
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194

    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 139.

    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 2 locations. Consider refactoring.
    Open

    export const republishCVVRepoMetadata = (params, handleSuccess) => put({
      type: API_OPERATIONS.PUT,
      key: cvVersionRepublishRepoMetadataKey(params.cvId, params.id),
      url: api.getApiUrl(`/content_view_versions/${params.id}/republish_repositories`),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 601..611

    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 123.

    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 2 locations. Consider refactoring.
    Open

    export const promoteContentViewVersion = (params, handleSuccess) => post({
      type: API_OPERATIONS.POST,
      key: cvVersionPromoteKey(params.id, params.versionEnvironments),
      url: api.getApiUrl(`/content_view_versions/${params.id}/promote`),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 613..623

    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 123.

    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 3 locations. Consider refactoring.
    Open

    export const addContentViewFilterRules = (filterId, rulesParams, handleSuccess) => put({
      type: API_OPERATIONS.PUT,
      key: ADD_CONTENT_VIEW_FILTER_RULES_KEY,
      url: api.getApiUrl(`/content_view_filters/${filterId}/add_filter_rules`),
      params: { rules_params: rulesParams },
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 394..402
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 404..412

    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 115.

    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 3 locations. Consider refactoring.
    Open

    export const deleteContentViewFilters = (cvId, ids, handleSuccess) => put({
      type: API_OPERATIONS.PUT,
      key: DELETE_CONTENT_VIEW_FILTERS_KEY,
      url: api.getApiUrl(`/content_views/${cvId}/remove_filters`),
      params: { filter_ids: ids },
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 404..412
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 414..422

    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 115.

    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 3 locations. Consider refactoring.
    Open

    export const deleteContentViewFilterRules = (filterId, ids, handleSuccess) => put({
      type: API_OPERATIONS.PUT,
      key: DELETE_CONTENT_VIEW_FILTER_RULES_KEY,
      url: api.getApiUrl(`/content_view_filters/${filterId}/remove_filter_rules`),
      params: { rule_ids: ids },
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 394..402
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 414..422

    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 115.

    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 2 locations. Consider refactoring.
    Open

    export const addCVFilterRule = (filterId, params, handleSuccess) => post({
      type: API_OPERATIONS.POST,
      key: ADD_CONTENT_VIEW_FILTER_RULE,
      url: api.getApiUrl(`/content_view_filters/${filterId}/rules`),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 267..275

    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 109.

    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 2 locations. Consider refactoring.
    Open

    export const createContentViewFilter = (cvId, params, handleSuccess) => post({
      type: API_OPERATIONS.POST,
      key: CREATE_CONTENT_VIEW_FILTER_KEY,
      url: api.getApiUrl(`/content_view_filters?content_view_id=${cvId}`),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 491..499

    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 109.

    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 2 locations. Consider refactoring.
    Open

    export const getCVFilterModuleStreams = (cvId, filterId, params) => get({
      key: cvFilterModuleStreamKey(cvId, filterId),
      params: {
        filter_id: filterId, show_all_for: 'content_view_filter', include_filter_ids: true, ...params,
      },
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 447..454

    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 98.

    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 2 locations. Consider refactoring.
    Open

    export const getCVFilterPackageGroups = (cvId, filterId, params) => get({
      key: cvFilterPackageGroupsKey(cvId, filterId),
      params: {
        filter_id: filterId, show_all_for: 'content_view_filter', include_filter_ids: true, ...params,
      },
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 456..463

    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 98.

    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 2 locations. Consider refactoring.
    Open

    export const getHosts = params => get({
      key: HOSTS_KEY,
      params: { organization_id: orgId(), ...params },
      errorToast: error => __(`Something went wrong while retrieving the hosts! ${getResponseErrorMsgs(error.response)}`),
      url: foremanApi.getApiUrl('/hosts'),
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 380..385

    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 84.

    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 2 locations. Consider refactoring.
    Open

    export const getActivationKeys = params => get({
      key: ACTIVATION_KEY_KEY,
      params: { organization_id: orgId(), ...params },
      errorToast: error => __(`Something went wrong while retrieving the activation keys! ${getResponseErrorMsgs(error.response)}`),
      url: api.getApiUrl('/activation_keys'),
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 387..392

    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 84.

    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

    export const getErrata = params => get({
      type: API_OPERATIONS.GET,
      key: ERRATA_CONTENT,
      url: api.getApiUrl('/errata'),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 84..90
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 223..229
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 277..283
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 285..291
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 301..307
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 309..315
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 317..323

    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 81.

    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

    export const getFiles = params => get({
      type: API_OPERATIONS.GET,
      key: FILE_CONTENT,
      url: api.getApiUrl('/files'),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 84..90
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 277..283
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 285..291
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 293..299
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 301..307
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 309..315
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 317..323

    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 81.

    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

    export const getDockerTags = params => get({
      type: API_OPERATIONS.GET,
      key: DOCKER_TAGS_CONTENT,
      url: api.getApiUrl('/docker_tags'),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 84..90
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 223..229
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 285..291
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 293..299
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 301..307
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 309..315
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 317..323

    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 81.

    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

    export const getDebPackages = params => get({
      type: API_OPERATIONS.GET,
      key: DEB_PACKAGES_CONTENT,
      url: api.getApiUrl('/debs'),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 84..90
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 223..229
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 277..283
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 285..291
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 293..299
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 309..315
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 317..323

    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 81.

    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

    export const getContainerManifestLists = params => get({
      type: API_OPERATIONS.GET,
      key: CONTAINER_MANIFEST_LIST_CONTENT,
      url: api.getApiUrl('/docker_manifest_lists'),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 84..90
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 223..229
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 277..283
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 293..299
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 301..307
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 309..315
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 317..323

    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 81.

    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

    export const getRPMPackages = params => get({
      type: API_OPERATIONS.GET,
      key: RPM_PACKAGES_CONTENT,
      url: api.getApiUrl('/packages'),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 223..229
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 277..283
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 285..291
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 293..299
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 301..307
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 309..315
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 317..323

    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 81.

    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

    export const getRepositories = params => get({
      type: API_OPERATIONS.GET,
      key: REPOSITORY_CONTENT,
      url: api.getApiUrl('/repositories'),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 84..90
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 223..229
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 277..283
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 285..291
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 293..299
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 301..307
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 309..315

    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 81.

    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

    export const getModuleStreams = params => get({
      type: API_OPERATIONS.GET,
      key: MODULE_STREAMS_CONTENT,
      url: api.getApiUrl('/module_streams'),
      params,
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 84..90
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 223..229
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 277..283
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 285..291
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 293..299
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 301..307
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 317..323

    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 81.

    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 3 locations. Consider refactoring.
    Open

      return get({
        key: cvDetailsVersionKey(cvId),
        params: apiParams,
        errorToast: error => __(`Something went wrong while retrieving the content view versions! ${getResponseErrorMsgs(error.response)}`),
        url: api.getApiUrl(apiUrl),
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 514..519
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 532..537

    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 65.

    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 3 locations. Consider refactoring.
    Open

      return get({
        key: cvDetailsComponentKey(cvId),
        params: apiParams,
        errorToast: error => __(`Something went wrong while retrieving the content view components! ${getResponseErrorMsgs(error.response)}`),
        url: api.getApiUrl(apiUrl),
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 514..519
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 543..548

    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 65.

    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 3 locations. Consider refactoring.
    Open

      return get({
        key: cvDetailsHistoryKey(cvId),
        params: apiParams,
        errorToast: error => __(`Something went wrong while retrieving the content view history! ${getResponseErrorMsgs(error.response)}`),
        url: api.getApiUrl(apiUrl),
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 532..537
    webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 543..548

    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 65.

    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

    There are no issues that match your filters.

    Category
    Status