Skip to content

refactor(site): remove template parameters insights out of experimental #9126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove conditionals from the FE
  • Loading branch information
BrunoQuaresma committed Aug 16, 2023
commit de91a521f6384f30f89583a90b38cf9b452d25c5
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const meta: Meta<typeof GeneralSettingsPageView> = {
"workspace_actions",
"single_tailnet",
"deployment_health_page",
"template_parameters_insights",
],
flag_shorthand: "",
hidden: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { subDays, isToday } from "date-fns"
import "react-date-range/dist/styles.css"
import "react-date-range/dist/theme/default.css"
import { DateRange, DateRangeValue } from "./DateRange"
import { useDashboard } from "components/Dashboard/DashboardProvider"
import OpenInNewOutlined from "@mui/icons-material/OpenInNewOutlined"
import Link from "@mui/material/Link"
import CheckCircleOutlined from "@mui/icons-material/CheckCircleOutlined"
Expand Down Expand Up @@ -61,10 +60,6 @@ export default function TemplateInsightsPage() {
queryKey: ["templates", template.id, "user-latency", insightsFilter],
queryFn: () => getInsightsUserLatency(insightsFilter),
})
const dashboard = useDashboard()
const shouldDisplayParameters =
dashboard.experiments.includes("template_parameters_insights") ||
process.env.NODE_ENV === "development"

return (
<>
Expand All @@ -77,7 +72,6 @@ export default function TemplateInsightsPage() {
}
templateInsights={templateInsights}
userLatency={userLatency}
shouldDisplayParameters={shouldDisplayParameters}
/>
</>
)
Expand All @@ -86,12 +80,10 @@ export default function TemplateInsightsPage() {
export const TemplateInsightsPageView = ({
templateInsights,
userLatency,
shouldDisplayParameters,
dateRange,
}: {
templateInsights: TemplateInsightsResponse | undefined
userLatency: UserLatencyInsightsResponse | undefined
shouldDisplayParameters: boolean
dateRange: ReactNode
}) => {
return (
Expand All @@ -114,12 +106,10 @@ export const TemplateInsightsPageView = ({
sx={{ gridColumn: "span 3" }}
data={templateInsights?.report.apps_usage}
/>
{shouldDisplayParameters && (
<TemplateParametersUsagePanel
sx={{ gridColumn: "span 3" }}
data={templateInsights?.report.parameters_usage}
/>
)}
<TemplateParametersUsagePanel
sx={{ gridColumn: "span 3" }}
data={templateInsights?.report.parameters_usage}
/>
</Box>
</>
)
Expand Down