mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-23 17:28:49 +02:00
Use SimpleLayout for WirelessLinkView
Replace explicit Layout with SimpleLayout, which auto-includes plugin content panels. Remove unused Row, Column, and PluginContentPanel imports.
This commit is contained in:
@@ -3,11 +3,9 @@ from django.utils.translation import gettext_lazy as _
|
|||||||
from dcim.models import Interface
|
from dcim.models import Interface
|
||||||
from extras.ui.panels import CustomFieldsPanel, TagsPanel
|
from extras.ui.panels import CustomFieldsPanel, TagsPanel
|
||||||
from netbox.ui import actions, layout
|
from netbox.ui import actions, layout
|
||||||
from netbox.ui.layout import Column, Row
|
|
||||||
from netbox.ui.panels import (
|
from netbox.ui.panels import (
|
||||||
CommentsPanel,
|
CommentsPanel,
|
||||||
ObjectsTablePanel,
|
ObjectsTablePanel,
|
||||||
PluginContentPanel,
|
|
||||||
RelatedObjectsPanel,
|
RelatedObjectsPanel,
|
||||||
)
|
)
|
||||||
from netbox.views import generic
|
from netbox.views import generic
|
||||||
@@ -219,27 +217,18 @@ class WirelessLinkListView(generic.ObjectListView):
|
|||||||
@register_model_view(WirelessLink)
|
@register_model_view(WirelessLink)
|
||||||
class WirelessLinkView(generic.ObjectView):
|
class WirelessLinkView(generic.ObjectView):
|
||||||
queryset = WirelessLink.objects.all()
|
queryset = WirelessLink.objects.all()
|
||||||
layout = layout.Layout(
|
layout = layout.SimpleLayout(
|
||||||
Row(
|
left_panels=[
|
||||||
Column(
|
panels.WirelessLinkInterfacePanel('interface_a', title=_('Interface A')),
|
||||||
panels.WirelessLinkInterfacePanel('interface_a', title=_('Interface A')),
|
panels.WirelessLinkPropertiesPanel(),
|
||||||
panels.WirelessLinkPropertiesPanel(),
|
TagsPanel(),
|
||||||
TagsPanel(),
|
CommentsPanel(),
|
||||||
CommentsPanel(),
|
],
|
||||||
PluginContentPanel('left_page'),
|
right_panels=[
|
||||||
),
|
panels.WirelessLinkInterfacePanel('interface_b', title=_('Interface B')),
|
||||||
Column(
|
panels.WirelessAuthenticationPanel(),
|
||||||
panels.WirelessLinkInterfacePanel('interface_b', title=_('Interface B')),
|
CustomFieldsPanel(),
|
||||||
panels.WirelessAuthenticationPanel(),
|
],
|
||||||
CustomFieldsPanel(),
|
|
||||||
PluginContentPanel('right_page'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
Column(
|
|
||||||
PluginContentPanel('full_width_page'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user