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. how to use '_searchable' in a report (Eric Bates)
--- Begin Message ---
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

Attachment: smime.p7m
Description: smime.p7m


--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
netdisco-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to