From 1229ed9a7fa276c00f4b486cd82ed7c42032d789 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 22 Dec 2015 14:47:26 -0700 Subject: [PATCH] add launch arguments to console output --- console/src/css/style.less | 9 +++++++-- console/src/index.html | 10 ++++++---- console/src/index.js | 7 ++----- console/src/main.js | 21 ++++++++++----------- console/src/modules/hf-process.js | 2 +- 5 files changed, 26 insertions(+), 23 deletions(-) diff --git a/console/src/css/style.less b/console/src/css/style.less index de8a9d5d4d..dd68d4c4ab 100644 --- a/console/src/css/style.less +++ b/console/src/css/style.less @@ -16,11 +16,11 @@ html { body { height: 100%; overflow: auto; - font-family: 'Raleway', sans-serif; + font-family: 'Raleway'; background-image: url('../images/background.jpg'); margin: 0; font-size: 11px; - letter-spacing: 1px; + letter-spacing: 0.075rem; } input, textarea, select, a { @@ -48,6 +48,11 @@ header { margin: 0px 75px; color: white; + a { + color: white; + text-decoration: none; + } + p { text-align: center; } diff --git a/console/src/index.html b/console/src/index.html index 69548dbb42..20d4d460dc 100644 --- a/console/src/index.html +++ b/console/src/index.html @@ -28,10 +28,12 @@

Search

diff --git a/console/src/index.js b/console/src/index.js index 937b0ad970..a76e52f3ae 100755 --- a/console/src/index.js +++ b/console/src/index.js @@ -71,11 +71,8 @@ $(function() { } } - $('#process-interface .power-on').click(function() { - ipcRenderer.send('start-process', { name: 'interface' }); - }); - $('#process-interface .power-off').click(function() { - ipcRenderer.send('stop-process', { name: 'interface' }); + $('#last-visited-link').click(function() { + ipcRenderer.send('start-interface'); }); $('#manage-server #restart').click(function() { ipcRenderer.send('restart-server', { name: 'home' }); diff --git a/console/src/main.js b/console/src/main.js index 4dc7c82ab9..d7c81ae1e1 100644 --- a/console/src/main.js +++ b/console/src/main.js @@ -120,8 +120,6 @@ app.on('ready', function() { var logPath = path.join(app.getAppPath(), 'logs'); if (interfacePath && dsPath && acPath) { - var pInterface = new Process('interface', interfacePath); - var homeServer = new ProcessGroup('home', [ new Process('domain-server', dsPath), new Process('ac-monitor', acPath, ['-n6', '--log-directory', logPath]) @@ -129,12 +127,10 @@ app.on('ready', function() { // make sure we stop child processes on app quit app.on('quit', function(){ - pInterface.stop(); homeServer.stop(); }); var processes = { - interface: pInterface, home: homeServer }; @@ -152,19 +148,22 @@ app.on('ready', function() { } // handle process updates - // pInterface.on('state-update', sendProcessUpdate); homeServer.on('process-update', sendProcessUpdate); homeServer.on('state-update', sendProcessGroupUpdate); // start the home server homeServer.start(); - // ipcMain.on('start-process', function(event, arg) { - // pInterface.start(); - // }); - // ipcMain.on('stop-process', function(event, arg) { - // pInterface.stop(); - // }); + ipcMain.on('start-interface', function(event, arg) { + // create a new Interface instance - Interface makes sure only one is running at a time + var args = []; + if (args.url) { + args << "--url" << args.url + } + + var pInterface = new Process('interface', interfacePath); + pInterface.start(); + }); ipcMain.on('restart-server', function(event, arg) { homeServer.restart(); diff --git a/console/src/modules/hf-process.js b/console/src/modules/hf-process.js index 0d9c72c7d0..c8b9f8e57a 100755 --- a/console/src/modules/hf-process.js +++ b/console/src/modules/hf-process.js @@ -117,7 +117,7 @@ Process.prototype = extend(Process.prototype, { console.warn("Can't start process that is not stopped."); return; } - console.log("Starting " + this.command); + console.log("Starting " + this.command + " " + this.commandArgs.join(' ')); var logStdout = 'ignore', logStderr = 'ignore';