diff --git a/br-webui/_includes/header.liquid b/br-webui/_includes/header.liquid index b9f8c749..db3b00de 100644 --- a/br-webui/_includes/header.liquid +++ b/br-webui/_includes/header.liquid @@ -14,6 +14,19 @@ function shutdown() { socket.emit('shutdown'); } + + function send() { + console.log('got into the function send'); + socket.emit('sendlog'); + + } + + socket.on('getlogs', function(data) { + console.log("In get logs"); + console.log(data); + }); + + @@ -42,6 +55,10 @@ diff --git a/br-webui/index.js b/br-webui/index.js index 29cb0143..096fc01a 100644 --- a/br-webui/index.js +++ b/br-webui/index.js @@ -1593,6 +1593,13 @@ io.on('connection', function(socket) { }); }); + socket.on('sendlog', function(data) { + logger.log('sendlog'); + var cmd = child_process.exec('ls', function (error, stdout, stderr) { + socket.emit('getlogs',"hi"); + logger.log('entered function sendlog'); + }); + }); var uploader = new SocketIOFile(socket, { // uploadDir: { // multiple directories // music: 'data/music',