ipfabric_netbox 4.3.1b2__tar.gz → 4.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ipfabric_netbox might be problematic. Click here for more details.

Files changed (89) hide show
  1. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/PKG-INFO +1 -1
  2. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/__init__.py +1 -1
  3. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/choices.py +20 -20
  4. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/forms.py +17 -15
  5. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/models.py +19 -19
  6. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/navigation.py +10 -9
  7. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/tables.py +12 -10
  8. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/inc/clone_form.html +7 -4
  9. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/inc/diff.html +10 -8
  10. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/inc/json.html +4 -2
  11. ipfabric_netbox-4.3.2/ipfabric_netbox/templates/ipfabric_netbox/inc/logs_pending.html +7 -0
  12. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/inc/merge_form.html +7 -5
  13. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/inc/site_topology_button.html +8 -6
  14. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/inc/site_topology_modal.html +8 -4
  15. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/inc/transform_map_field_map.html +2 -1
  16. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/inc/transform_map_relationship_map.html +2 -1
  17. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/ipfabric_table.html +4 -4
  18. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/ipfabricingestion.html +12 -11
  19. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/ipfabricsnapshot.html +15 -14
  20. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/ipfabricsource.html +13 -12
  21. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/ipfabricsync.html +16 -15
  22. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/ipfabrictransformmap.html +7 -6
  23. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/ipfabrictransformmap_list.html +2 -1
  24. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/ipfabrictransformmap_restore.html +1 -1
  25. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/ipfabrictransformmapgroup.html +4 -3
  26. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/partials/ingestion_progress.html +5 -4
  27. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/partials/ingestion_statistics.html +5 -4
  28. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/partials/job_logs.html +10 -9
  29. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/views.py +8 -7
  30. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/pyproject.toml +1 -1
  31. ipfabric_netbox-4.3.1b2/ipfabric_netbox/templates/ipfabric_netbox/inc/logs_pending.html +0 -6
  32. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/README.md +0 -0
  33. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/api/__init__.py +0 -0
  34. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/api/serializers.py +0 -0
  35. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/api/urls.py +0 -0
  36. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/api/views.py +0 -0
  37. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/data/transform_map.json +0 -0
  38. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/exceptions.py +0 -0
  39. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/filtersets.py +0 -0
  40. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/graphql/__init__.py +0 -0
  41. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/graphql/enums.py +0 -0
  42. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/graphql/filters.py +0 -0
  43. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/graphql/schema.py +0 -0
  44. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/graphql/types.py +0 -0
  45. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/jobs.py +0 -0
  46. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0001_initial.py +0 -0
  47. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0001_initial_squashed_0013_switch_to_branching_plugin.py +0 -0
  48. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0002_ipfabricsnapshot_status.py +0 -0
  49. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0003_ipfabricsource_type_and_more.py +0 -0
  50. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0004_ipfabricsync_auto_merge.py +0 -0
  51. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0005_alter_ipfabricrelationshipfield_source_model_and_more.py +0 -0
  52. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0006_alter_ipfabrictransformmap_target_model.py +0 -0
  53. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0007_prepare_custom_fields.py +0 -0
  54. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0008_prepare_transform_maps.py +0 -0
  55. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0009_transformmap_changes_for_netbox_v4_2.py +0 -0
  56. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0010_remove_uuid_from_get_or_create.py +0 -0
  57. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0011_update_part_number_DCIM_inventory_item_template.py +0 -0
  58. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0012_remove_status_field.py +0 -0
  59. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0013_switch_to_branching_plugin.py +0 -0
  60. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0014_ipfabrictransformmapgroup_ipfabrictransformmap_group.py +0 -0
  61. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0015_ipfabricingestionissue.py +0 -0
  62. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0016_tags_and_changelog_for_snapshots.py +0 -0
  63. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0017_ipfabricsync_update_custom_fields.py +0 -0
  64. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0018_remove_type_field.py +0 -0
  65. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0019_alter_ipfabrictransformmap_options_and_more.py +0 -0
  66. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/0020_clean_scheduled_jobs.py +0 -0
  67. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/migrations/__init__.py +0 -0
  68. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/signals.py +0 -0
  69. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/template_content.py +0 -0
  70. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/inc/snapshotdata.html +0 -0
  71. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/partials/ingestion_all.html +0 -0
  72. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/partials/ingestion_status.html +0 -0
  73. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/partials/object_tabs.html +0 -0
  74. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/ipfabric_netbox/partials/sync_last_ingestion.html +0 -0
  75. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templates/static/ipfabric_netbox/css/rack.css +0 -0
  76. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templatetags/__init__.py +0 -0
  77. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/templatetags/ipfabric_netbox_helpers.py +0 -0
  78. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/tests/__init__.py +0 -0
  79. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/tests/api/__init__.py +0 -0
  80. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/tests/api/test_api.py +0 -0
  81. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/tests/test_forms.py +0 -0
  82. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/tests/test_models.py +0 -0
  83. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/tests/test_views.py +0 -0
  84. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/urls.py +0 -0
  85. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/utilities/__init__.py +0 -0
  86. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/utilities/ipfutils.py +0 -0
  87. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/utilities/logging.py +0 -0
  88. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/utilities/nbutils.py +0 -0
  89. {ipfabric_netbox-4.3.1b2 → ipfabric_netbox-4.3.2}/ipfabric_netbox/utilities/transform_map.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ipfabric_netbox
