Skip to content

feat: consolidate web_ui_ config fields under web_ui section #4994

Description

@akorobkov-nvda

Is this a new feature, an enhancement, or a change to existing functionality?

Enhancement

How would you describe the priority of this feature request

Low (would be nice)

Please provide a clear description of problem this feature solves

The admin web UI configuration uses a flat naming convention with web_ui_ prefix:

web_ui_sidebar_tools = [...]
web_ui_logs_link_template = "..."

As more web UI settings are added, this flat structure becomes harder to maintain and document. A nested [web_ui] section would be cleaner and more consistent with other config sections

Feature Description

As an operator, I want related web UI configuration grouped under a [web_ui] section so that the config file is easier to navigate and understand.

Describe your ideal solution

Migrate from flat to nested structure:

# Before (current):
web_ui_sidebar_tools = [...]
web_ui_logs_link_template = "..."

# After (proposed):
[web_ui]
logs_link_template = "..."

[[web_ui.sidebar_tools]]
name = "grafana"
display_name = "Grafana"
url = "https://grafana.example.com"
  1. Add new nested WebUiConfig struct with sidebar_tools and logs_link_template fields
  2. Use #[serde(alias = "web_ui_sidebar_tools")] and #[serde(alias = "web_ui_logs_link_template")] to accept old field names during transition
  3. Log deprecation warning when old flat fields are used
  4. Update documentation to show new nested structure

Describe any alternatives you have considered

  • Keep flat structure indefinitely - works but gets messier as more settings are added
  • Hard break without aliases - too disruptive for existing deployments

Additional context

Affected files:

  • crates/api-core/src/cfg/file.rs - Config struct definitions
  • crates/api-core/src/cfg/load.rs - Config loading and validation
  • crates/api-core/src/test_support/default_config.rs - Test defaults
  • deploy/files/nico-api/nico-api-site-config.toml - Example config
  • crates/api-core/src/cfg/README.md - Documentation

Related PRs:

Code of Conduct

  • I agree to follow NVIDIA Infra Controller's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

featureFeature (deprecated - use issue type, but it's needed for reporting now)

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions