RackHD/on-web-ui

View on GitHub

Showing 136 of 162 total issues

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

describe('NodesComponent', () => {
  let component: NodesComponent;
  let fixture: ComponentFixture<NodesComponent>;

  beforeEach(async(() => {
Severity: Major
Found in src/app/management-center/nodes/nodes.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/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('CanvasGraphComponent', () => {
  let component: CanvasGraphComponent;
  let fixture: ComponentFixture<CanvasGraphComponent>;

  beforeEach(async(() => {
Severity: Major
Found in src/app/canvas-graph/canvas-graph.component.spec.ts and 19 other locations - About 4 hrs to fix
src/app/app.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('HistoryWorkflowComponent', () => {
  let component: HistoryWorkflowComponent;
  let fixture: ComponentFixture<HistoryWorkflowComponent>;

  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/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('FilesComponent', () => {
  let component: FilesComponent;
  let fixture: ComponentFixture<FilesComponent>;

  beforeEach(async(() => {
Severity: Major
Found in src/app/management-center/files/files.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/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('ProfilesComponent', () => {
  let component: ProfilesComponent;
  let fixture: ComponentFixture<ProfilesComponent>;

  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/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('SkuComponent', () => {
  let component: SkuComponent;
  let fixture: ComponentFixture<SkuComponent>;

  beforeEach(async(() => {
Severity: Major
Found in src/app/management-center/skus/sku.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/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 3 locations. Consider refactoring.
Open

  onCreateSubmit(){
    //existingFilename is used to store filename when updating file
    let existingFilename = this.selectedFile && this.selectedFile.filename;
    let file = this.files[0];
    //TODO: Add more details on progress
Severity: Major
Found in src/app/management-center/files/files.component.ts and 2 other locations - About 4 hrs to fix
src/app/management-center/profiles/profiles.component.ts on lines 120..133
src/app/management-center/templates/templates.component.ts on lines 119..132

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

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

  onCreateSubmit(){
    //existingFilename is used to store filename when updating file
    let existingFilename = this.selectedTemplate && this.selectedTemplate.name;
    let file = this.files[0];
    //TODO: Add more details on progress
Severity: Major
Found in src/app/management-center/templates/templates.component.ts and 2 other locations - About 4 hrs to fix
src/app/management-center/files/files.component.ts on lines 176..189
src/app/management-center/profiles/profiles.component.ts on lines 120..133

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

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

  onCreateSubmit(){
    //existingFilename is used to store filename when updating file
    let existingFilename = this.selectedProfile && this.selectedProfile.name;
    let file = this.files[0];
    //TODO: Add more details on progress
Severity: Major
Found in src/app/management-center/profiles/profiles.component.ts and 2 other locations - About 4 hrs to fix
src/app/management-center/files/files.component.ts on lines 176..189
src/app/management-center/templates/templates.component.ts on lines 119..132

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

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

  getNodeObm(node): Observable<string> {
    if (!_.isEmpty(node.obms)) {
      let obmId = node.obms[0].ref.split("/").pop();
      return this.obmService.getByIdentifier(obmId)
        .pipe( map(data => data.config.host) );
Severity: Major
Found in src/app/solution-center/os-install/os-install.component.ts and 1 other location - About 4 hrs to fix
src/app/workflow-center/run-workflow/run-workflow.component.ts on lines 133..141

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

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

  getNodeObm(node): Observable<string> {
    if (!_.isEmpty(node.obms)) {
      let obmId = node.obms[0].ref.split("/").pop();
      return this.obmService.getByIdentifier(obmId)
      .pipe(map(data => data.config.host));
src/app/solution-center/os-install/os-install.component.ts on lines 252..260

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

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

  goToShowObmDetail(node: Node) {
    this.selectedNode = node;
    this.selectedObms = [];
    if (node.obms.length > 0) {
      for (let entry of node.obms) {
Severity: Major
Found in src/app/management-center/nodes/nodes.component.ts and 1 other location - About 4 hrs to fix
src/app/management-center/nodes/nodes.component.ts on lines 242..252

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

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

  goToShowIbmDetail(node: Node) {
    this.selectedNode = node;
    this.selectedObms = [];
    if (node.ibms.length > 0) {
      for (let entry of node.ibms) {
Severity: Major
Found in src/app/management-center/nodes/nodes.component.ts and 1 other location - About 4 hrs to fix
src/app/management-center/nodes/nodes.component.ts on lines 229..240

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

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

  @ErrorHanlder()
  public putByIdentifier(identifier:string, body: object, param?: any, responseType?: string): Observable<any> {
    let options = RackhdHttpService.createOptions(responseType);
    let url = RackHD.getBaseUrl() +
      this.urlConfig.getByIdentifierUrl + identifier +
Severity: Major
Found in src/app/utils/rackhd-http.ts and 1 other location - About 4 hrs to fix
src/app/utils/rackhd-http.ts on lines 111..118

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

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

  @ErrorHanlder()
  public postByIdentifier(identifier:string, body: object, param?: any, responseType?: string): Observable<any> {
    let options = RackhdHttpService.createOptions(responseType);
    let url = RackHD.getBaseUrl() +
      this.urlConfig.getByIdentifierUrl + identifier +
Severity: Major
Found in src/app/utils/rackhd-http.ts and 1 other location - About 4 hrs to fix
src/app/utils/rackhd-http.ts on lines 95..102

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

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

  getNodeTag(node): Observable<string> {
    if (!_.isEmpty(node.tags)) {
      return this.tagService.getTagByNodeId(node.id)
        .pipe(
          map(data => {
Severity: Major
Found in src/app/solution-center/os-install/os-install.component.ts and 1 other location - About 4 hrs to fix
src/app/workflow-center/run-workflow/run-workflow.component.ts on lines 143..155

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

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

  getNodeTag(node): Observable<string> {
    if (!_.isEmpty(node.tags)) {
      return this.tagService.getTagByNodeId(node.id)
      .pipe(
        map(data => {
src/app/solution-center/os-install/os-install.component.ts on lines 262..274

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

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

  getDefinition(workflow: Workflow){
    this.selectedWorkflow = workflow;
    let graphName = workflow.definition.split('/').pop();
    this.graphService.getByIdentifier(graphName)
    .subscribe(
src/app/workflow-center/history-workflow/history-workflow.component.ts on lines 137..148

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

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

  getDefinition(workflow: Workflow){
    this.selectedWorkflow = workflow;
    let graphName = workflow.definition.split('/').pop();
    this.graphService.getByIdentifier(graphName)
    .subscribe(
src/app/workflow-center/active-workflow/active-workflow.component.ts on lines 117..128

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

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

  getChild(objKey: string, workflow: Graph){
    this.selectedWorkflow = workflow;
    this.action = _.capitalize(objKey);
    this.rawData = workflow && workflow[objKey];
    if (!_.isEmpty(this.rawData))
Severity: Major
Found in src/app/management-center/workflows/workflows.component.ts and 1 other location - About 3 hrs to fix
src/app/workflow-center/active-workflow/active-workflow.component.ts on lines 109..115

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

Severity
Category
Status
Source
Language