Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding direct or external links #1

Open
alensforu opened this issue Dec 20, 2024 · 0 comments
Open

Adding direct or external links #1

alensforu opened this issue Dec 20, 2024 · 0 comments

Comments

@alensforu
Copy link

alensforu commented Dec 20, 2024

Hello markkuleinio,
Firstly, thank you for making this Netbox plugin !
I was hoping to use it to have submenus in my left panels using direct links to a specific netbox page, or an external page outside of my netbox instance.
For example, adding a menu item with a link to a saved filter, something like https://netboxinstance.comt/dcim/devices/?filter=my-devices.
But when adding this I get an error :
`https is not a registered namespace

Python version: 3.11.6
NetBox version: 4.0.3
Plugins:
netbox_device_support_plugin: 1.0.14
netbox_hello_world_page: 0.1
netbox_inventory: 2.0.1
netbox_lifecycle: 1.0.4
netbox_napalm_plugin: 0.3.0
netbox_topology_views: 4.1.0`

My navigation.py file is like this

`menuitem1 = PluginMenuItem(
# "hello_world" is defined in urls.py
link="https://instance.comt/dcim/devices/?filter=nyc-devices",
link_text="New York",
)
menuitem2 = PluginMenuItem(
# "hello_world" is defined in urls.py
link="https:///instance.com/dcim/devices/?filter=sea-devices",
link_text="Seattle",
)

menu = PluginMenu(
label="My Sites",
groups=(
("Global Site Links", (menuitem1,menuitem2,)),
),
# See the icons in https://pictogrammers.com/library/mdi/
# (remember to add the "mdi-" prefix)
icon_class="mdi mdi-earth",
)`

Would you be able to give me a hint about how to add this kind of links to the plugin ?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant