mirror of
https://github.com/lucaspalomodevelop/netbox-acls.git
synced 2026-03-12 23:27:23 +00:00
commit
67da7621fa
10
README.md
10
README.md
@ -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.
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1 +1,4 @@
|
||||
__version__ = "1.2.0"
|
||||
"""
|
||||
Version information for netbox-acls.
|
||||
"""
|
||||
__version__ = "1.2.1"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user