RackHD/on-web-ui

View on GitHub
src/app/canvas-graph/canvas-graph.component.ts

Summary

Maintainability
C
1 day
Test Coverage

File canvas-graph.component.ts has 334 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
  Component,
  ElementRef,
  EventEmitter,
  Input,
Severity: Minor
Found in src/app/canvas-graph/canvas-graph.component.ts - About 4 hrs to fix

    Function addNode has 80 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      addNode() {
        // mothod 1 for keep current context
        let self = this;
    
        // this function is referenced from lightgraph src.
    Severity: Major
    Found in src/app/canvas-graph/canvas-graph.component.ts - About 3 hrs to fix

      Function afterClick has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        afterClick(e, node) {
          if (!node || !node.properties)
            return;
      
          let self = this;
      Severity: Minor
      Found in src/app/canvas-graph/canvas-graph.component.ts - About 1 hr to fix

        Function ngOnInit has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          ngOnInit() {
            if (this.editable) {
              this.graphTaskService.getAll()
              .subscribe(allTasks => {
                this.taskInjectableNames = allTasks.map(function (item) {
        Severity: Minor
        Found in src/app/canvas-graph/canvas-graph.component.ts - About 1 hr to fix

          Function drawNodes has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            drawNodes() {
              if (!this.workflow) return;
          
              this.graph.clear();
          
          
          Severity: Minor
          Found in src/app/canvas-graph/canvas-graph.component.ts - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status