RackHD/on-web-ui

View on GitHub

Showing 162 of 162 total issues

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

  getNodeSku(node): Observable<string> {
    let hasSkuId = !!node.sku;
    let isComputeWithoutSku = (node.sku === null) && node.type === "compute";
    if (hasSkuId) {
      return this.skuService.getByIdentifier(node.sku.split("/").pop())
Severity: Major
Found in src/app/solution-center/os-install/os-install.component.ts and 1 other location - About 7 hrs to fix
src/app/workflow-center/run-workflow/run-workflow.component.ts on lines 119..131

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

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

  getNodeSku(node): Observable<string> {
    let hasSkuId = !!node.sku;
    let isComputeWithoutSku = (node.sku === null) && node.type === "compute";
    if (hasSkuId) {
      return this.skuService.getByIdentifier(node.sku.split("/").pop())
src/app/solution-center/os-install/os-install.component.ts on lines 238..250

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

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

    public getWaitedBysMatrix(tasks: any[]): any {
      let waitedBys = {};
      _.forEach(tasks, task => {
        _.forEach(task[this.waitOnKey], (states, key) => {
          let state: string;
Severity: Major
Found in src/app/canvas-graph/canvas-helper.ts and 1 other location - About 7 hrs to fix
src/app/canvas-graph/canvas-helper.ts on lines 282..297

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

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

    public getWaitedBysMatrix(tasks: any[]): any {
      let waitedBys = {};
      _.forEach(tasks, task => {
        _.forEach(task[this.waitOnKey], (states, key) => {
          let state: string;
Severity: Major
Found in src/app/canvas-graph/canvas-helper.ts and 1 other location - About 7 hrs to fix
src/app/canvas-graph/canvas-helper.ts on lines 39..54

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

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

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

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

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

Refactorings

Further Reading

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

    let list = _.map(nodes, node => {
      return forkJoin(
        this.getNodeSku(node).pipe(catchError( () => of(null))),
        this.getNodeObm(node).pipe(catchError( () => of(null))),
        this.getNodeTag(node).pipe(catchError( () => of(null)))
src/app/solution-center/os-install/os-install.component.ts on lines 216..228

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

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

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

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

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

Refactorings

Further Reading

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

    let list = _.map(nodes, node => {
      return forkJoin(
        this.getNodeSku(node).pipe(catchError( () => of(null))),
        this.getNodeObm(node).pipe(catchError( () => of(null))),
        this.getNodeTag(node).pipe(catchError( () => of(null)))
Severity: Major
Found in src/app/solution-center/os-install/os-install.component.ts and 1 other location - About 7 hrs to fix
src/app/workflow-center/run-workflow/run-workflow.component.ts on lines 158..170

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

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

File os-install.component.ts has 416 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Component, OnInit } from '@angular/core';
import { Poller, Node, API_PATTERN, ADDR_PATTERN, REPO_PATTERN, IP_PATTERN, DNS_PATTERN } from 'app/models';
import { FormControl, FormGroup, FormBuilder, Validators } from '@angular/forms';
import {
  AlphabeticalComparator,
Severity: Minor
Found in src/app/solution-center/os-install/os-install.component.ts - About 6 hrs to fix

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

    describe('RunWorkflowComponent', () => {
      let component: RunWorkflowComponent;
      let fixture: ComponentFixture<RunWorkflowComponent>;
    
      beforeEach(async(() => {
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('WorkflowCenterComponent', () => {
      let component: WorkflowCenterComponent;
      let fixture: ComponentFixture<WorkflowCenterComponent>;
    
      beforeEach(async(() => {
    Severity: Major
    Found in src/app/workflow-center/workflow-center.component.spec.ts and 19 other locations - About 4 hrs to fix
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('PollersComponent', () => {
      let component: PollersComponent;
      let fixture: ComponentFixture<PollersComponent>;
    
      beforeEach(async(() => {
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('ActiveWorkflowComponent', () => {
      let component: ActiveWorkflowComponent;
      let fixture: ComponentFixture<ActiveWorkflowComponent>;
    
      beforeEach(async(() => {
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('WorkflowEditorComponent', () => {
      let component: WorkflowEditorComponent;
      let fixture: ComponentFixture<WorkflowEditorComponent>;
    
      beforeEach(async(() => {
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('ObmComponent', () => {
      let component: ObmComponent;
      let fixture: ComponentFixture<ObmComponent>;
    
      beforeEach(async(() => {
    Severity: Major
    Found in src/app/management-center/obms/obm.component.spec.ts and 19 other locations - About 4 hrs to fix
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('ConfigComponent', () => {
      let component: ConfigComponent;
      let fixture: ComponentFixture<ConfigComponent>;
    
      beforeEach(async(() => {
    Severity: Major
    Found in src/app/management-center/configs/config.component.spec.ts and 19 other locations - About 4 hrs to fix
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('SolutionCenterComponent', () => {
      let component: SolutionCenterComponent;
      let fixture: ComponentFixture<SolutionCenterComponent>;
    
      beforeEach(async(() => {
    Severity: Major
    Found in src/app/solution-center/solution-center.component.spec.ts and 19 other locations - About 4 hrs to fix
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('WorkflowsComponent', () => {
      let component: WorkflowsComponent;
      let fixture: ComponentFixture<WorkflowsComponent>;
    
      beforeEach(async(() => {
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('CatalogsComponent', () => {
      let component: AppComponent;
      let fixture: ComponentFixture<AppComponent>;
    
      beforeEach(async(() => {
    Severity: Major
    Found in src/app/app.component.spec.ts and 19 other locations - About 4 hrs to fix
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('CatalogsComponent', () => {
      let component: CatalogsComponent;
      let fixture: ComponentFixture<CatalogsComponent>;
    
      beforeEach(async(() => {
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('ManagementCenterComponent', () => {
      let component: ManagementCenterComponent;
      let fixture: ComponentFixture<ManagementCenterComponent>;
    
      beforeEach(async(() => {
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-viewer/workflow-viewer.component.spec.ts on lines 5..22

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

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

    describe('WorkflowViewerComponent', () => {
      let component: WorkflowViewerComponent;
      let fixture: ComponentFixture<WorkflowViewerComponent>;
    
      beforeEach(async(() => {
    src/app/app.component.spec.ts on lines 5..21
    src/app/canvas-graph/canvas-graph.component.spec.ts on lines 5..21
    src/app/management-center/catalogs/catalogs.component.spec.ts on lines 5..22
    src/app/management-center/configs/config.component.spec.ts on lines 5..22
    src/app/management-center/files/files.component.spec.ts on lines 5..23
    src/app/management-center/management-center.component.spec.ts on lines 5..22
    src/app/management-center/nodes/nodes.component.spec.ts on lines 5..22
    src/app/management-center/obms/obm.component.spec.ts on lines 5..22
    src/app/management-center/pollers/pollers.component.spec.ts on lines 5..22
    src/app/management-center/profiles/profiles.component.spec.ts on lines 5..22
    src/app/management-center/skus/sku.component.spec.ts on lines 5..22
    src/app/management-center/templates/templates.component.spec.ts on lines 5..21
    src/app/management-center/workflows/workflows.component.spec.ts on lines 5..21
    src/app/solution-center/solution-center.component.spec.ts on lines 5..21
    src/app/workflow-center/active-workflow/active-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/history-workflow/history-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/run-workflow/run-workflow.component.spec.ts on lines 5..21
    src/app/workflow-center/workflow-center.component.spec.ts on lines 5..22
    src/app/workflow-center/workflow-editor/workflow-editor.component.spec.ts on lines 5..21

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

    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