Private GIT

Skip to content
Snippets Groups Projects
Commit fc724922 authored by Alexis Tyler's avatar Alexis Tyler
Browse files

Added underscore.js and fixed viewlog search

parent 16630151
Branches
Tags
No related merge requests found
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
"jquery-form": "~3.46.0", "jquery-form": "~3.46.0",
"jquery-timeago": "~1.4.3", "jquery-timeago": "~1.4.3",
"jquery-tokeninput": "~1.7.0", "jquery-tokeninput": "~1.7.0",
"bootstrap3-typeahead": "~3.1.1" "bootstrap3-typeahead": "~3.1.1",
"underscore": "~1.8.3"
} }
} }
File suppressed by a .gitattributes entry, the file's encoding is unsupported, or the file size exceeds the limit.
$(document).ready(function(){ $(document).ready(function(){
$('#minLevel,#logFilter,#logSearch').on('keyup change', function(){ $('#minLevel,#logFilter,#logSearch').on('keyup change', _.debounce(function (e) {
if ($('#logSearch').val().length > 0){ if ($('#logSearch').val().length > 0){
$('#logSearch').prop('disabled', true);
$('#logFilter option[value="<NONE>"]').prop('selected', true); $('#logFilter option[value="<NONE>"]').prop('selected', true);
$('#minLevel option[value=5]').prop('selected', true); $('#minLevel option[value=5]').prop('selected', true);
} }
$('#minLevel').prop('disabled', true); $('#minLevel').prop('disabled', true);
$('#logFilter').prop('disabled', true); $('#logFilter').prop('disabled', true);
$('#logSearch').prop('disabled', true);
document.body.style.cursor='wait'; document.body.style.cursor='wait';
url = srRoot + '/errorlogs/viewlog/?minLevel='+$('select[name=minLevel]').val()+'&logFilter='+$('select[name=logFilter]').val()+'&logSearch='+$('#logSearch').val(); url = srRoot + '/errorlogs/viewlog/?minLevel='+$('select[name=minLevel]').val()+'&logFilter='+$('select[name=logFilter]').val()+'&logSearch='+$('#logSearch').val();
$.get(url, function(data){ $.get(url, function(data){
...@@ -15,8 +13,7 @@ $(document).ready(function(){ ...@@ -15,8 +13,7 @@ $(document).ready(function(){
$('pre').html($(data).find('pre').html()); $('pre').html($(data).find('pre').html());
$('#minLevel').prop('disabled', false); $('#minLevel').prop('disabled', false);
$('#logFilter').prop('disabled', false); $('#logFilter').prop('disabled', false);
$('#logSearch').prop('disabled', false);
document.body.style.cursor='default'; document.body.style.cursor='default';
}); });
}); }, 500));
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment