Safe to modify rowCount in code?

Started by RadioCat, August 14, 2023, 12:43:10 AM

Previous topic - Next topic
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?

How about a merge request?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

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.