mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:48:09 +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()">
|
<body onload="ready()">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<input id="search-input" placeholder="filter" />
|
<input id="search-input" placeholder="filter" />
|
||||||
|
<button id="view-logs">Open Log Directory</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="tabs top">
|
<ul class="tabs top">
|
||||||
|
|
|
@ -43,6 +43,7 @@ ready = function() {
|
||||||
|
|
||||||
var domainServer = remote.getGlobal('domainServer');
|
var domainServer = remote.getGlobal('domainServer');
|
||||||
var acMonitor = remote.getGlobal('acMonitor');
|
var acMonitor = remote.getGlobal('acMonitor');
|
||||||
|
var openLogDirectory = remote.getGlobal('openLogDirectory');
|
||||||
|
|
||||||
var pendingLines = {
|
var pendingLines = {
|
||||||
'ds': new Array(),
|
'ds': new Array(),
|
||||||
|
@ -218,6 +219,12 @@ ready = function() {
|
||||||
appendLogMessages('ac');
|
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
|
// handle filtering of table rows on input change
|
||||||
$('#search-input').on('input', function() {
|
$('#search-input').on('input', function() {
|
||||||
filter = $(this).val().toLowerCase();
|
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.
|
// 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
|
// 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.
|
// which is absolutely not what we want for a taskbar application.
|
||||||
|
@ -309,6 +313,7 @@ global.homeServer = null;
|
||||||
global.domainServer = null;
|
global.domainServer = null;
|
||||||
global.acMonitor = null;
|
global.acMonitor = null;
|
||||||
global.userConfig = userConfig;
|
global.userConfig = userConfig;
|
||||||
|
global.openLogDirectory = openLogDirectory;
|
||||||
|
|
||||||
var LogWindow = function(ac, ds) {
|
var LogWindow = function(ac, ds) {
|
||||||
this.ac = ac;
|
this.ac = ac;
|
||||||
|
|
Loading…
Reference in a new issue