netbox-sqlquery 0.1.4__tar.gz → 0.1.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_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/PKG-INFO +1 -1
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/__init__.py +21 -2
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery.egg-info/PKG-INFO +1 -1
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/pyproject.toml +1 -1
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/LICENSE +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/README.md +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/abstract_schema.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/access.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/api/__init__.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/api/serializers.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/api/urls.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/api/views.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/filtersets.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/forms.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/management/__init__.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/management/commands/__init__.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/management/commands/sqlquery_create_views.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/migrations/0001_initial.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/migrations/0002_query_permissions.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/migrations/__init__.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/models.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/navigation.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/preferences.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/query.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/schema.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/static/netbox_sqlquery/editor.js +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/static/netbox_sqlquery/icon.LICENSE +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/static/netbox_sqlquery/icon.svg +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/tables.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/templates/netbox_sqlquery/query.html +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/templates/netbox_sqlquery/saved_query.html +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/tests/__init__.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/tests/test_access.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/tests/test_api.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/tests/test_models.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/tests/test_views.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/urls.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/views.py +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery.egg-info/SOURCES.txt +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery.egg-info/dependency_links.txt +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery.egg-info/top_level.txt +0 -0
- {netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: netbox-sqlquery
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: SQL query interface for NetBox with syntax highlighting, abstract views, and role-based access control
|
|
5
5
|
Author-email: Ravi Pina <ravi@pina.org>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import logging
|
|
2
|
+
import sys
|
|
2
3
|
|
|
3
4
|
from netbox.plugins import PluginConfig
|
|
4
5
|
|
|
5
6
|
logger = logging.getLogger("netbox_sqlquery")
|
|
6
7
|
|
|
8
|
+
# Management commands that modify schema — creating views during these
|
|
9
|
+
# can block migrations when a view depends on a column being altered.
|
|
10
|
+
_SKIP_VIEWS_COMMANDS = {"migrate", "makemigrations"}
|
|
11
|
+
|
|
7
12
|
|
|
8
13
|
class NetBoxSQLQueryConfig(PluginConfig):
|
|
9
14
|
name = "netbox_sqlquery"
|
|
@@ -12,7 +17,7 @@ class NetBoxSQLQueryConfig(PluginConfig):
|
|
|
12
17
|
"SQL query interface for NetBox with syntax highlighting,"
|
|
13
18
|
" abstract views, and role-based access control"
|
|
14
19
|
)
|
|
15
|
-
version = "0.1.
|
|
20
|
+
version = "0.1.5"
|
|
16
21
|
author = "Ravi Pina"
|
|
17
22
|
author_email = "ravi@pina.org"
|
|
18
23
|
base_url = "sqlquery"
|
|
@@ -41,7 +46,21 @@ class NetBoxSQLQueryConfig(PluginConfig):
|
|
|
41
46
|
# Register navigation based on top_level_menu setting
|
|
42
47
|
self._register_navigation()
|
|
43
48
|
|
|
44
|
-
#
|
|
49
|
+
# Hook post_migrate so views are (re)created after schema changes.
|
|
50
|
+
from django.db.models.signals import post_migrate
|
|
51
|
+
|
|
52
|
+
post_migrate.connect(self._create_views, sender=self)
|
|
53
|
+
|
|
54
|
+
# For normal app startup (gunicorn/uvicorn), create views directly.
|
|
55
|
+
# Skip during management commands that modify schema — views that
|
|
56
|
+
# reference columns being altered will cause PostgreSQL to reject
|
|
57
|
+
# the migration with "cannot alter type of a column used by a view".
|
|
58
|
+
running_command = sys.argv[1] if len(sys.argv) > 1 else None
|
|
59
|
+
if running_command not in _SKIP_VIEWS_COMMANDS:
|
|
60
|
+
self._create_views(sender=self)
|
|
61
|
+
|
|
62
|
+
@staticmethod
|
|
63
|
+
def _create_views(sender, **kwargs):
|
|
45
64
|
try:
|
|
46
65
|
from .abstract_schema import ensure_views
|
|
47
66
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: netbox-sqlquery
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: SQL query interface for NetBox with syntax highlighting, abstract views, and role-based access control
|
|
5
5
|
Author-email: Ravi Pina <ravi@pina.org>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "netbox-sqlquery"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.5"
|
|
8
8
|
description = "SQL query interface for NetBox with syntax highlighting, abstract views, and role-based access control"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
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
|
{netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/management/commands/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/migrations/0002_query_permissions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/static/netbox_sqlquery/editor.js
RENAMED
|
File without changes
|
{netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/static/netbox_sqlquery/icon.LICENSE
RENAMED
|
File without changes
|
{netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/static/netbox_sqlquery/icon.svg
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery/templates/netbox_sqlquery/query.html
RENAMED
|
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
|
{netbox_sqlquery-0.1.4 → netbox_sqlquery-0.1.5}/netbox_sqlquery.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|