OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: RadioCat on August 14, 2023, 12:43:10 AM

Title: Safe to modify rowCount in code?
Post by: RadioCat 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 (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?
Title: Re: Safe to modify rowCount in code?
Post by: Patrick M. Hausen on August 14, 2023, 01:01:56 AM
How about a merge request?
Title: Re: Safe to modify rowCount in code?
Post by: RadioCat 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.