OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • [RFC] Every service should have an explicit Enable/Disable toggle
« previous next »
  • Print
Pages: [1]

Author Topic: [RFC] Every service should have an explicit Enable/Disable toggle  (Read 977 times)

doktornotor

  • Hero Member
  • *****
  • Posts: 709
  • Karma: 70
    • View Profile
[RFC] Every service should have an explicit Enable/Disable toggle
« on: September 02, 2024, 12:24:43 pm »
Willing to post PRs on Github eventually but want some comments first.

The worst offender here being the netflow thing, that is completely confusing with lots of threads about disabling the feature.

Another one that comes to mind is the legacy ntpd stuff. Wanting to disable something temporarily does not mean I want to ruin my configuration by removing all the pools / timeservers and redo it again when finished with testing chrony or whatever.

I'm probably missing some others here, again - please comment.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: [RFC] Every service should have an explicit Enable/Disable toggle
« Reply #1 on: September 02, 2024, 12:38:42 pm »
Disabling NTP was a workaround for a lack of a knob in the first place and introducing a "disableenable" type would have been more work and also not sure where to put it (system general vs. network time settings). Both being static pages doesn't help the cause. If you want to do it why not. Just be aware of repercussions of model migration and enable/disable toggles causing model validations to fail because of cross-reference between enable settings and other (required) fields in the future... like this one https://github.com/opnsense/core/commit/54ccb747cd

NetFlow is certainly a good target but also needs a model migration figuring out the implicit logic first to have users arrive in their correct state WRT the enable flag.

I've always felt that items from Reporting: Settings don't have good visilbilty but given your requirement they are already considered feature complete. Still, they both feel a bit out of sight on that particular page.


Cheers,
Franco
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: [RFC] Every service should have an explicit Enable/Disable toggle
« Reply #2 on: September 02, 2024, 12:40:11 pm »
PS: maybe a link to the settings page where to enable/disable would be an interesting addition to the services API?
Logged

doktornotor

  • Hero Member
  • *****
  • Posts: 709
  • Karma: 70
    • View Profile
Re: [RFC] Every service should have an explicit Enable/Disable toggle
« Reply #3 on: September 02, 2024, 01:03:26 pm »
Quote from: franco on September 02, 2024, 12:40:11 pm
Disabling NTP was a workaround for a lack of a knob in the first place and introducing a "disableenable" type would have been more work and also not sure where to put it (system general vs. network time settings).

The ntpd "logic" is particularly horrible, as noticed recently.  :-X

Quote from: franco on September 02, 2024, 12:40:11 pm
Just be aware of repercussions of model migration and enable/disable toggles causing model validations to fail because of cross-reference between enable settings and other (required) fields in the future... like this one https://github.com/opnsense/core/commit/54ccb747cd

Thanks, will check.

Quote from: franco on September 02, 2024, 12:40:11 pm
PS: maybe a link to the settings page where to enable/disable would be an interesting addition to the services API?

Does not sound bad.

And, a completely off-topic before I forget - the dashboard widgets' headers. Please, link that to appropriate menu items.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: [RFC] Every service should have an explicit Enable/Disable toggle
« Reply #4 on: September 02, 2024, 01:09:03 pm »
> And, a completely off-topic before I forget - the dashboard widgets' headers. Please, link that to appropriate menu items.

Yes, already on Stephan's TODO list. Found out recently while testing the new WOL widget.


Cheers,
Franco
Logged

doktornotor

  • Hero Member
  • *****
  • Posts: 709
  • Karma: 70
    • View Profile
Re: [RFC] Every service should have an explicit Enable/Disable toggle
« Reply #5 on: September 02, 2024, 01:15:11 pm »
Quote from: franco on September 02, 2024, 01:09:03 pm
Yes, already on Stephan's TODO list. Found out recently while testing the new WOL widget.

 8)
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • [RFC] Every service should have an explicit Enable/Disable toggle
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2