theforeman/foreman

View on GitHub
webpack/assets/javascripts/compute_resource/libvirt.js

Summary

Maintainability
A
3 hrs
Test Coverage

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

export function allocationSwitcher(element, action) {
  const previous = $(element)
    .parent()
    .find('.active');

Severity: Minor
Found in webpack/assets/javascripts/compute_resource/libvirt.js - About 1 hr to fix

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

    export function imageSelected(item) {
      const template = $(item).val();
    
      if (template) {
        const url = $(item).attr('data-url');
    Severity: Minor
    Found in webpack/assets/javascripts/compute_resource/libvirt.js - About 1 hr to fix

      Function networkSelected has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function networkSelected(item) {
        const selected = $(item).val();
        const bridge = $(item)
          .parentsUntil('.fields')
          .parent()
      Severity: Minor
      Found in webpack/assets/javascripts/compute_resource/libvirt.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status