Home / Function/ inferProjectStatus() — supabase Function Reference

inferProjectStatus() — supabase Function Reference

Architecture documentation for the inferProjectStatus() function in ProjectCard.utils.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  c06df2be_a9ab_f6a3_7afa_b703f6c5ddb4["inferProjectStatus()"]
  1dcac9a8_5747_aea7_0621_578e314b0d7d["ProjectCard()"]
  1dcac9a8_5747_aea7_0621_578e314b0d7d -->|calls| c06df2be_a9ab_f6a3_7afa_b703f6c5ddb4
  a0cda87d_30b8_0b82_cec8_f596e3a74702["ProjectTableRow()"]
  a0cda87d_30b8_0b82_cec8_f596e3a74702 -->|calls| c06df2be_a9ab_f6a3_7afa_b703f6c5ddb4
  style c06df2be_a9ab_f6a3_7afa_b703f6c5ddb4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/Home/ProjectList/ProjectCard.utils.ts lines 3–40

export const inferProjectStatus = (projectStatus: string) => {
  let status = undefined
  switch (projectStatus) {
    case PROJECT_STATUS.ACTIVE_HEALTHY:
      status = 'isHealthy'
      break
    case PROJECT_STATUS.GOING_DOWN:
    case PROJECT_STATUS.PAUSING:
      status = 'isPausing'
      break
    case PROJECT_STATUS.INACTIVE:
      status = 'isPaused'
      break
    case PROJECT_STATUS.PAUSE_FAILED:
      status = 'isPauseFailed'
      break
    case PROJECT_STATUS.RESTARTING:
      status = 'isRestarting'
      break
    case PROJECT_STATUS.RESIZING:
      status = 'isResizing'
      break
    case PROJECT_STATUS.RESTORING:
      status = 'isRestoring'
      break
    case PROJECT_STATUS.RESTORE_FAILED:
      status = 'isRestoreFailed'
      break
    case PROJECT_STATUS.UPGRADING:
      status = 'isUpgrading'
      break
    case PROJECT_STATUS.UNKNOWN:
    case PROJECT_STATUS.COMING_UP:
      status = 'isComingUp'
      break
  }
  return status as InferredProjectStatus
}

Subdomains

Frequently Asked Questions

What does inferProjectStatus() do?
inferProjectStatus() is a function in the supabase codebase.
What calls inferProjectStatus()?
inferProjectStatus() is called by 2 function(s): ProjectCard, ProjectTableRow.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free