diff --git a/server-console/src/log.js b/server-console/src/log.js
index 3634eaeaa7..455b6828d8 100644
--- a/server-console/src/log.js
+++ b/server-console/src/log.js
@@ -43,6 +43,7 @@ ready = function() {
var domainServer = remote.getGlobal('domainServer');
var acMonitor = remote.getGlobal('acMonitor');
+ var openLogDirectory = remote.getGlobal('openLogDirectory');
var pendingLines = {
'ds': new Array(),
@@ -218,6 +219,12 @@ ready = function() {
appendLogMessages('ac');
}
+ // Binding a remote function directly does not work, so bind to a function
+ // that calls the remote function.
+ $('#view-logs').on('click', function() {
+ openLogDirectory();
+ });
+
// handle filtering of table rows on input change
$('#search-input').on('input', function() {
filter = $(this).val().toLowerCase();
diff --git a/server-console/src/main.js b/server-console/src/main.js
index 8f85872d0b..c47308aed6 100644
--- a/server-console/src/main.js
+++ b/server-console/src/main.js
@@ -285,6 +285,10 @@ function openFileBrowser(path) {
}
}
+function openLogDirectory() {
+ openFileBrowser(logPath);
+}
+
// NOTE: this looks like it does nothing, but it's very important.
// Without it the default behaviour is to quit the app once all windows closed
// which is absolutely not what we want for a taskbar application.
@@ -309,6 +313,7 @@ global.homeServer = null;
global.domainServer = null;
global.acMonitor = null;
global.userConfig = userConfig;
+global.openLogDirectory = openLogDirectory;
var LogWindow = function(ac, ds) {
this.ac = ac;