1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
| PLUGINS = ['netbox_qrcode']
PLUGINS_CONFIG = { 'netbox_qrcode': { 'title': 'By Songxwn.com', 'with_text': True, 'text_location': 'right', 'text_align_horizontal': 'left', 'text_align_vertical': 'middle', 'text_fields': ['name', 'serial'], 'custom_text': 'By Songxwn.com', 'text_template': 'By Songxwn.com', 'font': 'TahomaBold', 'font_size': '3mm', 'font_weight': 'normal', 'font_color': 'black', 'with_qr': True, 'url_template': None, 'qr_version': 1, 'qr_error_correction': 0, 'qr_box_size': 4, 'qr_border': 0, 'label_qr_width': '12mm', 'label_qr_height': '12mm', 'label_edge_top': '0mm', 'label_edge_left': '1.5mm', 'label_edge_right': '1.5mm', 'label_edge_bottom': '0mm', 'label_width': '56mm', 'label_height': '32mm', 'label_qr_text_distance': '1mm',
'rack': { 'label_qr_width': '24mm', 'label_qr_height': '24mm', 'label_width': '84mm', 'label_height': '32mm', 'label_qr_text_distance': '2mm', 'font': 'TahomaBold', 'font_size': '4mm', 'font_weight': 'normal', 'font_color': 'black', 'text_template': '机柜名称: {{ obj.name }}<br>所属站点: {{ obj.site }}<br>所属租户: {{ obj.tenant }}', },
'device': { 'text_template': '设备名称: {{ obj.name }}<br>所属站点: {{ obj.site }}<br>所属租户: {{ obj.tenant }}<br>序列号: {{ obj.serial }}<br>型号: {{ obj.device_type }}', },
'cable': { 'text_fields': [ '_termination_a_device', 'termination_a', '_termination_b_device', 'termination_b', 'a_terminations.device', 'a_terminations', 'b_terminations.device', 'b_terminations' ] },
'powerfeed': { 'text_fields': ['name'] },
'powerpanel': { 'text_fields': ['name'] },
'logo': 'https://songxwn.com/images/favicon.png' } }
|