You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This appears to be the same syntax as I'm seeing in the form data being sent. Blame indicates it was changed 5 months ago covering another effort here: opnsense#5443
So, in my debugging I found that changing it like this:
Also in debugging, the localStorage appears to not have this setting. It does have a setting for severity after I've selected/messed with that setting.
With using the first index, some pages are now reporting:
Uncaught TypeError: that.rowCount is undefined
I'm also not seeing the row selection on any bootgrids, except I found one on Firewall -> Aliases. This bootgrid appears to operate correctly.
So it looks like there's possibly two issues to address here. The LogController, and the bootgrid javascript.
The LogController could probably go for validation of the input, and override with a default if given something non-integer.
The javascript could probably got for something similar.
The issue of the rowCount selector not appearing is something else, but I have a feeling it's related to this issue.
The text was updated successfully, but these errors were encountered:
I found that the rowCount isn't being detected by isArray() as an "array." And also that rowCount is showing up as an object. Adding some conditions for the object allows that ternary to work as expected, and select the [0] index of rowCount.
Looking at the blame on that line, the line, and the whole section hasn't changed for 3 years.
Seems something else changed with how the rowCount is being presented and the code isn't ready to handle it. I need to look into it further to see. So far it doesn't look like issues have been reported on it. It may still be something with my machine. I'll probably do a full wipe and reset to make sure before submitting anything.
Unconfirmed at the moment, but cursory investigation leads to a change in how rowCount is being sent to the API causes an exception.
The line in question is this one:
https://github.com/opnsense/core/blob/f159f68f9728348d35841721251325d613f4c053/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/LogController.php#L76
Checking the variables in this leads me to finding this in the
$itemsPerPage
:I found that a bit unusual. I think that's supposed to be an integer, for whatever value is specifically selected for the bootgrid.
Looking at the request, I found the following form data of the request:
So the rowCount is being treated like an indexed array? But it doesn't look like severity which appears to be an array.
Looking into that I found this here:
https://github.com/opnsense/core/blame/master/src/opnsense/www/js/jquery.bootgrid.js#L81
This appears to be the same syntax as I'm seeing in the form data being sent. Blame indicates it was changed 5 months ago covering another effort here: opnsense#5443
So, in my debugging I found that changing it like this:
Allows it to work again, and rowCount becomes an integer instead of an array.
Also in debugging, the localStorage appears to not have this setting. It does have a setting for severity after I've selected/messed with that setting.
With using the first index, some pages are now reporting:
I'm also not seeing the row selection on any bootgrids, except I found one on Firewall -> Aliases. This bootgrid appears to operate correctly.
So it looks like there's possibly two issues to address here. The LogController, and the bootgrid javascript.
The LogController could probably go for validation of the input, and override with a default if given something non-integer.
The javascript could probably got for something similar.
The issue of the rowCount selector not appearing is something else, but I have a feeling it's related to this issue.
The text was updated successfully, but these errors were encountered: