ManageIQ/manageiq-ui-classic

View on GitHub

Showing 18,390 of 18,390 total issues

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

  dailyImageUsageConfig: {
    chartId: 'imageUsageDailyChart',
    headTitle: __('New Image Usage Trend'),
    timeFrame: __('Last 30 days'),
    createdLabel: __('Images'),
app/javascript/components/provider-dashboard-charts/charts_config.js on lines 156..167

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

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

            {
                "id": 7,
                "domain": null,
                "subdomain": null,
                "name": "Loic Tenant",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 154..175
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 176..197
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 198..219
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 220..241
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 264..285
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 286..307
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 308..329
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 330..351
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 352..373
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 374..395
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 440..461

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

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

            {
                "id": 20,
                "domain": null,
                "subdomain": null,
                "name": "test-ivr",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 154..175
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 176..197
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 198..219
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 220..241
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 242..263
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 264..285
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 286..307
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 308..329
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 330..351
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 352..373
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 440..461

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

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

            {
                "id": 6,
                "domain": null,
                "subdomain": null,
                "name": "cloudwest",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 154..175
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 176..197
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 198..219
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 242..263
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 264..285
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 286..307
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 308..329
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 330..351
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 352..373
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 374..395
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 440..461

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

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

            {
                "id": 9,
                "domain": null,
                "subdomain": null,
                "name": "testtel",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 154..175
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 176..197
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 198..219
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 220..241
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 242..263
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 264..285
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 308..329
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 330..351
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 352..373
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 374..395
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 440..461

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

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

            {
                "id": 13,
                "domain": null,
                "subdomain": null,
                "name": "Massachusetts",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 154..175
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 176..197
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 198..219
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 220..241
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 242..263
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 264..285
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 286..307
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 308..329
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 352..373
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 374..395
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 440..461

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

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

            {
                "id": 3,
                "domain": null,
                "subdomain": null,
                "name": "admin",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 176..197
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 198..219
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 220..241
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 242..263
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 264..285
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 286..307
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 308..329
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 330..351
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 352..373
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 374..395
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 440..461

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

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

            {
                "id": 2,
                "domain": null,
                "subdomain": null,
                "name": "OpenStack Cloud Provider OpenStack",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 154..175
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 176..197
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 198..219
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 220..241
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 242..263
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 264..285
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 286..307
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 308..329
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 330..351
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 352..373
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 374..395

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

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

            {
                "id": 15,
                "domain": null,
                "subdomain": null,
                "name": "Moneta_demo",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 2 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 396..417
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 462..483

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

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

            {
                "id": 4,
                "domain": null,
                "subdomain": null,
                "name": "cloud-southeast",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 154..175
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 198..219
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 220..241
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 242..263
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 264..285
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 286..307
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 308..329
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 330..351
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 352..373
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 374..395
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 440..461

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

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

            {
                "id": 19,
                "domain": null,
                "subdomain": null,
                "name": "test-ivy",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 154..175
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 176..197
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 198..219
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 220..241
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 242..263
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 264..285
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 286..307
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 330..351
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 352..373
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 374..395
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 440..461

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

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

            {
                "id": 8,
                "domain": null,
                "subdomain": null,
                "name": "openshift_demo",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 154..175
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 176..197
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 198..219
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 220..241
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 242..263
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 286..307
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 308..329
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 330..351
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 352..373
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 374..395
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 440..461

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

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

            {
                "id": 18,
                "domain": null,
                "subdomain": null,
                "name": "loic",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 2 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 418..439
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 462..483

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

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

            {
                "id": 5,
                "domain": null,
                "subdomain": null,
                "name": "cloud-user-demo",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 154..175
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 176..197
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 220..241
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 242..263
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 264..285
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 286..307
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 308..329
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 330..351
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 352..373
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 374..395
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 440..461

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

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

            {
                "id": 17,
                "domain": null,
                "subdomain": null,
                "name": "testetot",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 11 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 154..175
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 176..197
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 198..219
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 220..241
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 242..263
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 264..285
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 286..307
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 308..329
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 330..351
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 374..395
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 440..461

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

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

            {
                "id": 16,
                "domain": null,
                "subdomain": null,
                "name": "new",
Severity: Major
Found in app/javascript/spec/ansible-edit-catalog-form/mockdata.js and 2 other locations - About 3 hrs to fix
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 396..417
app/javascript/spec/ansible-edit-catalog-form/mockdata.js on lines 418..439

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

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

Class ConfigurationController has 28 methods (exceeds 20 allowed). Consider refactoring.
Open

class ConfigurationController < ApplicationController
  include Mixins::StartUrl
  include Mixins::GenericSessionMixin
  include Mixins::BreadcrumbsMixin

Severity: Minor
Found in app/controllers/configuration_controller.rb - About 3 hrs to fix

Class TreeBuilder has 28 methods (exceeds 20 allowed). Consider refactoring.
Open

class TreeBuilder
  include TreeKids

  attr_reader :name, :options, :tree_nodes, :bs_tree

Severity: Minor
Found in app/presenters/tree_builder.rb - About 3 hrs to fix

Method set_form_locals has 83 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def set_form_locals
    locals = {}
    if x_active_tree == :diagnostics_tree
      if @sb[:active_tab] == "diagnostics_cu_repair"
        action_url = "cu_repair"
Severity: Major
Found in app/controllers/ops_controller.rb - About 3 hrs to fix

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

    {
      value: 'Glance',
      sub_items: [{
        title: 'Show list of running Glance',
        value: 'Running (2)',
Severity: Major
Found in app/javascript/spec/textual_summary/data/multilink_table.js and 7 other locations - About 3 hrs to fix
app/javascript/spec/textual_summary/data/multilink_table.js on lines 4..21
app/javascript/spec/textual_summary/data/multilink_table.js on lines 22..39
app/javascript/spec/textual_summary/data/multilink_table.js on lines 40..57
app/javascript/spec/textual_summary/data/multilink_table.js on lines 76..93
app/javascript/spec/textual_summary/data/multilink_table.js on lines 94..111
app/javascript/spec/textual_summary/data/multilink_table.js on lines 127..144
app/javascript/spec/textual_summary/data/multilink_table.js on lines 145..162

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

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