1
23.7 Legacy Series / Safe to modify rowCount in code?
« on: August 14, 2023, 12:43:10 am »
The default row count of 7 for lists/reports is unusable. Others have asked about if it can be changed, ref: https://forum.opnsense.org/index.php?topic=19958.0, no answers. But it should be super-easy to change...
The code is at /usr/local/opnsense/www/js/opnsense_bootgrid_plugin.js, or in the repo, src/opnsense/www/js/opnsense_bootgrid_plugin.js. At around line 130, we have:
let gridopt = {
ajax: true,
selection: true,
multiSelect: true,
rowCount:[7,14,20,50,100,-1],
url: params['search'],
ajaxSettings: {
contentType: 'application/json;charset=utf-8',
dataType: "json",
},
How dicey would it be to simply move 50 to the front of that list in the instance code? Are there any checksums or other checks that would flag it as corrupted?
The code is at /usr/local/opnsense/www/js/opnsense_bootgrid_plugin.js, or in the repo, src/opnsense/www/js/opnsense_bootgrid_plugin.js. At around line 130, we have:
let gridopt = {
ajax: true,
selection: true,
multiSelect: true,
rowCount:[7,14,20,50,100,-1],
url: params['search'],
ajaxSettings: {
contentType: 'application/json;charset=utf-8',
dataType: "json",
},
How dicey would it be to simply move 50 to the front of that list in the instance code? Are there any checksums or other checks that would flag it as corrupted?

