Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(BIDS-2679) fix datatable debounce when searching #2802

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function showValidatorHist(index) {
}

$("#dash-validator-history-table").DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
lengthChange: false,
Expand Down Expand Up @@ -239,6 +240,7 @@ function renderProposedHistoryTable(data) {
}

$("#proposals-table").DataTable({
searchDelay: 0,
serverSide: false,
data: data,
processing: false,
Expand Down Expand Up @@ -471,6 +473,7 @@ $(document).ready(function () {
})
$.fn.DataTable.ext.pager.numbers_length = 5
var validatorsDataTable = (window.vdt = $("#validators").DataTable({
searchDelay: 0,
processing: true,
serverSide: false,
searching: true,
Expand Down
3 changes: 3 additions & 0 deletions static/js/notificationsCenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ function loadMonitoringData(data) {
stateLoadCallback: function (settings) {
return JSON.parse(localStorage.getItem("DataTables_" + settings.sInstance))
},
searchDelay: 0,
processing: true,
responsive: true,
scroller: true,
Expand Down Expand Up @@ -481,6 +482,7 @@ function loadNetworkData(data) {
stateLoadCallback: function (settings) {
return JSON.parse(localStorage.getItem("DataTables_" + settings.sInstance))
},
searchDelay: 0,
processing: true,
responsive: false,
scroller: true,
Expand Down Expand Up @@ -587,6 +589,7 @@ function loadValidatorsData(data) {
stateLoadCallback: function (settings) {
return JSON.parse(localStorage.getItem("DataTables_" + settings.sInstance))
},
searchDelay: 0,
processing: true,
// responsive: true,
paging: true,
Expand Down
2 changes: 2 additions & 0 deletions static/js/validatorRewards.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ function showSpinner() {

function showTable(data) {
$("#tax-table").DataTable({
searchDelay: 0,
processing: true,
serverSide: false,
ordering: true,
Expand Down Expand Up @@ -319,6 +320,7 @@ function updateSubscriptionTable(data, container) {
// $('#'+container+" thead").empty()
}
subsTable = $("#" + container).DataTable({
searchDelay: 0,
processing: true,
serverSide: false,
ordering: true,
Expand Down
1 change: 1 addition & 0 deletions templates/dashboard/tables.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
function createWithdrawalTable() {
if (!table) {
table = $("#withdrawal-table").DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
stateSave: true,
Expand Down
2 changes: 2 additions & 0 deletions templates/deposits.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
var q = usp.get('q')
{{ if len .DepositContract }}
var tbl = $('#initiated-deposits').DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
ordering: true,
Expand Down Expand Up @@ -46,6 +47,7 @@
})
{{end}}
var tblIncluded = $("#included-deposits").DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
ordering: true,
Expand Down
1 change: 1 addition & 0 deletions templates/epochs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script>
$(document).ready(function () {
$("#epochs").DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down
1 change: 1 addition & 0 deletions templates/eth1DepositsLeaderboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
var q = usp.get('q')
{{if len .DepositContract}}
var tbl = $('#deposits').DataTable({
searchDelay: 0,
stateSave: true,
stateSaveCallback: function (settings, data) {
data.start = 0
Expand Down
1 change: 1 addition & 0 deletions templates/execution/blocks.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
// data table
$(document).ready(function () {
$("#blocks").DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down
1 change: 1 addition & 0 deletions templates/mempoolview.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<script>
$("#mempool").DataTable({
searchDelay: 0,
searching: true,
pageLength: 25,
data: {{ .Data }},
Expand Down
4 changes: 4 additions & 0 deletions templates/pools_rocketpool.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
paging: true,
pagingType: "input",
searchDelay: 0,
processing: true,
ordering: true,
responsive: true,
Expand Down Expand Up @@ -107,6 +108,7 @@
},
paging: true,
pagingType: "input",
searchDelay: 0,
processing: true,
ordering: true,
responsive: true,
Expand Down Expand Up @@ -208,6 +210,7 @@
},
paging: true,
pagingType: "input",
searchDelay: 0,
processing: true,
ordering: true,
responsive: true,
Expand Down Expand Up @@ -286,6 +289,7 @@
order: [[0, "desc"]],
paging: true,
pagingType: "input",
searchDelay: 0,
processing: true,
ordering: true,
responsive: true,
Expand Down
4 changes: 4 additions & 0 deletions templates/slot/slot.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
$(document).ready(function () {
let slotNumber = {{ .Slot }} || 0
var depositsTblOpts = {
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down Expand Up @@ -188,6 +189,7 @@
$("#block_deposits").DataTable(depositsTblOpts)

let votesTblOpts = {
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down Expand Up @@ -234,6 +236,7 @@


let withdrawalOpts = {
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand All @@ -260,6 +263,7 @@
$("#block_withdrawals").DataTable(withdrawalOpts)

let blsChangeOpts = {
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down
1 change: 1 addition & 0 deletions templates/slots.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<script>
$(document).ready(function () {
var tblOpts = {
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down
2 changes: 2 additions & 0 deletions templates/user/notifications.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@

$(document).ready(function () {
$("#notifications").DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down Expand Up @@ -216,6 +217,7 @@
}
})
.DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down
6 changes: 6 additions & 0 deletions templates/validator/tables.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
var index = {{.Index}}
window.addEventListener('load', function() {
$('#blocks-table').DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
stateSave: true,
Expand Down Expand Up @@ -113,6 +114,7 @@

function createAttestationTable() {
$('#attestations-table').DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
stateSave: true,
Expand Down Expand Up @@ -182,6 +184,7 @@

function createWithdrawalTable() {
$('#withdrawal-table').DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
stateSave: true,
Expand Down Expand Up @@ -262,6 +265,7 @@

function createSyncTable() {
$('#sync-table').DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down Expand Up @@ -342,6 +346,7 @@
var index = {{.Index}}
window.addEventListener('load', function() {
$('#slashings-table').DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down Expand Up @@ -622,6 +627,7 @@ <h6 class="">This table displays the deposits received and processed by the beac
var index = {{.Index}}
window.addEventListener('load', function() {
$('#validator-history-table').DataTable({
searchDelay: 0,
processing: true,
details: false,
serverSide: true,
Expand Down
1 change: 1 addition & 0 deletions templates/validator_stats_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
stateLoadCallback: function (settings) {
return JSON.parse(localStorage.getItem("DataTables_" + settings.sInstance))
},
searchDelay: 0,
lengthChange: false,
dom: "Bfrtip",
buttons: ["copyHtml5", "excelHtml5", "csvHtml5", "pdfHtml5"],
Expand Down
1 change: 1 addition & 0 deletions templates/validators.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ <h6 class="dropdown-header"><span>Filter state</span> <span><span class="text-su
validatorsDataTable = $('#validators').DataTable({
search: q ? {search:q} : null,
pageLength: 25,
searchDelay: 0,
processing: true,
serverSide: true,
searching: false,
Expand Down
1 change: 1 addition & 0 deletions templates/validators_leaderboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script>
$(document).ready(function () {
var tblOpts = {
searchDelay: 0,
processing: true,
serverSide: true,
ordering: true,
Expand Down
1 change: 1 addition & 0 deletions templates/validators_slashings.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script>
$("#slashings").DataTable({
processing: true,
searchDelay: 0,
serverSide: true,
ordering: false,
searching: false,
Expand Down
2 changes: 2 additions & 0 deletions templates/withdrawals.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
var usp = new URLSearchParams(window.location.search)
var q = usp.get("q")
var tblWithdrawals = $("#withdrawals").DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down Expand Up @@ -82,6 +83,7 @@
}

var tblBLS = $("#blsChange").DataTable({
searchDelay: 0,
processing: true,
serverSide: true,
ordering: false,
Expand Down
Loading