mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: remove insights from experimental (#8868)
This commit is contained in:
Generated
-2
@@ -1567,7 +1567,6 @@ export type Experiment =
|
||||
| "moons"
|
||||
| "single_tailnet"
|
||||
| "tailnet_pg_coordinator"
|
||||
| "template_insights_page"
|
||||
| "template_restart_requirement"
|
||||
| "workspace_actions"
|
||||
export const Experiments: Experiment[] = [
|
||||
@@ -1575,7 +1574,6 @@ export const Experiments: Experiment[] = [
|
||||
"moons",
|
||||
"single_tailnet",
|
||||
"tailnet_pg_coordinator",
|
||||
"template_insights_page",
|
||||
"template_restart_requirement",
|
||||
"workspace_actions",
|
||||
]
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
import { useQuery } from "@tanstack/react-query"
|
||||
import { AuthorizationRequest } from "api/typesGenerated"
|
||||
import { ErrorAlert } from "components/Alert/ErrorAlert"
|
||||
import { useDashboard } from "components/Dashboard/DashboardProvider"
|
||||
|
||||
const templatePermissions = (
|
||||
templateId: string,
|
||||
@@ -72,12 +71,7 @@ export const TemplateLayout: FC<{ children?: JSX.Element }> = ({
|
||||
queryKey: ["template", templateName],
|
||||
queryFn: () => fetchTemplate(orgId, templateName),
|
||||
})
|
||||
const dashboard = useDashboard()
|
||||
const hasInsightsEnabled =
|
||||
dashboard.experiments.includes("template_insights_page") ||
|
||||
process.env.NODE_ENV === "development"
|
||||
const shouldShowInsights =
|
||||
hasInsightsEnabled && data?.permissions?.canUpdateTemplate
|
||||
const shouldShowInsights = data?.permissions?.canUpdateTemplate
|
||||
|
||||
if (error) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user