diff --git a/console/src/index.js b/console/src/index.js index 032ed8eb06..2f45f39320 100755 --- a/console/src/index.js +++ b/console/src/index.js @@ -35,22 +35,20 @@ $(function() { return; } + if (sendingProcess.name == "domain-server") { + toggleManageButton(settingsButton, + sendingProcess.state == HFProcess.ProcessStates.STARTED); + } + switch (sendingProcess.state) { case HFProcess.ProcessStates.STOPPED: processCircle.attr('class', 'circle stopped'); break; case HFProcess.ProcessStates.STOPPING: - if (sendingProcess.name == "domain-server") { - console.log("STOPPING DS"); - toggleManageButton(settingsButton, false); - } - processCircle.attr('class', 'circle stopping'); break; case HFProcess.ProcessStates.STARTED: - if (sendingProcess.name == "domain-server") { - toggleManageButton(settingsButton, true); - } + processCircle.attr('class', 'circle started'); break; @@ -63,7 +61,6 @@ $(function() { switch (sendingGroup.state) { case HFProcess.ProcessGroupStates.STOPPED: - break; case HFProcess.ProcessGroupStates.STOPPING: // if the process group is stopping, the stop button should be disabled toggleManageButton(stopButton, false); diff --git a/console/src/main.js b/console/src/main.js index 7950a629e3..e87384f235 100644 --- a/console/src/main.js +++ b/console/src/main.js @@ -136,9 +136,9 @@ app.on('ready', function() { } }; - function sendProcessGroupUpdate(process) { + function sendProcessGroupUpdate(processGroup) { if (mainWindow) { - mainWindow.webContents.send('process-group-update', process); + mainWindow.webContents.send('process-group-update', processGroup); } } @@ -175,6 +175,8 @@ app.on('ready', function() { for (let process of homeServer.processes) { sendProcessUpdate(process); } + + sendProcessGroupUpdate(homeServer); }); } });