3
- Version: 4.3.1b2
3
+ Version: 4.3.2
4
4
  Summary: NetBox plugin to sync IP Fabric data into NetBox
5
5
  License: MIT
6
6
  Keywords: netbox,ipfabric,plugin,sync
@@ -6,7 +6,7 @@ class NetboxIPFabricConfig(PluginConfig):
6
6
  name = "ipfabric_netbox"
7
7
  verbose_name = "NetBox IP Fabric SoT Plugin"
8
8
  description = "Sync IP Fabric into NetBox"
9
- version = "4.3.1b2"
9
+ version = "4.3.2"
10
10
  base_url = "ipfabric"
11
11
  min_version = "4.4.0"
12
12
 
@@ -173,16 +173,16 @@ class IPFabricTransformMapSourceModelChoices(ChoiceSet):
173
173
  PARTNUMBERS = "part_number"
174
174
 
175
175
  CHOICES = (
176
- (SITE, "Site", "cyan"),
177
- (INVENTORY, "Inventory", "gray"),
178
- (DEVICE, "Device", "gray"),
179
- (VIRTUALCHASSIS, "Virtual Chassis", "grey"),
180
- (INTERFACE, "Interface", "gray"),
181
- (VLAN, "VLAN", "gray"),
182
- (VRF, "VRF", "gray"),
183
- (PREFIX, "Prefix", "gray"),
184
- (IPADDRESS, "IP Address", "gray"),
185
- (PARTNUMBERS, "Part Number", "gray"),
176
+ (SITE, _("Site"), "cyan"),
177
+ (INVENTORY, _("Inventory"), "gray"),
178
+ (DEVICE, _("Device"), "gray"),
179
+ (VIRTUALCHASSIS, _("Virtual Chassis"), "grey"),
180
+ (INTERFACE, _("Interface"), "gray"),
181
+ (VLAN, _("VLAN"), "gray"),
182
+ (VRF, _("VRF"), "gray"),
183
+ (PREFIX, _("Prefix"), "gray"),
184
+ (IPADDRESS, _("IP Address"), "gray"),
185
+ (PARTNUMBERS, _("Part Number"), "gray"),
186
186
  )
187
187
 
188
188
 
@@ -203,8 +203,8 @@ class IPFabricSourceTypeChoices(ChoiceSet):
203
203
  REMOTE = "remote"
204
204
 
205
205
  CHOICES = (
206
- (LOCAL, "Local", "cyan"),
207
- (REMOTE, "Remote", "gray"),
206
+ (LOCAL, _("Local"), "cyan"),
207
+ (REMOTE, _("Remote"), "gray"),
208
208
  )
209
209
 
210
210
 
@@ -220,14 +220,14 @@ class IPFabricRawDataTypeChoices(ChoiceSet):
220
220
  SITE = "site"
221
221
 
222
222
  CHOICES = (
223
- (DEVICE, "Local", "cyan"),
224
- (VLAN, "VLAN", "gray"),
225
- (VIRTUALCHASSIS, "Virtual Chassis", "gray"),
226
- (PREFIX, "Prefix", "gray"),
227
- (INTERFACE, "Interface", "gray"),
228
- (INVENTORYITEM, "Inventory Item", "gray"),
229
- (IPADDRESS, "IP Address", "gray"),
230
- (SITE, "Site", "gray"),
223
+ (DEVICE, _("Local"), "cyan"),
224
+ (VLAN, _("VLAN"), "gray"),
225
+ (VIRTUALCHASSIS, _("Virtual Chassis"), "gray"),
226
+ (PREFIX, _("Prefix"), "gray"),
227
+ (INTERFACE, _("Interface"), "gray"),
228
+ (INVENTORYITEM, _("Inventory Item"), "gray"),
229
+ (IPADDRESS, _("IP Address"), "gray"),
230
+ (SITE, _("Site"), "gray"),
231
231
  )
