mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
FE: UI_DEFAULT_PAGE_SIZE #1181
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -123,7 +123,7 @@
|
|||||||
<!-- page script ----------------------------------------------------------- -->
|
<!-- page script ----------------------------------------------------------- -->
|
||||||
<script>
|
<script>
|
||||||
var deviceStatus = 'all';
|
var deviceStatus = 'all';
|
||||||
var tableRows = getCache ("nax_parTableRows") == "" ? 20 : getCache ("nax_parTableRows") ;
|
var tableRows = getCache ("nax_parTableRows") == "" ? parseInt(getSetting("UI_DEFAULT_PAGE_SIZE")) : getCache ("nax_parTableRows") ;
|
||||||
var tableOrder = getCache ("nax_parTableOrder") == "" ? [[3,'desc'], [0,'asc']] : JSON.parse(getCache ("nax_parTableOrder")) ;
|
var tableOrder = getCache ("nax_parTableOrder") == "" ? [[3,'desc'], [0,'asc']] : JSON.parse(getCache ("nax_parTableOrder")) ;
|
||||||
|
|
||||||
var tableColumnHide = [];
|
var tableColumnHide = [];
|
||||||
|
|||||||
@@ -169,7 +169,7 @@
|
|||||||
|
|
||||||
var eventsType = 'all';
|
var eventsType = 'all';
|
||||||
var period = '1 day';
|
var period = '1 day';
|
||||||
var tableRows = 25;
|
var tableRows = parseInt(getSetting("UI_DEFAULT_PAGE_SIZE"));
|
||||||
|
|
||||||
// Read parameters & Initialize components
|
// Read parameters & Initialize components
|
||||||
main();
|
main();
|
||||||
@@ -181,7 +181,7 @@ function main() {
|
|||||||
period = getCookie(parPeriod) === "" ? "1 day" : getCookie(parPeriod);
|
period = getCookie(parPeriod) === "" ? "1 day" : getCookie(parPeriod);
|
||||||
$('#period').val(period);
|
$('#period').val(period);
|
||||||
|
|
||||||
tableRows = getCookie(parTableRows) === "" ? 50 : parseInt(getCookie(parTableRows), 10);
|
tableRows = getCookie(parTableRows) === "" ? parseInt(getSetting("UI_DEFAULT_PAGE_SIZE")) : parseInt(getCookie(parTableRows), 10);
|
||||||
|
|
||||||
// Initialize components
|
// Initialize components
|
||||||
initializeDatatable();
|
initializeDatatable();
|
||||||
|
|||||||
@@ -213,6 +213,33 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"function": "DEFAULT_PAGE_SIZE",
|
||||||
|
"type": {
|
||||||
|
"dataType": "integer",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"elementType": "input",
|
||||||
|
"elementOptions": [{ "type": "number" }],
|
||||||
|
"transformers": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"maxLength": 50,
|
||||||
|
"default_value": 20,
|
||||||
|
"options": [],
|
||||||
|
"localized": [],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"string": "Default page size"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"string": "Default number of items shown in tables per page, for example in teh Devices lists."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"function": "DEV_SECTIONS",
|
"function": "DEV_SECTIONS",
|
||||||
"type": {
|
"type": {
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ require 'php/templates/header.php';
|
|||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
const table = $('#notificationsTable').DataTable({
|
const table = $('#notificationsTable').DataTable({
|
||||||
|
"pageLength": parseInt(getSetting("UI_DEFAULT_PAGE_SIZE")) ,
|
||||||
"columns": [
|
"columns": [
|
||||||
{ "data": "timestamp" ,
|
{ "data": "timestamp" ,
|
||||||
"render": function(data, type, row) {
|
"render": function(data, type, row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user