def planner_page( cluster: str, environment: str, topology: str, request: Request, ) -> Response: """Render a HTML page to show information about a topology.""" execution_state = tracker.get_execution_state(cluster, environment, topology) scheduler_location = tracker.get_scheduler_location( cluster, environment, topology) # is the tracker really making links for the UI!? job_page_link = scheduler_location["job_page_link"] launched_at = datetime.utcfromtimestamp(execution_state["submission_time"]) launched_time = launched_at.isoformat(" ") + "Z" return templates.TemplateResponse( "topology.html", { "cluster": cluster, "environ": environment, "topology": topology, "execution_state": execution_state, "launched": launched_time, "status": "unknown", # supposed to be "running" or "errors", but not implemented "active": "topologies", "job_page_link": job_page_link, "baseUrl": base_url, "request": request, }, )
def scheduler_location_json(cluster: str, environment: str, topology: str) -> ApiEnvelope: """Unimplemented method which is currently a duplicate of execution state.""" return api_topology_json(lambda: tracker.get_execution_state( cluster, environment, topology, ))
def execution_state_json(cluster: str, environment: str, topology: str) -> ApiEnvelope: """Return the execution state object for a topology.""" return api_topology_json(lambda: tracker.get_execution_state( cluster, environment, topology, ))