Skip to content

Commit

Permalink
Based on analyst feedback, disable tooltips and increase dnsdb sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mraoul committed May 3, 2019
1 parent 9ba910e commit b8176b6
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 86 deletions.
1 change: 1 addition & 0 deletions pydat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ The following is a list of keys that are recognized for searching specific
fields:

- **domainName**
- **tld**
- **administrativeContact_email**
- **administrativeContact_name**
- **administrativeContact_organization**
Expand Down
56 changes: 23 additions & 33 deletions pydat/pydat/pdns_sources/dnsdb/static/js/dnsdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,39 @@ $(document).ready(function(){

$('#dnsdb-tab').tabs();
$('.dnsdb-dnsres').dataTable(
{
"bJQueryUI": true,
//"bAutoWidth": false,
"oLanguage": {'sSearch': 'Filter:',
'sZeroRecords': 'No Records Found',
},
"aoColumnDefs": [
{"sWidth": "15%", 'bSortable': false, 'aTargets': [-1]},
],
"sPaginationType": "full_numbers",
"sDom" : '<"H"lfirp>t<"F"lfip>',
"iDisplayLength" : 50,
"fnDrawCallback": function(oSettings) {
$(".resolve").on("click", function() {
$(this).removeClass('link');
$(this).off('click');
resolve($(this).attr('domainName'), $(this));
});
}
});
{
"bJQueryUI": true,
//"bAutoWidth": false,
"oLanguage": {'sSearch': 'Filter:',
'sZeroRecords': 'No Records Found',
},
"aoColumnDefs": [
{"sWidth": "15%", 'bSortable': false, 'aTargets': [-1]},
],
"sPaginationType": "full_numbers",
"sDom" : '<"H"lfirp>t<"F"lfip>',
"aLengthMenu": [[50, 100, 200, 300], [50, 100, 200, 300]],
"iDisplayLength" : 100,
"fnDrawCallback": function(oSettings) {
$(".resolve").on("click", function() {
$(this).removeClass('link');
$(this).off('click');
resolve($(this).attr('domainName'), $(this));
});
}
});

/*
var tabName = $(document.createElement('span'));
tabName.text("PDNS" + direction + " Results");
tabName.css('position', 'absolute');
tabName.css('right', '20px');
tabName.css('font-size', '20px');
tabName.css('top', '13px');
$("#pdns-DNSDB").append(tabName);
*/


$(".pdns_search_form [name='result_format']").change(function(){
//Filtering should only be visible for List
if($(this).find("option:selected").val() == "list"){
$(this).parents().find('.form_filter').removeClass("novis").show();
}else{
$(this).parents().find('.form_filter').addClass("novis");
}
});
});


$(".pdns_search_form [name='result_format']").change();


});
4 changes: 2 additions & 2 deletions pydat/pydat/static/js/domain_advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ $(document).ready(function() {
$(this).tooltip( "option", "disabled", true );
$(this).off("click");
resolve($(this).attr('domainName'), $(this));
}).tooltip();
}); // .tooltip();
}
});

$('.dnsres').tooltip({ items: 'td[title]' });
// $('.dnsres').tooltip({ items: 'td[title]' });
}
});

Expand Down
40 changes: 0 additions & 40 deletions pydat/pydat/static/js/pdns.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,3 @@
$(document).ready(function() {

//search_toggle(0);

$('#pdns').tabs();

/*
$('#tab-DNSDB').tabs();
$('#tab-PassiveTotal').tabs();
$('.dnsres').dataTable(
{
"bJQueryUI": true,
//"bAutoWidth": false,
"oLanguage": {'sSearch': 'Filter:',
'sZeroRecords': 'No Records Found',
},
"aoColumnDefs": [
{"sWidth": "15%", 'bSortable': false, 'aTargets': [-1]},
],
"sPaginationType": "full_numbers",
"sDom" : '<"H"lfirp>t<"F"lfip>',
"iDisplayLength" : 50,
"fnDrawCallback": function(oSettings) {
$(".resolve").on("click", function() {
$(this).removeClass('link');
$(this).off('click');
resolve($(this).attr('domainName'), $(this));
});
}
});
var tabName = $(document.createElement('span'));
tabName.text("PDNS" + direction + " Results");
tabName.css('position', 'absolute');
tabName.css('right', '20px');
//tabName.css('color', 'white');
tabName.css('font-size', '20px');
tabName.css('top', '13px');
$("#pdns-DNSDB").append(tabName);
$("#pdns-PassiveTotal").append(tabName);
*/
});
22 changes: 11 additions & 11 deletions pydat/pydat/static/js/pydat.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ $(document).ready(function() {
//Associate toggle with click
$(".accordion" ).accordion({heightStyle: "content", collapsible: true});

$("#searchIcon").on("click", function() { search_toggle();});
$("#searchIcon").on("click", function() { search_toggle();});

$('.tooltip').tooltip();
// $('.tooltip').tooltip();

$("#" + active + "_link").addClass("tab_active");

Expand All @@ -30,7 +30,7 @@ $(document).ready(function() {
}else{
$(this).parents('tbody').find('.form_filter').addClass("novis");
}
});
});

$(".search_form [name='fmt']").change();

Expand Down Expand Up @@ -83,7 +83,7 @@ function search_toggle(duration){


function resolve(domain, target) {
var ep_url = resolve_url + domain + "/";
var ep_url = resolve_url + domain + "/";
$.ajax({
type: 'GET',
url: ep_url,
Expand All @@ -101,7 +101,7 @@ function resolve(domain, target) {
var arCell = document.createElement('td');
var anch = document.createElement('a');
$(anch).attr("href", data.ips[i].url);
$(anch).html(data.ips[i].ip);
$(anch).html(data.ips[i].ip);

$(arCell).append(anch);
$(arRow).append(arCell);
Expand All @@ -121,32 +121,32 @@ function resolve(domain, target) {
//Authors: Zygimantas Berziunas, Allan Jardine and vex
jQuery.fn.dataTableExt.oApi.fnSetFilteringDelay = function ( oSettings, iDelay ) {
var _that = this;

if ( iDelay === undefined ) {
iDelay = 250;
}

this.each( function ( i ) {
$.fn.dataTableExt.iApiIndex = i;
var
$this = this,
oTimerId = null,
sPreviousSearch = null,
anControl = $( 'input', _that.fnSettings().aanFeatures.f );

anControl.unbind( 'keyup' ).bind( 'keyup', function() {
var $$this = $this;

if (sPreviousSearch === null || sPreviousSearch != anControl.val()) {
window.clearTimeout(oTimerId);
sPreviousSearch = anControl.val();
sPreviousSearch = anControl.val();
oTimerId = window.setTimeout(function() {
$.fn.dataTableExt.iApiIndex = i;
_that.fnFilter( anControl.val() );
}, iDelay);
}
});

return this;
} );
return this;
Expand Down

0 comments on commit b8176b6

Please sign in to comment.