232
232
 
233
233
 
@@ -120,9 +120,9 @@ def list_to_choices(choices: list[str]) -> tuple[tuple[str, str], ...]:
120
120
  class IPFabricRelationshipFieldForm(NetBoxModelForm):
121
121
  coalesce = forms.BooleanField(required=False, initial=False)
122
122
  target_field = forms.CharField(
123
- label="Target Field",
123
+ label=_("Target Field"),
124
124
  required=True,
125
- help_text="Select target model field.",
125
+ help_text=_("Select target model field."),
126
126
  widget=forms.Select(),
127
127
  )
128
128
 
@@ -191,15 +191,15 @@ class IPFabricRelationshipFieldForm(NetBoxModelForm):
191
191
  class IPFabricTransformFieldForm(NetBoxModelForm):
192
192
  coalesce = forms.BooleanField(required=False, initial=False)
193
193
  source_field = forms.CharField(
194
- label="Source Field",
194
+ label=_("Source Field"),
195
195
  required=True,
196
- help_text="Select column from IP Fabric.",
196
+ help_text=_("Select column from IP Fabric."),
197
197
  widget=forms.Select(),
198
198
  )
199
199
  target_field = forms.CharField(
200
- label="Target Field",
200
+ label=_("Target Field"),
201
201
  required=True,
202
- help_text="Select target model field.",
202
+ help_text=_("Select target model field."),
203
203
  widget=forms.Select(),
204
204
  )
205
205
 
@@ -306,7 +306,7 @@ class IPFabricTransformMapBulkEditForm(NetBoxModelBulkEditForm):
306
306
  group = forms.ModelChoiceField(
307
307
  queryset=IPFabricTransformMapGroup.objects.all(),
308
308
  required=False,
309
- label="Target Group",
309
+ label=_("Target Group"),
310
310
  )
311
311
  model = IPFabricTransformMap
312
312
  fields = ("group",)
@@ -342,25 +342,27 @@ class IPFabricTransformMapBulkImportForm(NetBoxModelImportForm):
342
342
 
343
343
  class IPFabricTransformMapCloneForm(forms.Form):
344
344
  name = forms.CharField(
345
- required=True, label="Name", help_text="Name for the cloned transform map."
345
+ required=True,
346
+ label=_("Name"),
347
+ help_text=_("Name for the cloned transform map."),
346
348
  )
347
349
  group = forms.ModelChoiceField(
348
350
  queryset=IPFabricTransformMapGroup.objects.all(),
349
351
  required=False,
350
- label="Target Group",
351
- help_text="Select the group to assign the cloned transform map to.",
352
+ label=_("Target Group"),
353
+ help_text=_("Select the group to assign the cloned transform map to."),
352
354
  )
353
355
  clone_fields = forms.BooleanField(
354
356
  required=False,
355
357
  initial=True,
356
- label="Clone Child Fields",
357
- help_text="Clone all child fields of this transform map.",
358
+ label=_("Clone Child Fields"),
359
+ help_text=_("Clone all child fields of this transform map."),
358
360
  )
359
361
  clone_relationships = forms.BooleanField(
360
362
  required=False,
361
363
  initial=True,
362
- label="Clone Child Relationships",
363
- help_text="Clone all child relationships of this transform map.",
364
+ label=_("Clone Child Relationships"),
365
+ help_text=_("Clone all child relationships of this transform map."),
364
366
  )
365
367
 
366
368
 
@@ -763,7 +765,7 @@ class IPFabricSyncForm(NetBoxModelForm):
763
765
  )
764
766
  ]
765
767
  raise ValidationError(
766
- {"sites": f"Sites {invalid_sites} not part of the snapshot."}
768
+ {"sites": _(f"Sites {invalid_sites} not part of the snapshot.")}
767
769
  )
768
770
 
769
771
  scheduled_time = self.cleaned_data.get("scheduled")
@@ -105,8 +105,8 @@ class IPFabricTransformMapGroup(NetBoxModel):
105
105
 
106
106
  class Meta:
107
107
  ordering = ("pk",)
108
- verbose_name = "IP Fabric Transform Map Group"
109
- verbose_name_plural = "IP Fabric Transform Map Groups"
108
+ verbose_name = _("IP Fabric Transform Map Group")
109
+ verbose_name_plural = _("IP Fabric Transform Map Groups")
110
110
 
111
111
  def __str__(self):
112
112
  return self.name
