chore: remove insights from experimental (#8868)

This commit is contained in:
Bruno Quaresma
2023-08-02 20:24:00 +00:00
committed by GitHub
parent f7327dd2c6
commit b6018198b7
6 changed files with 1 additions and 18 deletions
-2
View File
@@ -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 (