netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Public demo: https://demo.netbox.dev
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.38k stars 2.49k forks source link

Custom Link Icons #16178

Open hendrikbl opened 1 month ago

hendrikbl commented 1 month ago

NetBox version

v4.0.2

Feature type

Change to existing functionality

Proposed functionality

The ability to add an optional icon to custom links to visually improve the rendered buttons. Either by providing a selection of available mdi icons or by providing a text field where users can input the name of the mdi icon. By making this field optional we do not create any breaking changes to existing custom links.

Use case

Having icons in buttons created by custom links would lead to a quicker recognition of the links purpose. E.g. mdi-web could be used with a link that opens an ip in your web browser. Also almost every button in netbox uses an icon so having this option for custom links would make them fit better into the overall visual experience.

Database changes

The CustomLink model needs an additional field (e.g. button_icon) to store the icon.

External dependencies

None

alehaa commented 1 month ago

seems to be a duplicate of #6877. FYI: The workaround using an <i> doesnt work anymore but you can use <div class="d-inline"> instead.

hendrikbl commented 1 month ago

Oh you're right, sorry for the duplicate. We had the <i> solution before. I will try your's asap.

DanSheps commented 1 month ago

Going to need to look into this a little more to see if it is a netbox thing or a HTML/CSS framework thing.