mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-15 21:36:59 +02:00
Merge pull request #8453 from huffman/feat/sandbox-logs-button
Add a button to the sandbox log window to open the log directory
This commit is contained in:
commit
87964c89da
3 changed files with 13 additions and 0 deletions
|
@ -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">
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue