Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Unified info widget settings #377

Merged
merged 4 commits into from
Oct 13, 2022
Merged

Feature: Unified info widget settings #377

merged 4 commits into from
Oct 13, 2022

Conversation

shamoon
Copy link
Collaborator

@shamoon shamoon commented Oct 12, 2022

As discussed, this PR implements "unified" settings for info widgets. It also updates the glances and unifi_console info widgets to use this. Appreciate any input.

  • Adds getPrivateWidgetOptions which optionally takes a widget type + index argument and returns... private widget options
  • private settings (currently "url", "username", "password", "key") are removed from the widget options API response so theyre not passed as query vars

This allows for "unified" widgets.yaml (and multiple instances of a widget without needing id or anything), no settings.yaml needed 🎉

e.g. widgets.yaml:

- glances:
    url: https://1.2.3.4:61208
    username: user
    password: pass
    label: RaspPi

- glances:
    url: https://5.6.7.8:61208
    username: user
    password: pass
    label: AnotherMachine

- unifi_console:
    url: https://9.10.11.12:443
    username: user
    password: pass

@benphelps benphelps merged commit 4ea2798 into gethomepage:main Oct 13, 2022
Copy link
Contributor

github-actions bot commented Feb 6, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants