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 request: Enhance API to show some basic stats #148

Closed
mtressl opened this issue Oct 16, 2024 · 5 comments
Closed

Feature request: Enhance API to show some basic stats #148

mtressl opened this issue Oct 16, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@mtressl
Copy link

mtressl commented Oct 16, 2024

To allow some more comprehensive integrations I came across the idea of having some more statistics published through the API.
For example, total number of hosts, number of known hosts, number of unknown hosts.

As far as I understand the docs (https://github.com/aceberg/WatchYourLAN/blob/main/docs/API.md) this is currently not available.

aceberg added a commit that referenced this issue Oct 20, 2024
@aceberg aceberg added the enhancement New feature or request label Oct 20, 2024
@aceberg
Copy link
Owner

aceberg commented Oct 21, 2024

Done in 2.0.4

@aceberg aceberg closed this as completed Oct 21, 2024
@mtressl
Copy link
Author

mtressl commented Oct 21, 2024

Great, thank you very much @aceberg
Works like a charm... e.g. as Custom API integration in Homepage (https://gethomepage.dev/)

image

@Famku
Copy link

Famku commented Oct 23, 2024

Great, thank you very much @aceberg Works like a charm... e.g. as Custom API integration in Homepage (https://gethomepage.dev/)

image

can you please share your widget config?

@mtressl
Copy link
Author

mtressl commented Oct 24, 2024

can you please share your widget config?

sure, @Famku

    - Watch your LAN:
        icon: http://xxx/favicon.png
        href: http://xxx:8840/
        description: Network IP scanner
        server: my-docker-home
        container: watchyourlan
        widget:
          type: customapi
          url: http://xxx/api/status/eth0
          refreshInterval: 60000
          mappings:
            - field: Total # needs to be YAML string or object
              label: Total
              format: number # optional - defaults to text
            - field: Online # needs to be YAML string or object
              label: Online
              format: number # optional - defaults to text
            - field: Unknown # needs to be YAML string or object
              label: Unknown
              format: number # optional - defaults to text

@Famku
Copy link

Famku commented Oct 24, 2024

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants