Netbox plugin to manage attachments for any model
Project description
NetBox Attachments Plugin
Netbox plugin for attaching files to any model.
Features
This plugin provide following Models:
- NetBoxAttachment
Compatibility
Netbox | Plugin |
---|---|
>= 3.3.4 | 0.0.0 <-> 0.0.5 |
>= 3.4.0 | 0.0.6 <-> 1.0.6 |
>= 3.4.3 | 1.0.7 <-> 1.1.X |
>= 3.5.0 | 2.0.0 |
>= 3.6.0 | 3.0.0 |
>= 3.7.0 | 4.0.0 |
>= 4.0.0 | 5.0.x - bug |
>= 4.0.0 | 5.1.0 |
Installation
The plugin is available as a Python package in pypi and can be installed with pip
pip install netbox-attachments
Enable the plugin in configuration.py
:
PLUGINS = ['netbox_attachments']
Restart NetBox and add netbox-attachments
to your local_requirements.txt
See NetBox Documentation for details
Configuration
The following options are available:
apps
:- Type: List
- Default: ['dcim', 'ipam', 'circuits', 'tenancy', 'virtualization', 'wireless']
- Description: Display
Attachments
feature on all models definded under the app label. Attachmets are displayed onright_page
of the detail-view of model.
display_default
:- Type: String
- Default: "additional_tab"
- Options: "left_page", "right_page", "full_width_page", "additional_tab"
- Description: Setup default setting of where attachments should be displayed under the models
display_setting
:- Type: Dict
- Default: {}
- Options: {<app_label.model>: <prefeered_display>}
- Example: {'dcim.devicerole': 'full_width_page', 'dcim.device': 'left_page', 'ipam.vlan': 'additional_tab'}
- Description: Set display setting for concrete model
- Tip: Proper
app_label
andmodel
names could be found at API<your_netbox_url>/api/extras/content-types/
Warning
additional_tab
does not work for Plugin models
Configuration Example:
PLUGINS_CONFIG = {
'netbox_attachments': {
'apps': ['dcim', 'ipam', 'circuits', 'tenancy', 'virtualization', 'wireless', 'inventory_monitor'],
'display_default': "right_page",
'display_setting': {'ipam.vlan': "left_page", 'dcim.device': "full_width_page", 'dcim.devicerole': "full_width_page", 'inventory_monitor.probe': "additional_tab"}
}
}
Enable Attachments for custom plugin (models)
- Append your plugin to configuration list
apps
: ['<plugin_name>']
- Extend detail templates
-
# At the TOP {% load plugins %} # Under a comments section {% plugin_right_page object %} # add the left_page and full_width for future extension
- Example (device - core model):
-
Screenshots
- Model View
- List View
- Detail View
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
netbox_attachments-5.1.2b2.tar.gz
(17.3 kB
view hashes)
Built Distribution
Close
Hashes for netbox_attachments-5.1.2b2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5690e4dae743a2a543f80ede51eacc27dd05e64cb0ff71ec765be4191e87023f |
|
MD5 | 5cc617fedaf6ccf9d8e82cd8381e6eab |
|
BLAKE2b-256 | 22b7351ea2d135d875097f573085363a5d0ddf4a867876cfb07bee2285ecb92e |
Close
Hashes for netbox_attachments-5.1.2b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdb41d908224a04903ceff8625b47e3e0f6ffeb8cc895a900f0e77e0b4fc8a60 |
|
MD5 | 94adb3c8e7512fcf56d02eba66de4a01 |
|
BLAKE2b-256 | 128c62ea54d47df1569073b93f0f3bf1d6ae7cdb2732374db0ea99a27d3acff8 |