Add open log dir button to server-console

This commit is contained in:
Ryan Huffman 2016-08-17 09:29:45 -07:00
parent 4c663b9d18
commit 0e259dcd29
3 changed files with 8 additions and 0 deletions

View file

@ -8,6 +8,7 @@
<body onload="ready()">
<div class="search">
<input id="search-input" placeholder="filter" />
<button id="view-logs">Open Log Directory</button>
</div>
<ul class="tabs top">

View file

@ -218,6 +218,8 @@ ready = function() {
appendLogMessages('ac');
}
$('#view-logs').on('click', remote.openLogDirectory);
// handle filtering of table rows on input change
$('#search-input').on('input', function() {
filter = $(this).val().toLowerCase();

View file

@ -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;