phpmyadmin/phpmyadmin

View on GitHub
resources/js/src/server/status/monitor.ts

Summary

Maintainability
F
2 wks
Test Coverage

File monitor.ts has 1886 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import $ from 'jquery';
import { AJAX } from '../../modules/ajax.ts';
import { Functions } from '../../modules/functions.ts';
import { CommonParams } from '../../modules/common.ts';
import tooltip from '../../modules/tooltip.ts';
Severity: Major
Found in resources/js/src/server/status/monitor.ts - About 5 days to fix

    Function loadLogStatistics has 242 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function loadLogStatistics (opts) {
            var logRequest = null;
    
            if (! opts.removeVariables) {
                opts.removeVariables = false;
    Severity: Major
    Found in resources/js/src/server/status/monitor.ts - About 1 day to fix

      Function addChart has 207 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function addChart (chartObj, initialize = undefined) {
              var i;
              var settings: { [p: string]: any } = {
                  title: escapeHtml(chartObj.title),
                  grid: {
      Severity: Major
      Found in resources/js/src/server/status/monitor.ts - About 1 day to fix

        Function filterQueries has 112 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function filterQueries (varFilterChange) {
                    var textFilter;
                    var val = ($('#filterQueryText').val() as string);
        
                    if (val.length === 0) {
        Severity: Major
        Found in resources/js/src/server/status/monitor.ts - About 4 hrs to fix

          Function refreshChartGrid has 109 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function refreshChartGrid () {
                  /* Send to server */
                  runtime.refreshRequest = $.post('index.php?route=/server/status/monitor/chart', {
                      'ajax_request': true,
                      'requiredData': JSON.stringify(runtime.dataList),
          Severity: Major
          Found in resources/js/src/server/status/monitor.ts - About 4 hrs to fix

            Function loadLogVars has 104 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    var loadLogVars = function (getvars = undefined) {
                        var vars = {
                            'ajax_request': true,
                            'server': CommonParams.get('server')
                        };
            Severity: Major
            Found in resources/js/src/server/status/monitor.ts - About 4 hrs to fix

              Function loadQueryAnalysis has 102 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function loadQueryAnalysis (rowData) {
                      var db = rowData.db || '';
                      var profilingChart = null;
              
                      $('#queryAnalyzerDialog').find('div.placeHolder').html(
              Severity: Major
              Found in resources/js/src/server/status/monitor.ts - About 4 hrs to fix

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

                    function initGrid () {
                        var i;
                
                        /* Apply default values & config */
                        if (isStorageSupported('localStorage')) {
                Severity: Major
                Found in resources/js/src/server/status/monitor.ts - About 3 hrs to fix

                  Function buildLogTable has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function buildLogTable (data, groupInserts) {
                          var rows = data.rows;
                          var cols = [];
                          var $table = $('<table class="table table-striped table-hover align-middle sortable"></table>');
                          var $tBody;
                  Severity: Major
                  Found in resources/js/src/server/status/monitor.ts - About 2 hrs to fix

                    Function openQueryAnalyzer has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function openQueryAnalyzer () {
                            var rowData = $(this).parent().data('query');
                            var query = rowData.argument || rowData.sql_text;
                    
                            if (window.codeMirrorEditor) {
                    Severity: Minor
                    Found in resources/js/src/server/status/monitor.ts - About 1 hr to fix

                      Function getLogAnalyseDialog has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function getLogAnalyseDialog (min, max) {
                              var $logAnalyseDialog = $('#logAnalyseDialog');
                              var $dateStart = $logAnalyseDialog.find('input[name="dateStart"]');
                              var $dateEnd = $logAnalyseDialog.find('input[name="dateEnd"]');
                              $dateStart.prop('readonly', true);
                      Severity: Minor
                      Found in resources/js/src/server/status/monitor.ts - About 1 hr to fix

                        Function click has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                dlgBtns[window.Messages.strImport].click = function () {
                                    var input = ($('#emptyDialog').find('#import_file') as JQuery<HTMLInputElement>)[0];
                                    var reader = new FileReader();
                        
                                    reader.onerror = function (event) {
                        Severity: Minor
                        Found in resources/js/src/server/status/monitor.ts - About 1 hr to fix

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

                                      reader.onload = function (e) {
                                          var data = (e.target.result as string);
                                          var json = null;
                                          // Try loading config
                                          try {
                          Severity: Minor
                          Found in resources/js/src/server/status/monitor.ts - About 1 hr to fix

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

                                function chartValueTransform (name, cur, prev) {
                                    switch (name) {
                                    case 'cpu-linux':
                                        if (prev === null) {
                                            return undefined;
                            Severity: Minor
                            Found in resources/js/src/server/status/monitor.ts - About 1 hr to fix

                              Avoid too many return statements within this function.
                              Open

                                      return undefined;
                              Severity: Major
                              Found in resources/js/src/server/status/monitor.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return diffQHits / (cur[1].value - prev[1].value + diffQHits) * 100;
                                Severity: Major
                                Found in resources/js/src/server/status/monitor.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                                  return 0;
                                  Severity: Major
                                  Found in resources/js/src/server/status/monitor.ts - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                return 100 - cur[0].value / cur[1].value * 100;
                                    Severity: Major
                                    Found in resources/js/src/server/status/monitor.ts - About 30 mins to fix

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

                                              $.each(runtime.charts, function (key, elem) {
                                                  gridCopy[key] = {};
                                                  gridCopy[key].nodes = elem.nodes;
                                                  gridCopy[key].settings = elem.settings;
                                                  gridCopy[key].title = elem.title;
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 4 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 649..656

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

                                      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

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

                                              $.each(runtime.charts, function (key, elem) {
                                                  gridCopy[key] = {};
                                                  gridCopy[key].nodes = elem.nodes;
                                                  gridCopy[key].series = elem.series;
                                                  gridCopy[key].settings = elem.settings;
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 4 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 2413..2420

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

                                      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

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                                  'swap': {
                                                      title: window.Messages.strSystemSwap,
                                                      series: [
                                                          { label: window.Messages.strUsedSwap, fill: true },
                                                          { label: window.Messages.strFreeSwap, fill: true }
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 2 other locations - About 4 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 299..315
                                      resources/js/src/server/status/monitor.ts on lines 382..393

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

                                      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

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                                  'memory': {
                                                      title: window.Messages.strSystemMemory,
                                                      series: [
                                                          { label: window.Messages.strUsedMemory, fill: true },
                                                          { label: window.Messages.strFreeMemory, fill: true }
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 2 other locations - About 4 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 299..315
                                      resources/js/src/server/status/monitor.ts on lines 394..405

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

                                      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

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                                  'swap': {
                                                      title: window.Messages.strSystemSwap,
                                                      series: [
                                                          {
                                                              label: window.Messages.strUsedSwap,
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 2 other locations - About 4 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 382..393
                                      resources/js/src/server/status/monitor.ts on lines 394..405

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

                                      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

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

                                                              if (logVars.slow_query_log !== 'ON') {
                                                                  str += '- <a class="set" href="#slow_query_log-ON">';
                                                                  str += window.sprintf(window.Messages.strEnableVar, 'slow_query_log');
                                                                  str += ' </a><br>';
                                                              } else {
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 3 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 903..911

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

                                      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

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

                                                              if (logVars.general_log !== 'ON') {
                                                                  str += '- <a class="set" href="#general_log-ON">';
                                                                  str += window.sprintf(window.Messages.strEnableVar, 'general_log');
                                                                  str += ' </a><br>';
                                                              } else {
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 3 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 913..921

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

                                      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

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

                                              'qce': {
                                                  title: window.Messages.strQueryCacheEfficiency,
                                                  series: [
                                                      {
                                                          label: window.Messages.strQueryCacheEfficiency
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 2 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 233..252

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

                                      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

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

                                              'qcu': {
                                                  title: window.Messages.strQueryCacheUsage,
                                                  series: [
                                                      {
                                                          label: window.Messages.strQueryCacheUsed
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 2 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 217..231

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

                                      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

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

                                                      $('#queryAnalyzerDialog').find('div.placeHolder a[href="#showChart"]').on('click', function () {
                                                          $('#queryAnalyzerDialog').find('#queryProfiling').show();
                                                          $('#queryAnalyzerDialog').find('table.queryNums').hide();
                                      
                                                          return false;
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 2 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 2388..2393

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

                                      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

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

                                                  'cpu': {
                                                      title: window.Messages.strSystemCPUUsage,
                                                      series: [
                                                          {
                                                              label: window.Messages.strAverageLoad
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 2 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 413..418

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

                                      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

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

                                                      $('#queryAnalyzerDialog').find('div.placeHolder a[href="#showNums"]').on('click', function () {
                                                          $('#queryAnalyzerDialog').find('#queryProfiling').hide();
                                                          $('#queryAnalyzerDialog').find('table.queryNums').show();
                                      
                                                          return false;
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 2 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 2395..2400

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

                                      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

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

                                              'c0': {
                                                  title: window.Messages.strQuestions,
                                                  series: [{ label: window.Messages.strQuestions }],
                                                  nodes: [{ dataPoints: [{ type: 'statusvar', name: 'Questions' }], display: 'differential' }],
                                                  maxYLabel: 0
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 2 hrs to fix
                                      resources/js/src/server/status/monitor.ts on lines 322..331

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

                                      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

                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                      Open

                                              var dlgBtns = {
                                                  [window.Messages.strFromSlowLog]: {
                                                      text: window.Messages.strFromSlowLog,
                                                      class: 'btn btn-secondary',
                                                  },
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 4 other locations - About 1 hr to fix
                                      resources/js/src/database/routines.ts on lines 193..202
                                      resources/js/src/server/status/monitor.ts on lines 697..706
                                      resources/js/src/server/status/monitor.ts on lines 2223..2232
                                      resources/js/src/triggers.ts on lines 188..197

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

                                      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

                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                      Open

                                              var dlgBtns = {
                                                  [window.Messages.strImport]: {
                                                      text: window.Messages.strImport,
                                                      class: 'btn btn-primary',
                                                  },
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 4 other locations - About 1 hr to fix
                                      resources/js/src/database/routines.ts on lines 193..202
                                      resources/js/src/server/status/monitor.ts on lines 1487..1496
                                      resources/js/src/server/status/monitor.ts on lines 2223..2232
                                      resources/js/src/triggers.ts on lines 188..197

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

                                      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

                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                      Open

                                              var dlgBtns = {
                                                  [window.Messages.strAnalyzeQuery]: {
                                                      text: window.Messages.strAnalyzeQuery,
                                                      class: 'btn btn-primary',
                                                  },
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 4 other locations - About 1 hr to fix
                                      resources/js/src/database/routines.ts on lines 193..202
                                      resources/js/src/server/status/monitor.ts on lines 697..706
                                      resources/js/src/server/status/monitor.ts on lines 1487..1496
                                      resources/js/src/triggers.ts on lines 188..197

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

                                      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

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

                                                  'cpu': {
                                                      title: window.Messages.strSystemCPUUsage,
                                                      series: [
                                                          {
                                                              label: window.Messages.strAverageLoad
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 1 hr to fix
                                      resources/js/src/server/status/monitor.ts on lines 265..278

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

                                      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

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

                                                  'cpu': {
                                                      title: window.Messages.strSystemCPUUsage,
                                                      series: [
                                                          {
                                                              label: window.Messages.strAverageLoad
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 1 hr to fix
                                      resources/js/src/server/status/monitor.ts on lines 368..381

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

                                      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

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

                                              var dlgBtns = {
                                                  [window.Messages.strClose]: {
                                                      text: window.Messages.strClose,
                                                      class: 'btn btn-primary',
                                                      click: function () {
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 1 hr to fix
                                      resources/js/src/server/status/monitor.ts on lines 1101..1109

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

                                      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

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

                                                              if (logVars.long_query_time < 2) {
                                                                  str += getImageTag('s_success') + ' ';
                                                                  str += window.sprintf(window.Messages.strLongQueryTimeSet, logVars.long_query_time);
                                                                  str += '<br>';
                                                              }
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 1 hr to fix
                                      resources/js/src/server/status/monitor.ts on lines 874..878

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

                                      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

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

                                                      var dlgBtns = {
                                                          [window.Messages.strClose]: {
                                                              text: window.Messages.strClose,
                                                              class: 'btn btn-primary',
                                                              click: function () {
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 1 hr to fix
                                      resources/js/src/server/status/monitor.ts on lines 806..814

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

                                      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

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

                                                              if (logVars.long_query_time > 2) {
                                                                  str += getImageTag('s_attention') + ' ';
                                                                  str += window.sprintf(window.Messages.strSmallerLongQueryTimeAdvice, logVars.long_query_time);
                                                                  str += '<br>';
                                                              }
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 1 hr to fix
                                      resources/js/src/server/status/monitor.ts on lines 880..884

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

                                      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

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

                                                  $('#chartStatusVar').on('click', function () {
                                                      $('input[name="chartTitle"]').val(
                                                          $('#chartSeries').find(':selected').text().replace(/_/g, ' ')
                                                      );
                                                  });
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 1 hr to fix
                                      resources/js/src/server/status/monitor.ts on lines 635..639

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

                                      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

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

                                                  $('#chartSeries').on('change', function () {
                                                      $('input[name="chartTitle"]').val(
                                                          $('#chartSeries').find(':selected').text().replace(/_/g, ' ')
                                                      );
                                                  });
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 1 hr to fix
                                      resources/js/src/server/status/monitor.ts on lines 629..633

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

                                      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

                                                                      elem.chart.series[j].data.splice(0, elem.chart.series[j].data.length - runtime.gridMaxPoints);
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 1 hr to fix
                                      resources/js/src/server/status/monitor.ts on lines 1649..1649

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

                                      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

                                                                      elem.chart.series[j].data.splice(0, elem.chart.series[j].data.length - runtime.gridMaxPoints);
                                      Severity: Major
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 1 hr to fix
                                      resources/js/src/server/status/monitor.ts on lines 1646..1646

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

                                      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

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

                                          ($('input[name="useDivisor"]') as JQuery<HTMLInputElement>).on('change', function () {
                                              $('span.divisorInput').toggle(this.checked);
                                          });
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 50 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 974..976

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

                                      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

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

                                          ($('input[name="useUnit"]') as JQuery<HTMLInputElement>).on('change', function () {
                                              $('span.unitInput').toggle(this.checked);
                                          });
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 50 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 970..972

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

                                      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

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

                                              dlgBtns[window.Messages.strFromGeneralLog].click = function () {
                                                  loadLog('general', min, max);
                                                  $(this).dialog('close');
                                              };
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 50 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 1499..1502

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

                                      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

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

                                              dlgBtns[window.Messages.strFromSlowLog].click = function () {
                                                  loadLog('slow', min, max);
                                                  $(this).dialog('close');
                                              };
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 50 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 1505..1508

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

                                      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

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

                                                      $('#chartGrid').find('tr').eq(0).find('td').eq(0).offset().top
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 40 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 1147..1147

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

                                      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

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

                                                  height: $('#chartGrid').find('tr').eq(1).find('td').eq(1).offset().top -
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 40 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 1148..1148

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

                                      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

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                                      if (typeof data !== 'undefined' && data.success === true) {
                                                          logData = data.message;
                                                      } else {
                                                          return serverResponseError();
                                                      }
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 2 other locations - About 35 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 837..841
                                      resources/js/src/server/status/monitor.ts on lines 1560..1564

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

                                      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

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

                                              var dateEnd = Date.parse($('#logAnalyseDialog').find('input[name="dateEnd"]').datepicker('getDate').toString()) || max;
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 35 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 1539..1539

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

                                      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

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                                          if (typeof data !== 'undefined' && data.success === true) {
                                                              logVars = data.message;
                                                          } else {
                                                              return serverResponseError();
                                                          }
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 2 other locations - About 35 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 1560..1564
                                      resources/js/src/server/status/monitor.ts on lines 1848..1852

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

                                      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

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

                                              var dateStart = Date.parse($('#logAnalyseDialog').find('input[name="dateStart"]').datepicker('getDate').toString()) || min;
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 1 other location - About 35 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 1540..1540

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

                                      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

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                                  if (typeof data !== 'undefined' && data.success === true) {
                                                      chartData = data.message;
                                                  } else {
                                                      return serverResponseError();
                                                  }
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 2 other locations - About 35 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 837..841
                                      resources/js/src/server/status/monitor.ts on lines 1848..1852

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

                                      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

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                              dlgBtns[window.Messages.strCancel].click = function () {
                                                  $(this).dialog('close');
                                              };
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 2 other locations - About 30 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 1865..1867
                                      resources/js/src/server/status/monitor.ts on lines 2240..2242

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

                                      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

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                                          dlgBtns[window.Messages.strClose].click = function () {
                                                              $(this).dialog('close');
                                                          };
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 2 other locations - About 30 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 766..768
                                      resources/js/src/server/status/monitor.ts on lines 2240..2242

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

                                      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

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                              dlgBtns[window.Messages.strClose].click = function () {
                                                  $(this).dialog('close');
                                              };
                                      Severity: Minor
                                      Found in resources/js/src/server/status/monitor.ts and 2 other locations - About 30 mins to fix
                                      resources/js/src/server/status/monitor.ts on lines 766..768
                                      resources/js/src/server/status/monitor.ts on lines 1865..1867

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

                                      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

                                      There are no issues that match your filters.

                                      Category
                                      Status