Send netdisco-users mailing list submissions to
netdisco-users@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
netdisco-users-requ...@lists.sourceforge.net
You can reach the person managing the list at
netdisco-users-ow...@lists.sourceforge.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:
1. Re: how to use '_searchable' in a report (Oliver Gorwits)
--- Begin Message ---
Hi Eric
How are you getting on?
I think the option you want to add to your custom report is "show_sidebar:
true" (
https://github.com/netdisco/netdisco/wiki/Configuration#show_sidebar-optional
)
Then you will get a sidebar with a text field to enter the MAC address.
Hope that helps, and let us know if you need anything else,
oliver.
On Tue, 29 Apr 2025 at 19:32, Eric Bates <eba...@whoi.edu> wrote:
> We're trying to write a report which maps MAC address to IP.
>
> I've had some success writing custom reports; but I've never tried to
> use the "_searchable" flag.
>
> - tag: ip_by_mac
> label: 'Search Mac Address For IP Address'
> category: Node
> columns:
> - {mac: 'MAC address', _searchable: true}
> - {ip: 'IP Address'}
> query: |
> SELECT mac, ip
> FROM node_ip
> WHERE mac = ?
> bind_params: ['mac']
>
> And this works if you run
> https://netdisco/report/ip_by_mac?mac=86bc0a292231
>
> Is there a more straight forward way to get a value into that
> placeholder? Or is a param in the URL the best option?
>
> Actually, as I write this, he's got the Swagger UI up and he's happily
> plugging MAC into that field; so we may be all set. Nevertheless...
>
> --
> Clark 159a
> 508/289-3112
>
> _______________________________________________
> Netdisco mailing list
> netdisco-users@lists.sourceforge.net
> https://sourceforge.net/p/netdisco/mailman/netdisco-users/
--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
netdisco-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netdisco-users