generated from coulomb/repo-seed
Start graph explorer contract
This commit is contained in:
@@ -9,6 +9,7 @@ from pathlib import Path
|
||||
from typing import Any
|
||||
from urllib.parse import parse_qs, urlparse
|
||||
|
||||
from .graph_explorer import fabric_graph_explorer_manifest, fabric_graph_explorer_payload
|
||||
from .registry import (
|
||||
RegistryError,
|
||||
RegistryStore,
|
||||
@@ -79,6 +80,14 @@ class RegistryHandler(BaseHTTPRequestHandler):
|
||||
return HTTPStatus.OK, backstage_projection(self.store.combined_graph())
|
||||
if parts == ["exports", "xregistry"]:
|
||||
return HTTPStatus.OK, xregistry_projection(self.store.combined_graph())
|
||||
if parts == ["exports", "graph-explorer"]:
|
||||
return HTTPStatus.OK, fabric_graph_explorer_payload(
|
||||
self.store.combined_graph(),
|
||||
self.store.list_repositories(),
|
||||
{str(snapshot["repo_slug"]) for snapshot in self.store.latest_snapshots()},
|
||||
)
|
||||
if parts == ["exports", "graph-explorer", "manifest"]:
|
||||
return HTTPStatus.OK, fabric_graph_explorer_manifest()
|
||||
if parts == ["artifacts"]:
|
||||
return HTTPStatus.OK, self.store.list_artifacts(
|
||||
repo_slug=_query_optional(query, "repo_slug"),
|
||||
|
||||
Reference in New Issue
Block a user