Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
r"/-/metadata(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "versions.json", self.versions),
r"/-/versions(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "plugins.json", self.plugins),
r"/-/plugins(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "config.json", lambda: self._config),
r"/-/config(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "threads.json", self.threads),
r"/-/threads(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "databases.json", self.connected_databases),
r"/-/databases(?P(\.json)?)$",
)
add_route(
DatabaseDownload.as_asgi(self), r"/(?P[^/]+?)(?P\.db)$"
)
add_route(
DatabaseView.as_asgi(self),
r"/(?P[^/]+?)(?P"
+ renderer_regex
+ r"|.jsono|\.csv)?$",
)
add_route(
add_route(
asgi_static(plugin["static_path"]),
"/-/static-plugins/{}/(?P
# Mount any plugin static/ directories
for plugin in get_plugins(pm):
if plugin["static_path"]:
add_route(
asgi_static(plugin["static_path"]),
"/-/static-plugins/{}/(?P
r"/-/versions(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "plugins.json", self.plugins),
r"/-/plugins(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "config.json", lambda: self._config),
r"/-/config(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "threads.json", self.threads),
r"/-/threads(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "databases.json", self.connected_databases),
r"/-/databases(?P(\.json)?)$",
)
add_route(
DatabaseDownload.as_asgi(self), r"/(?P[^/]+?)(?P\.db)$"
)
add_route(
DatabaseView.as_asgi(self),
r"/(?P[^/]+?)(?P"
+ renderer_regex
+ r"|.jsono|\.csv)?$",
)
add_route(
TableView.as_asgi(self),
r"/(?P[^/]+)/(?P[^/]+?$)",
)
add_route(
asgi_static(plugin["static_path"]),
"/-/static-plugins/{}/(?P
),
)
add_route(
JsonDataView.as_asgi(self, "metadata.json", lambda: self._metadata),
r"/-/metadata(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "versions.json", self.versions),
r"/-/versions(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "plugins.json", self.plugins),
r"/-/plugins(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "config.json", lambda: self._config),
r"/-/config(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "threads.json", self.threads),
r"/-/threads(?P(\.json)?)$",
)
add_route(
JsonDataView.as_asgi(self, "databases.json", self.connected_databases),
r"/-/databases(?P(\.json)?)$",
)
add_route(
DatabaseDownload.as_asgi(self), r"/(?P[^/]+?)(?P\.db)$"
)
add_route(
DatabaseView.as_asgi(self),
r"/(?P[^/]+?)(?P"