Merge pull request #114 from ryanmerolle/dev

release 1.2.1
This commit is contained in:
Ryan Merolle 2023-01-24 22:21:03 -05:00 committed by GitHub
commit 67da7621fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 77 additions and 68 deletions

View File

@ -40,7 +40,7 @@ Each Plugin Version listed below has been tested with its corresponding NetBox V
|:--------------:|:--------------:|
| 3.2 | 1.0.1 |
| 3.3 | 1.1.0 |
| 3.4 | 1.2.0 |
| 3.4 | 1.2.1 |
## Installing
@ -59,16 +59,20 @@ or by adding to your `local_requirements.txt` or `plugin_requirements.txt` (netb
netbox-acls
```
## Configuration
Enable the plugin in `/opt/netbox/netbox/netbox/configuration.py`,
or if you use netbox-docker, your `/configuration/plugins.py` file :
```python
PLUGINS = [
'netbox_acls'
"netbox_acls"
]
PLUGINS_CONFIG = {
"netbox_acls": {},
"netbox_acls": {
"top_level_menu": True # If set to True the plugin will add a top level menu item for the plugin. If set to False the plugin will add a menu item under the Plugins menu item. Default is set to True.
},
}
```

View File

@ -2,19 +2,16 @@
Define the plugin menu buttons & the plugin navigation bar enteries.
"""
from django.conf import settings
from extras.plugins import PluginMenu, PluginMenuButton, PluginMenuItem
from utilities.choices import ButtonColorChoices
plugin_settings = settings.PLUGINS_CONFIG["netbox_acls"]
#
# Define plugin menu buttons
#
menu = PluginMenu(
label="Access Lists",
groups=(
(
"ACLs",
(
menu_buttons = (
PluginMenuItem(
link="plugins:netbox_acls:accesslist_list",
link_text="Access Lists",
@ -71,8 +68,13 @@ menu = PluginMenu(
),
),
),
),
),
),
)
if plugin_settings.get("top_level_menu"):
menu = PluginMenu(
label="Access Lists",
groups=(("ACLs", menu_buttons),),
icon_class="mdi mdi-lock",
)
else:
menu_items = menu_buttons

View File

@ -1 +1,4 @@
__version__ = "1.2.0"
"""
Version information for netbox-acls.
"""
__version__ = "1.2.1"