kiwitcms/Kiwi

View on GitHub

Showing 21 of 406 total issues

File get.js has 743 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { fetchBugDetails } from '../../../../static/js/bugs'
import { jsonRPC } from '../../../../static/js/jsonrpc'
import { propertiesCard } from '../../../../static/js/properties'
import { tagsCard } from '../../../../static/js/tags'
import {
Severity: Major
Found in tcms/testruns/static/testruns/js/get.js - About 1 day to fix

    File get.js has 520 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { jsonRPC } from '../../../../static/js/jsonrpc'
    import { tagsCard } from '../../../../static/js/tags'
    import {
    animate,
    advancedSearchAndAddTestCases,
    Severity: Major
    Found in tcms/testplans/static/testplans/js/get.js - About 1 day to fix

      Function pageTestrunsGetReadyHandler has 162 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function pageTestrunsGetReadyHandler () {
      permissions.removeTag = $('#test_run_pk').data('perm-remove-tag') === 'True'
      permissions.addComment = $('#test_run_pk').data('perm-add-comment') === 'True'
      permissions.removeComment = $('#test_run_pk').data('perm-remove-comment') === 'True'
      permissions.viewHistoricalTestExecution = $('#test_run_pk').data('perm-view-historical-testexecution') === 'True'
      Severity: Major
      Found in tcms/testruns/static/testruns/js/get.js - About 6 hrs to fix

        Function toolbarEvents has 154 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function toolbarEvents (testPlanId, permissions) {
        $('.js-checkbox-toolbar').click(function (ev) {
        const isChecked = ev.target.checked
        const testCaseRows = $('.js-testcase-row').find('input')
         
         
        Severity: Major
        Found in tcms/testplans/static/testplans/js/get.js - About 6 hrs to fix

          Function pageTestcasesSearchReadyHandler has 145 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function pageTestcasesSearchReadyHandler () {
          initializeDateTimePicker('#id_before')
          initializeDateTimePicker('#id_after')
           
          const table = $('#resultsTable').DataTable({
          Severity: Major
          Found in tcms/testcases/static/testcases/js/search.js - About 5 hrs to fix

            Function pageTestplansSearchReadyHandler has 118 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function pageTestplansSearchReadyHandler () {
            initializeDateTimePicker('#id_before')
            initializeDateTimePicker('#id_after')
             
            const rowsNotShownMessage = $('#main-element').data('trans-some-rows-not-shown')
            Severity: Major
            Found in tcms/testplans/static/testplans/js/search.js - About 4 hrs to fix

              Function pageTestcasesGetReadyHandler has 115 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function pageTestcasesGetReadyHandler () {
              const caseId = $('#test_case_pk').data('pk')
              const productId = $('#product_pk').data('pk')
              const permRemoveTag = $('#test_case_pk').data('perm-remove-tag') === 'True'
              const permRemoveComponent = $('#test_case_pk').data('perm-remove-component') === 'True'
              Severity: Major
              Found in tcms/testcases/static/testcases/js/get.js - About 4 hrs to fix

                Function pageTestrunsSearchReadyHandler has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function pageTestrunsSearchReadyHandler () {
                initializeDateTimePicker('#id_before_start_date')
                initializeDateTimePicker('#id_after_start_date')
                initializeDateTimePicker('#id_before_stop_date')
                initializeDateTimePicker('#id_after_stop_date')
                Severity: Major
                Found in tcms/testruns/static/testruns/js/search.js - About 4 hrs to fix

                  Function drawTable has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function drawTable () {
                  $('#resultsTable').DataTable({
                  pageLength: $('#navbar').data('defaultpagesize'),
                  ajax: function (data, callbackF, settings) {
                  const query = {}
                  Severity: Major
                  Found in tcms/telemetry/static/telemetry/js/testing/execution-dashboard.js - About 4 hrs to fix

                    Function renderAdditionalInformation has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function renderAdditionalInformation (testRunId, execution) {
                    let linksQuery = { execution__run: testRunId }
                    let casesQuery = { executions__run: testRunId }
                    let componentQ = { cases__executions__run: testRunId }
                    let tagsQ = { case__executions__run: testRunId }
                    Severity: Major
                    Found in tcms/testruns/static/testruns/js/get.js - About 3 hrs to fix

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

                      function getExpandArea (testExecution) {
                      const container = $(`.test-execution-${testExecution.id}`)
                       
                      container.find('.test-execution-information .run-date').html(testExecution.stop_date || '-')
                      container.find('.test-execution-information .build').html(testExecution.build__name)
                      Severity: Major
                      Found in tcms/testruns/static/testruns/js/get.js - About 3 hrs to fix

                        Function pageBugsSearchReadyHandler has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function pageBugsSearchReadyHandler () {
                        initializeDateTimePicker('#id_before')
                        initializeDateTimePicker('#id_after')
                         
                        const table = $('#resultsTable').DataTable({
                        Severity: Major
                        Found in tcms/bugs/static/bugs/js/search.js - About 3 hrs to fix

                          Function drawTable has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function drawTable () {
                          $('.js-spinner').show()
                          if (table) {
                          table.destroy()
                           
                           
                          Severity: Major
                          Found in tcms/telemetry/static/telemetry/js/testing/status-matrix.js - About 3 hrs to fix

                            Function getTestCaseExpandArea has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function getTestCaseExpandArea (row, testCase, permissions) {
                            markdown2HTML(testCase.text, row.find('.js-test-case-expand-text'))
                            if (testCase.notes.trim().length > 0) {
                            row.find('.js-test-case-expand-notes').html(testCase.notes)
                            }
                            Severity: Major
                            Found in tcms/testplans/static/testplans/js/get.js - About 3 hrs to fix

                              Function drawChart has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function drawChart () {
                              const query = {}
                               
                              const productIds = $('#id_product').val()
                              if (productIds.length) {
                              Severity: Major
                              Found in tcms/telemetry/static/telemetry/js/testing/execution-trends.js - About 3 hrs to fix

                                Function initSimpleMDE has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function initSimpleMDE (textArea, fileUploadElement, autoSaveId = window.location.toString()) {
                                if (!textArea || !fileUploadElement) {
                                return null
                                }
                                 
                                 
                                Severity: Major
                                Found in tcms/static/js/simplemde_security_override.js - About 2 hrs to fix

                                  Function attachEvents has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function attachEvents (testPlanId, permissions) {
                                  treeViewBind('#testcases-list')
                                   
                                  if (permissions['perm-change-testcase']) {
                                  // update default tester
                                  Severity: Major
                                  Found in tcms/testplans/static/testplans/js/get.js - About 2 hrs to fix

                                    Function tagsCard has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export function tagsCard (model, objectId, displayFilter, permRemove) {
                                    // load the tags table
                                    const tagsTable = $('#tags').DataTable({
                                    ajax: function (data, callbackF, settings) {
                                    dataTableJsonRPC('Tag.filter', displayFilter, callbackF, function (data, callback) {
                                    Severity: Major
                                    Found in tcms/static/js/tags.js - About 2 hrs to fix

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

                                      export function initializePage () {
                                      table = $('#test-case-health-table').DataTable({
                                      ajax: function (data, callback, settings) {
                                      const query = {}
                                       
                                       
                                      Severity: Major
                                      Found in tcms/telemetry/static/telemetry/js/testing/test-case-health.js - About 2 hrs to fix

                                        Function clone has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                        def clone( # pylint: disable=too-many-arguments,too-many-positional-arguments
                                        Severity: Major
                                        Found in tcms/testplans/models.py - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language