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

Set stateDuration to 0 for all saved datatables to store the state indefinitely #1944

Merged
merged 6 commits into from
Oct 27, 2021
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
1 change: 1 addition & 0 deletions scripts/pi-hole/js/customcname.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ $(function () {
],
order: [[0, "asc"]],
stateSave: true,
stateDuration: 0,
stateSaveCallback: function (settings, data) {
utils.stateSaveCallback("LocalCNAMETable", data);
},
Expand Down
1 change: 1 addition & 0 deletions scripts/pi-hole/js/customdns.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ $(function () {
],
order: [[0, "asc"]],
stateSave: true,
stateDuration: 0,
stateSaveCallback: function (settings, data) {
utils.stateSaveCallback("LocalDNSTable", data);
},
Expand Down
6 changes: 1 addition & 5 deletions scripts/pi-hole/js/groups-adlists.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,17 +289,13 @@ function initTable() {
[10, 25, 50, 100, "All"],
],
stateSave: true,
stateDuration: 0,
stateSaveCallback: function (settings, data) {
utils.stateSaveCallback("groups-adlists-table", data);
},
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-adlists-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table
Expand Down
6 changes: 1 addition & 5 deletions scripts/pi-hole/js/groups-clients.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,13 @@ function initTable() {
[10, 25, 50, 100, "All"],
],
stateSave: true,
stateDuration: 0,
stateSaveCallback: function (settings, data) {
utils.stateSaveCallback("groups-clients-table", data);
},
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-clients-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table
Expand Down
6 changes: 1 addition & 5 deletions scripts/pi-hole/js/groups-domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,17 +246,13 @@ function initTable() {
[10, 25, 50, 100, "All"],
],
stateSave: true,
stateDuration: 0,
stateSaveCallback: function (settings, data) {
utils.stateSaveCallback("groups-domains-table", data);
},
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-domains-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Show group assignment column only on full page
Expand Down
6 changes: 1 addition & 5 deletions scripts/pi-hole/js/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,13 @@ $(function () {
[10, 25, 50, 100, "All"],
],
stateSave: true,
stateDuration: 0,
stateSaveCallback: function (settings, data) {
utils.stateSaveCallback("groups-table", data);
},
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table
Expand Down
5 changes: 1 addition & 4 deletions scripts/pi-hole/js/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,12 @@ $(function () {
emptyTable: "No issues found.",
},
stateSave: true,
stateDuration: 0,
stateSaveCallback: function (settings, data) {
utils.stateSaveCallback("messages-table", data);
},
stateLoadCallback: function () {
var data = utils.stateLoadCallback("messages-table");
// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID and blob columns
var hiddenCols = [0, 4, 5, 6, 7, 8];
Expand Down
1 change: 1 addition & 0 deletions scripts/pi-hole/js/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ $(function () {
[10, 25, 50, 100, "All"],
],
stateSave: true,
stateDuration: 0,
stateSaveCallback: function (settings, data) {
utils.stateSaveCallback("network_table", data);
},
Expand Down
1 change: 1 addition & 0 deletions scripts/pi-hole/js/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ $(function () {
[10, 25, 50, 100, "All"],
],
stateSave: true,
stateDuration: 0,
stateSaveCallback: function (settings, data) {
utils.stateSaveCallback("query_log_table", data);
},
Expand Down
1 change: 1 addition & 0 deletions scripts/pi-hole/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ $(function () {
scrollX: true,
order: [[2, "asc"]],
stateSave: true,
stateDuration: 0,
stateSaveCallback: function (settings, data) {
utils.stateSaveCallback("activeDhcpLeaseTable", data);
},
Expand Down