ytti / oxidized-web

Web UI + RESTful API for Oxidized
118 stars 72 forks source link

Migrate oxidized-web to an oxidized plugin #264

Open robertcheramy opened 2 months ago

robertcheramy commented 2 months ago

As discussed in PR #99 , oxidized-web needs the possibility to define more static settings than just which IP & port to listen to.

I would like to use the central configuration file (~/.config/oxidized/config) for every static settings (oxidized + oxidized-web). If oxidized-web at some point needs dynamic settings (user1 wants dark theme, user2 wants light theme), this must be handled by oxidized-web, not oxidized. A static setting in oxidized would be the path to the database where such dynamic settings are stored.

I would like to define (and document) the configuration settings inside oxidized-web and just tell oxidized to load the oxidized-web plugin. This opens the possibility to add more plugins from outside the core oxidized code.

The yaml file could look like this:

plugins:
  load:
    - oxidized-web
  oxidized-web:
    listen: 127.0.0.1:8888
    theme: dark
    hide_options:
      - enable
      - password
      - ip

This is a big change and I'd like to fix Issues and release a major version first.