{
- type: "default",
- title: "Your org’s projects are hibernating.",
- description: "",
- iconType: "sleep",
- cta: {
- type: "wake-projects",
- text: "Wake projects",
- },
- },
- };
- }
-
return {
isFetching: false,
isLoading: false,
diff --git a/web-admin/src/features/organizations/selectors.ts b/web-admin/src/features/organizations/selectors.ts
index fd552749ad9..757ed9adbd4 100644
--- a/web-admin/src/features/organizations/selectors.ts
+++ b/web-admin/src/features/organizations/selectors.ts
@@ -4,26 +4,7 @@ import {
type V1GetOrganizationResponse,
type V1Organization,
} from "@rilldata/web-admin/client";
-import { listProjectsForOrgQueryOptions } from "@rilldata/web-admin/features/projects/list-projects-query-options";
-import { queryClient } from "@rilldata/web-common/lib/svelte-query/globalQueryClient";
import type { FetchQueryOptions } from "@tanstack/query-core";
-import { createQuery } from "@tanstack/svelte-query";
-
-export function areAllProjectsHibernating(organization: string) {
- return createQuery({
- ...listProjectsForOrgQueryOptions(organization),
- select: (data) =>
- data.projects?.length &&
- data.projects.every((p) => !p.primaryDeploymentId),
- });
-}
-
-export async function fetchAllProjectsHibernating(organization: string) {
- const projectsResp = await queryClient.fetchQuery(
- listProjectsForOrgQueryOptions(organization),
- );
- return projectsResp.projects?.every((p) => !p.primaryDeploymentId) ?? false;
-}
function normalizeOrganization(
organization: string | V1Organization | undefined,
diff --git a/web-admin/src/routes/[organization]/+page.svelte b/web-admin/src/routes/[organization]/+page.svelte
index f3084a86e71..d7756a6b97f 100644
--- a/web-admin/src/routes/[organization]/+page.svelte
+++ b/web-admin/src/routes/[organization]/+page.svelte
@@ -1,8 +1,6 @@
@@ -49,11 +44,6 @@
{/if}
- {:else if $allProjectsHibernating.data}
-
{:else}
diff --git a/web-admin/src/routes/[organization]/[project]/+layout.ts b/web-admin/src/routes/[organization]/[project]/+layout.ts
index c53d813c0be..538b1baa8fc 100644
--- a/web-admin/src/routes/[organization]/[project]/+layout.ts
+++ b/web-admin/src/routes/[organization]/[project]/+layout.ts
@@ -1,11 +1,7 @@
-import { type RpcStatus } from "@rilldata/web-admin/client";
-import { hasBlockerIssues } from "@rilldata/web-admin/features/billing/selectors";
import { extractBranchFromPath } from "@rilldata/web-admin/features/branches/branch-utils.ts";
import { maybeRedirectToEditableDeployment } from "@rilldata/web-admin/features/branches/deployment-utils.ts";
import { isEditPage } from "@rilldata/web-admin/features/navigation/nav-utils.ts";
-import { fetchAllProjectsHibernating } from "@rilldata/web-admin/features/organizations/selectors";
-import { error, redirect } from "@sveltejs/kit";
-import { isAxiosError } from "axios";
+import { error } from "@sveltejs/kit";
export const load = async ({
params: { organization, project },
@@ -13,26 +9,10 @@ export const load = async ({
route,
url,
}) => {
- const { organizationPermissions, issues } = await parent();
+ const { organizationPermissions } = await parent();
if (!organizationPermissions.manageOrg) return;
- let projectHibernating = false;
- try {
- projectHibernating = await fetchAllProjectsHibernating(organization);
- } catch (e) {
- if (!isAxiosError(e) || !e.response) {
- throw error(500, "Error fetching projects for the organization");
- }
-
- throw error(e.response.status, e.response.data.message);
- }
-
- // if all projects were hibernated due to a blocker issue on org then take the user to projects page
- if (hasBlockerIssues(issues) && projectHibernating) {
- throw redirect(307, `/${organization}`);
- }
-
// Edit pages handle their own branch routing; everything below is non-edit only.
if (isEditPage({ route })) return;