Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Net/Frr: Discussion around Diagnostic pages and API
« previous
next »
Print
Pages: [
1
]
Author
Topic: Net/Frr: Discussion around Diagnostic pages and API (Read 3179 times)
marcquark
Full Member
Posts: 103
Karma: 5
Net/Frr: Discussion around Diagnostic pages and API
«
on:
January 07, 2022, 08:06:05 pm »
Hey comm,
so i tried to put in some effort recently to make the FRR plugin more of a first-class citizen. First thing i did was (try to) get rid of the dependency on lodash on the diagnostics pages. It's not that hard to do, all the components are basically there anyway.
The thing is, it takes time, a lot of it. This may be in part because i don't do that much coding, especially frontend stuff. But still, i spent a whole day just reworking the BGP page.
I did put in quite a bit of time and effort to attempt to make a generic, extensible Diagnostics template that can be re-used for the other pages, which i would now hope are a breeze to implement. And i also learned a lot about the nifty internals of Bootgrid.
But still, i had to introduce some fiddly JS code to convert the API output into something Bootgrid can understand. Then some other stuff that all in all is not that much - but everytime i spend an evening or a few hours working on these pages i ask myself "Wouldn't it be better to just present FRR's textual output to the user and not think about it anymore"?
It would for sure be a lot less code. Less code, less bugs, more time to spend working on other improvements. I see no big impact on usability from an admin's perspective, at least personally i don't mind reading text vs having the same information prettified in HTML.
Then again, i'm not sure if this is in line with the vision of OPNsense as a whole, and i do believe that routing protocol support is going to become increasingly important for more users in the future. So i'd like to open this thread for a discussion around the plugin and where to go with it. Specifically the diagnostics section.
On another note, and somewhat related, is the topic of the API implementation. Right now it passes through whatever FRR produces which, on the one hand, is a bit annoying when you deal with Bootgrid for example. On the other hand, it can potentially make people with existing tooling very happy because they can just continue using whatever scripts they have for FRR already. Plus whatever code snippets may be out there on stackoverflow or Github will also just work.
So my Q is, is it better to move the complexity of restructuring FRR's JSON output into the Backend and try to make the API output more uniform? Or is that best left in the frontend? Again i can see arguments for both sides...
/discuss
(edit: if you'd like to see my WIP to understand what i'm talking about, here's the branch on my fork:
https://github.com/marcquark/plugins/tree/diagnostics-overhaul
)
«
Last Edit: January 07, 2022, 08:09:37 pm by marcquark
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Net/Frr: Discussion around Diagnostic pages and API