From e5f806ef7ab37f864683b79b44e77d1895628a52 Mon Sep 17 00:00:00 2001 From: DJ Howard Date: Mon, 16 Sep 2024 09:28:57 -0400 Subject: [PATCH 1/6] adding exclude to floorplantile form --- changes/122.fixed | 1 + nautobot_floor_plan/forms.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/122.fixed diff --git a/changes/122.fixed b/changes/122.fixed new file mode 100644 index 0000000..c01e33e --- /dev/null +++ b/changes/122.fixed @@ -0,0 +1 @@ +excluded allocation_type and on_group_tile from floorplantile form \ No newline at end of file diff --git a/nautobot_floor_plan/forms.py b/nautobot_floor_plan/forms.py index 3f98d08..da29ad6 100644 --- a/nautobot_floor_plan/forms.py +++ b/nautobot_floor_plan/forms.py @@ -181,7 +181,7 @@ class Meta: """Meta attributes.""" model = models.FloorPlanTile - fields = "__all__" + exclude = ["allocation_type", "on_group_tile"] # pylint: disable=modelform-uses-exclude def __init__(self, *args, **kwargs): """Overwrite the constructor to define grid numbering style.""" From 252bca4c5436f8abbb4e91e75f1eba4c0802349a Mon Sep 17 00:00:00 2001 From: DJ Howard Date: Mon, 16 Sep 2024 11:21:42 -0400 Subject: [PATCH 2/6] added fields="__all__" and removed the disabling of pylint rule. --- nautobot_floor_plan/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nautobot_floor_plan/forms.py b/nautobot_floor_plan/forms.py index da29ad6..7b2873e 100644 --- a/nautobot_floor_plan/forms.py +++ b/nautobot_floor_plan/forms.py @@ -181,7 +181,8 @@ class Meta: """Meta attributes.""" model = models.FloorPlanTile - exclude = ["allocation_type", "on_group_tile"] # pylint: disable=modelform-uses-exclude + fields = "__all__" + exclude = ["allocation_type", "on_group_tile"] def __init__(self, *args, **kwargs): """Overwrite the constructor to define grid numbering style.""" From 92c7c8657a7e806b361a9c1104e4616ad9b0c238 Mon Sep 17 00:00:00 2001 From: DJ Howard Date: Mon, 16 Sep 2024 11:29:18 -0400 Subject: [PATCH 3/6] adding pylint disable to pass tests --- nautobot_floor_plan/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nautobot_floor_plan/forms.py b/nautobot_floor_plan/forms.py index 7b2873e..70acb34 100644 --- a/nautobot_floor_plan/forms.py +++ b/nautobot_floor_plan/forms.py @@ -182,7 +182,7 @@ class Meta: model = models.FloorPlanTile fields = "__all__" - exclude = ["allocation_type", "on_group_tile"] + exclude = ["allocation_type", "on_group_tile"] # pylint: disable=modelform-uses-exclude def __init__(self, *args, **kwargs): """Overwrite the constructor to define grid numbering style.""" From 631d1f39e6f5c7d00f0f5d327adc366b07c0c861 Mon Sep 17 00:00:00 2001 From: DJ Howard Date: Tue, 17 Sep 2024 12:35:39 -0400 Subject: [PATCH 4/6] Removing import button from Nav bar and adding fields to table view. --- nautobot_floor_plan/navigation.py | 6 +----- nautobot_floor_plan/tables.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/nautobot_floor_plan/navigation.py b/nautobot_floor_plan/navigation.py index fc5d79c..748a550 100644 --- a/nautobot_floor_plan/navigation.py +++ b/nautobot_floor_plan/navigation.py @@ -1,6 +1,6 @@ """Menu items.""" -from nautobot.apps.ui import NavMenuAddButton, NavMenuGroup, NavMenuImportButton, NavMenuItem, NavMenuTab +from nautobot.apps.ui import NavMenuAddButton, NavMenuGroup, NavMenuItem, NavMenuTab menu_items = ( NavMenuTab( @@ -19,10 +19,6 @@ link="plugins:nautobot_floor_plan:floorplan_add", permissions=["nautobot_floor_plan.add_floorplan"], ), - NavMenuImportButton( - link="plugins:nautobot_floor_plan:floorplan_import", - permissions=["nautobot_floor_plan.add_floorplan"], - ), ), ), ), diff --git a/nautobot_floor_plan/tables.py b/nautobot_floor_plan/tables.py index 416c877..cda0f75 100644 --- a/nautobot_floor_plan/tables.py +++ b/nautobot_floor_plan/tables.py @@ -44,7 +44,9 @@ class Meta(BaseTable.Meta): "x_size", "y_size", "x_origin_seed", + "x_axis_step", "y_origin_seed", + "y_axis_step", "tile_width", "tile_depth", "tags", @@ -54,6 +56,14 @@ class Meta(BaseTable.Meta): "pk", "floor_plan", "location", + "x_size", + "y_size", + "x_origin_seed", + "x_axis_step", + "y_origin_seed", + "y_axis_step", + "tile_width", + "tile_depth", "tags", "actions", ) From be70df0f56ae5af016e05ca9f2d3447765f68f05 Mon Sep 17 00:00:00 2001 From: DJ Howard <45186384+djhoward12@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:25:37 -0400 Subject: [PATCH 5/6] Update changes/122.fixed Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com> --- changes/122.fixed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes/122.fixed b/changes/122.fixed index c01e33e..f7d1a98 100644 --- a/changes/122.fixed +++ b/changes/122.fixed @@ -1 +1 @@ -excluded allocation_type and on_group_tile from floorplantile form \ No newline at end of file +Excluded internal `allocation_type` and `on_group_tile` fields from Floor Plan Tile add/edit form. \ No newline at end of file From b6d0d302577ae52701add69f4618d00a797de833 Mon Sep 17 00:00:00 2001 From: DJ Howard Date: Wed, 18 Sep 2024 13:33:29 -0400 Subject: [PATCH 6/6] Added change log fragment for nav bar modification --- changes/125.housekeeping | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/125.housekeeping diff --git a/changes/125.housekeeping b/changes/125.housekeeping new file mode 100644 index 0000000..0dea932 --- /dev/null +++ b/changes/125.housekeeping @@ -0,0 +1 @@ +Removed import button from Navigation bar. \ No newline at end of file