cantino/huginn

View on GitHub
app/assets/javascripts/components/utils.js

Summary

Maintainability
C
1 day
Test Coverage

Function handleDryRunButton has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static handleDryRunButton(button, data) {
      if (data == null) {
        data = button.form
          ? $(':input[name!="_method"]', button.form).serialize()
          : "";
Severity: Major
Found in app/assets/javascripts/components/utils.js - About 3 hrs to fix

    Function success has 66 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            success: (modal_data) => {
              return Utils.showDynamicModal(modal_data, {
                body: (body) => {
                  let previous;
                  const form = $(body).find(".dry-run-form");
    Severity: Major
    Found in app/assets/javascripts/components/utils.js - About 2 hrs to fix

      Function body has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  body: (body) => {
                    let previous;
                    const form = $(body).find(".dry-run-form");
                    const payload_editor = form.find(".payload-editor");
      
      
      Severity: Major
      Found in app/assets/javascripts/components/utils.js - About 2 hrs to fix

        Function showDynamicModal has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            static showDynamicModal(content, param) {
              if (content == null) {
                content = "";
              }
              if (param == null) {
        Severity: Minor
        Found in app/assets/javascripts/components/utils.js - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status