From 275f67ae12bba4498035817b0c99d7d5b2025e50 Mon Sep 17 00:00:00 2001 From: Parth Dagia Date: Tue, 14 Apr 2026 00:27:21 +0530 Subject: [PATCH] chore: remove leftover debug console.log statements from WebAPP/App/ Removes 25 active console.log debug calls across 20 files in WebAPP/App/Controller/ and WebAPP/App/Model/. These fired during normal user actions (page loads, cell edits, case selection) and in some cases dumped entire model objects to the browser console. Scope notes: - Preserves console.error (intentional error logging) and commented-out // console.log(...) lines (out of scope). - Skips WebAPP/Classes/*.js since those are upstream-overlap surface per docs/UPSTREAM_SYNC.md and would risk merge conflicts at the next MUIO sync. Follows the cleanup precedent from #422, which removed similar debug logs from Pivot.js, DataModelResult.Class.js, and Const.Class.js during the v5.5 sync. Fixes #436 --- WebAPP/App/Controller/AddCase.js | 8 -------- WebAPP/App/Controller/DataFile.js | 7 ------- WebAPP/App/Controller/LegacyImport.js | 3 --- WebAPP/App/Controller/RESViewerMermaid.js | 1 - WebAPP/App/Controller/RTSM.js | 1 - WebAPP/App/Controller/RYDtb.js | 3 --- WebAPP/App/Controller/RYS.js | 1 - WebAPP/App/Controller/RYT.js | 1 - WebAPP/App/Controller/RYTC.js | 1 - WebAPP/App/Controller/RYTTs.js | 1 - WebAPP/App/Controller/Settings.js | 4 +--- WebAPP/App/Controller/ViewData.js | 2 -- WebAPP/App/Model/RESViewer.Model.js | 9 --------- WebAPP/App/Model/RS.Model.js | 1 - WebAPP/App/Model/RT.Model.js | 1 - WebAPP/App/Model/RTSM.Model.js | 2 -- WebAPP/App/Model/RYDtb.Model.js | 4 ---- WebAPP/App/Model/RYSeDt.Model.js | 2 -- WebAPP/App/Model/RYTSM.Model.js | 1 - WebAPP/App/Model/RYTs.Model.js | 4 ---- 20 files changed, 1 insertion(+), 56 deletions(-) diff --git a/WebAPP/App/Controller/AddCase.js b/WebAPP/App/Controller/AddCase.js index e3e542e1c..f6ef373bd 100644 --- a/WebAPP/App/Controller/AddCase.js +++ b/WebAPP/App/Controller/AddCase.js @@ -54,7 +54,6 @@ export default class AddCase { AddCase.initPage(model); }) .catch(error => { - console.log(' error ', error) Message.bigBoxDanger(error); }) } @@ -96,7 +95,6 @@ export default class AddCase { } static initEvents(model) { - console.log('model ', model) let $divTech = $("#osy-gridTech"); let $divTechGroup = $("#osy-gridTechGroup"); let $divStg = $("#osy-gridStg"); @@ -326,7 +324,6 @@ export default class AddCase { //sortingn ne utice na rowid i id i index var rowid = $divTech.jqxGrid('getrowid', id); - console.log('rowid id ', rowid,id) //var rows = $divTech.jqxGrid('getboundrows'); // // console.log('rows[rowId].uid ', rows[rowid].uid); // // console.log('rows[id]].uid ', rows[id].uid); @@ -340,7 +337,6 @@ export default class AddCase { //provjera da brisemo tacnu tehnologiju //console.log('techIds ', model.techs[id].TechId,techId, htmltechId, model.techNames[techId], model.techNames[model.techs[id].TechId], model.techNames[htmltechId]) if(model.techs[id].TechId != techId ||techId != htmltechId){ - console.log('delete tech') Message.bigBoxDanger('Technology deletion error', `Wrong index!! ${model.techs[id].Tech}?`, 3000); } if(model.techs[id].TG.length>0){ @@ -586,7 +582,6 @@ export default class AddCase { model.seasons[rowBoundIndex][column] = value; if (column == 'Se') { var seId = $divSe.jqxGrid('getcellvalue', rowBoundIndex, 'SeId'); - console.log('seId ', seId, value) model.seNames[seId] = value; } }); @@ -743,7 +738,6 @@ export default class AddCase { delete model.dtbNames[dtbId]; //ovdje trebamo izbaciti season iz timeslice definicije $.each(model.timeslices, function (id, obj) { - console.log('dtbCount ', id, obj, dtbId) if(obj.DTB == dtbId){ obj.DTB='DTB_0'; } @@ -900,7 +894,6 @@ export default class AddCase { let defaultStg = DefaultObj.defaultStg(); model.stg.push(JSON.parse(JSON.stringify(defaultStg[0], ['StgId', 'Stg', 'Desc',"UnitId", "TTS","TFS", "Operation"]))); //update stgames - console.log('defaultStg ',defaultStg) model.stgNames[defaultStg[0]['StgId']] = defaultStg[0]['Stg']; //add row $divStg.jqxGrid('addrow', null, defaultStg); @@ -934,7 +927,6 @@ export default class AddCase { model.stg[rowBoundIndex][column] = value; if (column == 'Stg') { var stgId = $divStg.jqxGrid('getcellvalue', rowBoundIndex, 'StgId'); - console.log('stgId ', stgId, value) model.stgNames[stgId] = value; } }); diff --git a/WebAPP/App/Controller/DataFile.js b/WebAPP/App/Controller/DataFile.js index d34f2c7e5..4e2799373 100644 --- a/WebAPP/App/Controller/DataFile.js +++ b/WebAPP/App/Controller/DataFile.js @@ -569,7 +569,6 @@ export default class DataFile { } }) .catch(error => { - console.log('error ',error) Message.loaderEnd(); Message.bigBoxDanger('Error message', error, null); }) @@ -582,7 +581,6 @@ export default class DataFile { e.stopImmediatePropagation(); Html.renderScOrder( model.scBycs[model.cs]); Message.clearMessages(); - console.log('select, ', model) var caserunanme = $(this).attr('data-ps'); model.cs = caserunanme; Html.renderScOrder( model.scBycs[model.cs]); @@ -616,7 +614,6 @@ export default class DataFile { }) .then(data => { let [DataFile, ResultCSV] = data; - console.log('data ', data) if (ResultCSV.length != 0) { $(".Results").show(); Html.renderCSV(ResultCSV, model.cs) @@ -758,7 +755,6 @@ export default class DataFile { }) .catch(error => { - console.log(error) Message.danger(error); }); } @@ -836,7 +832,6 @@ export default class DataFile { }) .catch(error => { - console.log(error) Message.danger(error); }); } @@ -934,8 +929,6 @@ export default class DataFile { $("#osy-lpOutput").empty(); $('.Cases').tab('show'); - console.log('response clean up ', response) - Sidebar.Reload(model.casename); Message.clearMessages(); diff --git a/WebAPP/App/Controller/LegacyImport.js b/WebAPP/App/Controller/LegacyImport.js index bceb3179e..903fa234b 100644 --- a/WebAPP/App/Controller/LegacyImport.js +++ b/WebAPP/App/Controller/LegacyImport.js @@ -110,7 +110,6 @@ export default class LegacyImport { var date = $("#osy-date").val(); var currency = $("#osy-currency").val(); var templateName = $("#osy-template").val(); - console.log('templateName ', templateName) let data = false; if ($('#osy-data').is(":checked")){ data = true; @@ -127,7 +126,6 @@ export default class LegacyImport { } Osemosys.importTemplate(POSTDATA) .then(response => { - console.log('response ', response) if (response.status_code == "success") { Message.loaderEnd(); //console.log('response ', response) @@ -139,7 +137,6 @@ export default class LegacyImport { } }) .catch(error => { - console.log('error ', error) Message.loaderEnd(); Message.bigBoxDanger('Error message', error, null); }) diff --git a/WebAPP/App/Controller/RESViewerMermaid.js b/WebAPP/App/Controller/RESViewerMermaid.js index 52c7a0a60..73e229133 100644 --- a/WebAPP/App/Controller/RESViewerMermaid.js +++ b/WebAPP/App/Controller/RESViewerMermaid.js @@ -30,7 +30,6 @@ export default class RESViewer { this.initEvents(model); }) .catch(error => { - console.log('error ', error) Message.warning(error); }); } diff --git a/WebAPP/App/Controller/RTSM.js b/WebAPP/App/Controller/RTSM.js index c1ae1d5a8..a8abeac8f 100644 --- a/WebAPP/App/Controller/RTSM.js +++ b/WebAPP/App/Controller/RTSM.js @@ -211,7 +211,6 @@ export default class RTSM { e.stopImmediatePropagation(); var sc = $("#osy-scenarios").val(); Html.lblScenario(sc); - console.log('sc ', sc) Grid.applyRSTMFilter($divGrid, sc, model.param); Message.smallBoxInfo('Info', 'Scenario data opened!', 2000); }); diff --git a/WebAPP/App/Controller/RYDtb.js b/WebAPP/App/Controller/RYDtb.js index b7eec42d5..a231677c3 100644 --- a/WebAPP/App/Controller/RYDtb.js +++ b/WebAPP/App/Controller/RYDtb.js @@ -115,9 +115,6 @@ export default class RYDtb { delete obj.ScId; }); - console.log('param ', param) - console.log('savedata ', saveData) - Osemosys.updateData(saveData, param, "RYDtb.json") .then(response => { //model.gridData[model.param] = JSON.parse(daRYTsData); diff --git a/WebAPP/App/Controller/RYS.js b/WebAPP/App/Controller/RYS.js index 3a87f5f00..914a7b8f7 100644 --- a/WebAPP/App/Controller/RYS.js +++ b/WebAPP/App/Controller/RYS.js @@ -51,7 +51,6 @@ export default class RYS { static initPage(model) { - console.log('model ', model) Message.clearMessages(); //Navbar.initPage(model.casename); Html.title(model.casename, model.PARAMNAMES[model.param], GROUPNAMES[model.group]); diff --git a/WebAPP/App/Controller/RYT.js b/WebAPP/App/Controller/RYT.js index 4a2be359d..84cc14dc5 100644 --- a/WebAPP/App/Controller/RYT.js +++ b/WebAPP/App/Controller/RYT.js @@ -51,7 +51,6 @@ export default class RYT { static initPage(model) { - console.log('model ', model) Message.clearMessages(); //Navbar.initPage(model.casename); Html.title(model.casename, model.PARAMNAMES[model.param], GROUPNAMES[model.group]); diff --git a/WebAPP/App/Controller/RYTC.js b/WebAPP/App/Controller/RYTC.js index 89bc364e5..b4aba653b 100644 --- a/WebAPP/App/Controller/RYTC.js +++ b/WebAPP/App/Controller/RYTC.js @@ -53,7 +53,6 @@ export default class RYTC { } }) .catch(error => { - console.log('error ', error) if (error.status_code == 'CaseError') { MessageSelect.init(RYTC.refreshPage.bind(RYTC)); } diff --git a/WebAPP/App/Controller/RYTTs.js b/WebAPP/App/Controller/RYTTs.js index a0c2ea98f..24d916fa2 100644 --- a/WebAPP/App/Controller/RYTTs.js +++ b/WebAPP/App/Controller/RYTTs.js @@ -224,7 +224,6 @@ export default class RYTTs { } }).on('cellvaluechanged', function (event) { if (!pasteEvent) { - console.log('not paste') //Pace.restart(); pasteEvent = false; var args = event.args; diff --git a/WebAPP/App/Controller/Settings.js b/WebAPP/App/Controller/Settings.js index 6d38b8708..47e90c955 100644 --- a/WebAPP/App/Controller/Settings.js +++ b/WebAPP/App/Controller/Settings.js @@ -169,11 +169,9 @@ export default class Settings { }) .then((data) =>{ - let [session, module] = data; - console.log(pageId, module, session); + let [session, module] = data; const AddCase = module.default; const casename = session['session']; - console.log('units from strogae ',JSON.parse(localStorage.getItem("osy-units"))) // Call the onLoad method AddCase.refreshPage(casename); }) diff --git a/WebAPP/App/Controller/ViewData.js b/WebAPP/App/Controller/ViewData.js index 1f1a93db4..c1ecd5644 100644 --- a/WebAPP/App/Controller/ViewData.js +++ b/WebAPP/App/Controller/ViewData.js @@ -54,7 +54,6 @@ export default class ViewData { let $divTEGrid = $('#osy-gridRT'); var daRTGrid = new $.jqx.dataAdapter(model.srcRTGrid, { autoBind: true }); - console.log('daRTGrid', daRTGrid.records); Grid.Grid($divTEGrid, daRTGrid, model.columnsRT, { height:200}); Grid.applyTEviewDataFilter($divTEGrid); @@ -395,7 +394,6 @@ export default class ViewData { let rytData = $divGrid.jqxGrid('getdisplayrows'); let data = JSON.parse(JSON.stringify(rytData, ['Sc', 'paramName', 'UnitId', 'TechName', "CommName", "EmisName", "ConName", 'Ts', 'MoId'].concat(model.years))); - console.log('data', data); Base.prepareCSV(model.casename, data) .then(response =>{ Message.smallBoxInfo('Case study message', response.message, 3000); diff --git a/WebAPP/App/Model/RESViewer.Model.js b/WebAPP/App/Model/RESViewer.Model.js index fd443cdcb..73e182071 100644 --- a/WebAPP/App/Model/RESViewer.Model.js +++ b/WebAPP/App/Model/RESViewer.Model.js @@ -10,9 +10,6 @@ export class Model { let resData = DataModel.RESData(genData, DemandComms); let techData = DataModel.getTechData(genData); let commData = DataModel.getCommData(genData); - - - console.log('resData ', resData) let index = 0; let labelIndex = {}; @@ -208,12 +205,6 @@ export class Model { - console.log('source ', source) - console.log('target ', target) - console.log('value ', value) - console.log('labelLink ', labelLink) - console.log('colorLink ', colorLink) - let labelCount = source.length; this.selectedTechs = selectedTechs; this.dispayedTechs = dispayedTechs; diff --git a/WebAPP/App/Model/RS.Model.js b/WebAPP/App/Model/RS.Model.js index e999b2bf8..82cbed1e9 100644 --- a/WebAPP/App/Model/RS.Model.js +++ b/WebAPP/App/Model/RS.Model.js @@ -19,7 +19,6 @@ export class Model { let scenarios = genData['osy-scenarios']; this.param = param; - console.log(RSdata, group, PARAMETERS, param) let RSgrid = DataModel.RSgrid(genData, RSdata, PARAMETERS); let RSchart = DataModel.RSchart(genData, RSdata); let PARAMNAMES = DataModel.ParamName(PARAMETERS[group]); diff --git a/WebAPP/App/Model/RT.Model.js b/WebAPP/App/Model/RT.Model.js index 5ccb407bc..0c0c7a112 100644 --- a/WebAPP/App/Model/RT.Model.js +++ b/WebAPP/App/Model/RT.Model.js @@ -60,7 +60,6 @@ export class Model { if (['TMPAL', 'TMPAU'].includes(this.param)){ return true; }else{ - console.log('Number.isInteger(value) ', value, Number.isInteger(value)) if (value < 0) { return { result: false, message: 'Value must be positive!' }; } diff --git a/WebAPP/App/Model/RTSM.Model.js b/WebAPP/App/Model/RTSM.Model.js index 0589ee63f..0c8e0dd4f 100644 --- a/WebAPP/App/Model/RTSM.Model.js +++ b/WebAPP/App/Model/RTSM.Model.js @@ -18,8 +18,6 @@ export class Model { let RTSMgrid = DataModel.RTSMgrid(genData, RTSMdata, PARAMETERS); - console.log('RTSMgrid ', RTSMgrid) - // let techIds = DataModel.TechId(genData); // let ActivityTechs = DataModel.activityTechs(techs); // let ActivityComms = DataModel.activityComms(genData); diff --git a/WebAPP/App/Model/RYDtb.Model.js b/WebAPP/App/Model/RYDtb.Model.js index 38fa8f8bf..e8f73e03e 100644 --- a/WebAPP/App/Model/RYDtb.Model.js +++ b/WebAPP/App/Model/RYDtb.Model.js @@ -48,10 +48,6 @@ export class Model { } let cellsrenderer = function (row, columnfield, value, defaulthtml, columnproperties) { - // if(columnfield = '2020') - // console.log('ROW, COLUMN, VALUE ', row, columnfield, value) - if(row == 4 && columnfield == '2020') - console.log('row renderer ', row, 'row renderer value ', value) if (value === null || value === '') { return 'n/a'; } else { diff --git a/WebAPP/App/Model/RYSeDt.Model.js b/WebAPP/App/Model/RYSeDt.Model.js index b77305c87..6f44fd680 100644 --- a/WebAPP/App/Model/RYSeDt.Model.js +++ b/WebAPP/App/Model/RYSeDt.Model.js @@ -13,8 +13,6 @@ export class Model { let PARAMNAMES = DataModel.ParamName(PARAMETERS[group]); let RYSeDtgrid = DataModel.RYSeDtgrid(genData, RYCTsdata, PARAMETERS); - console.log('RYSeDtgrid ',RYSeDtgrid) - let years = genData['osy-years']; let seasons = genData['osy-se']; let scenarios = genData['osy-scenarios']; diff --git a/WebAPP/App/Model/RYTSM.Model.js b/WebAPP/App/Model/RYTSM.Model.js index 8d31d3086..c36c2a7ef 100644 --- a/WebAPP/App/Model/RYTSM.Model.js +++ b/WebAPP/App/Model/RYTSM.Model.js @@ -18,7 +18,6 @@ export class Model { let RYTSMgrid = DataModel.RYTSMgrid(genData, RYTSMdata, PARAMETERS); - console.log('RYTSMgrid ', RYTSMgrid) let techIds = DataModel.TechId(genData); let ActivityTechs = DataModel.activityTechs(techs); let ActivityComms = DataModel.activityComms(genData); diff --git a/WebAPP/App/Model/RYTs.Model.js b/WebAPP/App/Model/RYTs.Model.js index 6e97de7a7..61717492d 100644 --- a/WebAPP/App/Model/RYTs.Model.js +++ b/WebAPP/App/Model/RYTs.Model.js @@ -50,10 +50,6 @@ export class Model { } let cellsrenderer = function (row, columnfield, value, defaulthtml, columnproperties) { - // if(columnfield = '2020') - // console.log('ROW, COLUMN, VALUE ', row, columnfield, value) - if(row == 4 && columnfield == '2020') - console.log('row renderer ', row, 'row renderer value ', value) if (value === null || value === '') { return 'n/a'; } else {