diff --git a/backend/src/app.py b/backend/src/app.py index 4c741ec..8bee52b 100644 --- a/backend/src/app.py +++ b/backend/src/app.py @@ -90,7 +90,6 @@ def add_views(admin: Admin) -> None: from src.features.ipam.views import BlockView, PrefixView, VLANView from src.features.org.views import LocationView, SiteGroupView, SiteView - admin.add_view(LocationView) admin.add_view(DeviceTypeView) admin.add_view(PlatformView) admin.add_view(ManufacturerView) @@ -99,6 +98,7 @@ def add_views(admin: Admin) -> None: admin.add_view(DeviceRoleView) admin.add_view(SiteGroupView) admin.add_view(SiteView) + admin.add_view(LocationView) admin.add_view(DeviceView) admin.add_view(BlockView) admin.add_view(PrefixView) diff --git a/backend/src/features/admin/views.py b/backend/src/features/admin/views.py index d5891ba..1808e28 100644 --- a/backend/src/features/admin/views.py +++ b/backend/src/features/admin/views.py @@ -58,6 +58,8 @@ class UserView(ModelView, model=models.User): form_ajax_refs = {"group": {"fields": ("name",), "order_by": "id"}, "role": {"fields": ("name",), "order_by": "id"}} + icon = "fa-solid fa-user" + class GroupView(ModelView, model=models.Group): name = models.Group.__visible_name__[locale_ctx.get()] @@ -78,6 +80,7 @@ class GroupView(ModelView, model=models.Group): page_size_options = [20, 50, 100, 200] form_ajax_refs = {"role": {"fields": ("name",), "order_by": "id"}} + icon = "fa-solid fa-user-group" class RoleView(ModelView, model=models.Role): @@ -98,3 +101,4 @@ class RoleView(ModelView, model=models.Role): page_size_options = [20, 50, 100, 200] form_ajax_refs = {"group": {"fields": ("name",), "order_by": "id"}} + icon = "fa-sharp fa-solid fa-circle-user" diff --git a/backend/src/features/intend/views.py b/backend/src/features/intend/views.py index 53134d6..599abd7 100644 --- a/backend/src/features/intend/views.py +++ b/backend/src/features/intend/views.py @@ -7,6 +7,8 @@ class DeviceTypeView(ModelView, model=models.DeviceType): name = "Device Type" name_plural = "Device Types" + icon = "mdi:server" + class PlatformView(ModelView, model=models.Platform): category = "Intend" diff --git a/backend/src/features/ipam/views.py b/backend/src/features/ipam/views.py index a38e8ce..7f5c4a8 100644 --- a/backend/src/features/ipam/views.py +++ b/backend/src/features/ipam/views.py @@ -20,6 +20,7 @@ class BlockView(ModelView, model=models.Block): models.Block.block, models.Block.is_private, ] + icon = "codepen" class PrefixView(ModelView, model=models.Prefix): diff --git a/backend/src/features/org/views.py b/backend/src/features/org/views.py index 1d4e2c3..8623315 100644 --- a/backend/src/features/org/views.py +++ b/backend/src/features/org/views.py @@ -23,6 +23,7 @@ class SiteGroupView(ModelView, model=models.SiteGroup): page_size = 20 page_size_options = [20, 50, 100, 200] form_create_rules = ["name", "description"] + icon = "fa-solid fa-sitemap" class SiteView(ModelView, model=models.Site):