Comments (9)
This doesn't really fit well together in the schema of settings that are managed via the UI: They are all stored in the database and have UI where the user can change them, so reading them from a config file (or env vars) would be a bit strange - they'd either need to always override the DB settings or somehow be imported into the DB (and updated if they change at a later time).
Not sure that's a good solution for this tbh...
from indico-plugins.
How about the timezone, for instance. That's the approach I had in mind when I opened the ticket. Right now it's an UI setting but can also be defined with the DEFAULT_TIMEZONE environmental variable and hence, on a configuration file. Another example would be the S3 plugin, that can also be configured using this approach.
With this change we could leverage the configuration as code advantages also for this plugin.
from indico-plugins.
DEFAULT_TIMEZONE
cannot be fully overridden in the UI; you can only set a different time zone for specific categories or events..
from indico-plugins.
How about disabling UI edition if the config option is specified using an environmental variable? I've seen this approach around and that would clearly establish priorities.
from indico-plugins.
So I was thinking about this, and introducing individual env vars seems like a bit of a mess (especially considering data types - settings are stored as JSON after all!).
So my suggestion (ideally for you to contribute) would be to add an indico.conf setting SETTINGS_OVERRIDE
that can be set to a dict like this:
SETTINGS_OVERRIDE = {
'plugin_piwik': {
'server_api_url': 'https://example.com'
}
}
In the get_all_settings
and get_setting
util you then add code that takes this config setting into account and instead of getting the value from the DB, the one from the override will be used.
The documentation for this setting would clearly mention that it's an advanced feature and module/setting names need to be looked up in the code if someone wants to use it.
As a bonus, the plugin settings form rendered from RHPluginDetails
could disable the form fields for any setting locked like this so an admin doesn't try to change it via the web UI.
from indico-plugins.
That's sounds like a nice solution for what we're looking for :)
from indico-plugins.
Just to avoid any misunderstanding and both sides waiting for the other to add it: Are you willing to contribute this?
It should be pretty straightforward and while the two utils I mentioned in my last comment don't have their own unit tests, the SettingsProxy
-related tests should probably cover it well enough.
from indico-plugins.
We should be able to work on this at some point, probably in a couple of weeks. Does that sound good to you?
from indico-plugins.
Sure! Sounds like something for 3.2.1 or 3.2.2 then ;)
from indico-plugins.
Related Issues (20)
- Zoom plugin: add ability to configure cohosts
- Zoom plugin: OAuth integration HOT 11
- Configuration info. HOT 1
- String defect HOT 5
- i18n strings not referenced from Admin interface HOT 2
- Add plugin: owncloud
- Zoom plugin: Handle meeting expirations
- Jupyter preview: Update nbconvert dependency
- Add hCaptcha plugin
- Zoom: Do not break meetings with registration enabled HOT 1
- Citadel Search: Remember sort order while on page?
- Citadel Search: Wrong counts in sidebar when searching in categories
- Zoom: Option to create "Zoom participants" from registered event participans
- Minor issue: Release 3.2.2 HOT 1
- Zoom: Do not fail if existing co-host can no longer be found
- storage_s3: Password saved in plain text in database HOT 1
- CERN Indico Event Statistics Broken HOT 4
- Allow chunked uploads to S3
- Move CI to GitHub actions instead of Travis HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from indico-plugins.