├── netbox_themes ├── api │ ├── __init__.py │ └── serializers.py ├── migrations │ ├── __init__.py │ ├── 0002_alter_theme_base_theme.py │ └── 0001_initial_netbox_themes.py ├── exceptions.py ├── navigation.py ├── tables.py ├── templates │ ├── netbox_themes │ │ └── theme.html │ └── base │ │ └── base.html ├── views.py ├── __init__.py ├── urls.py ├── templatetags │ └── netbox_themes_template_filters.py ├── models.py └── forms.py ├── media ├── doom.png ├── excel.png ├── greggs.png ├── pokemon.png ├── sunrise.png ├── christmas.png ├── startrek.png └── create-theme.png ├── MANIFEST.in ├── .gitignore ├── samples ├── sunrise.css ├── christmas.css ├── greggs.css ├── doom.css └── excel.css ├── setup.py ├── pyproject.toml ├── LICENSE └── README.md /netbox_themes/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /netbox_themes/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /media/doom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcrawf/netbox-plugin-themes/HEAD/media/doom.png -------------------------------------------------------------------------------- /media/excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcrawf/netbox-plugin-themes/HEAD/media/excel.png -------------------------------------------------------------------------------- /media/greggs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcrawf/netbox-plugin-themes/HEAD/media/greggs.png -------------------------------------------------------------------------------- /media/pokemon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcrawf/netbox-plugin-themes/HEAD/media/pokemon.png -------------------------------------------------------------------------------- /media/sunrise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcrawf/netbox-plugin-themes/HEAD/media/sunrise.png -------------------------------------------------------------------------------- /media/christmas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcrawf/netbox-plugin-themes/HEAD/media/christmas.png -------------------------------------------------------------------------------- /media/startrek.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcrawf/netbox-plugin-themes/HEAD/media/startrek.png -------------------------------------------------------------------------------- /media/create-theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcrawf/netbox-plugin-themes/HEAD/media/create-theme.png -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include netbox_themes/templates * 2 | recursive-include netbox_themes/templatetags * 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.egginfo 2 | netbox_themes.egg-info 3 | __pycache__ 4 | netbox_plugin_themes.egg-info/ 5 | dist 6 | venv 7 | -------------------------------------------------------------------------------- /netbox_themes/exceptions.py: -------------------------------------------------------------------------------- 1 | class ThemeDeleteError(Exception): 2 | pass 3 | 4 | class ThemeEditError(Exception): 5 | pass 6 | -------------------------------------------------------------------------------- /netbox_themes/navigation.py: -------------------------------------------------------------------------------- 1 | from netbox.plugins import PluginMenuItem 2 | 3 | menu_items = ( 4 | PluginMenuItem( 5 | link='plugins:netbox_themes:theme_list', 6 | link_text='Themes Manager' 7 | ), 8 | ) 9 | -------------------------------------------------------------------------------- /samples/sunrise.css: -------------------------------------------------------------------------------- 1 | .navbar { 2 | background: linear-gradient(#15e7eb, #fcba03) !important; 3 | } 4 | 5 | .netbox-edition::before { 6 | content: "🌞"; 7 | } 8 | 9 | .netbox-edition::after { 10 | content: "🌞"; 11 | } 12 | 13 | .mdi-magnify::before { 14 | content: "🌞"; 15 | } 16 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import find_packages, setup 2 | 3 | setup( 4 | name='netbox-plugin-themes', 5 | version='0.5.1', 6 | description='Custom CSS themes for NetBox', 7 | install_requires=[], 8 | packages=find_packages(), 9 | include_package_data=True, 10 | zip_safe=False, 11 | ) 12 | -------------------------------------------------------------------------------- /netbox_themes/tables.py: -------------------------------------------------------------------------------- 1 | import django_tables2 as tables 2 | 3 | from netbox.tables import NetBoxTable 4 | from .models import Theme 5 | 6 | class ThemeTable(NetBoxTable): 7 | 8 | class Meta(NetBoxTable.Meta): 9 | model = Theme 10 | fields = ('id', 'name', 'base_theme', 'active') 11 | default_columns = ('id', 'name', 'base_theme', 'active') 12 | -------------------------------------------------------------------------------- /netbox_themes/templates/netbox_themes/theme.html: -------------------------------------------------------------------------------- 1 | {% extends 'generic/object.html' %} 2 | {% load netbox_themes_template_filters %} 3 | 4 | {% block content %} 5 |
{{ object.css_data|base64decode|linebreaks }}
11 |