a9 commited on
Commit
9793e68
·
verified ·
1 Parent(s): 348af6d

Upload 26 files

Browse files
frontend/src/components/RepoCard.tsx CHANGED
@@ -27,6 +27,9 @@ export default function RepoCard({ repo }) {
27
  <h2>{repo.namespace}/{repo.repo}</h2>
28
  <button onClick={() => deleteRepo(repo.id)}>❌</button>
29
  </div>
 
 
 
30
 
31
  {statusQuery.data && (
32
  <StatusBadge
 
27
  <h2>{repo.namespace}/{repo.repo}</h2>
28
  <button onClick={() => deleteRepo(repo.id)}>❌</button>
29
  </div>
30
+
31
+ if (metricsQuery.isLoading) return <p>Loading...</p>;
32
+ if (metricsQuery.isError) return <p>Error loading metrics</p>;
33
 
34
  {statusQuery.data && (
35
  <StatusBadge
frontend/src/components/StatusBadge.tsx CHANGED
@@ -8,7 +8,7 @@ export default function StatusBadge({ state, stage }) {
8
 
9
  return (
10
  <div className={`px-3 py-1 rounded ${color}`}>
11
- {stage}
12
- </div>
13
  );
14
  }
 
8
 
9
  return (
10
  <div className={`px-3 py-1 rounded ${color}`}>
11
+ {state} • {stage}
12
+ </div>
13
  );
14
  }
services/connection_registry.py CHANGED
@@ -10,11 +10,7 @@ class ConnectionRegistry:
10
  if repo.id in self.connections: return
11
  conn = RepoConnection(repo.id, repo.namespace, repo.repo)
12
  self.connections[repo.id] = conn
13
- try:
14
- loop = asyncio.get_running_loop()
15
- conn.start()
16
- except RuntimeError:
17
- pass
18
 
19
  def unregister(self, repo_id: str):
20
  if conn := self.connections.pop(repo_id, None):
 
10
  if repo.id in self.connections: return
11
  conn = RepoConnection(repo.id, repo.namespace, repo.repo)
12
  self.connections[repo.id] = conn
13
+ asyncio.create_task(conn._listen_events())
 
 
 
 
14
 
15
  def unregister(self, repo_id: str):
16
  if conn := self.connections.pop(repo_id, None):