Showing 243 of 409 total issues
Function dialogUpload
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
myOwn.dialogUpload = function dialogUpload(ajaxPath, ajaxParams, ajaxPrepareResultFun, showWithMiniMenu, messages, refresheable, acceptPhotos, optsNames){
messages = changing(my.messages, messages||{})
optsNames = optsNames || [];
var doneFun = function doneFun(){
var fileAttr={class:'import-button',type:'file',style:'min-width:400px'};
File continuar.js
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use script";
function classToggle(element,clase, sacoAgrego ){
if(sacoAgrego){
element.classList.add(clase);
Function displayMenu
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
myOwn.displayMenu = function displayMenu(layout, menu, addrParams, parents){
var my = this;
var selectedItem = null;
var elements=[];
var depth = parents.length;
Function prepareMenu
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
myOwn.TableGrid.prototype.prepareMenu = function prepareMenu(button){
button.src=my.path.img+'menu-dots.png';
button.title=my.messages.optionsForThisTable;
var grid=this;
var menuOptions=[];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function controlar_compatibilidad
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
function controlar_compatibilidad(ya, id, idBoton){
"use strict";
var boton=document.getElementById(idBoton || 'login');
id = id || 'resultado_incompatibilidad';
var div=document.getElementById(id);
Function showParams
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
showParams:function(formDef, main_layout, addrParams, mainAction){
var autoproced = addrParams.autoproced || false
addrParams.up=addrParams.up||addrParams.ff||{};
var params=addrParams.up;
// var button = html.button(formDef.proceedLabel||my.messages.proceed).create();
Function doneFun
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
var doneFun = function doneFun(){
var fileAttr={class:'import-button',type:'file',style:'min-width:400px'};
if(acceptPhotos){
fileAttr.accept='image/*';
}
Function exportacionesGenerico
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
AppBackend.prototype.exportacionesGenerico = async function exportacionesGenerico(result, procedureDef, context, params, files){
var {csvFileName, fileName} = procedureDef.forExport
if (!(result instanceof Array)) {
if (!result || !(result instanceof Object)) {
throw new Error ("exportacionesGenerico debe recibir {title:string, rows:Record<string, any>[]}[]")
Function refreshAllRows
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
grid.refreshAllRows = async function(force){
var timeStamp = new Date().getTime();
await grid.connector.my.ajax.table_data({
table:grid.connector.tableName,
fixedFields:grid.connector.fixedFields,
Function dialogInput
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
dialogInput:function(typedControl, opts){
opts = changing({
reference: {},
extraRow: null
},opts ||{});
Function readProcedureDefinitions
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
myAjax.readProcedureDefinitions=function readProcedureDefinitions(){
var my = this;
var promise;
var getStored=function(setupOrError){
if(setupOrError && !(setupOrError instanceof Error) && !setupOrError.isoffline){
Function informDetectedStatus
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
myOwn.informDetectedStatus = function informDetectedStatus(statusCode, logged) {
var my=this;
if(my.debuggingStatus){ my.debuggingStatus(statusCode); }
if(my.previousStatusCode!=statusCode){
// var previousStatus = my["connection-status"][my.previousStatusCode];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function showPage
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
myOwn.showPage = function showPage(pageDef){
my.prepareFloating3dots();
var newHash;
if(!location.hash){
newHash=sessionStorage.getItem('backend-plus-hash-redirect');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function tipoCeldas
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
tipoCeldas(){
//var tiposCeldas = {
return {
titulo:{
completar: function completar(){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function defaultInformProgress
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
var defaultInformProgress = function defaultInformProgress(progressInfo){
if(progressInfo.message || progressInfo.end || progressInfo.start || progressInfo.loaded){
if(!divProgress){
var idAutoClose='id-auto-close-'+Math.random();
var checkAutoClose=html.input({type:'checkbox', id:idAutoClose, checked:myAjax.ajaxPromise.autoClose}).create();
Function td
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
myOwn.DataColumnGrid.prototype.td = function td(depot, iColumn, tr, saveRow){
var grid = this.grid;
var fieldDef = this.fieldDef;
var forInsert = false; // TODO: Verificar que esto está en desuso
var enabledInput=depot.allow.update !== false && grid.def.allow.update /* && !grid.connector.fixedField[fieldDef.name] */ && (forInsert?fieldDef.allow.insert:fieldDef.allow.update);
Function tableDatum
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function tableDatum(context, parameters){
var be=context.be;
var tableName=parameters.table;
var defTable=be.tableStructures[tableName];
if(!defTable){
Function displayDetailGrid
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
detailControl.displayDetailGrid = function(opts,event){
var result;
event=event||{};
if(!('fixedFields' in opts)){
opts.fixedFields = calculateFixedFields();
Function checkDatabaseStructure
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
AppBackend.prototype.checkDatabaseStructure = async function checkDatabaseStructure(client){
var be=this;
var result = await client.query(`select setting from pg_settings where name='server_version';`).fetchUniqueValue();
if(result.value<be.config.db['min-version']){
console.log('PARA INSTALACIONES VIEJAS QUE NO USEN generatedAs O NO ACTUALICEN operativos:');
Function displayBody
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
grid.displayBody=function displayBody(){
var grid = this;
var depotsToDisplay = grid.filterDepots(grid.depots);
grid.sortDepotsToDisplay = function sortDepotsToDisplay(depotsToDisplay){
if(grid.view.sortColumns.length>0){