Private GIT

Skip to content
Snippets Groups Projects
Commit 9a820f0a authored by miigotu's avatar miigotu
Browse files

Merge pull request #2484 from OmgImAlexis/fix-viewlogs

Fixes viewlogs not keeping url state
parents 90b8b34a 5dd4ecdb
Branches
Tags
No related merge requests found
......@@ -19,6 +19,7 @@ function(){
$('#logSearch').prop('disabled', true);
url = '${sbRoot}/errorlogs/viewlog/?minLevel='+$('select[name=minLevel]').val()+'&logFilter='+$('select[name=logFilter]').val()+'&logSearch='+$('#logSearch').val()
$.get(url, function(data){
history.pushState('data', '', url);
$('pre').html($(data).find('pre').html());
$('#minLevel').removeProp('disabled');
$('#logFilter').removeProp('disabled');
......@@ -40,14 +41,20 @@ function(){
document.body.style.cursor='default';
});
$('#logSearch').keyup(function() {
$('#logSearch').on('keyup', function() {
if ( $('#logSearch').val().length == 0 ) {
$('#logFilter option[value=\\<NONE\\>]').prop('selected', true);
$('#logFilter option[value=<NONE>]').prop('selected', true);
$('#minLevel option[value=20]').prop('selected', true);
$('#minLevel').prop('disabled', false);
$('#logFilter').prop('disabled', false);
url = '${sbRoot}/errorlogs/viewlog/?minLevel='+$('select[name=minLevel]').val()+'&logFilter='+$('select[name=logFilter]').val()+'&logSearch='+$('#logSearch').val()
window.location.href = url
$.get(url, function(data){
history.pushState('data', '', url);
$('pre').html($(data).find('pre').html());
$('#minLevel').removeProp('disabled');
$('#logFilter').removeProp('disabled');
$('#logSearch').removeProp('disabled');
});
} else {
$('#minLevel').prop('disabled', true);
$('#logFilter').prop('disabled', true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment