netbox-qrcode icon indicating copy to clipboard operation
netbox-qrcode copied to clipboard

Feature Request: Support Role based Setting

Open Daniel-Dietz opened this issue 1 year ago • 1 comments

Depending on the Role, a different QR code Text would be very Helpful.

Suggestion add a new “layer” to the Config

PLUGINS_CONFIG = { 'netbox_qrcode': { 'with_text': True, 'text_fields': ['name', 'serial'], 'font': 'ArialMT', 'custom_text': 'Property of SomeCompany\ntel.8.800333554-CALL', 'text_location': 'up', 'qr_version': 1, 'qr_error_correction': 0, 'qr_box_size': 4, 'qr_border': 4, # per object options 'cable': None, # disable QR code for Cable object 'rack': { 'text_fields': [ 'site', 'name', 'facility_id', 'tenant', 'cf.cf_name' ] }, 'device': { 'qr_box_size': 6, 'custom_text': None, } # per role options 'dell': { 'qr_box_size': 6, 'custom_text': 'Dell Hotline 12345', 'text_fields': [ 'serial' ] } } }

Daniel-Dietz avatar May 21 '24 16:05 Daniel-Dietz

You can try Jinja template for this purpose.

k01ek avatar Sep 05 '24 05:09 k01ek