Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
Safe to modify rowCount in code?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Safe to modify rowCount in code? (Read 748 times)
RadioCat
Newbie
Posts: 5
Karma: 0
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?
Logged
Patrick M. Hausen
Hero Member
Posts: 6848
Karma: 575
Re: Safe to modify rowCount in code?
«
Reply #1 on:
August 14, 2023, 01:01:56 am »
How about a merge request?
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
RadioCat
Newbie
Posts: 5
Karma: 0
Re: Safe to modify rowCount in code?
«
Reply #2 on:
August 14, 2023, 02:01:45 am »
i.e. change it for everyone, submit for approval? I'm happy to go that path. I'll see if I can make it gracefully-configurable.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
Safe to modify rowCount in code?