netbox-vcloud 0.2.4__tar.gz → 0.2.5__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.
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/PKG-INFO +1 -1
- netbox_vcloud-0.2.5/netbox_vcloud/template_content.py +26 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud.egg-info/PKG-INFO +1 -1
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/pyproject.toml +1 -1
- netbox_vcloud-0.2.4/netbox_vcloud/template_content.py +0 -22
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/MANIFEST.in +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/README.md +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/__init__.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/admin.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/api/serializers.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/api/urls.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/api/views.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/forms.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/jobs/__init__.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/jobs/cloudsync.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/migrations/0001_initial.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/migrations/0002_cloudsyncconfig_next_sync.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/migrations/0003_cloudsyncconfig_netbox_cluster_and_more.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/migrations/__init__.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/models.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/navigation.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/sync.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/sync_utils.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/tables.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/templates/netbox_vcloud/cloudsyncconfig.html +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/templates/netbox_vcloud/cloudsyncconfig_list.html +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/templatetags/__init__.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/templatetags/boolean_icon.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/urls.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud/views.py +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud.egg-info/SOURCES.txt +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud.egg-info/dependency_links.txt +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud.egg-info/requires.txt +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/netbox_vcloud.egg-info/top_level.txt +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/setup.cfg +0 -0
- {netbox_vcloud-0.2.4 → netbox_vcloud-0.2.5}/test/test_sync_utils.py +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from netbox.plugins import PluginTemplateExtension
|
|
2
|
+
from django.urls import reverse
|
|
3
|
+
from django.utils.html import format_html
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CloudSyncConfigButtons(PluginTemplateExtension):
|
|
7
|
+
model = "netbox_vcloud.cloudsyncconfig"
|
|
8
|
+
|
|
9
|
+
def buttons(self):
|
|
10
|
+
obj = self.context.get("object")
|
|
11
|
+
if (
|
|
12
|
+
not obj
|
|
13
|
+
or obj._meta.label_lower != "netbox_vcloud.cloudsyncconfig"
|
|
14
|
+
or not getattr(obj, "pk", None)
|
|
15
|
+
):
|
|
16
|
+
return ""
|
|
17
|
+
|
|
18
|
+
url = reverse("plugins:netbox_vcloud:run_sync_now", kwargs={"pk": obj.pk})
|
|
19
|
+
return format_html(
|
|
20
|
+
'<a href="{}" class="btn btn-sm btn-primary">'
|
|
21
|
+
'<i class="mdi mdi-sync"></i> Run Sync Now</a>',
|
|
22
|
+
url,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
template_extensions = [CloudSyncConfigButtons]
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
from netbox.plugins import PluginTemplateExtension
|
|
2
|
-
from django.urls import reverse
|
|
3
|
-
from django.utils.html import format_html
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class CloudSyncConfigButtons(PluginTemplateExtension):
|
|
7
|
-
model = 'netbox_vcloud.cloudsyncconfig'
|
|
8
|
-
|
|
9
|
-
def buttons(self):
|
|
10
|
-
obj = self.context.get('object')
|
|
11
|
-
if not obj or obj._meta.label_lower != 'netbox_vcloud.cloudsyncconfig':
|
|
12
|
-
return ""
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
url = reverse('plugins:netbox_vcloud:run_sync_now', args=[obj.pk])
|
|
16
|
-
return format_html(
|
|
17
|
-
f'<a href="{url}" class="btn btn-sm btn-primary">'
|
|
18
|
-
f'<i class="mdi mdi-sync"></i> Run Sync Now</a>'
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
template_extensions = [CloudSyncConfigButtons]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|