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
@@ -8024,7 +8024,6 @@ const docTemplate = `{
|
||||
"tailnet_pg_coordinator",
|
||||
"single_tailnet",
|
||||
"template_restart_requirement",
|
||||
"template_insights_page",
|
||||
"deployment_health_page"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
@@ -8033,7 +8032,6 @@ const docTemplate = `{
|
||||
"ExperimentTailnetPGCoordinator",
|
||||
"ExperimentSingleTailnet",
|
||||
"ExperimentTemplateRestartRequirement",
|
||||
"ExperimentTemplateInsightsPage",
|
||||
"ExperimentDeploymentHealthPage"
|
||||
]
|
||||
},
|
||||
|
||||
Generated
-2
@@ -7185,7 +7185,6 @@
|
||||
"tailnet_pg_coordinator",
|
||||
"single_tailnet",
|
||||
"template_restart_requirement",
|
||||
"template_insights_page",
|
||||
"deployment_health_page"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
@@ -7194,7 +7193,6 @@
|
||||
"ExperimentTailnetPGCoordinator",
|
||||
"ExperimentSingleTailnet",
|
||||
"ExperimentTemplateRestartRequirement",
|
||||
"ExperimentTemplateInsightsPage",
|
||||
"ExperimentDeploymentHealthPage"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1868,9 +1868,6 @@ const (
|
||||
// quiet hours instead of max_ttl.
|
||||
ExperimentTemplateRestartRequirement Experiment = "template_restart_requirement"
|
||||
|
||||
// Insights page
|
||||
ExperimentTemplateInsightsPage Experiment = "template_insights_page"
|
||||
|
||||
// Deployment health page
|
||||
ExperimentDeploymentHealthPage Experiment = "deployment_health_page"
|
||||
|
||||
@@ -1883,7 +1880,6 @@ const (
|
||||
// Experiments that are not ready for consumption by all users should
|
||||
// not be included here and will be essentially hidden.
|
||||
var ExperimentsAll = Experiments{
|
||||
ExperimentTemplateInsightsPage,
|
||||
ExperimentDeploymentHealthPage,
|
||||
}
|
||||
|
||||
|
||||
Generated
-1
@@ -2676,7 +2676,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
| `tailnet_pg_coordinator` |
|
||||
| `single_tailnet` |
|
||||
| `template_restart_requirement` |
|
||||
| `template_insights_page` |
|
||||
| `deployment_health_page` |
|
||||
|
||||
## codersdk.Feature
|
||||
|
||||
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