• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / codegate-ui / 12828464111

17 Jan 2025 11:48AM UTC coverage: 65.711% (+0.8%) from 64.918%
12828464111

Pull #94

github

web-flow
Merge de9616a3a into d873272ed
Pull Request #94: feat: initial work on codegate version check widget

223 of 416 branches covered (53.61%)

Branch coverage included in aggregate %.

42 of 48 new or added lines in 9 files covered. (87.5%)

442 of 596 relevant lines covered (74.16%)

27.08 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.82
/src/features/dashboard-codegate-status/lib/get-codegate-health.ts
1
export enum HealthStatus {
3✔
2
  HEALTHY = "Healthy",
3
  UNHEALTHY = "Unhealthy",
4
}
5

6
type HealthResponse = { status: "healthy" | unknown } | null;
7

8
export const getCodeGateHealth = async (): Promise<HealthStatus | null> => {
3✔
9
  const resp = await fetch(
14✔
10
    new URL("/health", import.meta.env.VITE_BASE_API_URL),
11
  );
12
  const data = (await resp.json()) as unknown as HealthResponse;
13✔
13

14
  if (data?.status === "healthy") return HealthStatus.HEALTHY;
13✔
15
  if (data?.status !== "healthy") return HealthStatus.UNHEALTHY;
12!
16

NEW
17
  return null;
×
18
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc