diff --git a/src/config.js b/src/config.js index 3c2d6de..a7b9fa7 100644 --- a/src/config.js +++ b/src/config.js @@ -5,7 +5,6 @@ const CONFIG_PATH = path.join(__dirname, "config.json"); function getConfig(name, configPath=CONFIG_PATH) { let config = fs.readFileSync(configPath); config = JSON.parse(config.toString()); - console.log('config', config); if (name) { return config[name] || {}; } else { @@ -14,7 +13,6 @@ function getConfig(name, configPath=CONFIG_PATH) { } function setConfig(config, callback, configPath=CONFIG_PATH) { - console.log('config', config) let oldConfig = fs.readFileSync(configPath); oldConfig = JSON.parse(oldConfig.toString()); oldConfig[config.NAME] = config; diff --git a/src/configRenderer.js b/src/configRenderer.js index d2ea255..c88b2b8 100644 --- a/src/configRenderer.js +++ b/src/configRenderer.js @@ -38,9 +38,7 @@ function addListeners() { let submit = document.getElementById("submit"); submit.addEventListener("click", async (event) => { event.preventDefault(); - console.log('click'); let newConfig = getNewConfig(); - console.log('newConfig', newConfig); window.electron.setConfig(newConfig, closeWindow); }) } diff --git a/src/dashboards.js b/src/dashboards.js index 4099f79..7d5f897 100644 --- a/src/dashboards.js +++ b/src/dashboards.js @@ -14,8 +14,6 @@ async function getOSDStatus() { try { const osStatus = await apiRequest('localhost:9200'); const osdStatus = await apiRequest('localhost:5601/api/status'); - console.log('osStatus', osStatus) - console.log('osdStatus', osdStatus); if (osStatus.name) { statuses["os"] = "green" } @@ -24,7 +22,6 @@ async function getOSDStatus() { statuses["osd"] = osdStatus.status.overall.state; } } catch (e) { - console.log('e', e); } return statuses; @@ -39,7 +36,6 @@ async function getOSDStatus() { } async function startProxy(config) { - console.log('config Proxy', config); //export variables in command line for (let variable in config) { process.env[variable] = config[variable]; @@ -50,37 +46,28 @@ async function startProxy(config) { proxy.stdout.on('data', function(data) { data = JSON.parse(data.toString()); - //console.log('stdout: ' + JSON.stringify(data)); }) proxy.stderr.on('data', function(data) { - //console.log('stderr: ' + data.toString()); }) proxy.on('exit', function(code) { - console.log('child process exited with code ' + code.toString()); }) return; } async function startOSD(config) { - console.log('config', config); //start osd var osd = spawn(config.OSD_PATH + '/bin/opensearch-dashboards'); osd.stdout.on('data', function(data) { data = JSON.parse(data.toString()); - console.log('stdout: ' + JSON.stringify(data)); }) osd.stderr.on('data', function(data) { - - console.log('stderr: ' + data.toString()); }) osd.on('exit', function(code) { - console.log('child process exited with code ' + code.toString()); - }) } diff --git a/src/renderer.js b/src/renderer.js index 25c6401..2a80071 100644 --- a/src/renderer.js +++ b/src/renderer.js @@ -26,7 +26,6 @@ async function populateFields() { function getActiveConfig() { let profile = document.getElementById("profile"); var name = profile.options[profile.selectedIndex].value; - console.log('name', name); return config[name] || null; } @@ -51,8 +50,6 @@ function addListeners() { //get active profile config let activeConfig = getActiveConfig(); - console.log(activeConfig); - await window.electron.startProxy(activeConfig); await window.electron.startOSD(activeConfig); waitForServer(); @@ -62,7 +59,6 @@ function addListeners() { async function waitForServer() { let osdStatus = await window.electron.getOSDStatus(); - console.log(osdStatus); if (osdStatus["os"] == "green" && osdStatus["osd"] == "green") { window.electron.ipcRenderer.invoke("swapURL", "http://localhost:5601"); } else { diff --git a/test/jest/dashboard.test.js b/test/jest/dashboard.test.js index 691fcdd..843f383 100644 --- a/test/jest/dashboard.test.js +++ b/test/jest/dashboard.test.js @@ -20,7 +20,6 @@ describe('Config Test', () => { let value = Math.floor(Math.random() * 1000); await dashboards.setConfig(map, value, ()=>{}, CONFIG_TEST_PATH); let config = await dashboards.getConfig(CONFIG_TEST_PATH); - console.log('config', config); expect(config[map]).toEqual(value); })