maestro-server/client-app

View on GitHub

Showing 82 of 82 total issues

File script.js has 344 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * This component made by Sagalbot
 *
 * https://github.com/sagalbot/vue-select
 */
Severity: Minor
Found in src/components/bootue/forms/select/script.js - About 4 hrs to fix

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

      methods: {
        prepared(data) {
          return data.map(d => {
            d.qtdtargets = _.size(d.deps);
            d.ldatacenters = _.get(d, "datacenters.name", "-");
    Severity: Major
    Found in src/pages/dashboard/inventory/brokers/list/table/script.js and 1 other location - About 3 hrs to fix
    src/pages/dashboard/inventory/loadbalances/list/table/script.js on lines 57..74

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

    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

      methods: {
        prepared(data) {
          return data.map(d => {
            d.qtdtargets = _.size(d.deps);
            d.ldatacenters = _.get(d, "datacenters.name", "-");
    src/pages/dashboard/inventory/brokers/list/table/script.js on lines 58..75

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

    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

    Function updateTypeFilter has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

        updateTypeFilter(val) {
          this.clearFilter();
    
          if (val) {
            const re = /^(.*) \((.*)\)/;

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

      computed: {
        MDeps() {
          return this.$parent.$refs.modal_deps;
        },
        MMembers() {
    Severity: Major
    Found in src/pages/dashboard/inventory/object-storage/view/script.js and 1 other location - About 2 hrs to fix
    src/pages/dashboard/inventory/cache/view/script.js on lines 22..42

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

    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

      computed: {
        MDeps() {
          return this.$parent.$refs.modal_deps;
        },
        MMembers() {
    Severity: Major
    Found in src/pages/dashboard/inventory/cache/view/script.js and 1 other location - About 2 hrs to fix
    src/pages/dashboard/inventory/object-storage/view/script.js on lines 22..42

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

    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

    Function getJSON has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

    export default function getJSON (url, header = []) {
      const request = new window.XMLHttpRequest()
      const data = {}
      // p (-simulated- promise)
      const p = {
    Severity: Minor
    Found in src/components/bootue/forms/typeahead/_utils/getJSON.js - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    `` has 23 functions (exceeds 20 allowed). Consider refactoring.
    Open

      methods: {
        close () {
          this.displayDayView = this.displayMonthView = this.displayYearView = false
        },
        inputClick () {
    Severity: Minor
    Found in src/components/bootue/forms/datepicker/script.js - About 2 hrs to fix

      File script.js has 267 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import translations from '../_texts/translations.js'
      
      export default {
        props: {
          value: { type: String },
      Severity: Minor
      Found in src/components/bootue/forms/datepicker/script.js - About 2 hrs to fix

        Function setItems has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
        Open

            setItems (data) {
              if (this.async) {
                this.items = this.asyncKey ? data[this.asyncKey] : data
                this.items = this.items.slice(0, this.limit)
              } else {
        Severity: Minor
        Found in src/components/bootue/forms/typeahead/script.js - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function transition has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            transition (val, old) {
              if (val === old) { return }
              const el = this.$el
              const body = document.body
              if (val) {
        Severity: Minor
        Found in src/components/bootue/modal/script.js - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function FetcherData has 61 lines of code (exceeds 40 allowed). Consider refactoring.
        Open

        const FetcherData = Entity => (opts = {}, headers = {}) => {
          const tenant = tenantMananger.get();
          const k = _.get(Entity, "ename");
          const cache_key = _.get(opts, "cache_key", "d");
          const { path } = opts;
        Severity: Major
        Found in src/resources/services/fetchEntity.js - About 1 hr to fix

          Function data has 56 lines of code (exceeds 40 allowed). Consider refactoring.
          Open

            data() {
              return {
                limit: 300,
                results: {
                  servers: {
          Severity: Major
          Found in src/pages/dashboard/home/script.js - About 1 hr to fix

            Function beforeDestroy has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

              beforeDestroy () {
                if (this._tabGroup) {
                  this._tabGroup.tabs = this._tabGroup.tabs.filter(el => el !== this)
                }
                if (this._tabs) {
            Severity: Minor
            Found in src/components/bootue/tab/script.js - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function data has 50 lines of code (exceeds 40 allowed). Consider refactoring.
            Open

              data() {
                const initData = {
                  name: null,
                  method: "GET",
                  endpoint: null,
            Severity: Minor
            Found in src/pages/dashboard/reports/scheduler/modalCreate/script.js - About 1 hr to fix

              Function getJSON has 47 lines of code (exceeds 40 allowed). Consider refactoring.
              Open

              export default function getJSON (url, header = []) {
                const request = new window.XMLHttpRequest()
                const data = {}
                // p (-simulated- promise)
                const p = {
              Severity: Minor
              Found in src/components/bootue/forms/typeahead/_utils/getJSON.js - About 1 hr to fix

                Function data has 46 lines of code (exceeds 40 allowed). Consider refactoring.
                Open

                  data() {
                    return {
                      cdb: 0,
                      family: "Database",
                      foptions: "Oracle",
                Severity: Minor
                Found in src/pages/dashboard/inventory/databases/modalOracle/script.js - About 1 hr to fix

                  Function data has 45 lines of code (exceeds 40 allowed). Consider refactoring.
                  Open

                    data: function() {
                      return {
                        entity: new Servers(),
                        columns: [
                          "name",
                  Severity: Minor
                  Found in src/pages/dashboard/inventory/servers/list/table/script.js - About 1 hr to fix

                    Function created has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                      created () {
                        this._isTab = true
                        let tabs = this
                        while (!this._tabs && tabs.$parent) {
                          if (tabs._isTabGroup) {
                    Severity: Minor
                    Found in src/components/bootue/tab/script.js - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function data has 41 lines of code (exceeds 40 allowed). Consider refactoring.
                    Open

                      data: function() {
                        return {
                          model: {},
                          entity: Reports,
                          options: {
                    Severity: Minor
                    Found in src/pages/dashboard/reports/exports/view/table/script.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language