@@ -125,7 +125,7 @@ class IPFabricTransformMap(NetBoxModel):
125
125
  target_model = models.ForeignKey(
126
126
  to=ContentType,
127
127
  related_name="+",
128
- verbose_name="Target Model",
128
+ verbose_name=_("Target Model"),
129
129
  limit_choices_to=IPFabricSupportedSyncModels,
130
130
  help_text=_("The object(s) to which transform map target applies."),
131
131
  on_delete=models.PROTECT,
@@ -142,8 +142,8 @@ class IPFabricTransformMap(NetBoxModel):
142
142
 
143
143
  class Meta:
144
144
  ordering = ("pk",)
145
- verbose_name = "IP Fabric Transform Map"
146
- verbose_name_plural = "IP Fabric Transform Maps"
145
+ verbose_name = _("IP Fabric Transform Map")
146
+ verbose_name_plural = _("IP Fabric Transform Maps")
147
147
 
148
148
  def __str__(self):
149
149
  if self.source_model and self.target_model:
@@ -337,7 +337,7 @@ class IPFabricRelationshipField(models.Model):
337
337
  ContentType,
338
338
  related_name="ipfabric_transform_fields",
339
339
  limit_choices_to=IPFabricRelationshipFieldSourceModels,
340
- verbose_name="Source Model",
340
+ verbose_name=_("Source Model"),
341
341
  on_delete=models.PROTECT,
342
342
  blank=False,
343
343
  null=False,
@@ -356,8 +356,8 @@ class IPFabricRelationshipField(models.Model):
356
356
 
357
357
  class Meta:
358
358
  ordering = ("transform_map",)
359
- verbose_name = "IP Fabric Relationship Field"
360
- verbose_name_plural = "IP Fabric Relationship Fields"
359
+ verbose_name = _("IP Fabric Relationship Field")
360
+ verbose_name_plural = _("IP Fabric Relationship Fields")
361
361
 
362
362
  @property
363
363
  def docs_url(self):
@@ -386,8 +386,8 @@ class IPFabricTransformField(models.Model):
386
386
 
387
387
  class Meta:
388
388
  ordering = ("transform_map",)
389
- verbose_name = "IP Fabric Transform Field"
390
- verbose_name_plural = "IP Fabric Transform Fields"
389
+ verbose_name = _("IP Fabric Transform Field")
390
+ verbose_name_plural = _("IP Fabric Transform Fields")
391
391
 
392
392
  @property
393
393
  def docs_url(self):
@@ -449,8 +449,8 @@ class IPFabricSource(IPFabricClient, JobsMixin, PrimaryModel):
449
449
 
450
450
  class Meta:
451
451
  ordering = ("name",)
452
- verbose_name = "IP Fabric Source"
453
- verbose_name_plural = "IP Fabric Sources"
452
+ verbose_name = _("IP Fabric Source")
453
+ verbose_name_plural = _("IP Fabric Sources")
454
454
 
455
455
  def __str__(self):
456
456
  return f"{self.name}"
@@ -588,8 +588,8 @@ class IPFabricSnapshot(TagsMixin, ChangeLoggedModel):
588
588
 
589
589
  class Meta:
590
590
  ordering = ("source", "-date")
591
- verbose_name = "IP Fabric Snapshot"
592
- verbose_name_plural = "IP Fabric Snapshots"
591
+ verbose_name = _("IP Fabric Snapshot")
592
+ verbose_name_plural = _("IP Fabric Snapshots")
593
593
 
594
594
  def __str__(self):
595
595
  return f"{self.name} - {self.snapshot_id}"
@@ -647,7 +647,7 @@ class IPFabricSync(IPFabricClient, JobsMixin, TagsMixin, ChangeLoggedModel):
647
647
 
648
648
  class Meta:
649
649
  ordering = ["pk"]
650
- verbose_name = "IP Fabric Sync"
650
+ verbose_name = _("IP Fabric Sync")
651
651
 
652
652
  def __str__(self):
653
653
  return f"{self.name}"
@@ -928,8 +928,8 @@ class IPFabricIngestion(JobsMixin, models.Model):
928
928
 
929
929
  class Meta:
930
930
  ordering = ("pk",)
931
- verbose_name = "IP Fabric Ingestion"
932
- verbose_name_plural = "IP Fabric Ingestions"
931
+ verbose_name = _("IP Fabric Ingestion")
932
+ verbose_name_plural = _("IP Fabric Ingestions")
933
933
 
934
934
  def __str__(self):
935
935
  return self.name
@@ -1040,8 +1040,8 @@ class IPFabricIngestionIssue(models.Model):
1040
1040
 
1041
1041
  class Meta:
1042
1042
  ordering = ["timestamp"]
1043
- verbose_name = "IP Fabric Ingestion Issue"
1044
- verbose_name_plural = "IP Fabric Ingestion Issues"
1043
+ verbose_name = _("IP Fabric Ingestion Issue")
1044
+ verbose_name_plural = _("IP Fabric Ingestion Issues")
1045
1045
 
1046
1046
  def __str__(self):
1047
1047
  return f"[{self.timestamp}] {self.message}"
@@ -1,3 +1,4 @@
1
+ from django.utils.translation import gettext as _
1
2
  from netbox.plugins import PluginMenu
2
3
  from netbox.plugins import PluginMenuButton
3
4
  from netbox.plugins import PluginMenuItem
@@ -6,7 +7,7 @@ from netbox.plugins import PluginMenuItem
6
7
  sync_buttons = [
7
8
  PluginMenuButton(
8
9
  link="plugins:ipfabric_netbox:ipfabricsync_add",
9
- title="Add",
10
+ title=_("Add"),
10
11
  icon_class="mdi mdi-plus-thick",
11
12
  permissions=["ipfabric_netbox.add_ipfabricsync"],
12
13
  )
@@ -15,7 +16,7 @@ sync_buttons = [
15
16
  source_buttons = [
16
17
  PluginMenuButton(
17
18
  link="plugins:ipfabric_netbox:ipfabricsource_add",
18
- title="Add",
19
+ title=_("Add"),
19
20
  icon_class="mdi mdi-plus-thick",
20
21
  permissions=["ipfabric_netbox.add_ipfabricsource"],
21
22
  )
@@ -23,33 +24,33 @@ source_buttons = [
23
24
 
24
25
  source = PluginMenuItem(
25
26
  link="plugins:ipfabric_netbox:ipfabricsource_list",
26
- link_text="Sources",
27
+ link_text=_("Sources"),
27
28
  buttons=source_buttons,
28
29
  permissions=["ipfabric_netbox.view_ipfabricsource"],
29
30
  )
30
31
 
31
32
  snapshot = PluginMenuItem(
32
33
  link="plugins:ipfabric_netbox:ipfabricsnapshot_list",
33
- link_text="Snapshots",
34
+ link_text=_("Snapshots"),
34
35
  permissions=["ipfabric_netbox.view_ipfabricsnapshot"],
35
36
  )
36
37
 
37
38
 
38
39
  ingestion = PluginMenuItem(
39
40
  link="plugins:ipfabric_netbox:ipfabricsync_list",
40
- link_text="Syncs",
41
+ link_text=_("Syncs"),
41
42
  buttons=sync_buttons,
42
43
  permissions=["ipfabric_netbox.view_ipfabricsync"],
43
44
  )
44
45
 
45
46
  tmg = PluginMenuItem(
46
47
  link="plugins:ipfabric_netbox:ipfabrictransformmapgroup_list",
47
- link_text="Transform Map Groups",
48
+ link_text=_("Transform Map Groups"),
48
49
  permissions=["ipfabric_netbox.view_ipfabrictransformmapgroup"],
49
50
  buttons=[
50
51
  PluginMenuButton(
51
52
  link="plugins:ipfabric_netbox:ipfabrictransformmapgroup_add",
52
- title="Add",
53
+ title=_("Add"),
53
54
  icon_class="mdi mdi-plus-thick",
54
55
  permissions=["ipfabric_netbox.add_ipfabrictransformmapgroup"],
55
56
  )
@@ -58,12 +59,12 @@ tmg = PluginMenuItem(
58
59
 
59
60
  tm = PluginMenuItem(
60
61
  link="plugins:ipfabric_netbox:ipfabrictransformmap_list",
61
- link_text="Transform Maps",
62
+ link_text=_("Transform Maps"),
62
63
  permissions=["ipfabric_netbox.view_ipfabrictransformmap"],
63
64
  buttons=[
64
65
  PluginMenuButton(
65
66
  link="plugins:ipfabric_netbox:ipfabrictransformmap_add",
66
- title="Add",
67
+ title=_("Add"),
67
68
  icon_class="mdi mdi-plus-thick",
68
69
  permissions=["ipfabric_netbox.add_ipfabrictransformmap"],
69
70
  )
@@ -68,7 +68,7 @@ class IPFabricTransformMapGroupTable(NetBoxTable):
68
68
  maps_count = columns.LinkedCountColumn(
69
69
  viewname="plugins:ipfabric_netbox:ipfabrictransformmap_list",
70
70
  url_params={"group_id": "pk"},
71
- verbose_name="Transform Maps",
71
+ verbose_name=_("Transform Maps"),
72
72
  )
73
73
 
74
74
  class Meta(NetBoxTable.Meta):
@@ -90,9 +90,11 @@ class IPFabricTransformMapTable(NetBoxTable):
90
90
 
91
91
  class IPFabricIngestionTable(NetBoxTable):
92
92
  name = tables.Column(linkify=True)
93
- sync = tables.Column(verbose_name="IP Fabric Sync", linkify=True)
93
+ sync = tables.Column(verbose_name=_("IP Fabric Sync"), linkify=True)
94
94
  branch = tables.Column(linkify=True)
95
- changes = tables.Column(accessor="staged_changes", verbose_name="Number of Changes")
95
+ changes = tables.Column(
96
+ accessor="staged_changes", verbose_name=_("Number of Changes")
97
+ )
96
98
  actions = columns.ActionsColumn(actions=("delete",))
97
99
 
98
100
  class Meta(NetBoxTable.Meta):
@@ -126,7 +128,7 @@ class IPFabricSnapshotTable(NetBoxTable):
126
128
  class IPFabricSourceTable(NetBoxTable):
127
129
  name = tables.Column(linkify=True)
128
130
  status = columns.ChoiceFieldColumn()
129
- snapshot_count = tables.Column(verbose_name="Snapshots")
131
+ snapshot_count = tables.Column(verbose_name=_("Snapshots"))
130
132
  tags = columns.TagColumn(url_name="core:datasource_list")
131
133
 
132
134
  class Meta(NetBoxTable.Meta):
@@ -148,13 +150,13 @@ class IPFabricSyncTable(NetBoxTable):
148
150
  name = tables.Column(linkify=True)
149
151
  status = columns.ChoiceFieldColumn()
150
152
  snapshot_name = tables.Column(
151
- verbose_name="Snapshot Name",
153
+ verbose_name=_("Snapshot Name"),
152
154
  accessor="snapshot_data",
153
155
  linkify=True,
154
156
  )
155
157
  last_ingestion = tables.Column(
156
158
  accessor="last_ingestion",
157
- verbose_name="Last Ingestion",
159
+ verbose_name=_("Last Ingestion"),
158
160
  linkify=True,
159
161
  )
160
162
 
@@ -186,9 +188,9 @@ class IPFabricIngestionChangesTable(NetBoxTable):
186
188
  id = tables.Column(verbose_name=_("ID"))
187
189
  pk = None
188
190
  object_type = tables.Column(
189
- accessor="object_type.model", verbose_name="Object Type"
191
+ accessor="object_type.model", verbose_name=_("Object Type")
190
192
  )
191
- object = tables.Column(verbose_name="Object")
193
+ object = tables.Column(verbose_name=_("Object"))
192
194
  actions = columns.TemplateColumn(template_code=DIFF_BUTTON)
193
195
 
194
196
  def render_object(self, value, record):
@@ -225,8 +227,8 @@ class IPFabricIngestionChangesTable(NetBoxTable):
225
227
 
226
228
  class IPFabricIngestionIssuesTable(NetBoxTable):
227
229
  id = tables.Column(verbose_name=_("ID"))
228
- exception = tables.Column(verbose_name="Exception Type")
229
- message = tables.Column(verbose_name="Error Message")
230
+ exception = tables.Column(verbose_name=_("Exception Type"))
231
+ message = tables.Column(verbose_name=_("Error Message"))
230
232
  actions = None
231
233
 
232
234
  class Meta(NetBoxTable.Meta):
@@ -1,13 +1,16 @@
1
1
  {% load form_helpers %}
2
+ {% load i18n %}
2
3
 
3
4
  <form action="{{ form_url }}" method="post">
4
5
  {% csrf_token %}
5
6
 
6
7
  <div class="modal-header">
7
- <h5 class="modal-title">Confirm Clone</h5>
8
+ <h5 class="modal-title">{% trans "Confirm Clone" %}</h5>
8
9
  </div>
9
10
  <div class="modal-body">
11
+ {% blocktrans trimmed with count=selected_objects|length %}
10
12
  <p>Are you sure you want to <strong class="text-danger">clone</strong> {{ object_type }} <strong>{{ object }}</strong>?</p>
13
+ {% endblocktrans %}
11
14
  {% if form.non_field_errors %}
12
15
  <div class="form-text text-danger">
13
16
  {{ form.non_field_errors }}
@@ -17,11 +20,11 @@
17
20
  </div>
18
21
  <div class="modal-footer">
19
22
  {% if return_url %}
20
- <a href="{{ return_url }}" class="btn btn-outline-secondary">Cancel</a>
23
+ <a href="{{ return_url }}" class="btn btn-outline-secondary">{% trans "Cancel" %}</a>
21
24
  {% else %}
22
- <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
25
+ <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">{% trans "Cancel" %}</button>
23
26
  {% endif %}
24
- <button hx-post="{% url 'plugins:ipfabric_netbox:ipfabrictransformmap_clone' pk=pk %}" hx-target="#htmx-modal-content" type="submit" class="btn btn-danger">Clone</button>
27
+ <button hx-post="{% url 'plugins:ipfabric_netbox:ipfabrictransformmap_clone' pk=pk %}" hx-target="#htmx-modal-content" type="submit" class="btn btn-danger">{% trans "Clone" %}</button>
25
28
  </div>
26
29
  </div>
27
30
  </form>
@@ -1,13 +1,15 @@
1
+ {% load i18n %}
1
2
  <div class="modal-content" id="htmx-modal-content">
2
3
  <div class="modal-header">
3
- <h5 class="modal-title">Change Diff {{ change }}</h5>
4
+ <h5 class="modal-title">
5
+ {% blocktrans %}Change Diff {{ change }}{% endblocktrans %}</h5>
4
6
  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
5
7
  </div>
6
8
  <div class="modal-body">
7
9
  <div class="row mb-3">
8
10
  <div class="col-6">
9
11
  <div class="card">
10
- <h5 class="card-header">Pre-Change Data</h5>
12
+ <h5 class="card-header">%{ trans "Pre-Change Data" %}</h5>
11
13
  <div class="card-body">
12
14
  {% if prechange_data %}
13
15
  <pre class="change-data">{% for k, v in prechange_data.items %}{% spaceless %}
@@ -15,14 +17,14 @@
15
17
  {% endspaceless %}{% endfor %}
16
18
  </pre>
17
19
  {% else %}
18
- <span class="text-muted">None</span>
20
+ <span class="text-muted">%{ trans "None" %}</span>
19
21
  {% endif %}
20
22
  </div>
21
23
  </div>
22
24
  </div>
23
25
  <div class="col-6">
24
26
  <div class="card">
25
- <h5 class="card-header">Post-Change Data</h5>
27
+ <h5 class="card-header">%{ trans "Post-Change Data" %}</h5>
26
28
  <div class="card-body">
27
29
  {% if postchange_data %}
28
30
  <pre class="change-data">{% for k, v in postchange_data.items %}{% spaceless %}
@@ -36,7 +38,7 @@
36
38
  <div class="col">
37
39
  <div class="card">
38
40
  <div class="card-header">
39
- <h5 class="d-inline">Difference</h5>
41
+ <h5 class="d-inline">%{ trans "Difference" %}</h5>
40
42
  <!-- <div class="btn-group btn-group-sm float-end noprint">
41
43
  <a {% if prev_change %}href="{% url 'extras:objectchange' pk=prev_change.pk %}"{% else %}disabled{% endif %} class="btn btn-outline-secondary">
42
44
  <i class="mdi mdi-chevron-left" aria-hidden="true"></i> Previous
@@ -50,11 +52,11 @@
50
52
  {% if diff_added == diff_removed %}
51
53
  <span class="text-muted" style="margin-left: 10px;">
52
54
  {% if object.action == 'create' %}
53
- Object Created
55
+ %{ trans "Object Created" %}
54
56
  {% elif object.action == 'delete' %}
55
- Object Deleted
57
+ %{ trans "Object Deleted" %}
56
58
  {% else %}
57
- No Changes
59
+ %{ trans "No Changes" %}
58
60
  {% endif %}
59
61
  </span>
60
62
  {% else %}
@@ -1,12 +1,14 @@
1
+ {% load i18n %}
2
+
1
3
  <div class="modal-header">
2
- <h5 class="modal-title">Raw Data {{ object.pk }}</h5>
4
+ <h5 class="modal-title">{% blocktrans %}Raw Data {{ object.pk }}{% endblocktrans %}</h5>
3
5
  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
4
6
  </div>
5
7
  <div class="modal-body">
6
8
  <div class="row mb-3">
7
9
  <div class="col-12">
8
10
  <div class="card">
9
- <h5 class="card-header">JSON Output</h5>
11
+ <h5 class="card-header">{% trans "JSON Output" %}</h5>
10
12
  <div class="card-body">
11
13
  <pre>{{ object.data | json }}</pre>
12
14
  </div>
@@ -0,0 +1,7 @@
1
+ {% load i18n %}
2
+ {# Indicates that a job result is still pending; used for HTMX requests #}
3
+ <div class="spinner-border float-start me-1" id="spinner" role="status">
4
+ <span class="visually-hidden">{% trans "Loading..." %}</span>
5
+ </div>
6
+ <h3>{% trans "Logs pending..." %}</h3>
7
+ <small class="text-muted">{% trans "Last updated" %} {% now "H:i:s" %}</small>
@@ -1,22 +1,24 @@
1
1
  {% load form_helpers %}
2
-
2
+ {% load i18n %}
3
3
  <form action="{{ form_url }}" method="post">
4
4
  {% csrf_token %}
5
5
 
6
6
  <div class="modal-header">
7
- <h5 class="modal-title">Confirm Merge</h5>
7
+ <h5 class="modal-title">{% trans "Confirm Merge" %}</h5>
8
8
  </div>
9
9
  <div class="modal-body">
10
+ {% blocktrans %}
10
11
  <p>Are you sure you want to <strong class="text-danger">merge</strong> {{ object_type }} <strong>{{ object }}</strong>?</p>
12
+ {% endblocktrans %}
11
13
  {% render_form form %}
12
14
  </div>
13
15
  <div class="modal-footer">
14
16
  {% if return_url %}
15
- <a href="{{ return_url }}" class="btn btn-outline-secondary">Cancel</a>
17
+ <a href="{{ return_url }}" class="btn btn-outline-secondary">{% trans "Cancel" %}</a>
16
18
  {% else %}
17
- <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
19
+ <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">{% trans "Cancel" %}</button>
18
20
  {% endif %}
19
- <button type="submit" class="btn btn-danger">Merge</button>
21
+ <button type="submit" class="btn btn-danger">{% trans "Merge" %}</button>
20
22
  </div>
21
23
  </div>
22
24
  </form>
@@ -1,8 +1,10 @@
1
+ {% load i18n %}
2
+
1
3
  <div class="btn-group" role="group" aria-label="Button group with nested dropdown">
2
4
  <div class="btn-group" role="group">
3
5
  <button id="btnGroupDrop1" type="button" class="btn btn-sm btn-success dropdown-toggle" data-bs-toggle="dropdown"
4
6
  aria-expanded="false">
5
- IP Fabric Topology
7
+ {% trans "IP Fabric Topology" %}
6
8
  </button>
7
9
  <ul class="dropdown-menu" aria-labelledby="btnGroupDrop1">
8
10
  {% if source is not None %}
@@ -10,19 +12,19 @@
10
12
  hx-get="{% url 'plugins:ipfabric_netbox:ipfabricsource_topology' pk=source.pk site=object.pk %}?snapshot=$last&source={{ source.id }}"
11
13
  hx-target="#topology-modal-content" data-bs-toggle="modal" data-bs-target="#topology-modal"
12
14
  class="dropdown-item">
13
- Last Snapshot
15
+ {% trans "Last Snapshot" %}
14
16
  </a>
15
17
  </li>
16
18
  <li><a href="#"
17
19
  hx-get="{% url 'plugins:ipfabric_netbox:ipfabricsource_topology' pk=source.pk site=object.pk %}?snapshot=$prev&source={{ source.id }}"
18
20
  hx-target="#topology-modal-content" data-bs-toggle="modal" data-bs-target="#topology-modal"
19
21
  class="dropdown-item">
20
- Previous Snapshot
22
+ {% trans "Previous Snapshot" %}
21
23
  </a>
22
24
  </li>
23
25
  {% else %}
24
26
  <li>
25
- <span class="dropdown-item text-danger">No IP Fabric Source Found for this Site</span>
27
+ <span class="dropdown-item text-danger">{% trans "No IP Fabric Source Found for this Site" %}</span>
26
28
  </li>
27
29
  {% endif %}
28
30
  </ul>
@@ -33,13 +35,13 @@
33
35
  <div class="modal-dialog modal-xl">
34
36
  <div class="modal-content">
35
37
  <div class="modal-header">
36
- <h5 class="modal-title">{{ object.name }} Topology</h5>
38
+ <h5 class="modal-title">{{ object.name }} {% trans "Topology" %}</h5>
37
39
  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
38
40
  </div>
39
41
  <div id="topology-modal-content">
40
42
  <div class="modal-body">
41
43
  <div class="d-flex align-items-center">
42
- <strong role="status">Loading...</strong>
44
+ <strong role="status">{% trans "Loading..." %}</strong>
43
45
  <div class="spinner-border ms-auto" aria-hidden="true"></div>
44
46
  </div>
45
47
  </div>